suspenders 1.17.0 → 1.18.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -1
- data/.ruby-version +1 -1
- data/.travis.yml +1 -1
- data/Gemfile.lock +5 -5
- data/NEWS.md +13 -0
- data/README.md +3 -6
- data/lib/suspenders/actions.rb +0 -4
- data/lib/suspenders/app_builder.rb +8 -11
- data/lib/suspenders/version.rb +1 -1
- data/spec/features/new_project_spec.rb +9 -0
- data/spec/support/suspenders.rb +1 -1
- data/templates/Gemfile.erb +1 -1
- data/templates/bin_setup.erb +11 -4
- data/templates/{config_locales_en.yml → config_locales_en.yml.erb} +0 -0
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5ed82bbed26013b10a8da6e00c1bbfd20ae852bd
|
4
|
+
data.tar.gz: dbbb9f4dd43bf2311392125b8739a4672b5e51b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a730d820d42a75b9e30825e3a8a6f429fd83bd0f89a39074117ec03f1bc7d6092235cb2feef9b9d114e7f61d9fd10b4536189df32c8aa9091f3cd249e63d2bd9
|
7
|
+
data.tar.gz: 2ef3565187f9ba9503679df275bfc4dc1323ce4ae29700750bd3c8ccb5451196e1a6799862f56603f1459e361778a484b1c3e3109e1a35a0627ce80aefef21c4
|
data/.gitignore
CHANGED
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.1.
|
1
|
+
2.1.3
|
data/.travis.yml
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
suspenders (1.
|
4
|
+
suspenders (1.18.0)
|
5
5
|
bitters (~> 0.10.0)
|
6
6
|
bundler (~> 1.3)
|
7
7
|
rails (= 4.1.6)
|
@@ -40,7 +40,7 @@ GEM
|
|
40
40
|
childprocess (>= 0.3.6)
|
41
41
|
cucumber (>= 1.1.1)
|
42
42
|
rspec-expectations (>= 2.7.0)
|
43
|
-
bitters (0.10.
|
43
|
+
bitters (0.10.1)
|
44
44
|
bourbon (>= 3.2)
|
45
45
|
sass (>= 3.2)
|
46
46
|
thor
|
@@ -106,16 +106,16 @@ GEM
|
|
106
106
|
rspec-expectations (2.99.0)
|
107
107
|
diff-lcs (>= 1.1.3, < 2.0)
|
108
108
|
rspec-mocks (2.99.0)
|
109
|
-
sass (3.4.
|
109
|
+
sass (3.4.6)
|
110
110
|
sprockets (2.12.2)
|
111
111
|
hike (~> 1.2)
|
112
112
|
multi_json (~> 1.0)
|
113
113
|
rack (~> 1.0)
|
114
114
|
tilt (~> 1.1, != 1.3.0)
|
115
|
-
sprockets-rails (2.
|
115
|
+
sprockets-rails (2.2.0)
|
116
116
|
actionpack (>= 3.0)
|
117
117
|
activesupport (>= 3.0)
|
118
|
-
sprockets (
|
118
|
+
sprockets (>= 2.8, < 4.0)
|
119
119
|
thor (0.19.1)
|
120
120
|
thread_safe (0.3.4)
|
121
121
|
tilt (1.4.1)
|
data/NEWS.md
CHANGED
@@ -1,3 +1,16 @@
|
|
1
|
+
1.18.0 (October 23, 2014)
|
2
|
+
|
3
|
+
* Use Ruby 2.1.3.
|
4
|
+
* Move New Relic to all gem groups to more easily
|
5
|
+
[debug Rails performance in development][debug-performance].
|
6
|
+
* Make `bin/setup` idempotent, failing fast with install messages.
|
7
|
+
* Fix unevaluated app name in generated `en.yml` locale file.
|
8
|
+
* Change `File.exists?` to `File.exist?` to fix Ruby warning.
|
9
|
+
* Don't include port 6000 as an option for Foreman; Chome considers it unsafe.
|
10
|
+
* Git ignore the entire /tmp directory.
|
11
|
+
|
12
|
+
[debug-performance]: https://upcase.com/improving-rails-performance
|
13
|
+
|
1
14
|
1.17.0 (September 30, 2014)
|
2
15
|
|
3
16
|
* Use Rails 4.1.6.
|
data/README.md
CHANGED
@@ -39,6 +39,7 @@ It includes application gems like:
|
|
39
39
|
* [High Voltage](https://github.com/thoughtbot/high_voltage) for static pages
|
40
40
|
* [jQuery Rails](https://github.com/rails/jquery-rails) for jQuery
|
41
41
|
* [Neat](https://github.com/thoughtbot/neat) for semantic grids
|
42
|
+
* [New Relic RPM](https://github.com/newrelic/rpm) for monitoring performance
|
42
43
|
* [Normalize](https://necolas.github.io/normalize.css/) for resetting browser styles
|
43
44
|
* [Postgres](https://github.com/ged/ruby-pg) for access to the Postgres database
|
44
45
|
* [Rack Timeout](https://github.com/kch/rack-timeout) to abort requests that are
|
@@ -51,12 +52,6 @@ It includes application gems like:
|
|
51
52
|
translations
|
52
53
|
* [Unicorn](https://github.com/defunkt/unicorn) to serve HTTP requests
|
53
54
|
|
54
|
-
And gems only for staging and production like:
|
55
|
-
|
56
|
-
* [New Relic RPM](https://github.com/newrelic/rpm) for monitoring performance
|
57
|
-
* [Rails 12 Factor](https://github.com/heroku/rails_12factor) to make running
|
58
|
-
Rails 4 apps easier on Heroku
|
59
|
-
|
60
55
|
And development gems like:
|
61
56
|
|
62
57
|
* [Dotenv](https://github.com/bkeepers/dotenv) for loading environment variables
|
@@ -122,6 +117,8 @@ This:
|
|
122
117
|
* Sets them as `staging` and `production` Git remotes
|
123
118
|
* Configures staging with `RACK_ENV` and `RAILS_ENV` environment variables set
|
124
119
|
to `staging`
|
120
|
+
* Adds the [Rails 12 Factor](https://github.com/heroku/rails_12factor) gem
|
121
|
+
to make running Rails 4 apps easier on Heroku
|
125
122
|
|
126
123
|
Git
|
127
124
|
---
|
data/lib/suspenders/actions.rb
CHANGED
@@ -9,10 +9,6 @@ module Suspenders
|
|
9
9
|
File.open(path, "w") { |file| file.write(contents) }
|
10
10
|
end
|
11
11
|
|
12
|
-
def uncomment_in_file(path, uncommented)
|
13
|
-
replace_in_file(path, "# #{uncommented}", uncommented)
|
14
|
-
end
|
15
|
-
|
16
12
|
def action_mailer_host(rails_env, host)
|
17
13
|
host_config = "config.action_mailer.default_url_options = { host: '#{host}' }"
|
18
14
|
configure_environment(rails_env, host_config)
|
@@ -212,8 +212,8 @@ end
|
|
212
212
|
end
|
213
213
|
|
214
214
|
def configure_time_formats
|
215
|
-
remove_file
|
216
|
-
|
215
|
+
remove_file "config/locales/en.yml"
|
216
|
+
template "config_locales_en.yml.erb", "config/locales/en.yml"
|
217
217
|
end
|
218
218
|
|
219
219
|
def configure_rack_timeout
|
@@ -289,11 +289,7 @@ end
|
|
289
289
|
def set_heroku_remotes
|
290
290
|
remotes = <<-SHELL
|
291
291
|
|
292
|
-
# Set up staging and production
|
293
|
-
git remote add staging git@heroku.com:#{app_name}-staging.git || true
|
294
|
-
git remote add production git@heroku.com:#{app_name}-production.git || true
|
295
|
-
|
296
|
-
# Join the staging and production apps.
|
292
|
+
# Set up the staging and production apps.
|
297
293
|
#{join_heroku_app('staging')}
|
298
294
|
#{join_heroku_app('production')}
|
299
295
|
SHELL
|
@@ -305,9 +301,10 @@ git remote add production git@heroku.com:#{app_name}-production.git || true
|
|
305
301
|
heroku_app_name = "#{app_name}-#{environment}"
|
306
302
|
<<-SHELL
|
307
303
|
if heroku join --app #{heroku_app_name} &> /dev/null; then
|
308
|
-
|
304
|
+
git remote add #{environment} git@heroku.com:#{heroku_app_name}.git || true
|
305
|
+
printf 'You are a collaborator on the "#{heroku_app_name}" Heroku app\n'
|
309
306
|
else
|
310
|
-
|
307
|
+
printf 'Ask for access to the "#{heroku_app_name}" Heroku app\n'
|
311
308
|
fi
|
312
309
|
SHELL
|
313
310
|
end
|
@@ -366,7 +363,7 @@ fi
|
|
366
363
|
def raise_on_missing_translations_in(environment)
|
367
364
|
config = 'config.action_view.raise_on_missing_translations = true'
|
368
365
|
|
369
|
-
|
366
|
+
uncomment_lines("config/environments/#{environment}.rb", config)
|
370
367
|
end
|
371
368
|
|
372
369
|
def override_path_for_tests
|
@@ -385,7 +382,7 @@ fi
|
|
385
382
|
end
|
386
383
|
|
387
384
|
def port_number
|
388
|
-
@port_number ||= [3000, 4000, 5000,
|
385
|
+
@port_number ||= [3000, 4000, 5000, 7000, 8000, 9000].sample
|
389
386
|
end
|
390
387
|
end
|
391
388
|
end
|
data/lib/suspenders/version.rb
CHANGED
@@ -102,6 +102,15 @@ feature 'Suspend a new project with default configuration' do
|
|
102
102
|
expect(File).to exist("#{project_path}/config/i18n-tasks.yml")
|
103
103
|
end
|
104
104
|
|
105
|
+
scenario "generated en.yml is evaluated" do
|
106
|
+
run_suspenders
|
107
|
+
|
108
|
+
locales_en_file = IO.read("#{project_path}/config/locales/en.yml")
|
109
|
+
app_name = SuspendersTestHelpers::APP_NAME
|
110
|
+
|
111
|
+
expect(locales_en_file).to match(/application: #{app_name.humanize}/)
|
112
|
+
end
|
113
|
+
|
105
114
|
def analytics_partial
|
106
115
|
IO.read("#{project_path}/app/views/application/_analytics.html.erb")
|
107
116
|
end
|
data/spec/support/suspenders.rb
CHANGED
data/templates/Gemfile.erb
CHANGED
@@ -12,6 +12,7 @@ gem "high_voltage"
|
|
12
12
|
gem "i18n-tasks"
|
13
13
|
gem "jquery-rails"
|
14
14
|
gem "neat", "~> 1.5.1"
|
15
|
+
gem "newrelic_rpm", ">= 3.7.3"
|
15
16
|
gem "normalize-rails", "~> 3.0.0"
|
16
17
|
gem "pg"
|
17
18
|
gem "rack-timeout"
|
@@ -48,5 +49,4 @@ group :test do
|
|
48
49
|
end
|
49
50
|
|
50
51
|
group :staging, :production do
|
51
|
-
gem "newrelic_rpm", ">= 3.7.3"
|
52
52
|
end
|
data/templates/bin_setup.erb
CHANGED
@@ -7,6 +7,10 @@
|
|
7
7
|
set -e
|
8
8
|
|
9
9
|
# Set up Ruby dependencies via Bundler
|
10
|
+
if ! command -v bundle > /dev/null; then
|
11
|
+
gem install bundler --no-document
|
12
|
+
fi
|
13
|
+
|
10
14
|
bundle install
|
11
15
|
|
12
16
|
# Set up configurable environment variables
|
@@ -21,10 +25,13 @@ bundle exec rake dev:prime
|
|
21
25
|
mkdir -p .git/safe
|
22
26
|
|
23
27
|
# Pick a port for Foreman
|
24
|
-
|
28
|
+
if ! grep -qs 'port' .foreman; then
|
29
|
+
printf 'port: <%= config[:port_number] %>\n' >> .foreman
|
30
|
+
fi
|
25
31
|
|
26
|
-
#
|
32
|
+
# Error out if Foreman is not installed
|
27
33
|
if ! command -v foreman > /dev/null; then
|
28
|
-
|
29
|
-
|
34
|
+
printf 'Foreman is not installed.\n'
|
35
|
+
printf 'See https://github.com/ddollar/foreman for install instructions.\n'
|
36
|
+
exit 1
|
30
37
|
fi
|
File without changes
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: suspenders
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.18.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- thoughtbot
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-10-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bitters
|
@@ -166,7 +166,7 @@ files:
|
|
166
166
|
- templates/background_jobs_rspec.rb
|
167
167
|
- templates/bin_setup.erb
|
168
168
|
- templates/config_i18n_tasks.yml
|
169
|
-
- templates/config_locales_en.yml
|
169
|
+
- templates/config_locales_en.yml.erb
|
170
170
|
- templates/database_cleaner_rspec.rb
|
171
171
|
- templates/development_seeds.rb
|
172
172
|
- templates/disable_xml_params.rb
|
@@ -199,7 +199,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
199
199
|
requirements:
|
200
200
|
- - ">="
|
201
201
|
- !ruby/object:Gem::Version
|
202
|
-
version: 2.1.
|
202
|
+
version: 2.1.3
|
203
203
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
204
204
|
requirements:
|
205
205
|
- - ">="
|
@@ -207,7 +207,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
207
207
|
version: '0'
|
208
208
|
requirements: []
|
209
209
|
rubyforge_project:
|
210
|
-
rubygems_version: 2.
|
210
|
+
rubygems_version: 2.4.1
|
211
211
|
signing_key:
|
212
212
|
specification_version: 4
|
213
213
|
summary: Generate a Rails app using thoughtbot's best practices.
|