bretels 1.0.3 → 1.1.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: 417a804e6c24e698010740e209dbaa1832dab7a3
4
- data.tar.gz: 28bbe8160d288696b53245ce21bd3da2627ec0d6
3
+ metadata.gz: 472f46af3217abca672dcc3c8679f3480d27b24f
4
+ data.tar.gz: 820a4c2e9fe39269340950fc99f1e4acb07cf2a9
5
5
  SHA512:
6
- metadata.gz: 3b4ea638b5b74ce900e668b44684a0ba604b9079dfbb574c7dab84bac79b3548f06cae9c385c149ca7578e89bad319225c58b9e33d349a7838985f027504e817
7
- data.tar.gz: 0b50b8e3781d2be6b05034a93a19b7243ded16d6a85111dde30bbf70224a9f06e72d01b2a868e94db6be5224e2f0ac0ffd4d120fc51034bbe530f1b9ae911d85
6
+ metadata.gz: 714a1c209819a7ae02366bc9c13654f7edb68eb11a71341d0bbe0c96267e61dab2d9e9f9435ae74e9526c7589f3dae86b88e0951f98b80b0d799b7379d8f0ca8
7
+ data.tar.gz: f393b7746fe1245b61ecccb09b58796c580b0f1162d3dccdcef7545a9822182c5201bd2cbef9d523f8f01d0420fdc24e77c724cef9ee209c35b48cb4a9708d9f
@@ -1,84 +1,108 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bretels (1.0.3)
4
+ bretels (1.1.0)
5
5
  bundler (>= 1.1)
6
- rails (= 4.0.0)
6
+ rails (~> 4.2.0)
7
7
 
8
8
  GEM
9
9
  remote: http://rubygems.org/
10
10
  specs:
11
- actionmailer (4.0.0)
12
- actionpack (= 4.0.0)
13
- mail (~> 2.5.3)
14
- actionpack (4.0.0)
15
- activesupport (= 4.0.0)
16
- builder (~> 3.1.0)
17
- erubis (~> 2.7.0)
18
- rack (~> 1.5.2)
11
+ actionmailer (4.2.1)
12
+ actionpack (= 4.2.1)
13
+ actionview (= 4.2.1)
14
+ activejob (= 4.2.1)
15
+ mail (~> 2.5, >= 2.5.4)
16
+ rails-dom-testing (~> 1.0, >= 1.0.5)
17
+ actionpack (4.2.1)
18
+ actionview (= 4.2.1)
19
+ activesupport (= 4.2.1)
20
+ rack (~> 1.6)
19
21
  rack-test (~> 0.6.2)
20
- activemodel (4.0.0)
21
- activesupport (= 4.0.0)
22
- builder (~> 3.1.0)
23
- activerecord (4.0.0)
24
- activemodel (= 4.0.0)
25
- activerecord-deprecated_finders (~> 1.0.2)
26
- activesupport (= 4.0.0)
27
- arel (~> 4.0.0)
28
- activerecord-deprecated_finders (1.0.3)
29
- activesupport (4.0.0)
30
- i18n (~> 0.6, >= 0.6.4)
31
- minitest (~> 4.2)
32
- multi_json (~> 1.3)
33
- thread_safe (~> 0.1)
34
- tzinfo (~> 0.3.37)
35
- arel (4.0.1)
36
- atomic (1.1.14)
37
- builder (3.1.4)
22
+ rails-dom-testing (~> 1.0, >= 1.0.5)
23
+ rails-html-sanitizer (~> 1.0, >= 1.0.1)
24
+ actionview (4.2.1)
25
+ activesupport (= 4.2.1)
26
+ builder (~> 3.1)
27
+ erubis (~> 2.7.0)
28
+ rails-dom-testing (~> 1.0, >= 1.0.5)
29
+ rails-html-sanitizer (~> 1.0, >= 1.0.1)
30
+ activejob (4.2.1)
31
+ activesupport (= 4.2.1)
32
+ globalid (>= 0.3.0)
33
+ activemodel (4.2.1)
34
+ activesupport (= 4.2.1)
35
+ builder (~> 3.1)
36
+ activerecord (4.2.1)
37
+ activemodel (= 4.2.1)
38
+ activesupport (= 4.2.1)
39
+ arel (~> 6.0)
40
+ activesupport (4.2.1)
41
+ i18n (~> 0.7)
42
+ json (~> 1.7, >= 1.7.7)
43
+ minitest (~> 5.1)
44
+ thread_safe (~> 0.3, >= 0.3.4)
45
+ tzinfo (~> 1.1)
46
+ arel (6.0.0)
47
+ builder (3.2.2)
38
48
  erubis (2.7.0)
