gb-firestarter 0.3.1 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,12 +1,12 @@
1
- require 'spec_helper'
1
+ require "spec_helper"
2
2
 
3
- describe 'factories' do
3
+ describe "factories" do
4
4
  FactoryGirl.factories.map(&:name).each do |factory_name|
5
5
  specify "#{factory_name} factory is valid", :factory do
6
6
  factory = build(factory_name)
7
7
 
8
8
  if factory.respond_to?(:valid?)
9
- expect(factory).to be_valid, factory.errors.full_messages.join(',')
9
+ expect(factory).to be_valid, factory.errors.full_messages.join(",")
10
10
  end
11
11
  end
12
12
  end
@@ -1,14 +1,14 @@
1
1
  if defined?(RSpec)
2
2
  task(:spec).clear
3
3
 
4
- desc 'Run all specs'
4
+ desc "Run all specs"
5
5
  RSpec::Core::RakeTask.new(:spec) do |t|
6
- t.rspec_opts = '--tag ~factory'
6
+ t.rspec_opts = "--tag ~factory"
7
7
  end
8
8
 
9
- desc 'Run factory specs.'
9
+ desc "Run factory specs."
10
10
  RSpec::Core::RakeTask.new(:factory_specs) do |t|
11
- t.pattern = './spec/models/factories_spec.rb'
11
+ t.pattern = "./spec/models/factories_spec.rb"
12
12
  end
13
13
 
14
14
  task spec: :factory_specs
@@ -1,13 +1,13 @@
1
1
  if %w(development test).include? Rails.env
2
- require 'rubocop/rake_task'
3
- require 'scss_lint'
4
- require 'scss_lint/rake_task'
2
+ require "rubocop/rake_task"
3
+ require "scss_lint"
4
+ require "scss_lint/rake_task"
5
5
 
6
6
  RuboCop::RakeTask.new
7
7
  SCSSLint::RakeTask.new do |t|
8
- t.config = '.scss-lint.yml'
8
+ t.config = ".scss-lint.yml"
9
9
  end
10
10
 
11
- desc 'Lint code'
11
+ desc "Lint code"
12
12
  task lint: [:rubocop, :scss_lint]
13
13
  end
@@ -0,0 +1,13 @@
1
+ MetricFu::Configuration.run do |config|
2
+ config.configure_metric(:cane) do |cane|
3
+ cane.no_doc = 'y'
4
+ end
5
+
6
+ config.configure_metric(:churn) do |churn|
7
+ churn.ignore_files = %w(Gemfile Gemfile.lock)
8
+ end
9
+
10
+ config.configure_metric(:reek) do |reek|
11
+ reek.config_file_pattern = '.metrics.reek'
12
+ end
13
+ end
@@ -0,0 +1,3 @@
1
+ ---
2
+ IrresponsibleModule:
3
+ enabled: false
@@ -1,14 +1,14 @@
1
- workers Integer(ENV['PUMA_WORKERS'] || 3)
2
- threads Integer(ENV['MIN_THREADS'] || 1), Integer(ENV['MAX_THREADS'] || 16)
1
+ workers Integer(ENV["PUMA_WORKERS"] || 3)
2
+ threads Integer(ENV["MIN_THREADS"] || 1), Integer(ENV["MAX_THREADS"] || 16)
3
3
 
4
4
  preload_app!
5
5
 
6
- environment ENV['RAILS_ENV'] || 'development'
6
+ environment ENV["RAILS_ENV"] || "development"
7
7
 
8
- if %w(production staging).include?(ENV['RAILS_ENV'])
8
+ if %w(production staging).include?(ENV["RAILS_ENV"])
9
9
  bind "unix:///var/www/#{ENV['APP_NAME']}/shared/sockets/puma.sock"
10
10
  else
11
- port ENV['PORT'] || 3000
11
+ port ENV["PORT"] || 3000
12
12
  end
13
13
 
14
14
  on_worker_boot do
