publishing_platform_test 0.1.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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: e2680aa480c4206de30ac00dbf59a440e2bff03b09fcef26dc7b841415c3492c
4
+ data.tar.gz: 2d093436294507af4ef4f42fdfe832084e75592971a5c7bf2185bc80fdab7893
5
+ SHA512:
6
+ metadata.gz: e196f83716d7debd7ab0c3c4be67ee90ac30318c8798767fb095eedfad5c37588e747196cccd87d3c8730f74cfa6e4f7d5c7d57bf789ac870eb940a46a2da824
7
+ data.tar.gz: 0147ef8125102be2eec8ef4ccb6717818ff778d38672c4fa05ce0c0e70fc2d56fed726a436e09eb047ad33b9f0293c469ce936a687fdd683fc2511fc03a194ab
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,8 @@
1
+ inherit_gem:
2
+ publishing_platform_rubocop:
3
+ - config/default.yml
4
+ - config/rspec.yml
5
+
6
+ inherit_mode:
7
+ merge:
8
+ - Exclude
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 3.2.4
data/LICENSE ADDED
@@ -0,0 +1,23 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Publishing Platform
4
+
5
+ Copyright (c) 2018 Crown Copyright (Government Digital Service)
6
+
7
+ Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ of this software and associated documentation files (the "Software"), to deal
9
+ in the Software without restriction, including without limitation the rights
10
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ copies of the Software, and to permit persons to whom the Software is
12
+ furnished to do so, subject to the following conditions:
13
+
14
+ The above copyright notice and this permission notice shall be included in all
15
+ copies or substantial portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,23 @@
1
+ # Publishing Platform Test
2
+ Publishing Platform test dependencies & configuration
3
+
4
+ ## Installation
5
+
6
+ ```ruby
7
+ gem "publishing_platform_test"
8
+ ```
9
+
10
+ And then execute:
11
+
12
+ ```
13
+ $ bundle
14
+ ```
15
+
16
+ ## Usage
17
+
18
+ Somewhere in your `spec_helper.rb`, `rails_helper.rb`, or
19
+ `spec/support/publishing_platform_test.rb` put:
20
+
21
+ ```ruby
22
+ PublishingPlatformTest.configure
23
+ ```
data/Rakefile ADDED
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rubocop/rake_task"
5
+ require "rspec/core/rake_task"
6
+
7
+ RSpec::Core::RakeTask.new(:spec)
8
+ RuboCop::RakeTask.new
9
+
10
+ task default: %i[rubocop spec]
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module PublishingPlatformTest
4
+ VERSION = "0.1.0"
5
+ end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "publishing_platform_test/version"
4
+
5
+ require "capybara"
6
+ require "puma"
7
+ require "selenium-webdriver"
8
+
9
+ module PublishingPlatformTest
10
+ def self.configure
11
+ Capybara.register_driver :headless_chrome do |app|
12
+ Capybara::Selenium::Driver.new(app,
13
+ browser: :chrome,
14
+ options: headless_chrome_selenium_options)
15
+ end
16
+
17
+ Capybara.javascript_driver = :headless_chrome
18
+ Capybara.server = :puma, { Silent: true }
19
+ end
20
+
21
+ def self.headless_chrome_selenium_options
22
+ Selenium::WebDriver::Chrome::Options.new.tap do |options|
23
+ options.add_argument("--headless=new")
24
+ options.add_argument("--no-sandbox") if ENV["PUBLISHING_PLATFORM_TEST_CHROME_NO_SANDBOX"]
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,34 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/publishing_platform_test/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "publishing_platform_test"
7
+ spec.version = PublishingPlatformTest::VERSION
8
+ spec.authors = ["Publishing Platform"]
9
+
10
+ spec.summary = "Test setup for Publishing Platform"
11
+ spec.description = "Test configuration and dependencies for applications on Publishing Platform"
12
+ spec.license = "MIT"
13
+ spec.required_ruby_version = ">= 3.1"
14
+
15
+ # Specify which files should be added to the gem when it is released.
16
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
17
+ spec.files = Dir.chdir(__dir__) do
18
+ `git ls-files -z`.split("\x0").reject do |f|
19
+ (File.expand_path(f) == __FILE__) ||
20
+ f.start_with?(*%w[bin/ test/ spec/ features/ .git .circleci appveyor Gemfile])
21
+ end
22
+ end
23
+ spec.bindir = "exe"
24
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
25
+ spec.require_paths = %w[lib]
26
+
27
+ spec.add_dependency "capybara", ">= 3.36"
28
+ spec.add_dependency "puma"
29
+ spec.add_dependency "selenium-webdriver", ">= 4.0"
30
+
31
+ spec.add_development_dependency "climate_control"
32
+ spec.add_development_dependency "publishing_platform_rubocop"
33
+ spec.add_development_dependency "simplecov"
34
+ end
metadata ADDED
@@ -0,0 +1,135 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: publishing_platform_test
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Publishing Platform
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2024-11-17 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: capybara
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '3.36'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '3.36'
27
+ - !ruby/object:Gem::Dependency
28
+ name: puma
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: selenium-webdriver
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '4.0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '4.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: climate_control
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: publishing_platform_rubocop
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: simplecov
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ description: Test configuration and dependencies for applications on Publishing Platform
98
+ email:
99
+ executables: []
100
+ extensions: []
101
+ extra_rdoc_files: []
102
+ files:
103
+ - ".rspec"
104
+ - ".rubocop.yml"
105
+ - ".ruby-version"
106
+ - LICENSE
107
+ - README.md
108
+ - Rakefile
109
+ - lib/publishing_platform_test.rb
110
+ - lib/publishing_platform_test/version.rb
111
+ - publishing_platform_test.gemspec
112
+ homepage:
113
+ licenses:
114
+ - MIT
115
+ metadata: {}
116
+ post_install_message:
117
+ rdoc_options: []
118
+ require_paths:
119
+ - lib
120
+ required_ruby_version: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '3.1'
125
+ required_rubygems_version: !ruby/object:Gem::Requirement
126
+ requirements:
127
+ - - ">="
128
+ - !ruby/object:Gem::Version
129
+ version: '0'
130
+ requirements: []
131
+ rubygems_version: 3.5.23
132
+ signing_key:
133
+ specification_version: 4
134
+ summary: Test setup for Publishing Platform
135
+ test_files: []