49
+ globalid (0.3.3)
50
+ activesupport (>= 4.1.0)
39
51
  hike (1.2.3)
40
- i18n (0.6.9)
41
- mail (2.5.4)
42
- mime-types (~> 1.16)
43
- treetop (~> 1.4.8)
44
- mime-types (1.25.1)
45
- minitest (4.7.5)
46
- multi_json (1.8.2)
47
- polyglot (0.3.3)
48
- rack (1.5.2)
49
- rack-test (0.6.2)
52
+ i18n (0.7.0)
53
+ json (1.8.2)
54
+ loofah (2.0.1)
55
+ nokogiri (>= 1.5.9)
56
+ mail (2.6.3)
57
+ mime-types (>= 1.16, < 3)
58
+ mime-types (2.4.3)
59
+ mini_portile (0.6.2)
60
+ minitest (5.5.1)
61
+ multi_json (1.11.0)
62
+ nokogiri (1.6.6.2)
63
+ mini_portile (~> 0.6.0)
64
+ rack (1.6.0)
65
+ rack-test (0.6.3)
50
66
  rack (>= 1.0)
51
- rails (4.0.0)
52
- actionmailer (= 4.0.0)
53
- actionpack (= 4.0.0)
54
- activerecord (= 4.0.0)
55
- activesupport (= 4.0.0)
67
+ rails (4.2.1)
68
+ actionmailer (= 4.2.1)
69
+ actionpack (= 4.2.1)
70
+ actionview (= 4.2.1)
71
+ activejob (= 4.2.1)
72
+ activemodel (= 4.2.1)
73
+ activerecord (= 4.2.1)
74
+ activesupport (= 4.2.1)
56
75
  bundler (>= 1.3.0, < 2.0)
57
- railties (= 4.0.0)
58
- sprockets-rails (~> 2.0.0)
59
- railties (4.0.0)
60
- actionpack (= 4.0.0)
61
- activesupport (= 4.0.0)
76
+ railties (= 4.2.1)
77
+ sprockets-rails
78
+ rails-deprecated_sanitizer (1.0.3)
79
+ activesupport (>= 4.2.0.alpha)
80
+ rails-dom-testing (1.0.6)
81
+ activesupport (>= 4.2.0.beta, < 5.0)
82
+ nokogiri (~> 1.6.0)
83
+ rails-deprecated_sanitizer (>= 1.0.1)
84
+ rails-html-sanitizer (1.0.2)
85
+ loofah (~> 2.0)
86
+ railties (4.2.1)
87
+ actionpack (= 4.2.1)
88
+ activesupport (= 4.2.1)
62
89
  rake (>= 0.8.7)
63
90
  thor (>= 0.18.1, < 2.0)
64
- rake (10.1.1)
65
- sprockets (2.10.1)
91
+ rake (10.4.2)
92
+ sprockets (2.12.3)
66
93
  hike (~> 1.2)
67
94
  multi_json (~> 1.0)
68
95
  rack (~> 1.0)
69
96
  tilt (~> 1.1, != 1.3.0)
70
- sprockets-rails (2.0.1)
97
+ sprockets-rails (2.2.4)
71
98
  actionpack (>= 3.0)
