rails_apps_composer 1.5.5 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. data/README.textile +185 -254
  2. data/lib/rails_wizard/command.rb +54 -13
  3. data/lib/rails_wizard/config.rb +1 -1
  4. data/lib/rails_wizard/diagnostics.rb +22 -0
  5. data/lib/rails_wizard/template.rb +36 -2
  6. data/lib/rails_wizard.rb +1 -0
  7. data/recipes/auth.rb +84 -0
  8. data/recipes/controllers.rb +58 -0
  9. data/recipes/{seed_database.rb → database.rb} +35 -22
  10. data/recipes/{action_mailer.rb → email.rb} +29 -50
  11. data/recipes/example.rb +70 -0
  12. data/recipes/extras.rb +91 -30
  13. data/recipes/frontend.rb +59 -0
  14. data/recipes/gems.rb +128 -0
  15. data/recipes/models.rb +61 -0
  16. data/recipes/prelaunch.rb +45 -0
  17. data/recipes/readme.rb +83 -0
  18. data/recipes/routes.rb +36 -0
  19. data/recipes/setup.rb +148 -0
  20. data/recipes/testing.rb +187 -0
  21. data/recipes/views.rb +39 -0
  22. data/spec/rails_wizard/template_spec.rb +4 -2
  23. data/templates/helpers.erb +53 -2
  24. data/templates/layout.erb +81 -20
  25. data/version.rb +1 -1
  26. metadata +19 -49
  27. data/recipes/active_admin.rb +0 -36
  28. data/recipes/activerecord.rb +0 -37
  29. data/recipes/add_user.rb +0 -140
  30. data/recipes/airbrake.rb +0 -34
  31. data/recipes/backbone.rb +0 -23
  32. data/recipes/capybara.rb +0 -34
  33. data/recipes/cleanup.rb +0 -40
  34. data/recipes/cloudfiles.rb +0 -36
  35. data/recipes/compass.rb +0 -46
  36. data/recipes/compass_960.rb +0 -48
  37. data/recipes/cucumber.rb +0 -75
  38. data/recipes/datamapper.rb +0 -111
  39. data/recipes/devise.rb +0 -114
  40. data/recipes/git.rb +0 -40
  41. data/recipes/guard.rb +0 -89
  42. data/recipes/haml.rb +0 -23
  43. data/recipes/heroku.rb +0 -61
  44. data/recipes/home_page.rb +0 -58
  45. data/recipes/home_page_users.rb +0 -47
  46. data/recipes/html5.rb +0 -152
  47. data/recipes/inherited_resources.rb +0 -23
  48. data/recipes/less.rb +0 -12
  49. data/recipes/mongohq.rb +0 -59
  50. data/recipes/mongoid.rb +0 -38
  51. data/recipes/mongolab.rb +0 -59
  52. data/recipes/omniauth.rb +0 -194
  53. data/recipes/omniauth_email.rb +0 -82
  54. data/recipes/paperclip.rb +0 -79
  55. data/recipes/prelaunch_signup.rb +0 -586
  56. data/recipes/rails_admin.rb +0 -29
  57. data/recipes/redis.rb +0 -23
  58. data/recipes/responders.rb +0 -10
  59. data/recipes/resque.rb +0 -25
  60. data/recipes/rspec.rb +0 -131
  61. data/recipes/sass.rb +0 -25
  62. data/recipes/settingslogic.rb +0 -43
  63. data/recipes/simple_form.rb +0 -54
  64. data/recipes/slim.rb +0 -46
  65. data/recipes/static_page.rb +0 -43
  66. data/recipes/subdomains.rb +0 -121
  67. data/recipes/turnip.rb +0 -18
  68. data/recipes/unicorn.rb +0 -29
  69. data/recipes/users_page.rb +0 -165
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_apps_composer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.5
4
+ version: 2.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-13 00:00:00.000000000 Z
12
+ date: 2012-08-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: i18n
@@ -150,56 +150,26 @@ extra_rdoc_files: []
150
150
  files:
151
151
  - lib/rails_wizard/command.rb
152
152
  - lib/rails_wizard/config.rb
153
+ - lib/rails_wizard/diagnostics.rb
153
154
  - lib/rails_wizard/recipe.rb
154
155
  - lib/rails_wizard/recipes.rb
