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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d3d69233667fc34f1e795937ac85a02b7c5d6440
4
- data.tar.gz: 23a405772fc9b1ae2d8e7fd5849161ace621bf44
3
+ metadata.gz: 5ed82bbed26013b10a8da6e00c1bbfd20ae852bd
4
+ data.tar.gz: dbbb9f4dd43bf2311392125b8739a4672b5e51b9
5
5
  SHA512:
6
- metadata.gz: cb7312ccc78cc42ea226c3ac331ec0d5b4637db8fe82fab1075a903913dc8f547cec70ab4437f3496459b8dbce6e5c646e220537b1c9797ababe6b5538302088
7
- data.tar.gz: 0b5d280d14550eac765f1a3b11e8a28b6054fb249d34f60054dce920698b5795dd0511da66506b0cc1a04d12dd85006f13939b5e1920c9ade8d10da9f88a576b
6
+ metadata.gz: a730d820d42a75b9e30825e3a8a6f429fd83bd0f89a39074117ec03f1bc7d6092235cb2feef9b9d114e7f61d9fd10b4536189df32c8aa9091f3cd249e63d2bd9
7
+ data.tar.gz: 2ef3565187f9ba9503679df275bfc4dc1323ce4ae29700750bd3c8ccb5451196e1a6799862f56603f1459e361778a484b1c3e3109e1a35a0627ce80aefef21c4
data/.gitignore CHANGED
@@ -1,4 +1,4 @@
1
1
  *.gem
2
2
  *.swp
3
3
  /.bundle
4
- /tmp/dummy
4
+ /tmp
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.1.2
1
+ 2.1.3
data/.travis.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.1.2
3
+ - 2.1.3
4
4
  before_install:
5
5
  - "echo '--colour' > ~/.rspec"
6
6
  - git config --global user.name 'Travis CI'
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- suspenders (1.17.0)
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.0)
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.3)
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.1.4)
115
+ sprockets-rails (2.2.0)
116
116
  actionpack (>= 3.0)
117
117
  activesupport (>= 3.0)
118
- sprockets (~> 2.8)
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
  ---
@@ -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 'config/locales/en.yml'
216
- copy_file 'config_locales_en.yml', 'config/locales/en.yml'
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 git remotes.
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
- echo 'You are a collaborator on the "#{heroku_app_name}" Heroku app'
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
- echo 'Ask for access to the "#{heroku_app_name}" Heroku app'
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
- uncomment_in_file("config/environments/#{environment}.rb", config)
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, 6000, 7000, 8000, 9000].sample
385
+ @port_number ||= [3000, 4000, 5000, 7000, 8000, 9000].sample
389
386
  end
390
387
  end
391
388
  end
@@ -1,5 +1,5 @@
1
1
  module Suspenders
2
2
  RAILS_VERSION = "4.1.6"
3
3
  RUBY_VERSION = IO.read("#{File.dirname(__FILE__)}/../../.ruby-version").strip
4
- VERSION = "1.17.0"
4
+ VERSION = "1.18.0"
5
5
  end
@@ -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
@@ -20,7 +20,7 @@ module SuspendersTestHelpers
20
20
  end
21
21
 
22
22
  def drop_dummy_database
23
- if File.exists?(project_path)
23
+ if File.exist?(project_path)
24
24
  Dir.chdir(project_path) do
25
25
  Bundler.with_clean_env do
26
26
  `rake db:drop`
@@ -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
@@ -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
- echo "port: <%= config[:port_number] %>" > .foreman
28
+ if ! grep -qs 'port' .foreman; then
29
+ printf 'port: <%= config[:port_number] %>\n' >> .foreman
30
+ fi
25
31
 
26
- # Print warning if Foreman is not installed
32
+ # Error out if Foreman is not installed
27
33
  if ! command -v foreman > /dev/null; then
28
- echo "foreman is not installed."
29
- echo "See https://github.com/ddollar/foreman for install instructions."
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
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.17.0
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-09-30 00:00:00.000000000 Z
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.2
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.2.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.