72
99
  activesupport (>= 3.0)
73
- sprockets (~> 2.8)
74
- thor (0.18.1)
75
- thread_safe (0.1.3)
76
- atomic
100
+ sprockets (>= 2.8, < 4.0)
101
+ thor (0.19.1)
102
+ thread_safe (0.3.5)
77
103
  tilt (1.4.1)
78
- treetop (1.4.15)
79
- polyglot
80
- polyglot (>= 0.3.1)
81
- tzinfo (0.3.38)
104
+ tzinfo (1.2.2)
105
+ thread_safe (~> 0.1)
82
106
 
83
107
  PLATFORMS
84
108
  ruby
@@ -26,6 +26,6 @@ Fork of thoughtbot's Suspenders for use at Brightin.
26
26
  s.rdoc_options = ["--charset=UTF-8"]
27
27
  s.extra_rdoc_files = %w[README.md LICENSE]
28
28
 
29
- s.add_dependency 'rails', '4.0.0'
29
+ s.add_dependency 'rails', '~> 4.2.0'
30
30
  s.add_dependency 'bundler', '>= 1.1'
31
31
  end
@@ -15,8 +15,10 @@ module Bretels
15
15
  'raise_delivery_errors = false', 'raise_delivery_errors = true'
16
16
  end
17
17
 
18
- def enable_factory_girl_syntax
18
+ def add_support_files
19
19
  copy_file 'factory_girl_syntax_rspec.rb', 'spec/support/factory_girl.rb'
20
+ copy_file 'database_cleaner.rb', 'spec/support/database_cleaner.rb'
21
+ copy_file 'poltergeist.rb', 'spec/support/poltergeist.rb'
20
22
  end
21
23
 
22
24
  def test_factories_first
@@ -27,6 +29,10 @@ module Bretels
27
29
  empty_directory 'spec/factories'
28
30
  end
29
31
 
32
+ def install_spring_gem
33
+ `gem install spring spring-commands-rspec`
34
+ end
35
+
30
36
  def add_cdn_settings
31
37
  config = <<-RUBY
32
38
  \n\n # Cloudfront settings
@@ -41,30 +47,6 @@ module Bretels
41
47
  :after => "config.assets.digest = true"
42
48
  end
43
49
 
44
- def configure_smtp
45
- config = <<-RUBY
46
- \n\n ActionMailer::Base.smtp_settings = {
47
- :address => 'smtp.sendgrid.net',
48
- :port => '587',
49
- :authentication => :plain,
50
- :user_name => ENV['SENDGRID_USERNAME'],
51
- :password => ENV['SENDGRID_PASSWORD'],
52
- :domain => 'herokuapp.com',
53
- :enable_starttls_auto => true
54
- }
55
- config.action_mailer.delivery_method = :smtp
56
- RUBY
57
-
58
- inject_into_file 'config/environments/production.rb', config.rstrip,
59
- :after => 'config.action_mailer.raise_delivery_errors = false'
60
-
61
- inject_into_file(
62
- "config/environments/development.rb",
63
- "\n\n config.action_mailer.delivery_method = :letter_opener",
64
- :before => "\nend"
65
- )
66
- end
67
-
68
50
  def enable_rack_deflater
69
51
  config = <<-RUBY
70
52
 
@@ -178,10 +160,11 @@ module Bretels
178
160
 
179
161
  def generate_rspec
180
162
  copy_file 'spec_helper.rb', 'spec/spec_helper.rb'
163
+ copy_file 'rails_helper.rb', 'spec/rails_helper.rb'
181
164
  end
182
165
 
183
166
  def setup_foreman
184
- copy_file 'unicorn.rb', 'config/unicorn.rb'
167
+ copy_file 'puma.rb', 'config/puma.rb'
185
168
  copy_file 'Procfile', 'Procfile'
186
169
  end
187
170
 
@@ -194,9 +177,9 @@ module Bretels
194
177
  def gitignore_files
