suspenders 1.29.0 → 1.30.0

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: b1c5bbaee1a756025cd9d7682c0d3f2e0cd7681a
4
- data.tar.gz: c01b10195b95bbcda715f73bb10e4e55311f6ec2
3
+ metadata.gz: d05003d3e1588c15c4291ed296d2c9c936ccb959
4
+ data.tar.gz: 4f3a7b17134b11d774f02b827cceb9b07f214e07
5
5
  SHA512:
6
- metadata.gz: 9678004a0610ec1aa35d4829870da67dbe3d64c69a90822223c11faa1cd5b1fa9c8ee75b77b0a927313752bb13286aa72d098817f335568ccdab6712e2e6f925
7
- data.tar.gz: 626aaecb11ce0f0f02ed50add9d214f41af8ef5b6c1885b8d2b7d4eeec3d2958bd1780bdf41837dd5eb812816148e62252b06ba8398889b0032ad38cfdd69f8f
6
+ metadata.gz: 5743803276b70bf047a8481b5bbdc34bb1b1143e352624309ca941d1aded2f139a284990a4f517f50abc35408eb89b17d5b15f799e7327e7919b815829a09748
7
+ data.tar.gz: 9f5980411e60b3646b54d4424918df79592519beb010541f3878c9eb8d421f3c55e81c53a9cf0ffdd4cbb05c984b22c93b965bd1f22e9350e9420c2731ece04a
data/Gemfile.lock CHANGED
@@ -4,41 +4,41 @@ PATH
4
4
  suspenders (1.29.0)
5
5
  bitters (~> 1.0.0)
6
6
  bundler (~> 1.3)
7
- rails (= 4.2.1)
7
+ rails (~> 4.2.0)
8
8
 
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- actionmailer (4.2.1)
13
- actionpack (= 4.2.1)
14
- actionview (= 4.2.1)
15
- activejob (= 4.2.1)
12
+ actionmailer (4.2.2)
13
+ actionpack (= 4.2.2)
14
+ actionview (= 4.2.2)
15
+ activejob (= 4.2.2)
16
16
  mail (~> 2.5, >= 2.5.4)
17
17
  rails-dom-testing (~> 1.0, >= 1.0.5)
18
- actionpack (4.2.1)
19
- actionview (= 4.2.1)
20
- activesupport (= 4.2.1)
18
+ actionpack (4.2.2)
19
+ actionview (= 4.2.2)
20
+ activesupport (= 4.2.2)
21
21
  rack (~> 1.6)
22
22
  rack-test (~> 0.6.2)
23
23
  rails-dom-testing (~> 1.0, >= 1.0.5)
24
24
  rails-html-sanitizer (~> 1.0, >= 1.0.1)
25
- actionview (4.2.1)
26
- activesupport (= 4.2.1)
25
+ actionview (4.2.2)
26
+ activesupport (= 4.2.2)
27
27
  builder (~> 3.1)
28
28
  erubis (~> 2.7.0)
29
29
  rails-dom-testing (~> 1.0, >= 1.0.5)
30
30
  rails-html-sanitizer (~> 1.0, >= 1.0.1)
31
- activejob (4.2.1)
32
- activesupport (= 4.2.1)
31
+ activejob (4.2.2)
32
+ activesupport (= 4.2.2)
33
33
  globalid (>= 0.3.0)
34
- activemodel (4.2.1)
35
- activesupport (= 4.2.1)
34
+ activemodel (4.2.2)
35
+ activesupport (= 4.2.2)
36
36
  builder (~> 3.1)
37
- activerecord (4.2.1)
38
- activemodel (= 4.2.1)
39
- activesupport (= 4.2.1)
37
+ activerecord (4.2.2)
38
+ activemodel (= 4.2.2)
39
+ activesupport (= 4.2.2)
40
40
  arel (~> 6.0)
41
- activesupport (4.2.1)
41
+ activesupport (4.2.2)
42
42
  i18n (~> 0.7)
43
43
  json (~> 1.7, >= 1.7.7)
44
44
  minitest (~> 5.1)
@@ -68,19 +68,19 @@ GEM
68
68
  minitest (5.7.0)
69
69
  nokogiri (1.6.6.2)
70
70
  mini_portile (~> 0.6.0)
71
- rack (1.6.1)
71
+ rack (1.6.2)
72
72
  rack-test (0.6.3)
73
73
  rack (>= 1.0)
