suspenders 1.26.0 → 1.27.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: faf9343cce26abf5827b653b3f5c095948a13860
4
- data.tar.gz: ce9093d0859282d3a7f41c208962643a8302a5e6
3
+ metadata.gz: 8630aa0ab9191605af8d2c664945e3417d4c8806
4
+ data.tar.gz: f0252df4217c18b074c1f0f6366798aaa8e68d51
5
5
  SHA512:
6
- metadata.gz: 19cc1bdfbe79281953659148b64d236faeb7fa3dfdb336119810880a89e38c20d4eb159cc7332c63a9a8ec244c96ae0908302ecda0572b84ee93aa819fdd11a7
7
- data.tar.gz: 9f128dc4af4f46dbaeb6a3bd2f7849c8fcee19145caeac8ed8f5799f27ab4a6f4ed5c7eb8faf9da8610e22eb090c09c990f87a83cae5b9ec545ef41377e2bab6
6
+ metadata.gz: bbe697e294d2aa1d277a200fb5db740a2290ea0103f5e6c3a6dfde800963f18c5e74e81649ddb778e40e0d618df327b2a0469ed438743007b12e6a5de5d32821
7
+ data.tar.gz: 51c5066912306b6be57cdaac826e636af62729ad1a67ce3f8068beac6b863af9b725c2a0bb27ec7c2062b9f59429633e469912f623cbba4c3e5b98ccb6c089d3
@@ -1,12 +1,11 @@
1
1
  language: ruby
2
- rvm:
3
- - 2.2.1
2
+ rvm: 2.2.1
3
+ cache: bundler
4
+ sudo: false
4
5
  before_install:
5
6
  - "echo '--colour' > ~/.rspec"
6
7
  - git config --global user.name 'Travis CI'
7
8
  - git config --global user.email 'travis-ci@example.com'
8
- install:
9
- - bundle install
9
+ install: bundle install
10
10
  notifications:
11
11
  email: false
12
- sudo: false
@@ -1,5 +1,10 @@
1
1
  # Contributing
2
2
 
3
+ We love pull requests from everyone. By participating in this project, you agree
4
+ to abide by the thoughtbot [code of conduct].
5
+
6
+ [code of conduct]: https://thoughtbot.com/open-source-code-of-conduct
7
+
3
8
  Fork the repo:
4
9
 
5
10
  git clone git@github.com:thoughtbot/suspenders.git
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- suspenders (1.25.0)
4
+ suspenders (1.26.0)
5
5
  bitters (~> 1.0.0)
6
6
  bundler (~> 1.3)
7
7
  rails (= 4.2.1)
data/NEWS.md CHANGED
@@ -1,3 +1,14 @@
1
+ 1.27.0 (April 10, 2015)
2
+
3
+ * Add Autoprefixer and browserslist config file
4
+ * Only display user-facing flashes
5
+ * Add code of conduct to CONTRIBUTING document
6
+ * Only use rack-timeout in staging and production
7
+ * Add SimpleCov
8
+ * Avoid generation of extra _flashes view
9
+ * Fix Travis CI install step
10
+ * Cache bundle in Travis CI runs
11
+
1
12
  1.26.0 (March 23, 2015)
2
13
 
3
14
  * Update Rails to 4.2.1
@@ -135,7 +135,8 @@ end
135
135
  end
136
136
 
137
137
  def create_shared_flashes
138
- copy_file '_flashes.html.erb', 'app/views/application/_flashes.html.erb'
138
+ copy_file "_flashes.html.erb", "app/views/application/_flashes.html.erb"
139
+ copy_file "flashes_helper.rb", "app/helpers/flashes_helper.rb"
139
140
  end
140
141
 
141
142
  def create_shared_javascripts
@@ -222,7 +223,11 @@ end
222
223
  end
223
224
 
224
225
  def configure_rack_timeout
225
- copy_file 'rack_timeout.rb', 'config/initializers/rack_timeout.rb'
226
+ rack_timeout_config = <<-RUBY
227
+ Rack::Timeout.timeout = (ENV["RACK_TIMEOUT"] || 10).to_i
228
+ RUBY
229
+
230
+ append_file "config/environments/production.rb", rack_timeout_config
226
231
  end
227
232
 
228
233
  def configure_simple_form
@@ -274,10 +279,6 @@ end
274
279
  run "bitters install --path app/assets/stylesheets"
275
280
  end
276
281
 
277
- def install_refills
278
- run "rails generate refills:import flashes"
279
- end
280
-
281
282
  def gitignore_files
282
283
  remove_file '.gitignore'
283
284
  copy_file 'suspenders_gitignore', '.gitignore'
@@ -387,6 +388,7 @@ you can deploy to staging and production with:
387
388
  end
388
389
 
389
390
  def copy_miscellaneous_files
391
+ copy_file "browserslist", "browserslist"
390
392
  copy_file "errors.rb", "config/initializers/errors.rb"
391
393
  copy_file "json_encoding.rb", "config/initializers/json_encoding.rb"
392
394
  end
@@ -40,7 +40,6 @@ module Suspenders
40
40
  invoke :configure_app
