rails_apps_composer 2.1.9 → 2.1.10
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rails_wizard/command.rb +3 -3
- data/recipes/auth.rb +0 -1
- data/recipes/gems.rb +3 -3
- data/recipes/init.rb +4 -2
- data/recipes/models.rb +2 -1
- data/recipes/railsapps.rb +0 -5
- data/recipes/setup.rb +3 -1
- data/version.rb +1 -1
- metadata +4 -4
data/lib/rails_wizard/command.rb
CHANGED
@@ -13,7 +13,7 @@ module RailsWizard
|
|
13
13
|
recipes, defaults = load_defaults
|
14
14
|
args = ask_for_args(defaults)
|
15
15
|
recipes = ask_for_recipes(recipes)
|
16
|
-
gems = ask_for_gems
|
16
|
+
gems = ask_for_gems(defaults)
|
17
17
|
run_template(name, recipes, gems, args, defaults, nil)
|
18
18
|
end
|
19
19
|
|
@@ -99,8 +99,8 @@ module RailsWizard
|
|
99
99
|
recipes
|
100
100
|
end
|
101
101
|
|
102
|
-
def ask_for_gems
|
103
|
-
gems = []
|
102
|
+
def ask_for_gems(defaults)
|
103
|
+
gems = defaults["gems"] || []
|
104
104
|
while getgem = ask("#{bold}What gem would you like to add? #{clear}#{yellow}(blank to finish)#{clear}")
|
105
105
|
if getgem == ''
|
106
106
|
break
|
data/recipes/auth.rb
CHANGED
@@ -19,7 +19,6 @@ after_bundler do
|
|
19
19
|
## DEVISE MODULES
|
20
20
|
if (prefer :devise_modules, 'confirmable') || (prefer :devise_modules, 'invitable')
|
21
21
|
gsub_file 'app/models/user.rb', /:registerable,/, ":registerable, :confirmable,"
|
22
|
-
gsub_file 'app/models/user.rb', /:remember_me/, ':remember_me, :confirmed_at'
|
23
22
|
if prefer :orm, 'mongoid'
|
24
23
|
gsub_file 'app/models/user.rb', /# field :confirmation_token/, "field :confirmation_token"
|
25
24
|
gsub_file 'app/models/user.rb', /# field :confirmed_at/, "field :confirmed_at"
|
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.5' if prefer :orm, 'mongoid'
|
26
26
|
gem 'pg', '>= 0.14.0' if prefer :database, 'postgresql'
|
27
27
|
gem 'mysql2', '>= 0.3.11' if prefer :database, 'mysql'
|
28
28
|
|
@@ -70,7 +70,7 @@ gem 'bootstrap-sass', '>= 2.0.4.0' if prefer :bootstrap, 'sass'
|
|
70
70
|
gem 'compass-rails', '>= 1.0.3', :group => :assets if prefer :frontend, 'foundation'
|
71
71
|
gem 'zurb-foundation', '>= 3.0.9', :group => :assets if prefer :frontend, 'foundation'
|
72
72
|
if prefer :bootstrap, 'less'
|
73
|
-
gem 'twitter-bootstrap-rails', '>= 2.1.
|
73
|
+
gem 'twitter-bootstrap-rails', '>= 2.1.3', :group => :assets
|
74
74
|
# install gem 'therubyracer' to use Less
|
75
75
|
gem 'therubyracer', '>= 0.10.2', :group => :assets, :platform => :ruby
|
76
76
|
end
|
@@ -84,7 +84,7 @@ gem 'devise', '>= 2.1.2' if prefer :authentication, 'devise'
|
|
84
84
|
gem 'devise_invitable', '>= 1.0.3' if prefer :devise_modules, 'invitable'
|
85
85
|
|
86
86
|
## Authentication (OmniAuth)
|
87
|
-
gem 'omniauth', '>= 1.1.
|
87
|
+
gem 'omniauth', '>= 1.1.1' if prefer :authentication, 'omniauth'
|
88
88
|
gem 'omniauth-twitter' if prefer :omniauth_provider, 'twitter'
|
89
89
|
gem 'omniauth-facebook' if prefer :omniauth_provider, 'facebook'
|
90
90
|
gem 'omniauth-github' if prefer :omniauth_provider, 'github'
|
data/recipes/init.rb
CHANGED
@@ -9,9 +9,11 @@ after_everything do
|
|
9
9
|
## DEVISE-CONFIRMABLE
|
10
10
|
append_file 'db/seeds.rb' do <<-FILE
|
11
11
|
puts 'SETTING UP DEFAULT USER LOGIN'
|
12
|
-
user = User.create! :name => 'First User', :email => 'user@example.com', :password => 'please', :password_confirmation => 'please'
|
12
|
+
user = User.create! :name => 'First User', :email => 'user@example.com', :password => 'please', :password_confirmation => 'please'
|
13
|
+
user.confirm!
|
13
14
|
puts 'New user created: ' << user.name
|
14
|
-
user2 = User.create! :name => 'Second User', :email => 'user2@example.com', :password => 'please', :password_confirmation => 'please'
|
15
|
+
user2 = User.create! :name => 'Second User', :email => 'user2@example.com', :password => 'please', :password_confirmation => 'please'
|
16
|
+
user2.confirm!
|
15
17
|
puts 'New user created: ' << user2.name
|
16
18
|
FILE
|
17
19
|
end
|
data/recipes/models.rb
CHANGED
@@ -9,10 +9,11 @@ after_bundler do
|
|
9
9
|
copy_from_repo 'app/models/user.rb', :repo => 'https://raw.github.com/RailsApps/rails3-mongoid-devise/master/' if prefer :orm, 'mongoid'
|
10
10
|
else
|
11
11
|
generate 'migration AddNameToUsers name:string'
|
12
|
+
copy_from_repo 'app/models/user.rb', :repo => 'https://raw.github.com/RailsApps/rails3-devise-rspec-cucumber/master/'
|
12
13
|
if (prefer :devise_modules, 'confirmable') || (prefer :devise_modules, 'invitable')
|
13
14
|
generate 'migration AddConfirmableToUsers confirmation_token:string confirmed_at:datetime confirmation_sent_at:datetime unconfirmed_email:string'
|
15
|
+
gsub_file 'app/models/user.rb', /:registerable,/, ":registerable, :confirmable,"
|
14
16
|
end
|
15
|
-
copy_from_repo 'app/models/user.rb', :repo => 'https://raw.github.com/RailsApps/rails3-devise-rspec-cucumber/master/'
|
16
17
|
end
|
17
18
|
end
|
18
19
|
### OMNIAUTH ###
|
data/recipes/railsapps.rb
CHANGED
@@ -13,7 +13,6 @@ case prefs[:railsapps]
|
|
13
13
|
when 'rails3-bootstrap-devise-cancan'
|
14
14
|
prefs[:git] = true
|
15
15
|
prefs[:database] = 'sqlite'
|
16
|
-
prefs[:templates] = 'erb'
|
17
16
|
prefs[:unit_test] = 'rspec'
|
18
17
|
prefs[:integration] = 'cucumber'
|
19
18
|
prefs[:fixtures] = 'factory_girl'
|
@@ -28,7 +27,6 @@ case prefs[:railsapps]
|
|
28
27
|
when 'rails3-devise-rspec-cucumber'
|
29
28
|
prefs[:git] = true
|
30
29
|
prefs[:database] = 'sqlite'
|
31
|
-
prefs[:templates] = 'erb'
|
32
30
|
prefs[:unit_test] = 'rspec'
|
33
31
|
prefs[:integration] = 'cucumber'
|
34
32
|
prefs[:fixtures] = 'factory_girl'
|
@@ -43,7 +41,6 @@ case prefs[:railsapps]
|
|
43
41
|
prefs[:git] = true
|
44
42
|
prefs[:database] = 'mongodb'
|
45
43
|
prefs[:orm] = 'mongoid'
|
46
|
-
prefs[:templates] = 'erb'
|
47
44
|
prefs[:unit_test] = 'rspec'
|
48
45
|
prefs[:integration] = 'cucumber'
|
49
46
|
prefs[:fixtures] = 'factory_girl'
|
@@ -58,7 +55,6 @@ case prefs[:railsapps]
|
|
58
55
|
prefs[:git] = true
|
59
56
|
prefs[:database] = 'mongodb'
|
60
57
|
prefs[:orm] = 'mongoid'
|
61
|
-
prefs[:templates] = 'erb'
|
62
58
|
prefs[:unit_test] = 'rspec'
|
63
59
|
prefs[:integration] = 'cucumber'
|
64
60
|
prefs[:fixtures] = 'factory_girl'
|
@@ -73,7 +69,6 @@ case prefs[:railsapps]
|
|
73
69
|
prefs[:git] = true
|
74
70
|
prefs[:database] = 'mongodb'
|
75
71
|
prefs[:orm] = 'mongoid'
|
76
|
-
prefs[:templates] = 'haml'
|
77
72
|
prefs[:unit_test] = 'rspec'
|
78
73
|
prefs[:integration] = 'cucumber'
|
79
74
|
prefs[:fixtures] = 'factory_girl'
|
data/recipes/setup.rb
CHANGED
@@ -90,7 +90,9 @@ if recipes.include? 'auth'
|
|
90
90
|
prefs[:omniauth_provider] = multiple_choice "OmniAuth provider?", [["Facebook", "facebook"], ["Twitter", "twitter"], ["GitHub", "github"],
|
91
91
|
["LinkedIn", "linkedin"], ["Google-Oauth-2", "google-oauth2"], ["Tumblr", "tumblr"]] unless prefs.has_key? :omniauth_provider
|
92
92
|
end
|
93
|
-
|
93
|
+
if prefer :authentication, 'devise'
|
94
|
+
prefs[:authorization] = multiple_choice "Authorization?", [["None", "none"], ["CanCan with Rolify", "cancan"]] unless prefs.has_key? :authorization
|
95
|
+
end
|
94
96
|
end
|
95
97
|
|
96
98
|
## MVC
|
data/version.rb
CHANGED
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.1.
|
4
|
+
version: 2.1.10
|
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-08-
|
12
|
+
date: 2012-08-25 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: -4342401758096405890
|
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: -4342401758096405890
|
215
215
|
requirements: []
|
216
216
|
rubyforge_project: rails_apps_composer
|
217
217
|
rubygems_version: 1.8.24
|