rails_apps_composer 2.4.5 → 2.4.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rails_wizard/command.rb +6 -0
- data/recipes/extras.rb +2 -2
- data/recipes/gems.rb +14 -6
- data/recipes/railsapps.rb +21 -5
- data/templates/layout.erb +2 -2
- data/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 97d8113d3d1bea42b32172a4ec80da7104371d93
|
4
|
+
data.tar.gz: dde1c7158345a9e058e9fb3ad7e2d9675cbc9065
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 77b28c8a85269f83849d59fe7e2b292e02c05c63c2c10ca1b6442241556df486daddb8be4ae967692490c626743f974cdaf76705f653750cd9720ce949623e7a
|
7
|
+
data.tar.gz: 7c8abdc3d88e5853e884b522353a44635112b384479b8ee24b28a98efad20342c8736fb3921a181686919f6508f89db432f155968aa1906b52da94da8ad3bd6d
|
data/lib/rails_wizard/command.rb
CHANGED
@@ -11,12 +11,17 @@ module RailsWizard
|
|
11
11
|
method_option :no_default_recipes, :type => :boolean, :aliases => "-L"
|
12
12
|
method_option :template_root, :type => :string, :aliases => '-t'
|
13
13
|
method_option :quiet, :type => :boolean, :aliases => "-q", :default => false
|
14
|
+
method_option :verbose, :type => :boolean, :aliases => "-V", :default => false
|
14
15
|
def new(name)
|
15
16
|
add_recipes
|
16
17
|
recipes, defaults = load_defaults
|
18
|
+
(print "\ndefaults: "; p defaults) if options[:verbose]
|
17
19
|
args = ask_for_args(defaults)
|
20
|
+
(print "\nargs: "; p args) if options[:verbose]
|
18
21
|
recipes = ask_for_recipes(recipes)
|
22
|
+
(print "\nrecipes: "; p recipes) if options[:verbose]
|
19
23
|
gems = ask_for_gems(defaults)
|
24
|
+
(print "\ngems: "; p gems) if options[:verbose]
|
20
25
|
run_template(name, recipes, gems, args, defaults, nil)
|
21
26
|
end
|
22
27
|
|
@@ -27,6 +32,7 @@ module RailsWizard
|
|
27
32
|
method_option :no_default_recipes, :type => :boolean, :aliases => "-L"
|
28
33
|
method_option :template_root, :type => :string, :aliases => '-t'
|
29
34
|
method_option :quiet, :type => :boolean, :aliases => "-q", :default => false
|
35
|
+
method_option :verbose, :type => :boolean, :aliases => "-V", :default => false
|
30
36
|
def template(template_name)
|
31
37
|
add_recipes
|
32
38
|
recipes, defaults = load_defaults
|
data/recipes/extras.rb
CHANGED
@@ -11,7 +11,7 @@ if File.exist?('.ruby-gemset')
|
|
11
11
|
rvmrc_file = File.read('.ruby-gemset')
|
12
12
|
rvmrc_detected = rvmrc_file.include? app_name
|
13
13
|
end
|
14
|
-
unless rvmrc_detected || prefs
|
14
|
+
unless rvmrc_detected || (prefs.has_key? :rvmrc)
|
15
15
|
prefs[:rvmrc] = yes_wizard? "Use or create a project-specific rvm gemset?"
|
16
16
|
end
|
17
17
|
if prefs[:rvmrc]
|
@@ -91,7 +91,7 @@ end
|
|
91
91
|
if prefs[:better_errors]
|
92
92
|
say_wizard "recipe adding better_errors gem"
|
93
93
|
add_gem 'better_errors', :group => :development
|
94
|
-
add_gem 'binding_of_caller', :group => :development, :platforms => [:mri_19, :rbx]
|
94
|
+
add_gem 'binding_of_caller', :group => :development, :platforms => [:mri_19, :mri_20, :rbx]
|
95
95
|
end
|
96
96
|
|
97
97
|
## BAN SPIDERS
|
data/recipes/gems.rb
CHANGED
@@ -36,7 +36,11 @@ end
|
|
36
36
|
unless prefer :database, 'default'
|
37
37
|
gsub_file 'Gemfile', /gem 'sqlite3'\n/, '' unless prefer :database, 'sqlite'
|
38
38
|
end
|
39
|
-
|
39
|
+
if rails_4?
|
40
|
+
add_gem 'mongoid', '~> 4', github: 'mongoid/mongoid' if prefer :orm, 'mongoid'
|
41
|
+
else
|
42
|
+
add_gem 'mongoid' if prefer :orm, 'mongoid'
|
43
|
+
end
|
40
44
|
gsub_file 'Gemfile', /gem 'pg'.*/, ''
|
41
45
|
add_gem 'pg' if prefer :database, 'postgresql'
|
42
46
|
gsub_file 'Gemfile', /gem 'mysql2'.*/, ''
|
@@ -59,9 +63,13 @@ end
|
|
59
63
|
if prefer :unit_test, 'rspec'
|
60
64
|
add_gem 'rspec-rails', :group => [:development, :test]
|
61
65
|
add_gem 'capybara', :group => :test if prefer :integration, 'rspec-capybara'
|
62
|
-
add_gem 'database_cleaner', :group => :test
|
66
|
+
add_gem 'database_cleaner', '1.0.1', :group => :test
|
63
67
|
if prefer :orm, 'mongoid'
|
64
|
-
|
68
|
+
if rails_4?
|
69
|
+
add_gem 'mongoid-rspec', '>= 1.6.0', github: 'evansagge/mongoid-rspec', :group => :test
|
70
|
+
else
|
71
|
+
add_gem 'mongoid-rspec', :group => :test
|
72
|
+
end
|
65
73
|
end
|
66
74
|
add_gem 'email_spec', :group => :test
|
67
75
|
end
|
@@ -72,7 +80,7 @@ if prefer :unit_test, 'minitest'
|
|
72
80
|
end
|
73
81
|
if prefer :integration, 'cucumber'
|
74
82
|
add_gem 'cucumber-rails', :group => :test, :require => false
|
75
|
-
add_gem 'database_cleaner', :group => :test unless prefer :unit_test, 'rspec'
|
83
|
+
add_gem 'database_cleaner', '1.0.1', :group => :test unless prefer :unit_test, 'rspec'
|
76
84
|
add_gem 'launchy', :group => :test
|
77
85
|
add_gem 'capybara', :group => :test
|
78
86
|
end
|
@@ -200,8 +208,8 @@ after_bundler do
|
|
200
208
|
gsub_file "config/database.yml", /database: myapp_production/, "database: #{app_name}_production"
|
201
209
|
end
|
202
210
|
unless prefer :database, 'sqlite'
|
203
|
-
|
204
|
-
|
211
|
+
if (prefs.has_key? :drop_database) ? prefs[:drop_database] :
|
212
|
+
(yes_wizard? "Drop any existing databases named #{app_name}?")
|
205
213
|
run 'bundle exec rake db:drop'
|
206
214
|
else
|
207
215
|
raise "aborted at user's request"
|
data/recipes/railsapps.rb
CHANGED
@@ -1,6 +1,14 @@
|
|
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
|
+
raise if (defined? defaults) || (defined? preferences) # Shouldn't happen.
|
5
|
+
if options[:verbose]
|
6
|
+
print "\nrecipes: ";p recipes
|
7
|
+
print "\ngems: " ;p gems
|
8
|
+
print "\nprefs: " ;p prefs
|
9
|
+
print "\nconfig: " ;p config
|
10
|
+
end
|
11
|
+
|
4
12
|
case Rails::VERSION::MAJOR.to_s
|
5
13
|
when "3"
|
6
14
|
prefs[:railsapps] = multiple_choice "Install an example application for Rails 3.2?",
|
@@ -148,12 +156,20 @@ case prefs[:railsapps]
|
|
148
156
|
prefs[:local_env_file] = true
|
149
157
|
prefs[:better_errors] = true
|
150
158
|
if prefer :git, true
|
151
|
-
prefs[:prelaunch_branch] = multiple_choice "Git branch for the prelaunch app?",
|
152
|
-
|
153
|
-
|
159
|
+
prefs[:prelaunch_branch] = multiple_choice "Git branch for the prelaunch app?",
|
160
|
+
[["wip (work-in-progress)", "wip"],
|
161
|
+
["master", "master"],
|
162
|
+
["prelaunch", "prelaunch"],
|
163
|
+
["staging", "staging"]] unless prefs.has_key? :prelaunch_branch
|
164
|
+
|
165
|
+
prefs[:main_branch] = unless 'master' == prefs[:prelaunch_branch]
|
166
|
+
'master'
|
154
167
|
else
|
155
|
-
|
156
|
-
|
168
|
+
multiple_choice "Git branch for the main app?",
|
169
|
+
[["None", "none"],
|
170
|
+
["wip (work-in-progress)", "wip"],
|
171
|
+
["edge", "edge"]]
|
172
|
+
end unless prefs.has_key? :main_branch
|
157
173
|
end
|
158
174
|
when 'rails3-bootstrap-devise-cancan'
|
159
175
|
prefs[:git] = true
|
data/templates/layout.erb
CHANGED
@@ -205,13 +205,13 @@ say_wizard "importing html2haml and haml2slim conversion tools"
|
|
205
205
|
require 'html2haml'
|
206
206
|
require 'haml2slim'
|
207
207
|
end
|
208
|
-
@after_blocks.each{|b| config = @configs[b[0]] || {}; @current_recipe = b[0]; b[1].call}
|
208
|
+
@after_blocks.each{|b| config = @configs[b[0]] || {}; @current_recipe = b[0]; puts @current_recipe; b[1].call}
|
209
209
|
|
210
210
|
# >-----------------------------[ Run 'After Everything' Callbacks ]-------------------------------<
|
211
211
|
|
212
212
|
@current_recipe = nil
|
213
213
|
say_wizard "Running 'after everything' callbacks."
|
214
|
-
@after_everything_blocks.each{|b| config = @configs[b[0]] || {}; @current_recipe = b[0]; b[1].call}
|
214
|
+
@after_everything_blocks.each{|b| config = @configs[b[0]] || {}; @current_recipe = b[0]; puts @current_recipe; b[1].call}
|
215
215
|
|
216
216
|
@current_recipe = nil
|
217
217
|
if diagnostics[:recipes] == 'success'
|
data/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_apps_composer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.4.
|
4
|
+
version: 2.4.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Kehoe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-08-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|
@@ -192,7 +192,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
192
192
|
version: '0'
|
193
193
|
requirements: []
|
194
194
|
rubyforge_project: rails_apps_composer
|
195
|
-
rubygems_version: 2.0.
|
195
|
+
rubygems_version: 2.0.7
|
196
196
|
signing_key:
|
197
197
|
specification_version: 4
|
198
198
|
summary: A version of the RailsWizard gem with custom recipes for Rails starter apps.
|