195
178
  concat_file 'suspenders_gitignore', '.gitignore'
196
179
  [
197
- 'spec/support',
198
- 'spec/lib',
180
+ 'spec/features',
199
181
  'spec/models',
182
+ 'spec/support'
200
183
  ].each do |dir|
201
184
  empty_directory(dir)
202
185
  create_file("#{dir}/.gitkeep")
@@ -215,42 +198,16 @@ module Bretels
215
198
  run "#{path_addition} heroku config:add RACK_ENV=staging RAILS_ENV=staging --remote=staging"
216
199
  end
217
200
 
218
- def customize_error_pages
219
- meta_tags =<<-EOS
220
- <meta charset='utf-8' />
221
- <meta name='robots' content='noodp' />
222
- EOS
223
- style_tags =<<-EOS
224
- <link href='/assets/application.css' media='all' rel='stylesheet' type='text/css' />
225
- EOS
226
-
227
- %w(500 404 422).each do |page|
228
- inject_into_file "public/#{page}.html", meta_tags, :after => "<head>\n"
229
- replace_in_file "public/#{page}.html", /<style.+>.+<\/style>/mi, style_tags.strip
230
- replace_in_file "public/#{page}.html", /<!--.+-->\n/, ''
231
- end
232
- end
233
-
234
201
  def remove_routes_comment_lines
235
202
  replace_in_file 'config/routes.rb',
236
- /Application\.routes\.draw do.*end/m,
237
- "Application.routes.draw do\nend"
238
- end
239
-
240
- def add_email_validator
241
- copy_file 'email_validator.rb', 'app/validators/email_validator.rb'
203
+ /Rails\.application\.routes\.draw do.*end/m,
204
+ "Rails.application.routes.draw do\nend"
242
205
  end
243
206
 
244
207
  def add_airbrake_configuration
245
208
  copy_file 'airbrake.rb', 'config/initializers/airbrake.rb'
246
209
  end
247
210
 
248
- def setup_default_rake_task
249
- append_file 'Rakefile' do
250
- "task(:default).clear\ntask :default => [:spec]"
251
- end
252
- end
253
-
254
211
  def raise_unpermitted_params
255
212
  config = <<-RUBY
256
213
  \n\n config.action_controller.action_on_unpermitted_parameters = :raise
@@ -28,7 +28,6 @@ module Bretels
28
28
  invoke :setup_database
29
29
  invoke :configure_app
30
30
  invoke :setup_stylesheets
31
- invoke :customize_error_pages
32
31
  invoke :remove_routes_comment_lines
33
32
  invoke :remove_turbolinks
34
33
  invoke :setup_git
@@ -45,11 +44,12 @@ module Bretels
45
44
  build :raise_delivery_errors
46
45
  build :initialize_on_precompile
47
46
  build :lib_in_load_path
47
+ build :install_spring_gem
48
48
  end
49
49
 
50
50
  def setup_test_environment
51
51
  say 'Setting up the test environment'
52
- build :enable_factory_girl_syntax
52
+ build :add_support_files
53
53
  build :test_factories_first
54
54
  build :generate_rspec
55
55
  build :configure_rspec
@@ -58,7 +58,6 @@ module Bretels
58
58
 
59
59
  def setup_production_environment
60
60
  say 'Setting up the production environment'
61
- build :configure_smtp
62
61
  build :enable_force_ssl
63
62
  build :add_cdn_settings
64
63
  build :enable_rack_deflater
@@ -70,7 +69,7 @@ module Bretels
70
69
  end
71
70
 
72
71
  def create_suspenders_views
73
- say 'Creating suspenders views'
72
+ say 'Creating bretel views'
74
73
  build :create_partials_directory
75
74
  build :create_shared_flashes
76
75
  build :create_application_layout
@@ -79,6 +78,7 @@ module Bretels
79
78
  def customize_gemfile
80
79
  build :replace_gemfile
