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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2b9ddfb233321416ab533a5e156cd947f0d5e44b
4
- data.tar.gz: d2eb7b14ed2c76e537312f701fe93ae45bfb4b43
3
+ metadata.gz: 168d32b4b8668e9c8f8147d6b04e11ae18c1a3eb
4
+ data.tar.gz: 14b3d823f29d0df70ffe2940221bf8d7833f58c0
5
5
  SHA512:
6
- metadata.gz: 13028e8366556af56000d2f0a96b3b4c523a7b6ff4e62e98fd6147d33bee5100f35742e6f232d5394435e3a0e446fd434cc36b73bd56796619ed0c94c53d17da
7
- data.tar.gz: f0350162e227a603748e2371f69656bb3be679e07bdaba669843613f9b7925a6a260a3aed39d07b65f4c7c9f13c562b750ee1e4dfdcae42989d231468686dede
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/system_testing/testing_code
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
- syntax_check:
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
- - system_test
77
- lint:
78
- jobs:
79
- - syntax_check
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.+/, /^tel:\d.+/, /^mailto:.+/]
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
 
@@ -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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Bucky
4
4
  module Version
5
- VERSION = '0.9.13'
5
+ VERSION = '0.9.14'
6
6
  end
7
7
  end
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.13
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-12 00:00:00.000000000 Z
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