@@ -1 +1,3 @@
1
- Rack::Timeout.timeout = (ENV['TIMEOUT_IN_SECONDS'] || 5).to_i
1
+ if Rails.env.production?
2
+ Rack::Timeout.timeout = (ENV["TIMEOUT_IN_SECONDS"] || 5).to_i
3
+ end
@@ -7,4 +7,4 @@
7
7
 
8
8
  # Make sure your secret_key_base is kept private
9
9
  # if you're sharing your code publicly.
10
- <%= app_const %>.config.secret_key_base = ENV['SECRET_KEY_BASE']
10
+ <%= app_const %>.config.secret_key_base = ENV["SECRET_KEY_BASE"]
@@ -1,10 +1,10 @@
1
1
  if Rails.env.staging? || Rails.env.production?
2
2
  SMTP_SETTINGS = {
3
- address: ENV.fetch('SMTP_ADDRESS'), # example: 'smtp.sendgrid.net'
3
+ address: ENV.fetch("SMTP_ADDRESS"), # example: 'smtp.sendgrid.net'
4
4
  authentication: :plain,
5
- domain: ENV.fetch('SMTP_DOMAIN'), # example: 'this-app.com'
6
- password: ENV.fetch('SMTP_PASSWORD'),
7
- port: '587',
8
- user_name: ENV.fetch('SMTP_USERNAME')
5
+ domain: ENV.fetch("SMTP_DOMAIN"), # example: 'this-app.com'
6
+ password: ENV.fetch("SMTP_PASSWORD"),
7
+ port: "587",
8
+ user_name: ENV.fetch("SMTP_USERNAME"),
9
9
  }
10
10
  end
@@ -1,15 +1,14 @@
1
- require 'simplecov'
2
- SimpleCov.start 'rails'
1
+ require "simplecov"
2
+ SimpleCov.start "rails"
3
3
 
4
- ENV['RAILS_ENV'] = 'test'
4
+ ENV["RAILS_ENV"] = "test"
5
5
 
6
- require File.expand_path('../../config/environment', __FILE__)
6
+ require File.expand_path("../../config/environment", __FILE__)
7
7
 
8
- require 'rspec/rails'
9
- require 'rspec/autorun'
10
- require 'capybara/webkit/matchers'
8
+ require "rspec/rails"
9
+ require "capybara/webkit/matchers"
11
10
 
12
- Dir[Rails.root.join('spec/support/**/*.rb')].each { |file| require file }
11
+ Dir[Rails.root.join("spec/support/**/*.rb")].each { |file| require file }
13
12
 
14
13
  module Features
15
14
  # Extend this module in spec/support/features/*.rb
@@ -23,15 +22,15 @@ RSpec.configure do |config|
23
22
 
24
23
  config.include Features, type: :feature
25
24
  config.infer_base_class_for_anonymous_controllers = false
26
- config.order = 'random'
25
+ config.order = "random"
27
26
  config.use_transactional_fixtures = false
28
27
 
29
- config.before(:each) do
30
- Capybara.current_driver = select_driver
28
+ config.before(:each) do |example|
29
+ Capybara.current_driver = select_driver(example)
31
30
  end
32
31
  end
33
32
 
34
- def select_driver
33
+ def select_driver(example)
35
34
  if example.metadata[:js]
36
35
  if example.metadata[:js] == :selenium
37
36
  :selenium
@@ -1,3 +1 @@
1
- require_relative 'production'
2
-
3
- Mail.register_interceptor RecipientInterceptor.new(ENV['EMAIL_RECIPIENTS'])
1
+ require_relative "production"
@@ -1,7 +1,7 @@
1
1
  class Binding
2
2
  def pry
3
- raise "You forgot a binding.pry in your tests" if ENV['CI']
4
- require 'pry'
3
+ raise "You forgot a binding.pry in your tests" if ENV["CI"]
4
+ require "pry"
5
5
  super
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gb-firestarter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
- - groupbuddies
7
+ - Subvisual
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-28 00:00:00.000000000 Z
11
+ date: 2016-06-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -86,10 +86,24 @@ dependencies:
86
86
  - - ">="