81
80
  build :set_ruby_to_version_being_used
81
+ bundle_command 'install'
82
82
  end
83
83
 
84
84
  def setup_database
@@ -98,8 +98,6 @@ module Bretels
98
98
  build :configure_dutch_language
99
99
  build :configure_rack_timeout
100
100
  build :add_airbrake_configuration
101
- build :add_email_validator
102
- build :setup_default_rake_task
103
101
  build :setup_foreman
104
102
  end
105
103
 
@@ -129,11 +127,6 @@ module Bretels
129
127
  build :init_git
130
128
  end
131
129
 
132
- def customize_error_pages
133
- say 'Customizing the 500/404/422 pages'
134
- build :customize_error_pages
135
- end
136
-
137
130
  def remove_turbolinks
138
131
  build :remove_turbolinks
139
132
  end
@@ -143,14 +136,7 @@ module Bretels
143
136
  end
144
137
 
145
138
  def outro
146
- say 'Done. Congratulations!'
147
- say '1. Run bundle install'
148
- say '2. Run rake db:create'
149
- say "3. Update config/initializers/airbrake.rb"
150
- end
151
-
152
- def run_bundle
153
- # Let's not: We'll bundle manually at the right spot
139
+ say 'Done. Congratulations! Please run bin/setup to setup database!'
154
140
  end
155
141
 
156
142
  protected
@@ -158,6 +144,5 @@ module Bretels
158
144
  def get_builder_class
159
145
  Bretels::AppBuilder
160
146
  end
161
-
162
147
  end
163
148
  end
@@ -1,3 +1,3 @@
1
1
  module Bretels
2
- VERSION = '1.0.3'
2
+ VERSION = '1.1.0'
3
3
  end
@@ -1,8 +1,7 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- ruby '2.0.0'
4
-
5
- gem 'rails', '~> 4.0.0'
3
+ gem 'rails', '~> 4.2.0'
4
+ gem 'airbrake'
6
5
  gem 'coffee-rails'
7
6
  gem 'jquery-rails'
8
7
  gem 'pg'
@@ -10,13 +9,14 @@ gem 'rack-timeout'
10
9
  gem 'rails-i18n'
11
10
  gem 'sass-rails'
12
11
  gem 'uglifier'
13
- gem 'airbrake'
14
12
 
15
13
  group :development do
16
14
  gem 'better_errors'
17
15
  gem 'binding_of_caller'
18
16
  gem 'letter_opener'
19
17
  gem 'quiet_assets'
18
+ gem 'spring'
19
+ gem 'spring-commands-rspec'
20
20
  end
21
21
 
22
22
  group :staging do
@@ -29,12 +29,13 @@ group :development, :test do
29
29
  end
30
30
 
31
31
  group :test do
32
- gem 'launchy'
32
+ gem 'capybara'
33
+ gem 'poltergeist'
34
+ gem 'database_cleaner'
33
35
  end
34
36
 
35
37
  group :staging, :production do
36
- gem 'newrelic_rpm'
37
38
  gem 'rack-zippy'
38
39
  gem 'rails_12factor'
39
- gem 'unicorn'
40
+ gem 'puma'
40
41
  end
@@ -1 +1 @@
1
- web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb
1
+ web: bundle exec puma -C config/puma.rb
@@ -1,5 +1,3 @@
1
- <div id="flash">
2
- <% flash.each do |key, value| -%>
3
- <div id="flash_<%= key %>"><%= value %></div>
4
- <% end -%>
5
- </div>
1
+ <% flash.each do |key, value| -%>
2
+ <div id="flash--<%= key %>"><%= value %></div>
3
+ <% end -%>
@@ -1,6 +1,13 @@
1
+ require 'rake'
2
+ require 'airbrake/rake_handler'
3
+
1
4
  Airbrake.configure do |config|
2
5
  config.api_key = ''
3
6
  config.host = ''
4
7
  config.port = 443
5
8
  config.secure = true
