jetfuel 1.18.6 → 1.19.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/jetfuel/app_builder.rb +10 -0
- data/lib/jetfuel/generators/app_generator.rb +2 -0
- data/lib/jetfuel/version.rb +1 -1
- data/templates/.rspec +2 -0
- data/templates/Gemfile.erb +3 -3
- data/templates/Guardfile +17 -0
- data/templates/poltergeist.rb +38 -0
- data/templates/spec_helper.rb +0 -4
- metadata +4 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 93d25a3964d73e0f25babdc05c7c0820fdfaf260
|
4
|
+
data.tar.gz: 6a3bba65ab902ad50d77294683af8ad75a9464b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: efe89ecee32f06d60408828fb6fafd8b4acd800535e7fd6254df24bc9dd4e624d57667cdf46dbaa3aaecbdcc397e396829bc16a624fed0c68853feb118a95efc
|
7
|
+
data.tar.gz: 47f9b01b608132c0220500b23a04e331e6384d305ba61219fd022c4231a123f99a537825cbfdfb356ab4aac1166d8709ff7b773f012a4eda56e57e1bc6f9dbb6
|
data/Gemfile.lock
CHANGED
data/lib/jetfuel/app_builder.rb
CHANGED
@@ -55,6 +55,14 @@ module Jetfuel
|
|
55
55
|
copy_file 'factory_girl_rspec.rb', 'spec/support/factory_girl.rb'
|
56
56
|
end
|
57
57
|
|
58
|
+
def setup_guard
|
59
|
+
copy_file 'Guardfile', 'Guardfile'
|
60
|
+
end
|
61
|
+
|
62
|
+
def configure_poltergeist
|
63
|
+
copy_file 'poltergeist.rb', 'spec/support/poltergeist.rb'
|
64
|
+
end
|
65
|
+
|
58
66
|
def configure_newrelic
|
59
67
|
template 'newrelic.yml.erb', 'config/newrelic.yml'
|
60
68
|
end
|
@@ -182,6 +190,8 @@ end
|
|
182
190
|
def configure_rspec
|
183
191
|
remove_file 'spec/spec_helper.rb'
|
184
192
|
copy_file 'spec_helper.rb', 'spec/spec_helper.rb'
|
193
|
+
remove_file '.rspec'
|
194
|
+
copy_file '.rspec', '.rspec'
|
185
195
|
end
|
186
196
|
|
187
197
|
def configure_travis
|
data/lib/jetfuel/version.rb
CHANGED
data/templates/.rspec
ADDED
data/templates/Gemfile.erb
CHANGED
@@ -33,17 +33,17 @@ group :development, :test do
|
|
33
33
|
gem 'dotenv-rails'
|
34
34
|
gem 'factory_girl_rails'
|
35
35
|
gem 'pry-rails'
|
36
|
-
gem 'rspec-rails', '~>
|
36
|
+
gem 'rspec-rails', '~> 3.0'
|
37
37
|
end
|
38
38
|
|
39
39
|
group :test do
|
40
|
-
gem '
|
40
|
+
gem 'poltergeist'
|
41
41
|
gem 'database_cleaner'
|
42
42
|
gem 'formulaic'
|
43
43
|
gem 'launchy'
|
44
44
|
gem 'shoulda-matchers', require: false
|
45
45
|
gem 'timecop'
|
46
|
-
gem '
|
46
|
+
gem 'guard-rspec'
|
47
47
|
end
|
48
48
|
|
49
49
|
group :staging, :production do
|
data/templates/Guardfile
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
guard :rspec, cmd: 'spring rspec' do
|
2
|
+
watch(%r{^spec/.+_spec\.rb$})
|
3
|
+
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
|
4
|
+
watch('spec/spec_helper.rb') { "spec" }
|
5
|
+
|
6
|
+
# Rails example
|
7
|
+
watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
|
8
|
+
watch(%r{^app/(.*)(\.erb|\.haml|\.slim)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
|
9
|
+
watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
|
10
|
+
watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
|
11
|
+
watch('config/routes.rb') { "spec/routing" }
|
12
|
+
watch('app/controllers/application_controller.rb') { "spec/controllers" }
|
13
|
+
|
14
|
+
# Capybara features specs
|
15
|
+
watch(%r{^app/views/(.+)/.*\.(erb|haml|slim)$}) { |m| "spec/features/#{m[1]}_spec.rb" }
|
16
|
+
watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| "spec/features/#{m[1]}_spec.rb" }
|
17
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
require 'capybara/poltergeist'
|
2
|
+
|
3
|
+
module Capybara::Poltergeist
|
4
|
+
class Client
|
5
|
+
private
|
6
|
+
def redirect_stdout
|
7
|
+
prev = STDOUT.dup
|
8
|
+
prev.autoclose = false
|
9
|
+
$stdout = @write_io
|
10
|
+
STDOUT.reopen(@write_io)
|
11
|
+
|
12
|
+
prev = STDERR.dup
|
13
|
+
prev.autoclose = false
|
14
|
+
$stderr = @write_io
|
15
|
+
STDERR.reopen(@write_io)
|
16
|
+
yield
|
17
|
+
ensure
|
18
|
+
STDOUT.reopen(prev)
|
19
|
+
$stdout = STDOUT
|
20
|
+
STDERR.reopen(prev)
|
21
|
+
$stderr = STDERR
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
class WarningSuppressor
|
27
|
+
class << self
|
28
|
+
def write(message)
|
29
|
+
if message =~ /QFont::setPixelSize: Pixel size <= 0/ || message =~/CoreText performance note:/ || message =~ /Method userSpaceScaleFactor/ then 0 else puts(message);1;end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
Capybara.register_driver :poltergeist_custom do |app|
|
35
|
+
Capybara::Poltergeist::Driver.new(app, phantomjs_logger: WarningSuppressor, phantomjs_options: ['--proxy-type=socks5', '--proxy=0.0.0.0:0'])
|
36
|
+
end
|
37
|
+
|
38
|
+
Capybara.javascript_driver = :poltergeist_custom
|
data/templates/spec_helper.rb
CHANGED
@@ -4,7 +4,6 @@ require File.expand_path('../../config/environment', __FILE__)
|
|
4
4
|
|
5
5
|
require 'rspec/rails'
|
6
6
|
require 'shoulda/matchers'
|
7
|
-
require 'webmock/rspec'
|
8
7
|
|
9
8
|
Dir[Rails.root.join('spec/support/**/*.rb')].each { |file| require file }
|
10
9
|
|
@@ -23,10 +22,7 @@ RSpec.configure do |config|
|
|
23
22
|
|
24
23
|
config.infer_base_class_for_anonymous_controllers = false
|
25
24
|
config.order = 'random'
|
26
|
-
config.treat_symbols_as_metadata_keys_with_true_values = true
|
27
25
|
config.use_transactional_fixtures = false
|
28
26
|
end
|
29
27
|
|
30
28
|
ActiveRecord::Migration.maintain_test_schema!
|
31
|
-
Capybara.javascript_driver = :webkit
|
32
|
-
WebMock.disable_net_connect!(allow_localhost: true)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jetfuel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.19.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- FlyoverWorks
|
@@ -141,8 +141,10 @@ files:
|
|
141
141
|
- spec/support/fake_github.rb
|
142
142
|
- spec/support/fake_heroku.rb
|
143
143
|
- spec/support/jetfuel.rb
|
144
|
+
- templates/.rspec
|
144
145
|
- templates/Brewfile
|
145
146
|
- templates/Gemfile.erb
|
147
|
+
- templates/Guardfile
|
146
148
|
- templates/Procfile
|
147
149
|
- templates/README.md.erb
|
148
150
|
- templates/_analytics.html.erb
|
@@ -163,6 +165,7 @@ files:
|
|
163
165
|
- templates/flashes.css.scss
|
164
166
|
- templates/i18n.rb
|
165
167
|
- templates/newrelic.yml.erb
|
168
|
+
- templates/poltergeist.rb
|
166
169
|
- templates/postgresql_database.yml.erb
|
167
170
|
- templates/rack_timeout.rb
|
168
171
|
- templates/sample.env
|