87
87
  - !ruby/object:Gem::Version
88
88
  version: 2.2.0
89
+ - !ruby/object:Gem::Dependency
90
+ name: rubocop
91
+ requirement: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - "~>"
94
+ - !ruby/object:Gem::Version
95
+ version: 0.40.0
96
+ type: :development
97
+ prerelease: false
98
+ version_requirements: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - "~>"
101
+ - !ruby/object:Gem::Version
102
+ version: 0.40.0
89
103
  description: |
90
104
  Firestarter is the way to get great apps up and running in a heartbeat. It's
91
- what we use at Group Buddies.
92
- email: contact@groupbuddies.com
105
+ what we use at Subvisual.
106
+ email: contact@subvisual.co
93
107
  executables:
94
108
  - firestarter
95
109
  extensions: []
@@ -98,6 +112,10 @@ extra_rdoc_files:
98
112
  - LICENSE
99
113
  files:
100
114
  - ".gitignore"
115
+ - ".metrics"
116
+ - ".metrics.reek"
117
+ - ".rspec"
118
+ - ".rubocop.yml"
101
119
  - ".ruby-version"
102
120
  - ".travis.yml"
103
121
  - CONTRIBUTING.md
@@ -129,7 +147,6 @@ files:
129
147
  - templates/database_cleaner_rspec.rb
130
148
  - templates/development_seeds.rb
131
149
  - templates/disable_xml_params.rb
132
- - templates/errors.rb
133
150
  - templates/factories_spec.rb
134
151
  - templates/factories_spec_rake_task.rb
135
152
  - templates/factory_girl_syntax_rspec.rb
@@ -137,13 +154,15 @@ files:
137
154
  - templates/firestarter_layout.slim.erb
138
155
  - templates/i18n.rb
139
156
  - templates/lint_rake_task.rb
157
+ - templates/metrics
158
+ - templates/metrics.reek
140
159
  - templates/postgresql_database.yml.erb
141
160
  - templates/puma.rb
142
161
  - templates/rack_timeout.rb
143
162
  - templates/ruby-version.erb
144
163
  - templates/sample.env
145
164
  - templates/scss-lint.yml
146
- - templates/secret_token.rb
165
+ - templates/secret_token.rb.erb
147
166
  - templates/slim.rb
148
167
  - templates/smtp.rb
149
168
  - templates/spec_helper.rb
@@ -170,7 +189,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
170
189
  version: '0'
171
190
  requirements: []
172
191
  rubyforge_project:
173
- rubygems_version: 2.4.5
192
+ rubygems_version: 2.6.2
174
193
  signing_key:
175
194
  specification_version: 4
176
195
  summary: Generate a Rails app using groupbuddies's best practices and opinions.
@@ -1,28 +0,0 @@
1
- require 'net/http'
2
- require 'net/smtp'
3
-
4
- # Example:
5
- # begin
6
- # some http call
7
- # rescue *HTTP_ERRORS => error
8
- # notify_hoptoad error
9
- # end
10
-
11
- HTTP_ERRORS = [Timeout::Error,
12
- Errno::EINVAL,
13
- Errno::ECONNRESET,
14
- EOFError,
15
- Net::HTTPBadResponse,
16
- Net::HTTPHeaderSyntaxError,
17
- Net::ProtocolError]
18
-
19
- SMTP_SERVER_ERRORS = [TimeoutError,
20
- IOError,
21
- Net::SMTPUnknownError,
22
- Net::SMTPServerBusy,
23
- Net::SMTPAuthenticationError]
24
-
25
- SMTP_CLIENT_ERRORS = [Net::SMTPFatalError,
26
- Net::SMTPSyntaxError]
27
-
28
- SMTP_ERRORS = SMTP_SERVER_ERRORS + SMTP_CLIENT_ERRORS