6
- end
9
+ config.rescue_rake_exceptions = true
10
+ ENV.keys.each do |filtered_key|
11
+ config.rake_environment_filters << filtered_key
12
+ end
13
+ end
@@ -0,0 +1,16 @@
1
+ RSpec.configure do |config|
2
+ config.use_transactional_fixtures = false
3
+
4
+ config.before(:suite) do
5
+ DatabaseCleaner.clean_with(:truncation)
6
+ end
7
+
8
+ config.before(:each) do |example|
9
+ DatabaseCleaner.strategy = example.metadata[:js] ? :truncation : :transaction
10
+ DatabaseCleaner.start
11
+ end
12
+
13
+ config.after(:each) do
14
+ DatabaseCleaner.clean
15
+ end
16
+ end
@@ -1,6 +1,6 @@
1
- require 'spec_helper'
1
+ require 'rails_helper'
2
2
 
3
- describe 'validate FactoryGirl factories' do
3
+ RSpec.describe 'validate FactoryGirl factories' do
4
4
  FactoryGirl.factories.each do |factory|
5
5
  context "with factory for :#{factory.name}" do
6
6
  subject { FactoryGirl.build(factory.name) }
@@ -0,0 +1,3 @@
1
+ require 'capybara/poltergeist'
2
+
3
+ Capybara.javascript_driver = :poltergeist
@@ -2,6 +2,7 @@ development: &default
2
2
  adapter: postgresql
3
3
  database: <%= app_name %>_development
4
4
  encoding: utf8
5
+ host: localhost
5
6
  min_messages: warning
6
7
  pool: 5
7
8
  timeout: 5000
@@ -0,0 +1,17 @@
1
+ workers Integer(ENV["WEB_CONCURRENCY"] || 3)
2
+ threads Integer(ENV["MIN_THREADS"] || 1), Integer(ENV["MAX_THREADS"] || 16)
3
+
4
+ preload_app!
5
+
6
+ rackup DefaultRackup
7
+ port ENV["PORT"] || 3000
8
+ environment ENV["RACK_ENV"] || "development"
9
+
10
+ on_worker_boot do
11
+ ActiveSupport.on_load(:active_record) do
12
+ config = ActiveRecord::Base.configurations[Rails.env] ||
13
+ Rails.application.config.database_configuration[Rails.env]
14
+ config["pool"] = ENV["MAX_THREADS"] || 16
15
+ ActiveRecord::Base.establish_connection(config)
16
+ end
17
+ end
@@ -0,0 +1,11 @@
1
+ ENV["RAILS_ENV"] = "test"
2
+ require 'spec_helper'
3
+ require File.expand_path("../../config/environment", __FILE__)
4
+ require "rspec/rails"
5
+
6
+ Dir[Rails.root.join("spec/support/**/*.rb")].each { |file| require file }
7
+ ActiveRecord::Migration.maintain_test_schema!
8
+
9
+ RSpec.configure do |config|
10
+ config.infer_spec_type_from_file_location!
11
+ end
@@ -1,16 +1,19 @@
1
- ENV["RAILS_ENV"] ||= 'test'
2
- require File.expand_path("../../config/environment", __FILE__)
3
- require 'rspec/rails'
4
- require 'rspec/autorun'
1
+ RSpec.configure do |config|
2
+ config.disable_monkey_patching!
5
3
 
6
- Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
4
+ if config.files_to_run.one?
5
+ config.default_formatter = 'doc'
6
+ end
7
7
 
8
- RSpec.configure do |config|
9
- config.include FactoryGirl::Syntax::Methods
10
- config.use_transactional_fixtures = true
11
- config.infer_base_class_for_anonymous_controllers = false
12
- config.order = "random"
13
- config.expect_with :rspec do |c|
14
- c.syntax = :expect
8
+ config.order = :random
9
+ Kernel.srand config.seed
10
+
11
+ config.expect_with :rspec do |expectations|
12
+ expectations.syntax = :expect
13
+ end
14
+
15
+ config.mock_with :rspec do |mocks|
16
+ mocks.syntax = :expect
17
+ mocks.verify_partial_doubles = true
15
18
  end