74
- rails (4.2.1)
75
- actionmailer (= 4.2.1)
76
- actionpack (= 4.2.1)
77
- actionview (= 4.2.1)
78
- activejob (= 4.2.1)
79
- activemodel (= 4.2.1)
80
- activerecord (= 4.2.1)
81
- activesupport (= 4.2.1)
74
+ rails (4.2.2)
75
+ actionmailer (= 4.2.2)
76
+ actionpack (= 4.2.2)
77
+ actionview (= 4.2.2)
78
+ activejob (= 4.2.2)
79
+ activemodel (= 4.2.2)
80
+ activerecord (= 4.2.2)
81
+ activesupport (= 4.2.2)
82
82
  bundler (>= 1.3.0, < 2.0)
83
- railties (= 4.2.1)
83
+ railties (= 4.2.2)
84
84
  sprockets-rails
85
85
  rails-deprecated_sanitizer (1.0.3)
86
86
  activesupport (>= 4.2.0.alpha)
@@ -90,9 +90,9 @@ GEM
90
90
  rails-deprecated_sanitizer (>= 1.0.1)
91
91
  rails-html-sanitizer (1.0.2)
92
92
  loofah (~> 2.0)
93
- railties (4.2.1)
94
- actionpack (= 4.2.1)
95
- activesupport (= 4.2.1)
93
+ railties (4.2.2)
94
+ actionpack (= 4.2.2)
95
+ activesupport (= 4.2.2)
96
96
  rake (>= 0.8.7)
97
97
  thor (>= 0.18.1, < 2.0)
98
98
  rake (10.4.2)
data/NEWS.md CHANGED
@@ -1,3 +1,12 @@
1
+ 1.30.0 (July 30, 2015)
2
+
3
+ * Update to RSpec 3.3
4
+ * Replace TravisCI with CircleCI
5
+ * Rename development data concept to avoid confusion with db/seeds
6
+ * Remove Unicorn in favor of Puma, as [recommended by Heroku]
7
+
8
+ [recommended by Heroku]: https://devcenter.heroku.com/changelog-items/594
9
+
1
10
  1.29.0 (June 16, 2015)
2
11
 
3
12
  * Generate rake, rails and rspec binstubs with Spring
data/README.md CHANGED
@@ -53,7 +53,7 @@ It includes application gems like:
53
53
  and style