155
156
  - lib/rails_wizard/template.rb
156
157
  - lib/rails_wizard.rb
157
- - recipes/action_mailer.rb
158
- - recipes/active_admin.rb
159
- - recipes/activerecord.rb
160
- - recipes/add_user.rb
161
- - recipes/airbrake.rb
162
- - recipes/backbone.rb
163
- - recipes/capybara.rb
164
- - recipes/cleanup.rb
165
- - recipes/cloudfiles.rb
166
- - recipes/compass.rb
167
- - recipes/compass_960.rb
168
- - recipes/cucumber.rb
169
- - recipes/datamapper.rb
170
- - recipes/devise.rb
158
+ - recipes/auth.rb
159
+ - recipes/controllers.rb
160
+ - recipes/database.rb
161
+ - recipes/email.rb
162
+ - recipes/example.rb
171
163
  - recipes/extras.rb
172
- - recipes/git.rb
173
- - recipes/guard.rb
174
- - recipes/haml.rb
175
- - recipes/heroku.rb
176
- - recipes/home_page.rb
177
- - recipes/home_page_users.rb
178
- - recipes/html5.rb
179
- - recipes/inherited_resources.rb
180
- - recipes/less.rb
181
- - recipes/mongohq.rb
182
- - recipes/mongoid.rb
183
- - recipes/mongolab.rb
184
- - recipes/omniauth.rb
185
- - recipes/omniauth_email.rb
186
- - recipes/paperclip.rb
187
- - recipes/prelaunch_signup.rb
188
- - recipes/rails_admin.rb
189
- - recipes/redis.rb
190
- - recipes/responders.rb
191
- - recipes/resque.rb
192
- - recipes/rspec.rb
193
- - recipes/sass.rb
194
- - recipes/seed_database.rb
195
- - recipes/settingslogic.rb
196
- - recipes/simple_form.rb
197
- - recipes/slim.rb
198
- - recipes/static_page.rb
199
- - recipes/subdomains.rb
200
- - recipes/turnip.rb
201
- - recipes/unicorn.rb
202
- - recipes/users_page.rb
164
+ - recipes/frontend.rb
165
+ - recipes/gems.rb
166
+ - recipes/models.rb
167
+ - recipes/prelaunch.rb
168
+ - recipes/readme.rb
169
+ - recipes/routes.rb
170
+ - recipes/setup.rb
171
+ - recipes/testing.rb
172
+ - recipes/views.rb
203
173
  - README.textile
204
174
  - version.rb
205
175
  - templates/helpers.erb
@@ -228,7 +198,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
228
198
  version: '0'
229
199
  segments:
230
200
  - 0
231
- hash: 584023313180931500
201
+ hash: -2921388160186911464
232
202
  required_rubygems_version: !ruby/object:Gem::Requirement
233
203
  none: false
234
204
  requirements:
@@ -237,7 +207,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
237
207
  version: '0'
238
208
  segments:
239
209
  - 0
240
- hash: 584023313180931500
210
+ hash: -2921388160186911464
241
211
  requirements: []
242
212
  rubyforge_project: rails_apps_composer
243
213
  rubygems_version: 1.8.24
