standout-capybara 1.0.1 → 2.0.2

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
  SHA256:
3
- metadata.gz: e0a6113a6b374a3ee0c13c2144255ea5c01b7723c9bce565951b58c08e78a709
4
- data.tar.gz: ab18be76d97e7bc9f8ce490a0c10152450994d6b60c66a4966a5b5bee50f00ca
3
+ metadata.gz: fd29c834ac84e1656630e98396e9b4dc4520c6e0d6b6b302c24e821ac6e5f963
4
+ data.tar.gz: 4a2887a64eaa5e9f37c63b9f5f501ee32ae6422931caa92a438017b22e13bba8
5
5
  SHA512:
6
- metadata.gz: e59968665d9e3a4e447754b4010f4198553e751b99cb90b11bedd72687b3f234004837d2e931bba55905eece291bb41baf629a91f47085fffc4a67737be0a344
7
- data.tar.gz: '0986639c364340a99174e3c37f3e457cb7cc6c1f3d84d8c257aecb498ec695623f96b41bc05151f6a9b126543bcadd6add4c4e7f3c0dfe82ffbcf1c3b43ca3ff'
6
+ metadata.gz: 0ec735dc0183b13376839feabb8c1b955858aaca9fbc3684f982262a9903c2049837b07b567f9207789e2220e14356e4887b3ceacf7c96eca4b1b8f4f99e1cc9
7
+ data.tar.gz: 94397166899fed78b71f61fdcd362fe55522187cf8eaab1484d96fcdfd67623f78363bc940735c2a4e9e4690fdcf4b8112ba6be6e2739560c9495ade6c826248
@@ -0,0 +1,38 @@
1
+ name: Ruby Gem
2
+ on:
3
+ release:
4
+ types: [published]
5
+ jobs:
6
+ build:
7
+ name: Build + Publish
8
+ runs-on: ubuntu-latest
9
+
10
+ steps:
11
+ - uses: actions/checkout@v2
12
+ - name: Set up Ruby 2.6
13
+ uses: actions/setup-ruby@v1
14
+ with:
15
+ version: 2.6.x
16
+
17
+ - name: Publish to GPR
18
+ run: |
19
+ mkdir -p $HOME/.gem
20
+ touch $HOME/.gem/credentials
21
+ chmod 0600 $HOME/.gem/credentials
22
+ printf -- "---\n:github: Bearer ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
23
+ gem build *.gemspec
24
+ gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem
25
+ env:
26
+ GEM_HOST_API_KEY: ${{secrets.GPR_AUTH_TOKEN}}
27
+ OWNER: standout
28
+
29
+ - name: Publish to RubyGems
30
+ run: |
31
+ mkdir -p $HOME/.gem
32
+ touch $HOME/.gem/credentials
33
+ chmod 0600 $HOME/.gem/credentials
34
+ printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
35
+ gem build *.gemspec
36
+ gem push *.gem
37
+ env:
38
+ GEM_HOST_API_KEY: ${{secrets.RUBYGEMS_AUTH_TOKEN}}
@@ -0,0 +1,21 @@
1
+ name: Tests
2
+
3
+ on: [push, pull_request, release]
4
+
5
+ jobs:
6
+ build:
7
+ name: Tests
8
+ runs-on: ubuntu-latest
9
+
10
+ steps:
11
+ - uses: actions/checkout@v2
12
+ - name: Set up Ruby 2.6
13
+ uses: actions/setup-ruby@v1
14
+ with:
15
+ version: 2.6.x
16
+ - name: Set up environment
17
+ run: |
18
+ gem install bundler
19
+ bundle install
20
+ - name: Test
21
+ run: rake
@@ -1,50 +1,42 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- standout-capybara (0.1.0)
4
+ standout-capybara (1.1.1)
5
5
  capybara
6
6
  capybara-screenshot
7
- chromedriver-helper
8
7
  selenium-webdriver
8
+ webdrivers
9
9
 
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- addressable (2.5.2)
14
- public_suffix (>= 2.0.2, < 4.0)
15
- archive-zip (0.11.0)
16
- io-like (~> 0.3.0)
17
- capybara (3.11.1)
13
+ addressable (2.7.0)
14
+ public_suffix (>= 2.0.2, < 5.0)
15
+ capybara (3.33.0)
18
16
  addressable
19
17
  mini_mime (>= 0.1.3)
20
18
  nokogiri (~> 1.8)
21
19
  rack (>= 1.6.0)
22
20
  rack-test (>= 0.6.3)
23
- regexp_parser (~> 1.2)
21
+ regexp_parser (~> 1.5)
24
22
  xpath (~> 3.2)
25
- capybara-screenshot (1.0.22)
23
+ capybara-screenshot (1.0.24)
26
24
  capybara (>= 1.0, < 4)
27
25
  launchy
28
- childprocess (0.9.0)
29
- ffi (~> 1.0, >= 1.0.11)
30
- chromedriver-helper (2.1.0)
31
- archive-zip (~> 0.10)
32
- nokogiri (~> 1.8)
26
+ childprocess (3.0.0)
33
27
  diff-lcs (1.3)