54
54
  * [Title](https://github.com/calebthompson/title) for storing titles in
55
55
  translations
56
- * [Unicorn](https://github.com/defunkt/unicorn) to serve HTTP requests
56
+ * [Puma](https://github.com/puma/puma) to serve HTTP requests
57
57
 
58
58
  And development gems like:
59
59
 
@@ -97,7 +97,7 @@ Suspenders also comes with:
97
97
  * [t() and l() in specs without prefixing with I18n][i18n]
98
98
  * An automatically-created `SECRET_KEY_BASE` environment variable in all
99
99
  environments
100
- * Configuration for [Travis][travis] Continuous Integration (tests)
100
+ * Configuration for [CircleCI][circle] Continuous Integration (tests)
101
101
  * Configuration for [Hound][hound] Continuous Integration (style)
102
102
  * The analytics adapter [Segment][segment] (and therefore config for Google
103
103
  Analytics, Intercom, Facebook Ads, Twitter Ads, etc.)
@@ -107,7 +107,7 @@ Suspenders also comes with:
107
107
  [pool]: https://devcenter.heroku.com/articles/concurrency-and-database-connections
108
108
  [binstub]: https://github.com/thoughtbot/suspenders/pull/282
109
109
  [i18n]: https://github.com/thoughtbot/suspenders/pull/304
110
- [travis]: http://docs.travis-ci.com/user/travis-pro/
110
+ [circle]: https://circleci.com/docs
111
111
  [hound]: https://houndci.com
112
112
  [segment]: https://segment.com
113
113
 
@@ -134,7 +134,7 @@ You can optionally specify alternate Heroku flags:
134
134
 
135
135
  suspenders app \
136
136
  --heroku true \
137
- --heroku-flags "--region eu --addons newrelic,pgbackups,sendgrid,ssl"
137
+ --heroku-flags "--region eu --addons newrelic,sendgrid,ssl"
138
138
 
139
139
  See all possible Heroku flags:
140
140
 
@@ -33,7 +33,7 @@ module Suspenders
33
33
  end
34
34
 
35
35
  def provide_dev_prime_task
36
- copy_file 'development_seeds.rb', 'lib/tasks/development_seeds.rake'
36
+ copy_file 'dev.rake', 'lib/tasks/dev.rake'
37
37
  end
38
38
 
39
39
  def configure_generators
@@ -209,8 +209,8 @@ end
209
209
  copy_file "spec_helper.rb", "spec/spec_helper.rb"
210
210
  end
211
211
 
212
- def configure_travis
213
- template 'travis.yml.erb', '.travis.yml'
212
+ def configure_ci
213
+ template "circle.yml.erb", "circle.yml"
214
214
  end
215
215
 
216
216
  def configure_i18n_for_test_environment
@@ -278,8 +278,8 @@ Rack::Timeout.timeout = (ENV["RACK_TIMEOUT"] || 10).to_i
278
278
  generate 'rspec:install'
279
279
  end
280
280
 
281
- def configure_unicorn
282
- copy_file 'unicorn.rb', 'config/unicorn.rb'
281
+ def configure_puma
282
+ copy_file "puma.rb", "config/puma.rb"
283
283
  end
284
284
 
285
285
  def setup_foreman
@@ -95,7 +95,7 @@ module Suspenders
95
95
  build :configure_background_jobs_for_rspec
96
96
  build :enable_database_cleaner
97
97
  build :configure_spec_support_features
98
- build :configure_travis
98
+ build :configure_ci
99
99
  build :configure_i18n_for_test_environment
100
100
  build :configure_i18n_tasks
101
101
  build :configure_action_mailer_in_specs
@@ -138,7 +138,7 @@ module Suspenders
138
138
  build :disable_xml_params
139
139
  build :fix_i18n_deprecation_warning
140
140
  build :setup_default_rake_task
141
- build :configure_unicorn
141
+ build :configure_puma
142
142
  build :setup_foreman
143
143
  end
144
144
 
@@ -1,5 +1,5 @@
1
1
  module Suspenders
2
- RAILS_VERSION = "4.2.1"
2
+ RAILS_VERSION = "~> 4.2.0"
3
3
  RUBY_VERSION = IO.read("#{File.dirname(__FILE__)}/../../.ruby-version").strip
4
- VERSION = "1.29.0"
4
+ VERSION = "1.30.0"
5
5
  end
@@ -17,6 +17,7 @@ gem "newrelic_rpm", ">= 3.9.8"
17
17
  gem "normalize-rails", "~> 3.0.0"
18
18
  gem "pg"
19
19
  gem "rack-canonical-host"
20
+ gem "puma"
20
21
  gem "rails", "<%= Suspenders::RAILS_VERSION %>"
21
22
  gem "recipient_interceptor"
22
23
  gem "refills"
@@ -24,7 +25,6 @@ gem "sass-rails", "~> 5.0"
24
25
  gem "simple_form"
25
26
  gem "title"
26
27
  gem "uglifier"
27
- gem "unicorn"
28
28
 
29
29
  group :development do
30
30
  gem "spring"
@@ -39,7 +39,7 @@ group :development, :test do
39
39
  gem "dotenv-rails"
40
40
  gem "factory_girl_rails"
41
41
  gem "pry-rails"
42
- gem "rspec-rails", "~> 3.1.0"
42
+ gem "rspec-rails", "~> 3.3.0"
43
43
  end
44
44
 
45
45
  group :test do
data/templates/Procfile CHANGED
@@ -1,2 +1,2 @@
1
- web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb
1
+ web: bundle exec puma -p $PORT -C ./config/puma.rb
2
2
  worker: bundle exec rake jobs:work
@@ -0,0 +1,8 @@
1
+ test:
2
+ override:
3
+ - bundle exec rake
4
+ deployment:
5
+ staging:
6
+ branch: master
7
+ commands:
8
+ - bin/deploy staging
@@ -2,7 +2,7 @@ if Rails.env.development? || Rails.env.test?
2
2
  require "factory_girl"
3
3
 
4
4
  namespace :dev do
5
- desc "Seed data for development environment"
5
+ desc "Sample data for local development environment"
6
6
  task prime: "db:setup" do
7
7
  include FactoryGirl::Syntax::Methods
8
8
 
@@ -4,9 +4,19 @@ development: &default
4
4
  encoding: utf8
5
5
  host: localhost
6
6
  min_messages: warning
7
- pool: 2
7
+ pool: <%%= ENV.fetch("DB_POOL", 5) %>
8
+ reaping_frequency: <%%= ENV.fetch("DB_REAPING_FREQUENCY", 10) %>
8
9
  timeout: 5000
9
10
 
10
11
  test:
11
12
  <<: *default
12
13
  database: <%= app_name %>_test
14
+
15
+ production: &deploy
16
+ encoding: utf8
17
+ min_messages: warning
18
+ pool: <%%= [ENV.fetch("MAX_THREADS", 5), ENV.fetch("DB_POOL", 5)].max %>
19
+ timeout: 5000
20
+ url: <%%= ENV.fetch("DATABASE_URL", "") %>
21
+
22
+ staging: *deploy
data/templates/puma.rb ADDED
@@ -0,0 +1,19 @@
1
+ # https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server
2
+
3
+ # The environment variable WEB_CONCURRENCY may be set to a default value based
4
+ # on dyno size. To manually configure this value use heroku config:set
5
+ # WEB_CONCURRENCY.
6
+ workers Integer(ENV.fetch("WEB_CONCURRENCY", 3))
7
+ threads_count = Integer(ENV.fetch("MAX_THREADS", 5))
8
+ threads(threads_count, threads_count)
9
+
10
+ preload_app!
11
+
12
+ rackup DefaultRackup
13
+ environment ENV.fetch("RACK_ENV", "development")
14
+
15
+ on_worker_boot do
16
+ # Worker specific setup for Rails 4.1+
17
+ # See: https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server#on-worker-boot
18
+ ActiveRecord::Base.establish_connection
19
+ end
@@ -16,6 +16,7 @@ RSpec.configure do |config|
16
16
  mocks.verify_partial_doubles = true
17
17
  end
18
18
 
19
+ config.example_status_persistence_file_path = "tmp/rspec_examples.txt"
19
20
  config.order = :random
20
21
  end
21
22
 
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.29.0
4
+ version: 1.30.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - thoughtbot
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-16 00:00:00.000000000 Z
11
+ date: 2015-07-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bitters
@@ -42,16 +42,16 @@ dependencies:
42
42
  name: rails
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '='
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 4.2.1
47
+ version: 4.2.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '='
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 4.2.1
54
+ version: 4.2.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -119,10 +119,11 @@ files:
119
119
  - templates/bin_setup.erb
120
120
  - templates/browserslist
121
121
  - templates/bundler_audit.rake
122
+ - templates/circle.yml.erb
122
123
  - templates/config_i18n_tasks.yml
123
124
  - templates/config_locales_en.yml.erb
124
125
  - templates/database_cleaner_rspec.rb
125
- - templates/development_seeds.rb
126
+ - templates/dev.rake
126
127
  - templates/disable_xml_params.rb
127
128
  - templates/errors.rb
128
129
  - templates/factory_girl_rspec.rb
@@ -132,6 +133,7 @@ files:
132
133
  - templates/json_encoding.rb
133
134
  - templates/newrelic.yml.erb
134
135
  - templates/postgresql_database.yml.erb
136
+ - templates/puma.rb
135
137
  - templates/rails_helper.rb
136
138
  - templates/sample.env
137
139
  - templates/secrets.yml
@@ -140,8 +142,6 @@ files:
140
142
  - templates/staging.rb
141
143
  - templates/suspenders_gitignore
142
144
  - templates/suspenders_layout.html.erb.erb
143
- - templates/travis.yml.erb
144
- - templates/unicorn.rb
145
145
  homepage: http://github.com/thoughtbot/suspenders
146
146
  licenses:
147
147
  - MIT
@@ -1,21 +0,0 @@
1
- before_install:
2
- - "echo '--colour' > ~/.rspec"
3
- - "echo 'gem: --no-document' > ~/.gemrc"
4
- - export DISPLAY=:99.0
5
- - sh -e /etc/init.d/xvfb start
6
- install:
7
- - bin/setup
8
- branches:
9
- only:
10
- - master
11
- cache:
12
- - bundler
13
- language:
14
- - ruby
15
- notifications:
16
- email: false
17
- rvm:
18
- - <%= Suspenders::RUBY_VERSION %>
19
- addons:
20
- postgresql: "9.3"
21
- sudo: false
data/templates/unicorn.rb DELETED
@@ -1,30 +0,0 @@
1
- # https://devcenter.heroku.com/articles/rails-unicorn
2
-
3
- worker_processes (ENV["UNICORN_WORKERS"] || 3).to_i
4
- timeout (ENV["UNICORN_TIMEOUT"] || 15).to_i
5
- preload_app true
6
-
7
- before_fork do |_server, _worker|
8
- Signal.trap "TERM" do
9
- puts "Unicorn master intercepting TERM, sending myself QUIT instead"
10
- Process.kill "QUIT", Process.pid
11
- end
12
-
13
- if defined? ActiveRecord::Base
14
- ActiveRecord::Base.connection.disconnect!
15
- end
16
- end
17
-
18
- after_fork do |_server, _worker|
19
- Signal.trap "TERM" do
20
- puts "Unicorn worker intercepting TERM, waiting for master to send QUIT"
21
- end
22
-
23
- if defined? ActiveRecord::Base
24
- config = ActiveRecord::Base.configurations[Rails.env] ||
25
- Rails.application.config.database_configuration[Rails.env]
26
- config["reaping_frequency"] = (ENV["DB_REAPING_FREQUENCY"] || 10).to_i
27
- config["pool"] = (ENV["DB_POOL"] || 2).to_i
28
- ActiveRecord::Base.establish_connection(config)
29
- end
30
- end