41
41
  invoke :setup_stylesheets
42
42
  invoke :install_bitters
43
- invoke :install_refills
44
43
  invoke :copy_miscellaneous_files
45
44
  invoke :customize_error_pages
46
45
  invoke :remove_routes_comment_lines
@@ -103,6 +102,7 @@ module Suspenders
103
102
  say 'Setting up the production environment'
104
103
  build :configure_newrelic
105
104
  build :configure_smtp
105
+ build :configure_rack_timeout
106
106
  build :enable_rack_deflater
107
107
  build :setup_asset_host
108
108
  end
@@ -130,7 +130,6 @@ module Suspenders
130
130
  build :configure_action_mailer
131
131
  build :configure_active_job
132
132
  build :configure_time_formats
133
- build :configure_rack_timeout
134
133
  build :configure_simple_form
135
134
  build :disable_xml_params
136
135
  build :fix_i18n_deprecation_warning
@@ -149,11 +148,6 @@ module Suspenders
149
148
  build :install_bitters
150
149
  end
151
150
 
152
- def install_refills
153
- say "Install Refills"
154
- build :install_refills
155
- end
156
-
157
151
  def setup_git
158
152
  if !options[:skip_git]
159
153
  say 'Initializing git'
@@ -1,5 +1,5 @@
1
1
  module Suspenders
2
2
  RAILS_VERSION = "4.2.1"
3
3
  RUBY_VERSION = IO.read("#{File.dirname(__FILE__)}/../../.ruby-version").strip
4
- VERSION = "1.26.0"
4
+ VERSION = "1.27.0"
5
5
  end
@@ -3,6 +3,7 @@ source "https://rubygems.org"
3
3
  ruby "<%= Suspenders::RUBY_VERSION %>"
4
4
 
5
5
  gem "airbrake"
6
+ gem "autoprefixer-rails"
6
7
  gem "bourbon", "~> 4.2.0"
7
8
  gem "coffee-rails", "~> 4.1.0"
8
9
  gem "delayed_job_active_record"
@@ -15,7 +16,6 @@ gem "neat", "~> 1.7.0"
15
16
  gem "newrelic_rpm", ">= 3.9.8"
16
17
  gem "normalize-rails", "~> 3.0.0"
17
18
  gem "pg"
18
- gem "rack-timeout"
19
19
  gem "rails", "<%= Suspenders::RAILS_VERSION %>"
20
20
  gem "recipient_interceptor"
21
21
  gem "refills"
@@ -47,9 +47,11 @@ group :test do
47
47
  gem "formulaic"
48
48
  gem "launchy"
49
49
  gem "shoulda-matchers", require: false
50
+ gem "simplecov", require: false
50
51
  gem "timecop"
51
52
  gem "webmock"
52
53
  end
53
54
 
54
55
  group :staging, :production do
56
+ gem "rack-timeout"
55
57
  end
@@ -1,6 +1,6 @@
1
1
  <% if flash.any? %>
2
2
  <div id="flash">
3
- <% flash.each do |key, value| -%>
3
+ <% user_facing_flashes.each do |key, value| -%>
4
4
  <div class="flash-<%= key %>"><%= value %></div>
5
5
  <% end -%>
6
6
  </div>
@@ -0,0 +1,4 @@
1
+ Last 2 versions
2
+ Explorer >= 9
3
+ iOS >= 7.1
4
+ Android >= 4.4
@@ -0,0 +1,5 @@
1
+ module FlashesHelper
2
+ def user_facing_flashes
3
+ flash.to_hash.slice("alert", "error", "notice", "success")
4
+ end
5
+ end
@@ -1,3 +1,8 @@
1
+ if ENV.fetch("COVERAGE", false)
2
+ require "simplecov"
3
+ SimpleCov.start "rails"
4
+ end
5
+
1
6
  require "webmock/rspec"
2
7
 
3
8
  # http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
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.26.0
4
+ version: 1.27.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-03-23 00:00:00.000000000 Z
11
+ date: 2015-04-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bitters
@@ -137,6 +137,7 @@ files:
137
137
  - templates/application.css.scss
138
138
  - templates/bin_deploy
139
139
  - templates/bin_setup.erb
140
+ - templates/browserslist
140
141
  - templates/bundler_audit.rake
141
142
  - templates/config_i18n_tasks.yml
142
143
  - templates/config_locales_en.yml.erb
@@ -145,11 +146,11 @@ files:
145
146
  - templates/disable_xml_params.rb
146
147
  - templates/errors.rb
147
148
  - templates/factory_girl_rspec.rb
149
+ - templates/flashes_helper.rb
148
150
  - templates/i18n.rb
149
151
  - templates/json_encoding.rb
150
152
  - templates/newrelic.yml.erb
151
153
  - templates/postgresql_database.yml.erb
152
- - templates/rack_timeout.rb
153
154
  - templates/rails_helper.rb
154
155
  - templates/sample.env
155
156
  - templates/secrets.yml
@@ -1 +0,0 @@
1
- Rack::Timeout.timeout = (ENV["RACK_TIMEOUT"] || 10).to_i