34
- ffi (1.9.25)
35
- io-like (0.3.0)
36
- launchy (2.4.3)
37
- addressable (~> 2.3)
38
- mini_mime (1.0.1)
39
- mini_portile2 (2.3.0)
40
- nokogiri (1.8.5)
41
- mini_portile2 (~> 2.3.0)
42
- public_suffix (3.0.3)
43
- rack (2.0.6)
28
+ launchy (2.5.0)
29
+ addressable (~> 2.7)
30
+ mini_mime (1.0.2)
31
+ mini_portile2 (2.4.0)
32
+ nokogiri (1.10.10)
33
+ mini_portile2 (~> 2.4.0)
34
+ public_suffix (4.0.5)
35
+ rack (2.2.3)
44
36
  rack-test (1.1.0)
45
37
  rack (>= 1.0, < 3)
46
- rake (10.5.0)
47
- regexp_parser (1.3.0)
38
+ rake (13.0.1)
39
+ regexp_parser (1.7.1)
48
40
  rspec (3.8.0)
49
41
  rspec-core (~> 3.8.0)
50
42
  rspec-expectations (~> 3.8.0)
@@ -58,10 +50,14 @@ GEM
58
50
  diff-lcs (>= 1.2.0, < 2.0)
59
51
  rspec-support (~> 3.8.0)
60
52
  rspec-support (3.8.0)
61
- rubyzip (1.2.2)
62
- selenium-webdriver (3.141.0)
63
- childprocess (~> 0.5)
64
- rubyzip (~> 1.2, >= 1.2.2)
53
+ rubyzip (2.3.0)
54
+ selenium-webdriver (3.142.7)
55
+ childprocess (>= 0.5, < 4.0)
56
+ rubyzip (>= 1.2.2)
57
+ webdrivers (4.4.1)
58
+ nokogiri (~> 1.6)
59
+ rubyzip (>= 1.3.0)
60
+ selenium-webdriver (>= 3.0, < 4.0)
65
61
  xpath (3.2.0)
66
62
  nokogiri (~> 1.8)
67
63
 
@@ -69,9 +65,9 @@ PLATFORMS
69
65
  ruby
70
66
 
71
67
  DEPENDENCIES
72
- rake (~> 10.0)
68
+ rake (~> 13.0)
73
69
  rspec (~> 3.0)
74
70
  standout-capybara!
75
71
 
76
72
  BUNDLED WITH
77
- 1.17.1
73
+ 1.17.3
data/README.md CHANGED
@@ -57,6 +57,16 @@ Example:
57
57
  $ nanobox run rake