@@ -1,36 +0,0 @@
1
- if recipes.include? 'mongoid'
2
- gem 'formtastic', "~> 2.1.1"
3
- gem 'activeadmin-mongoid'
4
- else
5
- gem 'activeadmin'
6
- end
7
- gem "meta_search", '>= 1.1.0.pre'
8
- # sass-rails is also required but is by default in rails
9
-
10
-
11
- after_bundler do
12
- case config['user_model']
13
- when 'default'
14
- generate 'active_admin:install'
15
- when ''
16
- generate 'active_admin:install'
17
- when 'skip'
18
- generate 'active_admin:install --skip-users'
19
- else
20
- generate "active_admin:install #{config['user_model']}"
21
- end
22
- end
23
-
24
- __END__
25
-
26
- name: ActiveAdmin
27
- description: "Install Active Admin to build an administration zone data in your application"
28
- author: systho
29
-
30
- category: other
31
-
32
- config:
33
- - user_model:
34
- type: string
35
- prompt: "What model will you use for admin users ? type 'skip' to skip this step (default is AdminUser)"
36
-
@@ -1,37 +0,0 @@
1
- if config['database']
2
- say_wizard "Configuring '#{config['database']}' database settings..."
3
- old_gem = gem_for_database
4
- @options = @options.dup.merge(:database => config['database'])
5
- gsub_file 'Gemfile', "gem '#{old_gem}'", "gem '#{gem_for_database}'"
6
- template "config/databases/#{@options[:database]}.yml", "config/database.yml.new"
7
- run 'mv config/database.yml.new config/database.yml'
8
- end
9
-
10
- after_bundler do
11
- rake "db:create:all" if config['auto_create']
12
- end
13
-
14
- __END__
15
-
16
- name: ActiveRecord
17
- description: "Use the default ActiveRecord database store."
18
- author: mbleigh
19
-
20
- exclusive: orm
21
- category: persistence
22
- tags: [sql, defaults, orm]
23
-
24
- config:
25
- - database:
26
- type: multiple_choice
27
- prompt: "Which database are you using?"
28
- choices:
29
- - ["MySQL", mysql]
30
- - ["Oracle", oracle]
31
- - ["PostgreSQL", postgresql]
32
- - ["SQLite", sqlite3]
33
- - ["Frontbase", frontbase]
34
- - ["IBM DB", ibm_db]
35
- - auto_create:
36
- type: boolean
37
- prompt: "Automatically create database with default configuration?"
data/recipes/add_user.rb DELETED
@@ -1,140 +0,0 @@
1
- # Application template recipe for the rails_apps_composer. Check for a newer version here:
2
- # https://github.com/RailsApps/rails_apps_composer/blob/master/recipes/add_user.rb
3
-
4
- after_bundler do
5
-
6
- say_wizard "AddUser recipe running 'after bundler'"
7
-
8
- if recipes.include? 'omniauth'
9
- generate(:model, "user provider:string uid:string name:string email:string")
10
- gsub_file 'app/models/user.rb', /\bend\s*\Z/ do
11
- <<-RUBY
12
- attr_accessible :provider, :uid, :name, :email
13
- end
14
- RUBY
15
- end
16
- end
17
-
18
- if recipes.include? 'devise'
19
-
20
- # Generate models and routes for a User
21
- generate 'devise user'
22
-
23
- if recipes.include? 'authorization'
24
- # create'app/models/ability.rb'
25
- generate 'cancan:ability'
26
- # create 'app/models/role.rb'
27
- # create 'config/initializers/rolify.rb'
28
- # create 'db/migrate/...rolify_create_roles.rb'
29
- # insert 'rolify' method in 'app/models/users.rb'
30
- if recipes.include? 'mongoid'
31
- generate 'rolify:role Role User mongoid'
32
- # correct the generation of rolify 3.1 with mongoid
33
- # the call to `rolify` should be *after* the inclusion of mongoid
34
- # (see https://github.com/EppO/rolify/issues/61)
35
- # This isn't needed for rolify>=3.2.0.beta4, but should cause no harm
36
- gsub_file 'app/models/user.rb',
37
- /^\s*(rolify.*?)$\s*(include Mongoid::Document.*?)$/,
38
- " \\2\n extend Rolify\n \\1\n"
39
- else
40
- generate 'rolify:role Role User'
41
- end
42
- end
43
-
44
- # Add a 'name' attribute to the User model
45
- if recipes.include? 'mongoid'
46
- # include timestamps to avoid special casing views for Mongoid
47
- gsub_file 'app/models/user.rb',
48
- /include Mongoid::Document$/,
49
- "\\0\n include Mongoid::Timestamps\n"
50
- # for mongoid
51
- gsub_file 'app/models/user.rb', /\bend\s*\Z/ do
52
- <<-RUBY
53
- # run 'rake db:mongoid:create_indexes' to create indexes
54
- index({ email: 1 }, { unique: true, background: true })
55
- field :name, :type => String
56
- validates_presence_of :name
57
- attr_accessible :name, :email, :password, :password_confirmation, :remember_me, :created_at, :updated_at
58
- end
59
- RUBY
60
- end
61
- else
62
- # for ActiveRecord
63
- # Devise created a Users database, we'll modify it
64
- generate 'migration AddNameToUsers name:string'
65
- if recipes.include? 'devise-confirmable'
66
- generate 'migration AddConfirmableToUsers confirmation_token:string confirmed_at:datetime confirmation_sent_at:datetime unconfirmed_email:string'
67
- end
68
- # Devise created a Users model, we'll modify it
69
- gsub_file 'app/models/user.rb', /attr_accessible :email/, 'attr_accessible :name, :email'
70
- inject_into_file 'app/models/user.rb', :before => 'validates_uniqueness_of' do
71
- "validates_presence_of :name\n"
72
- end
73
- gsub_file 'app/models/user.rb', /validates_uniqueness_of :email/, 'validates_uniqueness_of :name, :email'
74
- gsub_file 'app/models/user.rb', /# attr_accessible :title, :body/, ''
75
- end
76
-
77
- # needed for both mongoid and ActiveRecord
78
- if recipes.include? 'devise-confirmable'
79
- gsub_file 'app/models/user.rb', /:registerable,/, ":registerable, :confirmable,"
80
- gsub_file 'app/models/user.rb', /:remember_me/, ':remember_me, :confirmed_at'
81
- if recipes.include? 'mongoid'
82
- gsub_file 'app/models/user.rb', /# field :confirmation_token/, "field :confirmation_token"
83
- gsub_file 'app/models/user.rb', /# field :confirmed_at/, "field :confirmed_at"
84
- gsub_file 'app/models/user.rb', /# field :confirmation_sent_at/, "field :confirmation_sent_at"
85
- gsub_file 'app/models/user.rb', /# field :unconfirmed_email/, "field :unconfirmed_email"
86
- end
87
- end
88
- if recipes.include? 'devise-invitable'
89
- if recipes.include? 'mongoid'
90
- gsub_file 'app/models/user.rb', /\bend\s*\Z/ do
91
- <<-RUBY
92
- #invitable
93
- field :invitation_token, :type => String
94
- field :invitation_sent_at, :type => Time
95
- field :invitation_accepted_at, :type => Time
96
- field :invitation_limit, :type => Integer
97
- field :invited_by_id, :type => String
98
- field :invited_by_type, :type => String
99
- end
100
- RUBY
101
- end
102
- end
103
- end
104
-
105
- unless recipes.include? 'haml'
106
- # Generate Devise views (unless you are using Haml)
107
- run 'rails generate devise:views'
108
- # Modify Devise views to add 'name'
109
- inject_into_file "app/views/devise/registrations/edit.html.erb", :after => "<%= devise_error_messages! %>\n" do
110
- <<-ERB
111
- <p><%= f.label :name %><br />
112
- <%= f.text_field :name %></p>
113
- ERB
114
- end
115
- inject_into_file "app/views/devise/registrations/new.html.erb", :after => "<%= devise_error_messages! %>\n" do
116
- <<-ERB
117
- <p><%= f.label :name %><br />
118
- <%= f.text_field :name %></p>
119
- ERB
120
- end
121
- else
122
- # copy Haml versions of modified Devise views
123
- get 'https://raw.github.com/RailsApps/rails3-application-templates/master/files/devise-views-haml/app/views/devise/shared/_links.html.haml', 'app/views/devise/shared/_links.html.haml'
124
- get 'https://raw.github.com/RailsApps/rails3-application-templates/master/files/devise-views-haml/app/views/devise/registrations/edit.html.haml', 'app/views/devise/registrations/edit.html.haml'
125
- get 'https://raw.github.com/RailsApps/rails3-application-templates/master/files/devise-views-haml/app/views/devise/registrations/new.html.haml', 'app/views/devise/registrations/new.html.haml'
126
- end
127
-
128
- end
129
-
130
- end
131
-
132
- __END__
133
-
134
- name: AddUser
135
- description: "Add a User model including 'name' and 'email' attributes."
136
- author: RailsApps
137
-
138
- run_after: [devise]
139
- category: other
140
- tags: [utilities, configuration]
data/recipes/airbrake.rb DELETED
@@ -1,34 +0,0 @@
1
-
2
- gem 'airbrake'
3
-
4
- if config['use_heroku']
5
- after_everything do
6
- say_wizard "Adding airbrake:developer Heroku addon (you can always upgrade later)"
7
- run "heroku addons:add airbrake:developer"
8
- generate "airbrake --heroku"
9
- end
10
- else
11
- after_bundler do
12
- generate "airbrake --api-key #{config['api_key']}"
13
- end
14
- end
15
-
16
- __END__
17
-
18
- name: Airbrake
19
- description: Add Airbrake exception reporting to your application.
20
-
21
- category: services
22
- exclusive: exception_notification
23
- tags: [exception_notification]
24
- run_after: [heroku]
25
-
26
- config:
27
- - use_heroku:
28
- type: boolean
29
- prompt: "Use the Airbrake Heroku addon?"
30
- if_recipe: heroku
31
- - api_key:
32
- prompt: "Enter Airbrake API Key:"
33
- type: string
34
- unless: use_heroku
data/recipes/backbone.rb DELETED
@@ -1,23 +0,0 @@
1
- if config['backbone']
2
- gem 'rails-backbone', :version => '>= 0.7.2'
3
- after_bundler do
4
- generate 'backbone:install'
5
- end
6
- else
7
- recipes.delete('backbone')
8
- end
9
-
10
- __END__
11
-
12
- name: Backbone.js
13
- description: "Use the Backbone.js MVC framework"
14
- author: ashley_woodard
15
-
16
- exclusive: javascript_framework
17
- category: assets
18
- tags: [javascript, framework]
19
-
20
- config:
21
- - backbone:
22
- type: boolean
23
- prompt: Would you like to use the Backbone.js MVC framework?
data/recipes/capybara.rb DELETED
@@ -1,34 +0,0 @@
1
- gem 'capybara', :group => [:development, :test] unless recipes.include? 'cucumber'
2
-
3
- after_bundler do
4
- create_file "spec/support/capybara.rb", <<-RUBY
5
- require 'capybara/rails'
6
- require 'capybara/rspec'
7
- RUBY
8
-
9
- create_file "spec/requests/home_spec.rb", <<-RUBY
10
- require 'spec_helper'
11
-
12
- describe 'visiting the homepage' do
13
- before do
14
- visit '/'
15
- end
16
-
17
- it 'should have a body' do
18
- page.should have_css('body')
19
- end
20
- end
21
- RUBY
22
- end
23
-
24
- __END__
25
-
26
- name: Capybara
27
- description: "Use the Capybara acceptance testing libraries with RSpec."
28
- author: mbleigh
29
-
30
- requires: [rspec]
31
- run_after: [rspec]
32
- exclusive: acceptance_testing
33
- category: testing
34
- tags: [acceptance]
data/recipes/cleanup.rb DELETED
@@ -1,40 +0,0 @@
1
- # Application template recipe for the rails_apps_composer. Check for a newer version here:
2
- # https://github.com/RailsApps/rails_apps_composer/blob/master/recipes/cleanup.rb
3
-
4
- after_bundler do
5
-
6
- say_wizard "Cleanup recipe running 'after bundler'"
7
-
8
- # remove unnecessary files
9
- %w{
10
- README
11
- doc/README_FOR_APP
12
- public/index.html
13
- app/assets/images/rails.png
14
- }.each { |file| remove_file file }
15
-
16
- # add placeholder READMEs
17
- get "https://raw.github.com/RailsApps/rails3-application-templates/master/files/sample_readme.txt", "README"
18
- get "https://raw.github.com/RailsApps/rails3-application-templates/master/files/sample_readme.textile", "README.textile"
19
- gsub_file "README", /App_Name/, "#{app_name.humanize.titleize}"
20
- gsub_file "README.textile", /App_Name/, "#{app_name.humanize.titleize}"
21
-
22
- # remove commented lines and multiple blank lines from Gemfile
23
- # thanks to https://github.com/perfectline/template-bucket/blob/master/cleanup.rb
24
- gsub_file 'Gemfile', /#.*\n/, "\n"
25
- gsub_file 'Gemfile', /\n^\s*\n/, "\n"
26
-
27
- # remove commented lines and multiple blank lines from config/routes.rb
28
- gsub_file 'config/routes.rb', / #.*\n/, "\n"
29
- gsub_file 'config/routes.rb', /\n^\s*\n/, "\n"
30
-
31
- end
32
-
33
- __END__
34
-
35
- name: Cleanup
36
- description: "Remove unnecessary files left over from generating a new Rails app."
37
- author: RailsApps
38
-
39
- category: other
40
- tags: [utilities, configuration]
@@ -1,36 +0,0 @@
1
- if config['cloudfiles']
2
- gem 'cloudfiles'
3
- else
4
- recipes.delete('cloudfiles')
5
- end
6
-
7
- if config['cloudfiles']
8
- after_bundler do
9
- # Code here is run after Bundler installs all the gems for the project.
10
- # You can run generators and rake tasks in this section.
11
- end
12
- end
13
-
14
- if config['cloudfiles']
15
- after_everything do
16
- # These blocks are run after the bundler blocks and are reserved for
17
- # special cases like committing the files to a git repository (something
18
- # that depends on everything having been generated).
19
- end
20
- end
21
- # A recipe is two parts: the Ruby code and YAML back-matter that comes
22
- # after a blank line with the __END__ keyword.
23
-
24
- __END__
25
-
26
- name: Cloudfiles
27
- description: "Use Cloudfiles to store files."
28
- author: merlinvn
29
-
30
- category: persistence
31
- tags: [storage]
32
-
33
- config:
34
- - cloudfiles:
35
- type: boolean
36
- prompt: "Would you like to use Cloudfiles to store your files?"
data/recipes/compass.rb DELETED
@@ -1,46 +0,0 @@
1
- if config['compass']
2
- gem 'compass', :version => '~> 0.12.2', :group => [:assets]
3
- gem 'compass-rails', :version => '~> 1.0.3', :group => [:assets]
4
- after_bundler do
5
- remove_file 'app/assets/stylesheets/application.css'
6
-
7
- if File.exist?("config/initializers/sass.rb")
8
- create_file "app/assets/stylesheets/application.css.sass" do <<-SASS
9
- //= require_self
10
- //= require_tree .
11
-
12
- @import compass
13
- @import _blueprint
14
- SASS
15
- end
16
- else
17
- create_file "app/assets/stylesheets/application.css.scss" do <<-SCSS
18
- //= require_self
19
- //= require_tree .
20
-
21
- @import "compass";
22
- @import "_blueprint";
23
- SCSS
24
- end
25
- end
26
- end
27
- else
28
- recipes.delete('compass')
29
- end
30
-
31
- __END__
32
-
33
- name: Compass
34
- description: "Utilize Compass framework for SASS."
35
- author: ashley_woodard
36
-
37
- requires: [sass]
38
- run_after: [sass]
39
- exclusive: css_framework
40
- category: assets
41
- tags: [css]
42
-
43
- config:
44
- - compass:
45
- type: boolean
46
- prompt: Would you like to use Compass for stylesheets?
@@ -1,48 +0,0 @@
1
- if config['compass_960']
2
- gem 'compass-960-plugin', :version => '~> 0.10.4', :group => [:assets]
3
- after_bundler do
4
-
5
- #create compass.rb initializer
6
- create_file 'config/initializers/compass.rb' do <<-RUBY
7
- require 'ninesixty'
8
- RUBY
9
- end
10
-
11
- if File.exist?('config/initializers/sass.rb')
12
- inject_into_file 'app/assets/stylesheets/application.css.sass', :after => "@import compass\n" do <<-SASS
13
- @import 960/grid
14
- SASS
15
- end
16
- else
17
- inject_into_file 'app/assets/stylesheets/application.css.scss', :after => "@import \"compass\";\n" do <<-SCSS
18
- @import "960/grid";
19
- SCSS
20
- end
21
- end
22
-
23
- inject_into_file 'config/application.rb', :after => "Rails::Application\n" do <<-RUBY
24
- config.sass.load_paths << "#{Gem.loaded_specs['compass'].full_gem_path}/frameworks/compass/stylesheets"
25
- config.sass.load_paths << "#{Gem.loaded_specs['compass-960-plugin'].full_gem_path}/stylesheets"
26
- RUBY
27
- end
28
-
29
- end
30
- else
31
- recipes.delete('compass_960')
32
- end
33
- __END__
34
-
35
- name: Compass 960
36
- description: "Add compass-960-plugin for Compass"
37
- author: porta
38
-
39
- requires: [compass]
40
- run_after: [compass]
41
- exclusive: css_framework
42
- category: assets
43
- tags: [css]
44
-
45
- config:
46
- - compass_960:
47
- type: boolean
48
- prompt: Would you like to add Compass 960 plugin for Compass?
data/recipes/cucumber.rb DELETED
@@ -1,75 +0,0 @@
1
- # Application template recipe for the rails_apps_composer. Check for a newer version here:
2
- # https://github.com/RailsApps/rails_apps_composer/blob/master/recipes/cucumber.rb
3
-
4
- if config['cucumber']
5
- gem 'cucumber-rails', '>= 1.3.0', :group => :test, :require => false
6
- gem 'capybara', '>= 1.1.2', :group => :test
7
- gem 'database_cleaner', '>= 0.8.0', :group => :test
8
- gem 'launchy', '>= 2.1.0', :group => :test
9
- else
10
- recipes.delete('cucumber')
11
- end
12
-
13
- if config['cucumber']
14
- after_bundler do
15
- say_wizard "Cucumber recipe running 'after bundler'"
16
- generate "cucumber:install --capybara#{' --rspec' if recipes.include?('rspec')}#{' -D' if recipes.include?('mongoid')}"
17
- # make it easy to run Cucumber for single features without adding "--require features" to the command line
18
- gsub_file 'config/cucumber.yml', /std_opts = "/, 'std_opts = "-r features/support/ -r features/step_definitions '
19
- if recipes.include? 'mongoid'
20
- gsub_file 'features/support/env.rb', /transaction/, "truncation"
21
- inject_into_file 'features/support/env.rb', :after => 'begin' do
22
- "\n DatabaseCleaner.orm = 'mongoid'"
23
- end
24
- end
25
- end
26
- end
27
-
28
- if config['cucumber']
29
- if recipes.include? 'devise'
30
- after_bundler do
31
- say_wizard "Copying Cucumber scenarios from the rails3-devise-rspec-cucumber examples"
32
- begin
33
- # copy all the Cucumber scenario files from the rails3-devise-rspec-cucumber example app
34
- get 'https://raw.github.com/RailsApps/rails3-devise-rspec-cucumber/master/features/users/sign_in.feature', 'features/users/sign_in.feature'
35
- get 'https://raw.github.com/RailsApps/rails3-devise-rspec-cucumber/master/features/users/sign_out.feature', 'features/users/sign_out.feature'
36
- get 'https://raw.github.com/RailsApps/rails3-devise-rspec-cucumber/master/features/users/sign_up.feature', 'features/users/sign_up.feature'
37
- get 'https://raw.github.com/RailsApps/rails3-devise-rspec-cucumber/master/features/users/user_edit.feature', 'features/users/user_edit.feature'
38
- get 'https://raw.github.com/RailsApps/rails3-devise-rspec-cucumber/master/features/users/user_show.feature', 'features/users/user_show.feature'
39
- get 'https://raw.github.com/RailsApps/rails3-devise-rspec-cucumber/master/features/step_definitions/user_steps.rb', 'features/step_definitions/user_steps.rb'
40
- remove_file 'features/support/paths.rb'
41
- get 'https://raw.github.com/RailsApps/rails3-devise-rspec-cucumber/master/features/support/paths.rb', 'features/support/paths.rb'
42
- if recipes.include? 'devise-confirmable'
43
- gsub_file 'features/step_definitions/user_steps.rb', /Welcome! You have signed up successfully./, "A message with a confirmation link has been sent to your email address."
44
- inject_into_file 'features/users/sign_in.feature', :before => ' Scenario: User signs in successfully' do
45
- <<-RUBY
46
- Scenario: User has not confirmed account
47
- Given I exist as an unconfirmed user
48
- And I am not logged in
49
- When I sign in with valid credentials
50
- Then I see an unconfirmed account message
51
- And I should be signed out
52
- RUBY
53
- end
54
- end
55
- rescue OpenURI::HTTPError
56
- say_wizard "Unable to obtain Cucumber example files from the repo"
57
- end
58
- end
59
- end
60
- end
61
-
62
- __END__
63
-
64
- name: Cucumber
65
- description: "Use Cucumber for BDD (with Capybara)."
66
- author: RailsApps
67
-
68
- exclusive: acceptance_testing
69
- category: testing
70
- tags: [acceptance]
71
-
72
- config:
73
- - cucumber:
74
- type: boolean
75
- prompt: Would you like to use Cucumber for your BDD?