16
19
  end
@@ -1,5 +1,5 @@
1
1
  load "config/environments/production.rb"
2
2
 
3
- <%=app_const%>.configure do
3
+ Rails.application.configure do
4
4
  Mail.register_interceptor RecipientInterceptor.new(ENV['EMAIL_RECEIVERS'])
5
5
  end
@@ -4,7 +4,7 @@
4
4
  <head>
5
5
  <meta charset="utf-8" />
6
6
  <title></title>
7
- <%%= stylesheet_link_tag :application, :media => 'all' %>
7
+ <%%= stylesheet_link_tag :application, media: 'all' %>
8
8
  <%%= javascript_include_tag :application %>
9
9
  <%%= csrf_meta_tags %>
10
10
  </head>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bretels
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - brightin
@@ -9,22 +9,22 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-01-02 00:00:00.000000000 Z
12
+ date: 2015-03-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - '='
18
+ - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: 4.0.0
20
+ version: 4.2.0
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - '='
25
+ - - "~>"
26
26
  - !ruby/object:Gem::Version
27
- version: 4.0.0
27
+ version: 4.2.0
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: bundler
30
30
  requirement: !ruby/object:Gem::Requirement
@@ -66,16 +66,18 @@ files:
66
66
  - templates/_flashes.html.erb
67
67
  - templates/airbrake.rb
68
68
  - templates/config_locales_nl.yml
69
- - templates/email_validator.rb
69
+ - templates/database_cleaner.rb
70
70
  - templates/factories_spec.rb
71
71
  - templates/factory_girl_syntax_rspec.rb
72
+ - templates/poltergeist.rb
72
73
  - templates/postgresql_database.yml.erb
74
+ - templates/puma.rb
73
75
  - templates/rack_timeout.rb
76
+ - templates/rails_helper.rb
74
77
  - templates/spec_helper.rb
75
78
  - templates/staging.rb.erb
76
79
  - templates/suspenders_gitignore
77
80
  - templates/suspenders_layout.html.erb.erb
78
- - templates/unicorn.rb
79
81
  homepage: http://github.com/brightin/bretels
80
82
  licenses: []
81
83
  metadata: {}
@@ -96,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
96
98
  version: '0'
97
99
  requirements: []
98
100
  rubyforge_project:
99
- rubygems_version: 2.2.0
101
+ rubygems_version: 2.4.5
100
102
  signing_key:
101
103
  specification_version: 4
102
104
  summary: Generate a Rails app using brightins's best practices.
@@ -1,7 +0,0 @@
1
- class EmailValidator < ActiveModel::EachValidator
2
- def validate_each(record, attribute, value)
3
- unless value =~ /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i
4
- record.errors[attribute] << (options[:message] || "is not an email")
5
- end
6
- end
7
- end
@@ -1,24 +0,0 @@
1
- worker_processes Integer(ENV['WEB_CONCURRENCY'] || 3)
2
- timeout Integer(ENV['WEB_TIMEOUT'] || 15)
3
- preload_app true
4
-
5
- before_fork do |server, worker|
6
-
7
- Signal.trap 'TERM' do
8
- puts 'Unicorn master intercepting TERM and sending myself QUIT instead'
9
- Process.kill 'QUIT', Process.pid
10
- end
11
-
12
- defined?(ActiveRecord::Base) and
13
- ActiveRecord::Base.connection.disconnect!
14
- end
15
-
16
- after_fork do |server, worker|
17
-
18
- Signal.trap 'TERM' do
19
- puts 'Unicorn worker intercepting TERM and doing nothing. Wait for master to sent QUIT'
20
- end
21
-
22
- defined?(ActiveRecord::Base) and
23
- ActiveRecord::Base.establish_connection
24
- end