so_many_devices 1.0.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -1
- data/README.md +20 -5
- data/lib/so_many_devices/version.rb +1 -1
- data/lib/so_many_devices.rb +16 -18
- data/so_many_devices.gemspec +8 -11
- metadata +5 -32
- data/.gitignore +0 -12
- data/.rspec +0 -3
- data/.semaphore/main-deploy.yml +0 -19
- data/.semaphore/semaphore.yml +0 -31
- data/.travis.yml +0 -6
- data/Gemfile +0 -7
- data/bin/console +0 -14
- data/bin/setup +0 -8
- data/logo/renuo.png +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 15b6efb219438698be4a46e590cce66fdb663a413edd09d9cb2a1ce2e7a7ef63
|
|
4
|
+
data.tar.gz: 97ac505a5cd73539560f53732abc61c262c2a025983c54470cd97a86a0768e16
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0d67c72914f145926dda6f5478fe91cb5460cd2bbe669dea37f6e9ab8c134f5aa65826de3ce2ea0acd3db4abc67787a29d8e34c354a5fb5002fc4b27237cf157
|
|
7
|
+
data.tar.gz: de20ca536bfa8216233c04c64c798ce27e9dd8ee52768ca3d196cf87f41089b865404932f361e36b00d12e5a86225712759c89ef21ed110d525215da100263ba
|
data/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [2.0.0] - 2026-11-06
|
|
4
|
+
|
|
5
|
+
- **Breaking**: require Ruby 3.3 or newer.
|
|
6
|
+
- **Breaking**: all drivers run Chrome with `--force-prefers-reduced-motion`.
|
|
7
|
+
- Fix device drivers on Selenium 4, which no longer provides `Remote::Capabilities.chrome` and `desired_capabilities:`.
|
|
8
|
+
- Register the Chrome drivers with downloads only once, instead of once per device.
|
|
9
|
+
- Release from Semaphore when a version tag is pushed.
|
|
10
|
+
|
|
11
|
+
## [1.0.0] - 2023-01-25
|
|
2
12
|
|
|
3
13
|
- Added two new methods `first_download` and `last_download`.
|
|
4
14
|
- Added more instructions to the README for Chrome with downloads options, in particular to clean up folders.
|
data/README.md
CHANGED
|
@@ -43,6 +43,9 @@ config.before(:each, type: :system, js: true) do
|
|
|
43
43
|
end
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
+
All drivers run Chrome with `--force-prefers-reduced-motion`, so pages honouring `prefers-reduced-motion`
|
|
47
|
+
skip their animations and transitions, which makes tests faster and less flaky.
|
|
48
|
+
|
|
46
49
|
We use it to run our system tests on so many devices! Here is our standard configuration:
|
|
47
50
|
|
|
48
51
|
```ruby
|
|
@@ -122,12 +125,24 @@ All downloads are performed in the `tmp/downloads` folder of your project.
|
|
|
122
125
|
|
|
123
126
|
## Development
|
|
124
127
|
|
|
125
|
-
After checking out the repo, run `bin/setup` to install dependencies.
|
|
126
|
-
Then, run `
|
|
128
|
+
After checking out the repo, run `bin/setup` to install dependencies.
|
|
129
|
+
Then, run `bin/check` to run the tests and `bin/fastcheck` to run the linter.
|
|
130
|
+
You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
|
131
|
+
|
|
132
|
+
### Release
|
|
133
|
+
|
|
134
|
+
1. Bump the version in `lib/so_many_devices/version.rb`, run `bundle install`, update `CHANGELOG.md` and commit to `main`.
|
|
135
|
+
2. Tag the commit with the bare version and push the tag:
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
git tag -a 1.2.3 -m 1.2.3
|
|
139
|
+
git push origin 1.2.3
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
3. Create a GitHub release for the tag with the changelog section as notes.
|
|
127
143
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
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).
|
|
144
|
+
Semaphore runs the tests on the tag and, when they pass, promotes the `release` pipeline, which pushes the gem to
|
|
145
|
+
[rubygems.org](https://rubygems.org). It fails when the tag does not match the gem version.
|
|
131
146
|
|
|
132
147
|
## Contributing
|
|
133
148
|
|
data/lib/so_many_devices.rb
CHANGED
|
@@ -6,29 +6,27 @@ require "capybara"
|
|
|
6
6
|
module SoManyDevices
|
|
7
7
|
class Error < StandardError; end
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
standard_args = ["--disable-site-isolation-trials", "--force-prefers-reduced-motion"]
|
|
10
|
+
headless_args = ["--headless", *standard_args]
|
|
11
|
+
headless_args << "--disable-gpu" if Gem.win_platform?
|
|
10
12
|
|
|
11
|
-
devices
|
|
12
|
-
standard_args = ["--disable-site-isolation-trials"]
|
|
13
|
-
headless_args = ["--headless", "--disable-site-isolation-trials"]
|
|
14
|
-
headless_args << "--disable-gpu" if Gem.win_platform?
|
|
13
|
+
devices = YAML.load_file(File.join(__dir__, "so_many_devices.yml"))
|
|
15
14
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
)
|
|
21
|
-
Capybara::Selenium::Driver.new(app, browser: :chrome, desired_capabilities: capabilities)
|
|
15
|
+
devices.each do |device_name, emulation|
|
|
16
|
+
[[device_name, standard_args], ["#{device_name}_headless", headless_args]].each do |driver_name, args|
|
|
17
|
+
Capybara.register_driver driver_name.to_sym do |app|
|
|
18
|
+
browser_options = ::Selenium::WebDriver::Chrome::Options.new(args: args, emulation: emulation)
|
|
19
|
+
Capybara::Selenium::Driver.new(app, browser: :chrome, options: browser_options)
|
|
22
20
|
end
|
|
23
21
|
end
|
|
22
|
+
end
|
|
24
23
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
end
|
|
24
|
+
[[:selenium_chrome_with_download, standard_args], [:selenium_chrome_with_download_headless, headless_args]].each do |driver_name, args|
|
|
25
|
+
Capybara.register_driver driver_name do |app|
|
|
26
|
+
browser_options = ::Selenium::WebDriver::Chrome::Options.new(args: args)
|
|
27
|
+
browser_options.add_preference(:download, prompt_for_download: false, default_directory: SoManyDevices::DownloadsHelper::PATH.to_s)
|
|
28
|
+
browser_options.add_preference(:browser, set_download_behavior: {behavior: "allow"})
|
|
29
|
+
Capybara::Selenium::Driver.new(app, browser: :chrome, options: browser_options)
|
|
32
30
|
end
|
|
33
31
|
end
|
|
34
32
|
end
|
data/so_many_devices.gemspec
CHANGED
|
@@ -10,21 +10,18 @@ Gem::Specification.new do |spec|
|
|
|
10
10
|
spec.description = "This incomplete but very satisfying list of devices, will help you run your app on so many devices!"
|
|
11
11
|
spec.homepage = "https://github.com/renuo/so_many_devices"
|
|
12
12
|
spec.license = "MIT"
|
|
13
|
-
spec.required_ruby_version =
|
|
13
|
+
spec.required_ruby_version = ">= 3.3.0"
|
|
14
14
|
|
|
15
|
-
spec.metadata["
|
|
16
|
-
spec.metadata["
|
|
17
|
-
spec.metadata["changelog_uri"] = "https://github.com/renuo/so_many_devices/blob/main/CHANGELOG.md"
|
|
15
|
+
spec.metadata["source_code_uri"] = spec.homepage
|
|
16
|
+
spec.metadata["changelog_uri"] = "#{spec.homepage}/blob/main/CHANGELOG.md"
|
|
18
17
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
spec.files = Dir.chdir(__dir__) do
|
|
19
|
+
`git ls-files -z`.split("\x0").reject do |f|
|
|
20
|
+
(File.expand_path(f) == __FILE__) ||
|
|
21
|
+
f.start_with?(*%w[bin/ spec/ logo/ .git .github .semaphore .rspec .ruby-version Gemfile])
|
|
22
|
+
end
|
|
23
23
|
end
|
|
24
|
-
spec.bindir = "exe"
|
|
25
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
26
24
|
spec.require_paths = ["lib"]
|
|
27
25
|
|
|
28
26
|
spec.add_dependency "capybara", ">= 3.0"
|
|
29
|
-
spec.add_development_dependency "standard"
|
|
30
27
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: so_many_devices
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 2.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Alessandro Rodi
|
|
8
|
-
|
|
9
|
-
bindir: exe
|
|
8
|
+
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: capybara
|
|
@@ -24,20 +23,6 @@ dependencies:
|
|
|
24
23
|
- - ">="
|
|
25
24
|
- !ruby/object:Gem::Version
|
|
26
25
|
version: '3.0'
|
|
27
|
-
- !ruby/object:Gem::Dependency
|
|
28
|
-
name: standard
|
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
|
30
|
-
requirements:
|
|
31
|
-
- - ">="
|
|
32
|
-
- !ruby/object:Gem::Version
|
|
33
|
-
version: '0'
|
|
34
|
-
type: :development
|
|
35
|
-
prerelease: false
|
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
-
requirements:
|
|
38
|
-
- - ">="
|
|
39
|
-
- !ruby/object:Gem::Version
|
|
40
|
-
version: '0'
|
|
41
26
|
description: This incomplete but very satisfying list of devices, will help you run
|
|
42
27
|
your app on so many devices!
|
|
43
28
|
email:
|
|
@@ -46,33 +31,22 @@ executables: []
|
|
|
46
31
|
extensions: []
|
|
47
32
|
extra_rdoc_files: []
|
|
48
33
|
files:
|
|
49
|
-
- ".gitignore"
|
|
50
|
-
- ".rspec"
|
|
51
|
-
- ".semaphore/main-deploy.yml"
|
|
52
|
-
- ".semaphore/semaphore.yml"
|
|
53
|
-
- ".travis.yml"
|
|
54
34
|
- CHANGELOG.md
|
|
55
35
|
- CODE_OF_CONDUCT.md
|
|
56
|
-
- Gemfile
|
|
57
36
|
- LICENSE.txt
|
|
58
37
|
- README.md
|
|
59
38
|
- Rakefile
|
|
60
|
-
- bin/console
|
|
61
|
-
- bin/setup
|
|
62
39
|
- lib/so_many_devices.rb
|
|
63
40
|
- lib/so_many_devices.yml
|
|
64
41
|
- lib/so_many_devices/downloads_helper.rb
|
|
65
42
|
- lib/so_many_devices/version.rb
|
|
66
|
-
- logo/renuo.png
|
|
67
43
|
- so_many_devices.gemspec
|
|
68
44
|
homepage: https://github.com/renuo/so_many_devices
|
|
69
45
|
licenses:
|
|
70
46
|
- MIT
|
|
71
47
|
metadata:
|
|
72
|
-
homepage_uri: https://github.com/renuo/so_many_devices
|
|
73
48
|
source_code_uri: https://github.com/renuo/so_many_devices
|
|
74
49
|
changelog_uri: https://github.com/renuo/so_many_devices/blob/main/CHANGELOG.md
|
|
75
|
-
post_install_message:
|
|
76
50
|
rdoc_options: []
|
|
77
51
|
require_paths:
|
|
78
52
|
- lib
|
|
@@ -80,15 +54,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
80
54
|
requirements:
|
|
81
55
|
- - ">="
|
|
82
56
|
- !ruby/object:Gem::Version
|
|
83
|
-
version:
|
|
57
|
+
version: 3.3.0
|
|
84
58
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
85
59
|
requirements:
|
|
86
60
|
- - ">="
|
|
87
61
|
- !ruby/object:Gem::Version
|
|
88
62
|
version: '0'
|
|
89
63
|
requirements: []
|
|
90
|
-
rubygems_version:
|
|
91
|
-
signing_key:
|
|
64
|
+
rubygems_version: 4.0.23
|
|
92
65
|
specification_version: 4
|
|
93
66
|
summary: A list of configurations for so many devices!
|
|
94
67
|
test_files: []
|
data/.gitignore
DELETED
data/.rspec
DELETED
data/.semaphore/main-deploy.yml
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
version: v1.0
|
|
2
|
-
name: main-deploy
|
|
3
|
-
agent:
|
|
4
|
-
machine:
|
|
5
|
-
type: e1-standard-2
|
|
6
|
-
os_image: ubuntu1804
|
|
7
|
-
|
|
8
|
-
blocks:
|
|
9
|
-
- name: main-deploy
|
|
10
|
-
task:
|
|
11
|
-
secrets:
|
|
12
|
-
- name: rubygems-deploy
|
|
13
|
-
jobs:
|
|
14
|
-
- name: main-deploy
|
|
15
|
-
commands:
|
|
16
|
-
- checkout --use-cache
|
|
17
|
-
- gem build so_many_devices
|
|
18
|
-
- chmod 0600 ~/.gem/credentials
|
|
19
|
-
- gem push so_many_devices-*.gem
|
data/.semaphore/semaphore.yml
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
version: "v1.0"
|
|
2
|
-
name: so_many_devices
|
|
3
|
-
agent:
|
|
4
|
-
machine:
|
|
5
|
-
type: e1-standard-2
|
|
6
|
-
os_image: ubuntu1804
|
|
7
|
-
auto_cancel:
|
|
8
|
-
running:
|
|
9
|
-
when: "true"
|
|
10
|
-
|
|
11
|
-
blocks:
|
|
12
|
-
- name: tests
|
|
13
|
-
execution_time_limit:
|
|
14
|
-
minutes: 10
|
|
15
|
-
dependencies: []
|
|
16
|
-
task:
|
|
17
|
-
env_vars:
|
|
18
|
-
- name: RAILS_ENV
|
|
19
|
-
value: test
|
|
20
|
-
jobs:
|
|
21
|
-
- name: tests
|
|
22
|
-
commands:
|
|
23
|
-
- checkout --use-cache
|
|
24
|
-
- cache restore
|
|
25
|
-
- bundle install -j 4 --path vendor/bundle
|
|
26
|
-
- cache store
|
|
27
|
-
- bundle exec standardrb
|
|
28
|
-
- bundle exec rspec
|
|
29
|
-
promotions:
|
|
30
|
-
- name: main
|
|
31
|
-
pipeline_file: main-deploy.yml
|
data/.travis.yml
DELETED
data/Gemfile
DELETED
data/bin/console
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env ruby
|
|
2
|
-
|
|
3
|
-
require "bundler/setup"
|
|
4
|
-
require "so_many_devices"
|
|
5
|
-
|
|
6
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
|
7
|
-
# with your gem easier. You can also use a different console, if you like.
|
|
8
|
-
|
|
9
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
|
10
|
-
# require "pry"
|
|
11
|
-
# Pry.start
|
|
12
|
-
|
|
13
|
-
require "irb"
|
|
14
|
-
IRB.start(__FILE__)
|
data/bin/setup
DELETED
data/logo/renuo.png
DELETED
|
Binary file
|