rails_apps_composer 2.6.0 → 2.6.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0ea967b6c84219da0f3651f035b32872deca08d6
4
- data.tar.gz: b469da4fc8f5da8335bee208ddc646ecc37c1ff9
3
+ metadata.gz: 86253bef88caa6fba3caebfdca067014a32d3693
4
+ data.tar.gz: 5ed47674279dfb1743ecc1101d5b49162ee5f471
5
5
  SHA512:
6
- metadata.gz: 5525cf0d454c887f085900085a7a6ac6e1cfb669e4b57c7f1ee87bc278785e0db6cb4eda2a0df453797b5ca3d2516dc4418ca3087355ec1af466183aa80cf085
7
- data.tar.gz: 75c78f8ae2bcffdeab6fac289fc7b79bbb0ea6c4174ff50f85b0d4c7c581e1953080d305f8290200d9a8d90ccfa582eb9e0bf52549ad7a3113e9dc8146de0dec
6
+ metadata.gz: 3f09f7c03b3e3a140181b0b77507d042eb211e1d000582ca150c34e8bec58c16d4b212fcf986f500491cc79fa897015872f5bc705b24563b677239047b211c31
7
+ data.tar.gz: c010ceffe7a4332d3d1834892fb17358f64bbdc9f91c7c77fc9bda3404c66f4289f532da5787264fc60af9874da401630276e79c3aabda649c5d65875fc7ebaf
data/recipes/init.rb CHANGED
@@ -3,11 +3,13 @@
3
3
 
4
4
  after_everything do
5
5
  say_wizard "recipe running after everything"
6
- prefs[:secrets].each do |secret|
7
- env_var = " #{secret}: <%= ENV[\"#{secret.upcase}\"] %>"
8
- inject_into_file 'config/secrets.yml', "\n" + env_var, :after => "development:" if rails_4_1?
9
- ### 'inject_into_file' doesn't let us inject the same text twice unless we append the extra space, why?
10
- inject_into_file 'config/secrets.yml', "\n" + env_var + " ", :after => "production:" if rails_4_1?
6
+ if (!prefs[:secrets].nil?) and rails_4_1?
7
+ prefs[:secrets].each do |secret|
8
+ env_var = " #{secret}: <%= ENV[\"#{secret.upcase}\"] %>"
9
+ inject_into_file 'config/secrets.yml', "\n" + env_var, :after => "development:"
10
+ ### 'inject_into_file' doesn't let us inject the same text twice unless we append the extra space, why?
11
+ inject_into_file 'config/secrets.yml', "\n" + env_var + " ", :after => "production:"
12
+ end
11
13
  end
12
14
  case prefs[:email]
13
15
  when 'none'
data/templates/layout.erb CHANGED
@@ -18,9 +18,6 @@
18
18
  #
19
19
  # Thank you to Michael Bleigh for leading the way with the RailsWizard gem.
20
20
  #
21
- # Primarily generated by file:
22
- # https://github.com/RailsApps/rails_apps_composer/templates/layout.erb
23
- #
24
21
  # >---------------------------------------------------------------------------<
25
22
 
26
23
  # >----------------------------[ Initial Setup ]------------------------------<
@@ -107,16 +104,26 @@ diagnostics = {}
107
104
  <%= render('helpers').chomp %>
108
105
  # ><%= ' templates/helpers.erb '.center(75,'-').chomp %>end<
109
106
 
107
+ say_wizard("\033[1m\033[36m" + "" + "\033[0m")
108
+
109
+ say_wizard("\033[1m\033[36m" + ' _____ _ _' + "\033[0m")
110
+ say_wizard("\033[1m\033[36m" + "| __ \\ \(_\) | /\\" + "\033[0m")
111
+ say_wizard("\033[1m\033[36m" + "| |__) |__ _ _| |___ / \\ _ __ _ __ ___" + "\033[0m")
112
+ say_wizard("\033[1m\033[36m" + "| _ /\/ _` | | / __| / /\\ \\ | \'_ \| \'_ \\/ __|" + "\033[0m")
113
+ say_wizard("\033[1m\033[36m" + "| | \\ \\ (_| | | \\__ \\/ ____ \\| |_) | |_) \\__ \\" + "\033[0m")
114
+ say_wizard("\033[1m\033[36m" + "|_| \\_\\__,_|_|_|___/_/ \\_\\ .__/| .__/|___/" + "\033[0m")
115
+ say_wizard("\033[1m\033[36m" + " \| \| \| \|" + "\033[0m")
116
+ say_wizard("\033[1m\033[36m" + " \| \| \| \|" + "\033[0m")
117
+ say_wizard("\033[1m\033[36m" + '' + "\033[0m")
118
+ say_wizard("\033[1m\033[36m" + "Rails Composer, open source, supported by subscribers." + "\033[0m")
119
+ say_wizard("\033[1m\033[36m" + "Like Rails Composer? Please join RailsApps to support development." + "\033[0m")
120
+ say_wizard("\033[1m\033[36m" + "Need help? Ask on Stack Overflow with the tag \'railsapps.\'" + "\033[0m")
121
+ say_wizard("Your new application will contain diagnostics in its README file.")
122
+
110
123
  if diagnostics_recipes.sort.include? recipes.sort
111
124
  diagnostics[:recipes] = 'success'
112
- say_wizard("WOOT! The recipes you've selected are known to work together.")
113
125
  else
114
126
  diagnostics[:recipes] = 'fail'
115
- say_wizard("\033[1m\033[36m" + "WARNING! The recipes you've selected might not work together." + "\033[0m")
116
- say_wizard("Help us out by reporting whether this combination works or fails.")
117
- say_wizard("Please open an issue for rails_apps_composer on GitHub.")
118
- say_wizard("Your new application will contain diagnostics in its README file.")
119
- say_wizard("Continuing...")
120
127
  end
121
128
 
122
129
  # this application template only supports Rails version 3.1 and newer
@@ -129,13 +136,15 @@ when "3"
129
136
  end
130
137
  when "4"
131
138
  say_wizard "You are using Rails version #{Rails::VERSION::STRING}."
139
+ case Rails::VERSION::MINOR.to_s
140
+ when "0"
141
+ say_wizard "Please upgrade to Rails 4.1 or newer."
142
+ end
132
143
  else
133
- say_wizard "You are using Rails version #{Rails::VERSION::STRING} which is not supported. Try 3.1 or newer."
134
- raise StandardError.new "Rails #{Rails::VERSION::STRING} is not supported. Try 3.1 or newer."
144
+ say_wizard "You are using Rails version #{Rails::VERSION::STRING} which is not supported."
145
+ raise StandardError.new "Rails #{Rails::VERSION::STRING} is not supported."
135
146
  end
136
147
 
137
- say_wizard "Using rails_apps_composer recipes to generate an application."
138
-
139
148
  # >---------------------------[ Autoload Modules/Classes ]-----------------------------<
140
149
 
141
150
  inject_into_file 'config/application.rb', :after => 'config.autoload_paths += %W(#{config.root}/extras)' do <<-'RUBY'
data/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module RailsWizard
2
- VERSION = "2.6.0"
2
+ VERSION = "2.6.1"
3
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.6.0
4
+ version: 2.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Kehoe