rails_apps_composer 2.2.25 → 2.2.26
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.
- data/lib/rails_wizard/diagnostics.rb +9 -8
- data/recipes/extras.rb +1 -1
- data/recipes/gems.rb +16 -9
- data/recipes/init.rb +3 -1
- data/recipes/models.rb +12 -10
- data/recipes/railsapps.rb +30 -6
- data/recipes/saas.rb +107 -4
- data/version.rb +2 -2
- metadata +4 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
module RailsWizard
|
|
2
2
|
module Diagnostics
|
|
3
|
-
|
|
3
|
+
|
|
4
4
|
### collections of recipes that are known to work together
|
|
5
5
|
@@recipes = []
|
|
6
6
|
@@recipes << %w(example)
|
|
@@ -22,9 +22,9 @@ module RailsWizard
|
|
|
22
22
|
@@recipes << %w(controllers email example extras frontend gems git init models railsapps readme routes setup testing views)
|
|
23
23
|
@@recipes << %w(controllers email example extras frontend gems git init models prelaunch railsapps readme routes setup testing views)
|
|
24
24
|
@@recipes << %w(controllers email example extras frontend gems git init models prelaunch railsapps readme routes saas setup testing views)
|
|
25
|
-
|
|
25
|
+
|
|
26
26
|
### collections of preferences that are known to work together
|
|
27
|
-
|
|
27
|
+
|
|
28
28
|
# ignore these preferences (because they don't cause conflicts)
|
|
29
29
|
# :ban_spiders
|
|
30
30
|
# :better_errors
|
|
@@ -41,8 +41,9 @@ module RailsWizard
|
|
|
41
41
|
# :templates
|
|
42
42
|
|
|
43
43
|
@@prefs = []
|
|
44
|
-
@@prefs << {:railsapps=>"rails-
|
|
45
|
-
@@prefs << {:railsapps=>"rails-stripe-membership-saas", :database=>"sqlite", :unit_test=>"rspec", :integration=>"cucumber", :fixtures=>"factory_girl", :frontend=>"bootstrap", :bootstrap=>"sass", :email=>"
|
|
44
|
+
@@prefs << {:railsapps=>"rails-recurly-subscription-saas", :database=>"sqlite", :unit_test=>"rspec", :integration=>"cucumber", :fixtures=>"factory_girl", :frontend=>"bootstrap", :bootstrap=>"sass", :email=>"gmail", :authentication=>"devise", :devise_modules=>"default", :authorization=>"cancan", :starter_app=>"admin_app", :form_builder=>"simple_form"}
|
|
45
|
+
@@prefs << {:railsapps=>"rails-stripe-membership-saas", :database=>"sqlite", :unit_test=>"rspec", :integration=>"cucumber", :fixtures=>"factory_girl", :frontend=>"bootstrap", :bootstrap=>"sass", :email=>"gmail", :authentication=>"devise", :devise_modules=>"default", :authorization=>"cancan", :starter_app=>"admin_app", :form_builder=>"simple_form"}
|
|
46
|
+
@@prefs << {:railsapps=>"rails-stripe-membership-saas", :database=>"sqlite", :unit_test=>"rspec", :integration=>"cucumber", :fixtures=>"factory_girl", :frontend=>"bootstrap", :bootstrap=>"sass", :email=>"mandrill", :authentication=>"devise", :devise_modules=>"confirmable", :authorization=>"cancan", :starter_app=>"admin_app", :form_builder=>"simple_form"}
|
|
46
47
|
@@prefs << {:railsapps=>"rails-prelaunch-signup", :database=>"sqlite", :unit_test=>"rspec", :integration=>"cucumber", :fixtures=>"factory_girl", :frontend=>"bootstrap", :bootstrap=>"sass", :email=>"mandrill", :authentication=>"devise", :devise_modules=>"confirmable", :authorization=>"cancan", :starter_app=>"admin_app", :form_builder=>"simple_form"}
|
|
47
48
|
@@prefs << {:railsapps=>"rails3-bootstrap-devise-cancan", :database=>"sqlite", :unit_test=>"rspec", :integration=>"cucumber", :fixtures=>"factory_girl", :frontend=>"bootstrap", :bootstrap=>"sass", :email=>"gmail", :authentication=>"devise", :devise_modules=>"default", :authorization=>"cancan", :starter_app=>"admin_app", :form_builder=>"simple_form"}
|
|
48
49
|
@@prefs << {:railsapps=>"rails3-devise-rspec-cucumber", :database=>"sqlite", :unit_test=>"rspec", :integration=>"cucumber", :fixtures=>"factory_girl", :frontend=>"none", :email=>"gmail", :authentication=>"devise", :devise_modules=>"default", :authorization=>"none", :starter_app=>"users_app", :form_builder=>"none"}
|
|
@@ -53,13 +54,13 @@ module RailsWizard
|
|
|
53
54
|
@@prefs << {:railsapps=>"none", :database=>"sqlite", :unit_test=>"rspec", :integration=>"cucumber", :fixtures=>"none", :frontend=>"bootstrap", :bootstrap=>"sass", :email=>"gmail", :authentication=>"devise", :devise_modules=>"invitable", :authorization=>"cancan", :form_builder=>"simple_form", :starter_app=>"admin_app"}
|
|
54
55
|
@@prefs << {:railsapps=>"none", :database=>"sqlite", :unit_test=>"rspec", :integration=>"cucumber", :fixtures=>"factory_girl", :frontend=>"bootstrap", :bootstrap=>"sass", :email=>"gmail", :authentication=>"devise", :devise_modules=>"default", :authorization=>"cancan", :form_builder=>"none", :starter_app=>"admin_app"}
|
|
55
56
|
@@prefs << {:railsapps=>"none", :database=>"sqlite", :unit_test=>"test_unit", :integration=>"none", :fixtures=>"none", :frontend=>"bootstrap", :bootstrap=>"less", :email=>"sendgrid", :authentication=>"devise", :devise_modules=>"confirmable", :authorization=>"cancan", :form_builder=>"none", :starter_app=>"admin_app"}
|
|
56
|
-
|
|
57
|
+
|
|
57
58
|
def self.recipes
|
|
58
59
|
@@recipes
|
|
59
60
|
end
|
|
60
|
-
|
|
61
|
+
|
|
61
62
|
def self.prefs
|
|
62
63
|
@@prefs
|
|
63
64
|
end
|
|
64
65
|
end
|
|
65
|
-
end
|
|
66
|
+
end
|
data/recipes/extras.rb
CHANGED
|
@@ -25,7 +25,7 @@ if config['better_errors']
|
|
|
25
25
|
end
|
|
26
26
|
if prefs[:better_errors]
|
|
27
27
|
say_wizard "recipe adding better_errors gem"
|
|
28
|
-
gem 'better_errors', '>= 0.2
|
|
28
|
+
gem 'better_errors', '>= 0.3.2', :group => :development
|
|
29
29
|
gem 'binding_of_caller', '>= 0.6.8', :group => :development
|
|
30
30
|
end
|
|
31
31
|
|
data/recipes/gems.rb
CHANGED
|
@@ -22,7 +22,7 @@ end
|
|
|
22
22
|
|
|
23
23
|
## Database Adapter
|
|
24
24
|
gsub_file 'Gemfile', /gem 'sqlite3'\n/, '' unless prefer :database, 'sqlite'
|
|
25
|
-
gem 'mongoid', '>= 3.0.
|
|
25
|
+
gem 'mongoid', '>= 3.0.15' if prefer :orm, 'mongoid'
|
|
26
26
|
unless File.open('Gemfile').lines.any?{|line| line.include?('pg')}
|
|
27
27
|
gem 'pg', '>= 0.14.1' if prefer :database, 'postgresql'
|
|
28
28
|
end
|
|
@@ -36,16 +36,16 @@ if prefer :templates, 'haml'
|
|
|
36
36
|
gem 'haml-rails', '>= 0.3.5', :group => :development
|
|
37
37
|
# hpricot and ruby_parser are needed for conversion of HTML to Haml
|
|
38
38
|
gem 'hpricot', '>= 0.8.6', :group => :development
|
|
39
|
-
gem 'ruby_parser', '>= 3.1.
|
|
39
|
+
gem 'ruby_parser', '>= 3.1.1', :group => :development
|
|
40
40
|
end
|
|
41
41
|
if prefer :templates, 'slim'
|
|
42
|
-
gem 'slim', '>= 1.3.
|
|
42
|
+
gem 'slim', '>= 1.3.5'
|
|
43
43
|
gem 'haml2slim', '>= 0.4.6', :group => :development
|
|
44
44
|
# Haml is needed for conversion of HTML to Slim
|
|
45
45
|
gem 'haml', '>= 3.1.6', :group => :development
|
|
46
46
|
gem 'haml-rails', '>= 0.3.5', :group => :development
|
|
47
47
|
gem 'hpricot', '>= 0.8.6', :group => :development
|
|
48
|
-
gem 'ruby_parser', '>= 3.1.
|
|
48
|
+
gem 'ruby_parser', '>= 3.1.1', :group => :development
|
|
49
49
|
end
|
|
50
50
|
|
|
51
51
|
## Testing Framework
|
|
@@ -75,7 +75,7 @@ gem 'fabrication', '>= 2.3.0', :group => [:development, :test] if prefer :fixtur
|
|
|
75
75
|
gem 'machinist', '>= 2.0', :group => :test if prefer :fixtures, 'machinist'
|
|
76
76
|
|
|
77
77
|
## Front-end Framework
|
|
78
|
-
gem 'bootstrap-sass', '>= 2.
|
|
78
|
+
gem 'bootstrap-sass', '>= 2.2.2.0' if prefer :bootstrap, 'sass'
|
|
79
79
|
gem 'compass-rails', '>= 1.0.3', :group => :assets if prefer :frontend, 'foundation'
|
|
80
80
|
gem 'zurb-foundation', '>= 3.2.3', :group => :assets if prefer :frontend, 'foundation'
|
|
81
81
|
if prefer :bootstrap, 'less'
|
|
@@ -103,7 +103,7 @@ gem 'omniauth-linkedin' if prefer :omniauth_provider, 'linkedin'
|
|
|
103
103
|
gem 'omniauth-google-oauth2' if prefer :omniauth_provider, 'google_oauth2'
|
|
104
104
|
gem 'omniauth-tumblr' if prefer :omniauth_provider, 'tumblr'
|
|
105
105
|
|
|
106
|
-
## Authorization
|
|
106
|
+
## Authorization
|
|
107
107
|
if prefer :authorization, 'cancan'
|
|
108
108
|
gem 'cancan', '>= 1.6.8'
|
|
109
109
|
gem 'rolify', '>= 3.2.0'
|
|
@@ -112,13 +112,20 @@ end
|
|
|
112
112
|
## Form Builder
|
|
113
113
|
gem 'simple_form', '>= 2.0.4' if prefer :form_builder, 'simple_form'
|
|
114
114
|
|
|
115
|
-
## Membership App
|
|
115
|
+
## Membership App
|
|
116
116
|
if prefer :railsapps, 'rails-stripe-membership-saas'
|
|
117
117
|
gem 'stripe', '>= 1.7.4'
|
|
118
118
|
gem 'stripe_event', '>= 0.4.0'
|
|
119
119
|
end
|
|
120
|
+
if prefer :railsapps, 'rails-recurly-subscription-saas'
|
|
121
|
+
gem 'recurly', '>= 2.1.5'
|
|
122
|
+
gem 'nokogiri', '>= 1.5.5'
|
|
123
|
+
gem 'countries', '>= 0.8.4'
|
|
124
|
+
gem 'httpi', '>= 1.1.1'
|
|
125
|
+
gem 'httpclient', '>= 2.3.0.1'
|
|
126
|
+
end
|
|
120
127
|
|
|
121
|
-
## Signup App
|
|
128
|
+
## Signup App
|
|
122
129
|
if prefer :railsapps, 'rails-prelaunch-signup'
|
|
123
130
|
gem 'google_visualr', '>= 2.1.2'
|
|
124
131
|
gem 'jquery-datatables-rails', '>= 1.11.2'
|
|
@@ -126,7 +133,7 @@ end
|
|
|
126
133
|
|
|
127
134
|
## Gems from a defaults file or added interactively
|
|
128
135
|
gems.each do |g|
|
|
129
|
-
gem
|
|
136
|
+
gem(*g)
|
|
130
137
|
end
|
|
131
138
|
|
|
132
139
|
## Git
|
data/recipes/init.rb
CHANGED
|
@@ -101,7 +101,9 @@ FILE
|
|
|
101
101
|
run 'bundle exec rake db:drop'
|
|
102
102
|
run 'bundle exec rake db:mongoid:create_indexes'
|
|
103
103
|
end
|
|
104
|
-
|
|
104
|
+
unless prefer :railsapps, 'rails-recurly-subscription-saas'
|
|
105
|
+
run 'bundle exec rake db:seed'
|
|
106
|
+
end
|
|
105
107
|
### GIT ###
|
|
106
108
|
git :add => '-A' if prefer :git, true
|
|
107
109
|
git :commit => '-qm "rails_apps_composer: set up database"' if prefer :git, true
|
data/recipes/models.rb
CHANGED
|
@@ -36,7 +36,9 @@ RUBY
|
|
|
36
36
|
end
|
|
37
37
|
else
|
|
38
38
|
## DEVISE AND ACTIVE RECORD
|
|
39
|
-
|
|
39
|
+
unless prefer :railsapps, 'rails-recurly-subscription-saas'
|
|
40
|
+
generate 'migration AddNameToUsers name:string'
|
|
41
|
+
end
|
|
40
42
|
copy_from_repo 'app/models/user.rb', :repo => 'https://raw.github.com/RailsApps/rails3-devise-rspec-cucumber/master/'
|
|
41
43
|
if (prefer :devise_modules, 'confirmable') || (prefer :devise_modules, 'invitable')
|
|
42
44
|
gsub_file 'app/models/user.rb', /:registerable,/, ":registerable, :confirmable,"
|
|
@@ -56,7 +58,7 @@ RUBY
|
|
|
56
58
|
copy_from_repo 'config/initializers/omniauth.rb', :repo => repo
|
|
57
59
|
gsub_file 'config/initializers/omniauth.rb', /twitter/, prefs[:omniauth_provider] unless prefer :omniauth_provider, 'twitter'
|
|
58
60
|
generate 'model User name:string email:string provider:string uid:string' unless prefer :orm, 'mongoid'
|
|
59
|
-
run 'bundle exec rake db:migrate' unless prefer :orm, 'mongoid'
|
|
61
|
+
run 'bundle exec rake db:migrate' unless prefer :orm, 'mongoid'
|
|
60
62
|
copy_from_repo 'app/models/user.rb', :repo => repo # copy the User model (Mongoid version)
|
|
61
63
|
unless prefer :orm, 'mongoid'
|
|
62
64
|
## OMNIAUTH AND ACTIVE RECORD
|
|
@@ -72,7 +74,7 @@ RUBY
|
|
|
72
74
|
### AUTHORIZATION ###
|
|
73
75
|
if prefer :authorization, 'cancan'
|
|
74
76
|
generate 'cancan:ability'
|
|
75
|
-
if prefer :starter_app, 'admin_app'
|
|
77
|
+
if prefer :starter_app, 'admin_app'
|
|
76
78
|
# Limit access to the users#index page
|
|
77
79
|
copy_from_repo 'app/models/ability.rb', :repo => 'https://raw.github.com/RailsApps/rails3-bootstrap-devise-cancan/master/'
|
|
78
80
|
# allow an admin to update roles
|
|
@@ -82,13 +84,13 @@ RUBY
|
|
|
82
84
|
generate 'rolify:role Role User'
|
|
83
85
|
else
|
|
84
86
|
generate 'rolify:role Role User mongoid'
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
87
|
+
# correct the generation of rolify 3.1 with mongoid
|
|
88
|
+
# the call to `rolify` should be *after* the inclusion of mongoid
|
|
89
|
+
# (see https://github.com/EppO/rolify/issues/61)
|
|
90
|
+
# This isn't needed for rolify>=3.2.0.beta4, but should cause no harm
|
|
91
|
+
gsub_file 'app/models/user.rb',
|
|
92
|
+
/^\s*(rolify.*?)$\s*(include Mongoid::Document.*?)$/,
|
|
93
|
+
" \\2\n extend Rolify\n \\1\n"
|
|
92
94
|
end
|
|
93
95
|
end
|
|
94
96
|
### GIT ###
|
data/recipes/railsapps.rb
CHANGED
|
@@ -1,16 +1,23 @@
|
|
|
1
1
|
# Application template recipe for the rails_apps_composer. Change the recipe here:
|
|
2
2
|
# https://github.com/RailsApps/rails_apps_composer/blob/master/recipes/railsapps.rb
|
|
3
3
|
|
|
4
|
-
prefs[:railsapps] = multiple_choice "Install an example application?",
|
|
5
|
-
[["I want to build my own application", "none"],
|
|
6
|
-
["
|
|
7
|
-
["rails-prelaunch-signup", "rails-prelaunch-signup"],
|
|
8
|
-
["rails3-bootstrap-devise-cancan", "rails3-bootstrap-devise-cancan"],
|
|
9
|
-
["rails3-devise-rspec-cucumber", "rails3-devise-rspec-cucumber"],
|
|
4
|
+
prefs[:railsapps] = multiple_choice "Install an example application?",
|
|
5
|
+
[["I want to build my own application", "none"],
|
|
6
|
+
["membership/subscription/saas", "saas"],
|
|
7
|
+
["rails-prelaunch-signup", "rails-prelaunch-signup"],
|
|
8
|
+
["rails3-bootstrap-devise-cancan", "rails3-bootstrap-devise-cancan"],
|
|
9
|
+
["rails3-devise-rspec-cucumber", "rails3-devise-rspec-cucumber"],
|
|
10
10
|
["rails3-mongoid-devise", "rails3-mongoid-devise"],
|
|
11
11
|
["rails3-mongoid-omniauth", "rails3-mongoid-omniauth"],
|
|
12
12
|
["rails3-subdomains", "rails3-subdomains"]] unless prefs.has_key? :railsapps
|
|
13
13
|
|
|
14
|
+
case prefs[:railsapps]
|
|
15
|
+
when 'saas'
|
|
16
|
+
prefs[:railsapps] = multiple_choice "Billing with Stripe or Recurly?",
|
|
17
|
+
[["Stripe", "rails-stripe-membership-saas"],
|
|
18
|
+
["Recurly", "rails-recurly-subscription-saas"]]
|
|
19
|
+
end
|
|
20
|
+
|
|
14
21
|
case prefs[:railsapps]
|
|
15
22
|
when 'rails-stripe-membership-saas'
|
|
16
23
|
prefs[:git] = true
|
|
@@ -29,6 +36,23 @@ case prefs[:railsapps]
|
|
|
29
36
|
prefs[:quiet_assets] = true
|
|
30
37
|
prefs[:local_env_file] = true
|
|
31
38
|
prefs[:better_errors] = true
|
|
39
|
+
when 'rails-recurly-subscription-saas'
|
|
40
|
+
prefs[:git] = true
|
|
41
|
+
prefs[:database] = 'sqlite'
|
|
42
|
+
prefs[:unit_test] = 'rspec'
|
|
43
|
+
prefs[:integration] = 'cucumber'
|
|
44
|
+
prefs[:fixtures] = 'factory_girl'
|
|
45
|
+
prefs[:frontend] = 'bootstrap'
|
|
46
|
+
prefs[:bootstrap] = 'sass'
|
|
47
|
+
prefs[:email] = 'gmail'
|
|
48
|
+
prefs[:authentication] = 'devise'
|
|
49
|
+
prefs[:devise_modules] = 'default'
|
|
50
|
+
prefs[:authorization] = 'cancan'
|
|
51
|
+
prefs[:starter_app] = 'admin_app'
|
|
52
|
+
prefs[:form_builder] = 'simple_form'
|
|
53
|
+
prefs[:quiet_assets] = true
|
|
54
|
+
prefs[:local_env_file] = true
|
|
55
|
+
prefs[:better_errors] = true
|
|
32
56
|
when 'rails-prelaunch-signup'
|
|
33
57
|
prefs[:git] = true
|
|
34
58
|
prefs[:database] = 'sqlite'
|
data/recipes/saas.rb
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# https://github.com/RailsApps/rails_apps_composer/blob/master/recipes/saas.rb
|
|
3
3
|
|
|
4
4
|
if prefer :railsapps, 'rails-stripe-membership-saas'
|
|
5
|
-
|
|
5
|
+
|
|
6
6
|
after_everything do
|
|
7
7
|
say_wizard "recipe running after 'bundle install'"
|
|
8
8
|
repo = 'https://raw.github.com/RailsApps/rails-stripe-membership-saas/master/'
|
|
@@ -66,12 +66,12 @@ if prefer :railsapps, 'rails-stripe-membership-saas'
|
|
|
66
66
|
copy_from_repo 'config/routes.rb', :repo => repo
|
|
67
67
|
### CORRECT APPLICATION NAME ###
|
|
68
68
|
gsub_file 'config/routes.rb', /^.*.routes.draw do/, "#{app_const}.routes.draw do"
|
|
69
|
-
|
|
69
|
+
|
|
70
70
|
# >-------------------------------[ Assets ]--------------------------------<
|
|
71
71
|
copy_from_repo 'app/assets/javascripts/application.js', :repo => repo
|
|
72
72
|
copy_from_repo 'app/assets/javascripts/jquery.readyselector.js', :repo => repo
|
|
73
73
|
copy_from_repo 'app/assets/javascripts/jquery.externalscript.js', :repo => repo
|
|
74
|
-
copy_from_repo 'app/assets/javascripts/registrations.js
|
|
74
|
+
copy_from_repo 'app/assets/javascripts/registrations.js', :repo => repo
|
|
75
75
|
copy_from_repo 'app/assets/stylesheets/application.css.scss', :repo => repo
|
|
76
76
|
copy_from_repo 'app/assets/stylesheets/pricing.css.scss', :repo => repo
|
|
77
77
|
|
|
@@ -95,7 +95,7 @@ if prefer :railsapps, 'rails-stripe-membership-saas'
|
|
|
95
95
|
copy_from_repo 'features/users/user_edit.feature', :repo => repo
|
|
96
96
|
copy_from_repo 'features/users/user_delete.feature', :repo => repo
|
|
97
97
|
copy_from_repo 'features/step_definitions/user_steps.rb', :repo => repo
|
|
98
|
-
copy_from_repo 'features/step_definitions/form_helper_steps.rb', :repo => repo
|
|
98
|
+
copy_from_repo 'features/step_definitions/form_helper_steps.rb', :repo => repo
|
|
99
99
|
copy_from_repo 'config/locales/devise.en.yml', :repo => repo
|
|
100
100
|
|
|
101
101
|
### GIT ###
|
|
@@ -104,6 +104,109 @@ if prefer :railsapps, 'rails-stripe-membership-saas'
|
|
|
104
104
|
end # after_bundler
|
|
105
105
|
end # rails-stripe-membership-saas
|
|
106
106
|
|
|
107
|
+
if prefer :railsapps, 'rails-recurly-subscription-saas'
|
|
108
|
+
|
|
109
|
+
after_everything do
|
|
110
|
+
say_wizard "recipe running after 'bundle install'"
|
|
111
|
+
repo = 'https://raw.github.com/RailsApps/rails-recurly-subscription-saas/master/'
|
|
112
|
+
|
|
113
|
+
# >-------------------------------[ Clean up starter app ]--------------------------------<
|
|
114
|
+
|
|
115
|
+
%w{
|
|
116
|
+
public/index.html
|
|
117
|
+
app/assets/images/rails.png
|
|
118
|
+
}.each { |file| remove_file file }
|
|
119
|
+
# remove commented lines and multiple blank lines from Gemfile
|
|
120
|
+
# thanks to https://github.com/perfectline/template-bucket/blob/master/cleanup.rb
|
|
121
|
+
gsub_file 'Gemfile', /#.*\n/, "\n"
|
|
122
|
+
gsub_file 'Gemfile', /\n^\s*\n/, "\n"
|
|
123
|
+
# remove commented lines and multiple blank lines from config/routes.rb
|
|
124
|
+
gsub_file 'config/routes.rb', / #.*\n/, "\n"
|
|
125
|
+
gsub_file 'config/routes.rb', /\n^\s*\n/, "\n"
|
|
126
|
+
# GIT
|
|
127
|
+
git :add => '-A' if prefer :git, true
|
|
128
|
+
git :commit => '-qm "rails_apps_composer: clean up starter app"' if prefer :git, true
|
|
129
|
+
|
|
130
|
+
# >-------------------------------[ Migrations ]--------------------------------<
|
|
131
|
+
generate 'migration AddRecurlyToUsers first_name:string last_name:string customer_id:string'
|
|
132
|
+
run 'bundle exec rake db:drop'
|
|
133
|
+
run 'bundle exec rake db:migrate'
|
|
134
|
+
|
|
135
|
+
# >-------------------------------[ Models ]--------------------------------<
|
|
136
|
+
copy_from_repo 'app/models/ability.rb', :repo => repo
|
|
137
|
+
copy_from_repo 'app/models/user.rb', :repo => repo
|
|
138
|
+
|
|
139
|
+
# >-------------------------------[ Init ]--------------------------------<
|
|
140
|
+
copy_from_repo 'config/application.yml', :repo => repo
|
|
141
|
+
remove_file 'config/application.example.yml'
|
|
142
|
+
copy_file destination_root + '/config/application.yml', destination_root + '/config/application.example.yml'
|
|
143
|
+
copy_from_repo 'db/seeds.rb', :repo => repo
|
|
144
|
+
copy_from_repo 'config/initializers/recurly.rb', :repo => repo
|
|
145
|
+
run 'bundle exec rake db:seed'
|
|
146
|
+
run 'bundle exec rake db:test:prepare'
|
|
147
|
+
|
|
148
|
+
# >-------------------------------[ Controllers ]--------------------------------<
|
|
149
|
+
copy_from_repo 'app/controllers/home_controller.rb', :repo => repo
|
|
150
|
+
generate 'controller content silver gold platinum --skip-stylesheets --skip-javascripts'
|
|
151
|
+
copy_from_repo 'app/controllers/content_controller.rb', :repo => repo
|
|
152
|
+
copy_from_repo 'app/controllers/registrations_controller.rb', :repo => repo
|
|
153
|
+
copy_from_repo 'app/controllers/application_controller.rb', :repo => repo
|
|
154
|
+
copy_from_repo 'app/controllers/users_controller.rb', :repo => repo
|
|
155
|
+
copy_from_repo 'app/controllers/recurly_controller.rb', :repo => repo
|
|
156
|
+
|
|
157
|
+
# >-------------------------------[ Mailers ]--------------------------------<
|
|
158
|
+
generate 'mailer UserMailer'
|
|
159
|
+
copy_from_repo 'app/mailers/user_mailer.rb', :repo => repo
|
|
160
|
+
|
|
161
|
+
# >-------------------------------[ Views ]--------------------------------<
|
|
162
|
+
copy_from_repo 'app/views/home/index.html.erb', :repo => repo
|
|
163
|
+
copy_from_repo 'app/views/layouts/_navigation.html.erb', :repo => repo
|
|
164
|
+
copy_from_repo 'app/views/devise/registrations/new.html.erb', :repo => repo
|
|
165
|
+
copy_from_repo 'app/views/devise/registrations/edit.html.erb', :repo => repo
|
|
166
|
+
copy_from_repo 'app/views/user_mailer/expire_email.html.erb', :repo => repo
|
|
167
|
+
copy_from_repo 'app/views/user_mailer/expire_email.text.erb', :repo => repo
|
|
168
|
+
|
|
169
|
+
# >-------------------------------[ Routes ]--------------------------------<
|
|
170
|
+
copy_from_repo 'config/routes.rb', :repo => repo
|
|
171
|
+
### CORRECT APPLICATION NAME ###
|
|
172
|
+
gsub_file 'config/routes.rb', /^.*.routes.draw do/, "#{app_const}.routes.draw do"
|
|
173
|
+
|
|
174
|
+
# >-------------------------------[ Assets ]--------------------------------<
|
|
175
|
+
copy_from_repo 'app/assets/javascripts/application.js', :repo => repo
|
|
176
|
+
copy_from_repo 'app/assets/javascripts/jquery.readyselector.js', :repo => repo
|
|
177
|
+
copy_from_repo 'app/assets/javascripts/recurly.js', :repo => repo
|
|
178
|
+
copy_from_repo 'app/assets/javascripts/registrations.js', :repo => repo
|
|
179
|
+
copy_from_repo 'app/assets/stylesheets/application.css.scss', :repo => repo
|
|
180
|
+
copy_from_repo 'app/assets/stylesheets/pricing.css.scss', :repo => repo
|
|
181
|
+
|
|
182
|
+
# >-------------------------------[ RSpec ]--------------------------------<
|
|
183
|
+
say_wizard "copying RSpec tests from the rails-recurly-subscription-saas examples"
|
|
184
|
+
copy_from_repo 'spec/factories/roles.rb', :repo => repo
|
|
185
|
+
copy_from_repo 'spec/factories/users.rb', :repo => repo
|
|
186
|
+
copy_from_repo 'spec/models/user_spec.rb', :repo => repo
|
|
187
|
+
copy_from_repo 'spec/controllers/content_controller_spec.rb', :repo => repo
|
|
188
|
+
copy_from_repo 'spec/mailers/user_mailer_spec.rb', :repo => repo
|
|
189
|
+
copy_from_repo 'spec/recurly/recurly_config_spec.rb', :repo => repo
|
|
190
|
+
|
|
191
|
+
# >-------------------------------[ Cucumber ]--------------------------------<
|
|
192
|
+
say_wizard "copying Cucumber scenarios from the rails-recurly-subscription-saas examples"
|
|
193
|
+
remove_file 'features/users/user_show.feature'
|
|
194
|
+
copy_from_repo 'features/support/paths.rb', :repo => repo
|
|
195
|
+
copy_from_repo 'features/users/sign_in.feature', :repo => repo
|
|
196
|
+
copy_from_repo 'features/users/sign_up.feature', :repo => repo
|
|
197
|
+
copy_from_repo 'features/users/sign_up_with_recurly.feature', :repo => repo
|
|
198
|
+
copy_from_repo 'features/users/user_edit.feature', :repo => repo
|
|
199
|
+
copy_from_repo 'features/users/user_delete.feature', :repo => repo
|
|
200
|
+
copy_from_repo 'features/step_definitions/user_steps.rb', :repo => repo
|
|
201
|
+
copy_from_repo 'features/step_definitions/form_helper_steps.rb', :repo => repo
|
|
202
|
+
copy_from_repo 'config/locales/devise.en.yml', :repo => repo
|
|
203
|
+
|
|
204
|
+
### GIT ###
|
|
205
|
+
git :add => '-A' if prefer :git, true
|
|
206
|
+
git :commit => '-qm "rails_apps_composer: membership app"' if prefer :git, true
|
|
207
|
+
end # after_bundler
|
|
208
|
+
end # rails-recurly-subscription-saas
|
|
209
|
+
|
|
107
210
|
__END__
|
|
108
211
|
|
|
109
212
|
name: prelaunch
|
data/version.rb
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
module RailsWizard
|
|
2
|
-
VERSION = "2.2.
|
|
3
|
-
end
|
|
2
|
+
VERSION = "2.2.26"
|
|
3
|
+
end
|
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: 2.2.
|
|
4
|
+
version: 2.2.26
|
|
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-12-
|
|
12
|
+
date: 2012-12-22 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: i18n
|
|
@@ -202,7 +202,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
202
202
|
version: '0'
|
|
203
203
|
segments:
|
|
204
204
|
- 0
|
|
205
|
-
hash:
|
|
205
|
+
hash: 2651757590416578582
|
|
206
206
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
207
207
|
none: false
|
|
208
208
|
requirements:
|
|
@@ -211,7 +211,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
211
211
|
version: '0'
|
|
212
212
|
segments:
|
|
213
213
|
- 0
|
|
214
|
-
hash:
|
|
214
|
+
hash: 2651757590416578582
|
|
215
215
|
requirements: []
|
|
216
216
|
rubyforge_project: rails_apps_composer
|
|
217
217
|
rubygems_version: 1.8.24
|