Skip to content

Instantly share code, notes, and snippets.

@wikimatze
Forked from nesquena/my_template.rb
Last active May 10, 2018 19:46
Show Gist options
  • Select an option

  • Save wikimatze/b6162d50612e7ccabf3ee806dbaa5767 to your computer and use it in GitHub Desktop.

Select an option

Save wikimatze/b6162d50612e7ccabf3ee806dbaa5767 to your computer and use it in GitHub Desktop.

Revisions

  1. wikimatze revised this gist May 10, 2018. 1 changed file with 12 additions and 14 deletions.
    26 changes: 12 additions & 14 deletions my_template.rb
    Original file line number Diff line number Diff line change
    @@ -1,20 +1,18 @@
    project :test => :shoulda, :orm => :activerecord
    generate :model, "account username:string password:string"
    generate :model, "post title:string body:text"
    generate :controller, "posts get:index get:new post:new"
    generate :migration, "AddEmailToAccount email:string"
    project :test => :rspec, :orm => :activerecord
    generate 'model', 'account username:string password:string'
    generate 'model', 'post title:string body:text'
    generate 'controller', 'posts get:index get:new post:new'
    generate 'controller', 'users get:index'
    generate 'migration', 'AddEmailToAccount email:string'
    require_dependencies 'nokogiri'

    git :init
    git :add, "."
    git :commit, "initial commit"
    git :commit, "-m 'initial commit'"

    inject_into_file "app/models/post.rb","#Hello", :after => "end\n"
    rake "ar:create ar:migrate"
    initializer :test, "# Example"
    inject_into_file 'app/models/post.rb','#Hello', :after => "end\n"
    rake 'ar:create ar:migrate'
    initializer :test, '# Example'

    app :testapp do
    generate :controller, "users get:index"
    end
    git :add, "."
    git :commit, "second commit"
    git :add, '.'
    git :commit, "- m 'second commit'"
  2. @nesquena nesquena revised this gist Apr 6, 2010. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions my_template.rb
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,5 @@
    project :test => :shoulda, :orm => :activerecord
    generate :model, "account username:string password:string"
    generate :model, "post title:string body:text"
    generate :controller, "posts get:index get:new post:new"
    generate :migration, "AddEmailToAccount email:string"
  3. @nesquena nesquena revised this gist Apr 5, 2010. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion my_template.rb
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    project :test => :shoulda, :orm => :activerecord
    generate :model, "post title:string body:text"
    generate :controller, "posts get:index get:new post:new"
    generate :migration, "AddEmailToUser email:string"
    generate :migration, "AddEmailToAccount email:string"
    require_dependencies 'nokogiri'

    git :init
  4. @nesquena nesquena created this gist Apr 5, 2010.
    19 changes: 19 additions & 0 deletions my_template.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    project :test => :shoulda, :orm => :activerecord
    generate :model, "post title:string body:text"
    generate :controller, "posts get:index get:new post:new"
    generate :migration, "AddEmailToUser email:string"
    require_dependencies 'nokogiri'

    git :init
    git :add, "."
    git :commit, "initial commit"

    inject_into_file "app/models/post.rb","#Hello", :after => "end\n"
    rake "ar:create ar:migrate"
    initializer :test, "# Example"

    app :testapp do
    generate :controller, "users get:index"
    end
    git :add, "."
    git :commit, "second commit"