rspeckled 0.0.33 → 0.0.34
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/rspeckled/plugins.rb +1 -0
- data/lib/rspeckled/plugins/capybara.rb +40 -2
- data/lib/rspeckled/plugins/database_cleaner.rb +1 -1
- data/lib/rspeckled/plugins/devise.rb +2 -2
- data/lib/rspeckled/plugins/mongoid.rb +14 -0
- data/lib/rspeckled/support.rb +11 -0
- data/lib/rspeckled/version.rb +1 -1
- metadata +21 -21
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: daf53aabd68d518600a2cff9de16871c4760ed60
|
4
|
+
data.tar.gz: bc6c02c6128353d1fcfd8f910279056800bccb78
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a92c20fbb3efbc2b7b41e087af9bb3fb99cef3dbe261263934190c705c8b10586671df995c9c8ad1c1b1cbe5034b4b7f281c50e142985d3750562ea0e59e9ef
|
7
|
+
data.tar.gz: 17e55ca7b5612f68ddec7bc6b300bb229a0ce1a9ae5f2d4a53b011b5cf24342dc1ef7781ccf1bb2c8666db1fd31ba96696d88048afee5e5f01f0300c06875511
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/rspeckled/plugins.rb
CHANGED
@@ -17,6 +17,7 @@ require 'rspeckled/plugins/faraday'
|
|
17
17
|
require 'rspeckled/plugins/foreign_keys'
|
18
18
|
require 'rspeckled/plugins/omniauth'
|
19
19
|
require 'rspeckled/plugins/mocks'
|
20
|
+
require 'rspeckled/plugins/mongoid'
|
20
21
|
require 'rspeckled/plugins/pretty_print'
|
21
22
|
require 'rspeckled/plugins/rails/engine'
|
22
23
|
require 'rspeckled/plugins/rails/strong_parameters'
|
@@ -18,12 +18,50 @@ begin
|
|
18
18
|
require 'capybara/rails'
|
19
19
|
|
20
20
|
if defined?(Capybara::Driver::Base)
|
21
|
+
downloads_directory = "#{Dir.pwd}/tmp/downloads/"
|
22
|
+
Dir.mkdir(downloads_directory) unless Dir.exist?(downloads_directory)
|
23
|
+
|
24
|
+
chrome_options = {
|
25
|
+
'chromeOptions' => {
|
26
|
+
'prefs' => {
|
27
|
+
'profile.default_content_settings.popups' => 0,
|
28
|
+
'download.default_directory' => downloads_directory,
|
29
|
+
},
|
30
|
+
'args' => %w{
|
31
|
+
window-size=1920,1200
|
32
|
+
},
|
33
|
+
},
|
34
|
+
}
|
35
|
+
|
21
36
|
Capybara.register_driver :chrome do |app|
|
22
|
-
Capybara::Selenium::Driver.new(
|
37
|
+
Capybara::Selenium::Driver.new(
|
38
|
+
app,
|
39
|
+
:browser => :chrome,
|
40
|
+
:desired_capabilities => Selenium::WebDriver::Remote::Capabilities.chrome(chrome_options)
|
41
|
+
)
|
42
|
+
end
|
43
|
+
|
44
|
+
headless_chrome_options = chrome_options.dup
|
45
|
+
headless_chrome_options['chromeOptions']['binary'] = '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome'
|
46
|
+
headless_chrome_options['chromeOptions']['args'] << 'headless'
|
47
|
+
headless_chrome_options['chromeOptions']['args'] << 'disable-gpu'
|
48
|
+
|
49
|
+
Capybara.register_driver :headless_chrome do |app|
|
50
|
+
Capybara::Selenium::Driver.new(
|
51
|
+
app,
|
52
|
+
:browser => :chrome,
|
53
|
+
:desired_capabilities => Selenium::WebDriver::Remote::Capabilities.chrome(headless_chrome_options)
|
54
|
+
)
|
23
55
|
end
|
24
56
|
|
57
|
+
firefox_profile = Selenium::WebDriver::Firefox::Profile.new
|
58
|
+
firefox_profile['browser.download.dir'] = downloads_directory
|
59
|
+
firefox_profile['browser.download.folderList'] = 2
|
60
|
+
firefox_profile['browser.helperApps.neverAsk.saveToDisk'] = 'images/jpeg, application/pdf, application/octet-stream'
|
61
|
+
firefox_profile['pdfjs.disabled'] = true
|
62
|
+
|
25
63
|
Capybara.register_driver :firefox do |app|
|
26
|
-
Capybara::Selenium::Driver.new(app, :browser => :firefox)
|
64
|
+
Capybara::Selenium::Driver.new(app, :browser => :firefox, :profile => firefox_profile)
|
27
65
|
end
|
28
66
|
|
29
67
|
if defined?(Selenium::WebDriver)
|
@@ -20,7 +20,7 @@ begin
|
|
20
20
|
end
|
21
21
|
|
22
22
|
config.around(:each) do |example|
|
23
|
-
DatabaseCleaner.strategy = if example.metadata[:js]
|
23
|
+
DatabaseCleaner.strategy = if example.metadata[:js] || %i{mongoid}.include?(autodetected)
|
24
24
|
[:truncation, :except => %w{ar_internal_metadata}]
|
25
25
|
else
|
26
26
|
:transaction
|
@@ -10,8 +10,8 @@ begin
|
|
10
10
|
Devise.stretches = 1
|
11
11
|
|
12
12
|
RSpec.configure do |config|
|
13
|
-
config.include Devise::
|
14
|
-
config.include Warden::Test::Helpers,
|
13
|
+
config.include Devise::Test::ControllerHelpers, :type => :controller
|
14
|
+
config.include Warden::Test::Helpers, :type => :feature
|
15
15
|
|
16
16
|
config.before(:all, :type => :feature) do |_example|
|
17
17
|
Warden.test_mode!
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
##############################################################################
|
4
|
+
# Mongoid Plugin
|
5
|
+
##############################################################################
|
6
|
+
|
7
|
+
begin
|
8
|
+
require 'mongoid-rspec'
|
9
|
+
|
10
|
+
RSpec.configure do |config|
|
11
|
+
config.include Mongoid::Matchers
|
12
|
+
end
|
13
|
+
rescue LoadError
|
14
|
+
end
|
data/lib/rspeckled/support.rb
CHANGED
@@ -42,6 +42,14 @@ RSpec.configure do |config|
|
|
42
42
|
config.include ActionView::Helpers::TranslationHelper
|
43
43
|
end
|
44
44
|
|
45
|
+
##############################################################################
|
46
|
+
# PROFILING
|
47
|
+
##############################################################################
|
48
|
+
|
49
|
+
if config.files_to_run.length > 1
|
50
|
+
config.profile_examples = [(config.files_to_run.length * 0.1).to_i, 10].max
|
51
|
+
end
|
52
|
+
|
45
53
|
##############################################################################
|
46
54
|
# FORMATTING
|
47
55
|
##############################################################################
|
@@ -83,6 +91,9 @@ RSpec.configure do |config|
|
|
83
91
|
config.order = 'random'
|
84
92
|
config.run_all_when_everything_filtered = true
|
85
93
|
|
94
|
+
# Make all randomization deterministic based on the random run order seed
|
95
|
+
Kernel.srand config.seed
|
96
|
+
|
86
97
|
##############################################################################
|
87
98
|
# PERSISTENT FAILURES
|
88
99
|
##############################################################################
|
data/lib/rspeckled/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspeckled
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.34
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- thegranddesign
|
@@ -12,26 +12,26 @@ cert_chain:
|
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
13
|
MIIDqjCCApKgAwIBAgIBATANBgkqhkiG9w0BAQUFADBNMREwDwYDVQQDDAhydWJ5
|
14
14
|
Z2VtczEjMCEGCgmSJomT8ixkARkWE2xpdmluZ2hpZ2hvbnRoZWJsb2cxEzARBgoJ
|
15
|
-
kiaJk/
|
15
|
+
kiaJk/IsZAEZFgNjb20wHhcNMTcwODAyMjI1OTM1WhcNMTgwODAyMjI1OTM1WjBN
|
16
16
|
MREwDwYDVQQDDAhydWJ5Z2VtczEjMCEGCgmSJomT8ixkARkWE2xpdmluZ2hpZ2hv
|
17
17
|
bnRoZWJsb2cxEzARBgoJkiaJk/IsZAEZFgNjb20wggEiMA0GCSqGSIb3DQEBAQUA
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
18
|
+
A4IBDwAwggEKAoIBAQDtLa7+7p49gW15OgOyRZad/F92iZc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hTQaWQ3o2
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date: 2017-
|
34
|
+
date: 2017-12-18 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rspec
|
@@ -89,11 +89,10 @@ dependencies:
|
|
89
89
|
- - "~>"
|
90
90
|
- !ruby/object:Gem::Version
|
91
91
|
version: '1.1'
|
92
|
-
description:
|
92
|
+
description: Are you copying and pasting your RSpec configurations into each of your
|
93
93
|
projects like some kind of ANIMAL? Use Rspeckled to cure your woes.
|
94
|
-
|
95
|
-
|
96
|
-
email: rubygems@livinghighontheblog.com
|
94
|
+
email:
|
95
|
+
- rubygems@livinghighontheblog.com
|
97
96
|
executables: []
|
98
97
|
extensions: []
|
99
98
|
extra_rdoc_files: []
|
@@ -128,6 +127,7 @@ files:
|
|
128
127
|
- lib/rspeckled/plugins/foreign_keys.rb
|
129
128
|
- lib/rspeckled/plugins/garbage_collection.rb
|
130
129
|
- lib/rspeckled/plugins/mocks.rb
|
130
|
+
- lib/rspeckled/plugins/mongoid.rb
|
131
131
|
- lib/rspeckled/plugins/omniauth.rb
|
132
132
|
- lib/rspeckled/plugins/pretty_print.rb
|
133
133
|
- lib/rspeckled/plugins/rails/engine.rb
|
@@ -174,7 +174,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
174
174
|
version: '0'
|
175
175
|
requirements: []
|
176
176
|
rubyforge_project:
|
177
|
-
rubygems_version: 2.6.
|
177
|
+
rubygems_version: 2.6.13
|
178
178
|
signing_key:
|
179
179
|
specification_version: 4
|
180
180
|
summary: Stop Copying and Pasting Your RSpec Configuration
|
metadata.gz.sig
CHANGED
Binary file
|