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 +4 -4
- data/recipes/init.rb +7 -5
- data/templates/layout.erb +22 -13
- data/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 86253bef88caa6fba3caebfdca067014a32d3693
|
4
|
+
data.tar.gz: 5ed47674279dfb1743ecc1101d5b49162ee5f471
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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].
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
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.
|
134
|
-
raise StandardError.new "Rails #{Rails::VERSION::STRING} is not supported.
|
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