bucky-core 0.9.13 → 0.9.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +31 -9
- data/bucky-core.gemspec +1 -0
- data/lib/bucky/test_equipment/verifications/status_checker.rb +1 -1
- data/lib/bucky/utils/requests.rb +2 -2
- data/lib/bucky/version.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 168d32b4b8668e9c8f8147d6b04e11ae18c1a3eb
|
4
|
+
data.tar.gz: 14b3d823f29d0df70ffe2940221bf8d7833f58c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3a782f487cf7cb3c56ecb1628e52cc74efaefde79a16420bcb723a8bfa9628ab9e122652e30df9e91626555a5529e1d759fda99f248a2482f77dcc4b9a67eea
|
7
|
+
data.tar.gz: 880bbe4d10ff837ddae6fa9c3c16db2a285e7174ce20d50a971b29976f4b7650da1c2069b2db5f781912ae1e07c2c3487f9bc84f15a7832e0a1572c0fcf40552
|
data/.circleci/config.yml
CHANGED
@@ -1,15 +1,36 @@
|
|
1
1
|
version: 2
|
2
2
|
jobs:
|
3
|
+
generate_cache_for_system_test:
|
4
|
+
machine: true
|
5
|
+
steps:
|
6
|
+
- checkout
|
7
|
+
- restore_cache:
|
8
|
+
key: docker-{{ checksum ".circleci/config.yml" }}-{{ checksum "docker-compose.system-test.yml" }}-{{ checksum "Dockerfile.system-test" }}-{{ checksum "bucky-core.gemspec" }}
|
9
|
+
- run:
|
10
|
+
command: |
|
11
|
+
if [ ! -f ~/caches/images.tar ]; then
|
12
|
+
docker-compose -f docker-compose.system-test.yml build && \
|
13
|
+
mkdir -p ~/caches && \
|
14
|
+
docker save $(docker images | awk 'NR>=2 && ! /^<none>/{print $1}') -o ~/caches/images.tar
|
15
|
+
fi
|
16
|
+
- save_cache:
|
17
|
+
key: docker-{{ checksum ".circleci/config.yml" }}-{{ checksum "docker-compose.system-test.yml" }}-{{ checksum "Dockerfile.system-test" }}-{{ checksum "bucky-core.gemspec" }}
|
18
|
+
paths: ~/caches/images.tar
|
3
19
|
system_test:
|
4
20
|
machine: true
|
21
|
+
parallelism: 2
|
5
22
|
steps:
|
6
23
|
- checkout
|
24
|
+
- restore_cache:
|
25
|
+
key: docker-{{ checksum ".circleci/config.yml" }}-{{ checksum "docker-compose.system-test.yml" }}-{{ checksum "Dockerfile.system-test" }}-{{ checksum "bucky-core.gemspec" }}
|
26
|
+
- run:
|
27
|
+
command: docker load -q -i ~/caches/images.tar
|
7
28
|
- run:
|
8
29
|
name: docker up
|
9
|
-
command: docker-compose -f docker-compose.system-test.yml up --build -d
|
30
|
+
command: docker-compose -f docker-compose.system-test.yml up --no-build -d
|
10
31
|
- run:
|
11
32
|
name: execute system testing
|
12
|
-
command: docker exec bucky-core bats /bucky-core/
|
33
|
+
command: 'circleci tests glob system_testing/testing_code/*.bats | xargs -n 1 -I {} docker exec bucky-core bats "/bucky-core/"{} | circleci tests split'
|
13
34
|
- run:
|
14
35
|
name: docker down
|
15
36
|
command: docker-compose -f docker-compose.system-test.yml down
|
@@ -23,7 +44,7 @@ jobs:
|
|
23
44
|
- checkout
|
24
45
|
- type: cache-restore
|
25
46
|
key: unit-test-{{ checksum "Gemfile.lock" }}
|
26
|
-
- run: bundle install --path vendor/bundle
|
47
|
+
- run: bundle install --path vendor/bundle --quiet
|
27
48
|
- type: cache-save
|
28
49
|
key: unit-test-{{ checksum "Gemfile.lock" }}
|
29
50
|
paths:
|
@@ -39,14 +60,14 @@ jobs:
|
|
39
60
|
./cc-test-reporter before-build
|
40
61
|
bundle exec rspec
|
41
62
|
./cc-test-reporter after-build --coverage-input-type simplecov --exit-code $?
|
42
|
-
|
63
|
+
static_code_analysis:
|
43
64
|
docker:
|
44
65
|
- image: circleci/ruby:2.4.2-node
|
45
66
|
steps:
|
46
67
|
- checkout
|
47
68
|
- type: cache-restore
|
48
69
|
key: syntax-check-{{ checksum "Gemfile.lock" }}
|
49
|
-
- run: bundle install --path vendor/bundle
|
70
|
+
- run: bundle install --path vendor/bundle --quiet
|
50
71
|
- type: cache-save
|
51
72
|
key: syntax-check-{{ checksum "Gemfile.lock" }}
|
52
73
|
paths:
|
@@ -72,11 +93,12 @@ workflows:
|
|
72
93
|
version: 2
|
73
94
|
test:
|
74
95
|
jobs:
|
96
|
+
- static_code_analysis
|
75
97
|
- unit_test
|
76
|
-
-
|
77
|
-
|
78
|
-
|
79
|
-
|
98
|
+
- generate_cache_for_system_test
|
99
|
+
- system_test:
|
100
|
+
requires:
|
101
|
+
- generate_cache_for_system_test
|
80
102
|
deploy:
|
81
103
|
jobs:
|
82
104
|
- publish:
|
data/bucky-core.gemspec
CHANGED
@@ -39,6 +39,7 @@ Gem::Specification.new do |spec|
|
|
39
39
|
spec.add_development_dependency 'rubocop', '~> 0.63'
|
40
40
|
spec.add_development_dependency 'simplecov-console', '~> 0.4.2'
|
41
41
|
|
42
|
+
spec.add_runtime_dependency 'addressable', '~> 2.5'
|
42
43
|
spec.add_runtime_dependency 'color_echo', '~> 3.1'
|
43
44
|
spec.add_runtime_dependency 'json', '~> 2.1'
|
44
45
|
spec.add_runtime_dependency 'nokogiri', '~> 1.8'
|
@@ -146,7 +146,7 @@ module Bucky
|
|
146
146
|
def exclude_href?(href)
|
147
147
|
return true if href.nil?
|
148
148
|
|
149
|
-
exclude_regexps = [/^javascript
|
149
|
+
exclude_regexps = [/^javascript.+/i, /^tel:\d.+/i, /^mailto:.+/i]
|
150
150
|
exclude_regexps.keep_if { |reg| reg.match?(href) }
|
151
151
|
return true unless exclude_regexps.empty?
|
152
152
|
|
data/lib/bucky/utils/requests.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'net/http'
|
4
|
-
require 'uri'
|
4
|
+
require 'addressable/uri'
|
5
5
|
|
6
6
|
module Bucky
|
7
7
|
module Utils
|
@@ -17,7 +17,7 @@ module Bucky
|
|
17
17
|
# @param [Integer/Float] read_timeout max wait time until recieve response
|
18
18
|
# @return [Net::HTTP] HttpStatusCode
|
19
19
|
def get_response(uri, device, open_timeout, read_timeout)
|
20
|
-
parsed_uri = URI.parse(uri.to_str.strip)
|
20
|
+
parsed_uri = Addressable::URI.parse(uri.to_str.strip)
|
21
21
|
query = parsed_uri.query ? "?#{parsed_uri.query}" : ''
|
22
22
|
# If path is empty, add "/" e.g) http://example.com
|
23
23
|
path = parsed_uri.path.empty? ? '/' : parsed_uri.path
|
data/lib/bucky/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bucky-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- NaotoKishino
|
@@ -13,7 +13,7 @@ authors:
|
|
13
13
|
autorequire:
|
14
14
|
bindir: exe
|
15
15
|
cert_chain: []
|
16
|
-
date: 2019-07-
|
16
|
+
date: 2019-07-26 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: awesome_print
|
@@ -169,6 +169,20 @@ dependencies:
|
|
169
169
|
- - "~>"
|
170
170
|
- !ruby/object:Gem::Version
|
171
171
|
version: 0.4.2
|
172
|
+
- !ruby/object:Gem::Dependency
|
173
|
+
name: addressable
|
174
|
+
requirement: !ruby/object:Gem::Requirement
|
175
|
+
requirements:
|
176
|
+
- - "~>"
|
177
|
+
- !ruby/object:Gem::Version
|
178
|
+
version: '2.5'
|
179
|
+
type: :runtime
|
180
|
+
prerelease: false
|
181
|
+
version_requirements: !ruby/object:Gem::Requirement
|
182
|
+
requirements:
|
183
|
+
- - "~>"
|
184
|
+
- !ruby/object:Gem::Version
|
185
|
+
version: '2.5'
|
172
186
|
- !ruby/object:Gem::Dependency
|
173
187
|
name: color_echo
|
174
188
|
requirement: !ruby/object:Gem::Requirement
|