Skip to content

Commit 1a4b347

Browse files
committed
[rb] create multiple gemspec files
1 parent 3755075 commit 1a4b347

File tree

5 files changed

+69
-9
lines changed

5 files changed

+69
-9
lines changed

rb/.rubocop.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Metrics/BlockLength:
5151
Max: 18
5252
Exclude:
5353
- 'spec/**/*.rb'
54-
- 'selenium-webdriver.gemspec'
54+
- 'selenium-*.gemspec'
5555

5656
Metrics/ClassLength:
5757
CountComments: false

rb/Gemfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# frozen_string_literal: true
22

33
source 'https://rubygems.org'
4-
gemspec
4+
gemspec name: 'selenium-webdriver'

rb/lib/selenium/devtools/version.rb

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# frozen_string_literal: true
2+
3+
# Licensed to the Software Freedom Conservancy (SFC) under one
4+
# or more contributor license agreements. See the NOTICE file
5+
# distributed with this work for additional information
6+
# regarding copyright ownership. The SFC licenses this file
7+
# to you under the Apache License, Version 2.0 (the
8+
# "License"); you may not use this file except in compliance
9+
# with the License. You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing,
14+
# software distributed under the License is distributed on an
15+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
# KIND, either express or implied. See the License for the
17+
# specific language governing permissions and limitations
18+
# under the License.
19+
20+
module Selenium
21+
module DevTools
22+
VERSION = '0.0.1.alpha'
23+
end # DevTools
24+
end # Selenium

rb/selenium-devtools.gemspec

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# frozen_string_literal: true
2+
3+
root = __dir__
4+
raise "cwd must be #{root} when reading gemspec" if root != Dir.pwd
5+
6+
$LOAD_PATH.push(File.expand_path('lib', root))
7+
require 'selenium/devtools/version'
8+
9+
Gem::Specification.new do |s|
10+
s.name = 'selenium-devtools'
11+
s.version = Selenium::DevTools::VERSION
12+
13+
s.authors = ['Alex Rodionov', 'Titus Fortner', 'Thomas Walpole']
14+
15+
16+
s.summary = 'DevTools Code for use with Selenium'
17+
s.description = <<-DESCRIPTION
18+
Selenium WebDriver now supports limited DevTools interactions.
19+
This project allows users to specify desired versioning.
20+
DESCRIPTION
21+
22+
s.license = 'Apache-2.0'
23+
s.homepage = 'https://selenium.dev'
24+
s.metadata = {
25+
'changelog_uri' => 'https://github.com/SeleniumHQ/selenium/blob/trunk/rb/CHANGES',
26+
'source_code_uri' => 'https://github.com/SeleniumHQ/selenium/tree/trunk/rb'
27+
}
28+
29+
s.required_rubygems_version = Gem::Requirement.new('> 1.3.1') if s.respond_to? :required_rubygems_version=
30+
s.required_ruby_version = Gem::Requirement.new('>= 2.5')
31+
32+
s.files = Dir.glob('{lib/selenium/devtools}/**/*')
33+
s.require_paths = ["lib"]
34+
end

rb/selenium-webdriver.gemspec

+9-7
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,17 @@ Gem::Specification.new do |s|
1111
s.version = Selenium::WebDriver::VERSION
1212

1313
s.authors = ['Alex Rodionov', 'Titus Fortner', 'Thomas Walpole']
14-
14+
1515

16-
s.summary = 'The next generation developer focused tool for automated testing of webapps'
17-
s.description = 'WebDriver is a tool for writing automated tests of websites. ' \
18-
'It aims to mimic the behaviour of a real user, ' \
19-
'and as such interacts with the HTML of the application.'
16+
s.summary = 'Selenium is a browser automation tool for automated testing of webapps and more'
17+
s.description = <<-DESCRIPTION
18+
Selenium implements the W3C WebDriver protocol to automate popular browsers.
19+
It aims to mimic the behaviour of a real user as it interacts with the application's HTML.
20+
It's primarily intended for web application testing, but any web-based task can automated.
21+
DESCRIPTION
2022

2123
s.license = 'Apache-2.0'
22-
s.homepage = 'https://github.com/SeleniumHQ/selenium'
24+
s.homepage = 'https://selenium.dev'
2325
s.metadata = {
2426
'changelog_uri' => 'https://github.com/SeleniumHQ/selenium/blob/trunk/rb/CHANGES',
2527
'source_code_uri' => 'https://github.com/SeleniumHQ/selenium/tree/trunk/rb'
@@ -28,7 +30,7 @@ Gem::Specification.new do |s|
2830
s.required_rubygems_version = Gem::Requirement.new('> 1.3.1') if s.respond_to? :required_rubygems_version=
2931
s.required_ruby_version = Gem::Requirement.new('>= 2.5')
3032

31-
s.files = Dir["#{root}/**/*"].reject { |e| e =~ /ruby\.iml|build\.desc/ }.map { |e| e.sub("#{root}/", '') }
33+
s.files = Dir.glob('{lib/**/*}') - Dir.glob('{lib/selenium/devtools}/**/*')
3234
s.require_paths = ['lib']
3335

3436
s.add_runtime_dependency 'childprocess', ['>= 0.5', '< 5.0']

0 commit comments

Comments
 (0)