58
58
  ```
59
59
 
60
+ ### Options
61
+
62
+ Options that you can override using environment variables.
63
+
64
+ | Environment variable | Description |
65
+ |:-----------------|:------------|
66
+ | `CAPYBARA` | Override the driver |
67
+ | `CAPYBARA_WAIT_TIME` | Override default wait time of capybara |
68
+
69
+
60
70
  ### Available drivers
61
71
 
62
72
  Override the driver using the environment variable `CAPYBARA`.
@@ -74,13 +84,23 @@ CAPYBARA=[driver name] test-command
74
84
  | nanobox_chrome | Default driver when inside Nanobox. |
75
85
  ## Development
76
86
 
77
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
87
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run
88
+ `rake spec` to run the tests. You can also run `bin/console` for an interactive
89
+ prompt that will allow you to experiment.
78
90
 
79
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
91
+ To install this gem onto your local machine, run `bundle exec rake install`. To
92
+ release a new version, update the version number in `version.rb`, and then run
93
+ `bundle exec rake release`, which will create a git tag for the version, push
94
+ git commits and tags, and push the `.gem` file to
95
+ [rubygems.org](https://rubygems.org).
80
96
 
81
97
  ## Contributing
82
98
 
83
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/standout-capybara. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
99
+ Bug reports and pull requests are welcome on GitHub at
100
+ https://github.com/[USERNAME]/standout-capybara. This project is intended to be
101
+ a safe, welcoming space for collaboration, and contributors are expected to
102
+ adhere to the [Contributor Covenant](http://contributor-covenant.org) code of
103
+ conduct.
84
104
 
85
105
  ## License
86
106
 
@@ -88,4 +108,13 @@ The gem is available as open source under the terms of the [MIT License](https:/
88
108
 
89
109
  ## Code of Conduct
90
110
 
91
- Everyone interacting in the Standout::Capybara project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/standout-capybara/blob/master/CODE_OF_CONDUCT.md).
111
+ Everyone interacting in the Standout::Capybara project’s codebases, issue
112
+ trackers, chat rooms and mailing lists is expected to follow the [code of
113
+ conduct](https://github.com/[USERNAME]/standout-capybara/blob/master/CODE_OF_CONDUCT.md).
114
+
115
+ ## Release
116
+
117
+ To release a new version you should bump the version in the file
118
+ `lib/standout/capybara/version.rb`, commit the change and push it to GitHub.
119
+ Then you should create a release in GitHub and it will automatically be built
120
+ and uploaded to RubyGems and as a GitHub Package.
@@ -1,18 +1,20 @@
1
- require "standout/capybara/version"
2
- require "capybara"
3
- require "capybara-screenshot"
4
- require "selenium-webdriver"
5
- require "chromedriver-helper"
6
- require "standout/capybara/drivers/base"
7
- require "standout/capybara/drivers/chrome"
8
- require "standout/capybara/drivers/nanobox_chrome"
9
- require "standout/capybara/drivers/headless_chrome"
1
+ # frozen_string_literal: true
2
+
3
+ require 'standout/capybara/version'
4
+ require 'capybara'
5
+ require 'capybara-screenshot'
6
+ require 'selenium-webdriver'
7
+ require 'webdrivers'
8
+ require 'standout/capybara/drivers/base'
9
+ require 'standout/capybara/drivers/chrome'
10
+ require 'standout/capybara/drivers/nanobox_chrome'
11
+ require 'standout/capybara/drivers/headless_chrome'
10
12
 
11
13
  module Standout
12
14
  module Capybara
13
15
  def self.setup_driver
14
- driver_name = ENV["CAPYBARA"]
15
- is_using_nanobox = `whoami`.chomp == "gonano"
16
+ driver_name = ENV['CAPYBARA']
17
+ is_using_nanobox = `whoami`.chomp == 'gonano'
16
18
  fallback_driver = is_using_nanobox ? :nanobox_chrome : :headless_chrome
17
19
  driver_name ||= fallback_driver
18
20
  driver_name = driver_name.to_sym
@@ -30,9 +32,9 @@ module Standout
30
32
  end
31
33
 
32
34
  if ::Capybara.respond_to? :default_max_wait_time
33
- ::Capybara.default_max_wait_time = 30
35
+ ::Capybara.default_max_wait_time = ENV.fetch('CAPYBARA_WAIT_TIME') { 30 }.to_i
34
36
  else
35
- ::Capybara.default_wait_time = 30
37
+ ::Capybara.default_wait_time = ENV.fetch('CAPYBARA_WAIT_TIME') { 30 }.to_i
36
38
  end
37
39
  end
38
40
 
@@ -11,10 +11,11 @@ module Standout
11
11
 
12
12
  def self.register
13
13
  ::Capybara.register_driver driver_name do |driver|
14
+ capabilities = Selenium::WebDriver::Remote::Capabilities.chrome(chromeOptions: { args: %w[headless disable-gpu], w3c: false } )
14
15
  chrome_host = ENV["CHROME_HOST"] || ENV["DATA_CHROME_HOST"]
15
16
  ::Capybara::Selenium::Driver.new(driver,
16
17
  browser: :remote,
17
- desired_capabilities: :chrome,
18
+ desired_capabilities: capabilities,
18
19
  url: "http://#{chrome_host}:4444/wd/hub")
19
20
  end
20
21
  super
@@ -1,5 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Standout
2
4
  module Capybara
3
- VERSION = "1.0.1"
5
+ VERSION = '2.0.2'
4
6
  end
5
7
  end
@@ -25,8 +25,8 @@ Gem::Specification.new do |spec|
25
25
  spec.add_dependency "capybara"
26
26
  spec.add_dependency "capybara-screenshot"
27
27
  spec.add_dependency "selenium-webdriver"
28
- spec.add_dependency "chromedriver-helper"
28
+ spec.add_dependency "webdrivers"
29
29
 
30
- spec.add_development_dependency "rake", "~> 10.0"
30
+ spec.add_development_dependency "rake", "~> 13.0"
31
31
  spec.add_development_dependency "rspec", "~> 3.0"
32
32
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: standout-capybara
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Standout AB
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-11-19 00:00:00.000000000 Z
11
+ date: 2020-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capybara
@@ -53,7 +53,7 @@ dependencies:
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: chromedriver-helper
56
+ name: webdrivers
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - ">="
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '10.0'
75
+ version: '13.0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '10.0'
82
+ version: '13.0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rspec
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -101,9 +101,10 @@ executables: []
101
101
  extensions: []
102
102
  extra_rdoc_files: []
103
103
  files:
104
+ - ".github/workflows/gempush.yml"
105
+ - ".github/workflows/tests.yml"
104
106
  - ".gitignore"
105
107
  - ".rspec"
106
- - ".travis.yml"
107
108
  - CODE_OF_CONDUCT.md
108
109
  - Gemfile
109
110
  - Gemfile.lock
@@ -139,8 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
139
140
  - !ruby/object:Gem::Version
140
141
  version: '0'
141
142
  requirements: []
142
- rubyforge_project:
143
- rubygems_version: 2.7.6
143
+ rubygems_version: 3.0.3
144
144
  signing_key:
145
145
  specification_version: 4
146
146
  summary: Sane defaults for capybara
@@ -1,7 +0,0 @@
1
- ---
2
- sudo: false
3
- language: ruby
4
- cache: bundler
5
- rvm:
6
- - 2.5.1
7
- before_install: gem install bundler -v 1.17.1