tsumamigui 0.1.3 → 0.1.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: beb1d6f4f9c9c2df335b58c81ae398a4428845fa
4
- data.tar.gz: 2ae6515d29e64f28cb8e7f58c652d2cb61b1c278
2
+ SHA256:
3
+ metadata.gz: 88cac36e22ce3ffeea41d5bacbc1a692e6d319c9f83b4ea85332e4fa87c5b901
4
+ data.tar.gz: 5a1e4ed178ffb68821ef919df2a67af0fa308a67abbbda021c5535ee8058840c
5
5
  SHA512:
6
- metadata.gz: cc852aee3ae850519d9de601a158c5158f3f7574d34cee4ef39e563a0604a403463d5d34b072350084ddb93ef156fe7df8d9024cec730fc6f2c9f56680515ac9
7
- data.tar.gz: 236839d9eeadd3c4da5f416a34debf19361e042f50abdc2da525ea42c56c787312aa586ec24837aba153be366c8aad0fcffed216f6f2845b1482dfb2feb1041a
6
+ metadata.gz: 49703c21a19c998864bd209999229135b3603024a856634e9ed51c104a13f37a11c5a86960fc1006687966e56c383f6f7b22a0507dd35824dae3d171ab5185c9
7
+ data.tar.gz: b37ca21d50c1064fd44b88170add8d98a8622bb7b2c1f964397fb4a905e1a8a5790ae539cbeef0c7f1b89688b6b24cfb2a503fb295691dfd519ed99c9ea40fb7
@@ -56,7 +56,7 @@ jobs:
56
56
  - run: chmod +x ./cc-test-reporter
57
57
  - run: bundle install --path vendor/bundle
58
58
  - run: bundle exec rspec
59
- - run: ./cc-test-reporter after-build -t simplecov --exit-code $?
59
+ - run: ./cc-test-reporter after-build -t simplecov --exit-code $? || true
60
60
  - store_artifacts:
61
61
  path: coverage
62
62
 
@@ -13,12 +13,12 @@ Style/NumericLiterals:
13
13
  Enabled: false
14
14
  Style/FrozenStringLiteralComment:
15
15
  Enabled: false
16
+ Style/RescueStandardError:
17
+ Enabled: false
16
18
  Metrics/BlockLength:
17
19
  Exclude:
18
20
  - 'spec/**/*'
19
21
  Layout/SpaceAroundEqualsInParameterDefault:
20
22
  EnforcedStyle: no_space
21
23
  Layout/SpaceInsideHashLiteralBraces:
22
- EnforcedStyle: no_space
23
- Lint/RescueWithoutErrorClass:
24
- Enabled: false
24
+ EnforcedStyle: no_space
@@ -0,0 +1,10 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.1
4
+ install:
5
+ - bundle install --path vendor/bundle
6
+ script:
7
+ - bundle exec rspec
8
+ notifications:
9
+ slack:
10
+ secure: Xa8QbpXmep2+cIbcjwBMXVQ+omxbfKdoeFgQnaMMUBB0c2wiBU8DlpcbbZCuk+OteyLsUhFxV6wy/8j5+aQjj7NmcbHcsLt/TN+z9ibyTi1RYE6C3e6QbvvFHNitbp8ji42SEEP0UJrRURlSpCAMkbdJpwwHHErWJFPf+lvSW8wzsg0H6TG/P2lCVZUzTeZ6p7hqswzez3DWK6CYOgiU8zF/Gg3p+pdOwg5XlQIt+15SH6U8Hpx1nkKteiNvHFIDwCxBnYkF4NtVo31zGFfBNVYk8bGE0Dsv4+tdbXjgscMPN4R5WyXCzyyidyges6Hoo3u3ArqLYNdJ8PUYgNaue3shiyok3fTh3XugK0zOz03clApI6AfGdoisBCe/Xp77z2WLbb2dNB+IdElQImH6RhnXYUPlGcJLlB3I4P+Kbc36z0BoSy1NheggTEiHHUO8fGtLQ4RQQ4GhbXFBnNAY9NoU8hE18RltTD786oZYisSiYU8fCZdG4QP4LjKxVkAh5R0AXSCRbkGlWOJ1dyQ/actXfBb2v6U1uAfTXQC/UvKnsdTR2yPPX8T3bZDSACVsm0r5gRAHY3caE7QuL8wMZNDDNoF19rbcp0YlJkGzBbsZ2toLl1qEsWtHKuOd9UiqQoXT9wyfH+DHPIzaB644yTWFRgvetZsfTGMDFM78qBk=
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # Tsumamigui
2
- [![Gem Version](https://badge.fury.io/rb/tsumamigui.svg)](https://badge.fury.io/rb/tsumamigui) [![circleci](https://circleci.com/gh/obiyuta/tsumamigui.svg?&style=shield&circle-token=8e2bda0f04504c2fe43d3fe70ea8ab1b6184806f)](https://circleci.com/gh/obiyuta/tsumamigui/tree/master) [![Code Climate](https://codeclimate.com/github/obiyuta/tsumamigui/badges/gpa.svg)](https://codeclimate.com/github/obiyuta/tsumamigui) [![Test Coverage](https://codeclimate.com/github/obiyuta/tsumamigui/badges/coverage.svg)](https://codeclimate.com/github/obiyuta/tsumamigui/coverage) [![Dependency Status](https://gemnasium.com/badges/github.com/obiyuta/tsumamigui.svg)](https://gemnasium.com/github.com/obiyuta/tsumamigui) [![Inline docs](http://inch-ci.org/github/obiyuta/tsumamigui.svg?branch=master)](http://inch-ci.org/github/obiyuta/tsumamigui) [![codebeat badge](https://codebeat.co/badges/2f105d8e-4512-4449-be5f-de37d0fa99a7)](https://codebeat.co/projects/github-com-obiyuta-tsumamigui-master)
2
+ [![Gem Version](https://badge.fury.io/rb/tsumamigui.svg)](https://badge.fury.io/rb/tsumamigui) [![circleci](https://circleci.com/gh/obiyuta/tsumamigui.svg?&style=shield&circle-token=8e2bda0f04504c2fe43d3fe70ea8ab1b6184806f)](https://circleci.com/gh/obiyuta/tsumamigui/tree/master) [![Build Status](https://travis-ci.org/obiyuta/tsumamigui.svg?branch=master)](https://travis-ci.org/obiyuta/tsumamigui) [![Code Climate](https://codeclimate.com/github/obiyuta/tsumamigui/badges/gpa.svg)](https://codeclimate.com/github/obiyuta/tsumamigui) [![Test Coverage](https://codeclimate.com/github/obiyuta/tsumamigui/badges/coverage.svg)](https://codeclimate.com/github/obiyuta/tsumamigui/coverage) [![Dependency Status](https://gemnasium.com/badges/github.com/obiyuta/tsumamigui.svg)](https://gemnasium.com/github.com/obiyuta/tsumamigui) [![Inline docs](http://inch-ci.org/github/obiyuta/tsumamigui.svg?branch=master)](http://inch-ci.org/github/obiyuta/tsumamigui) [![codebeat badge](https://codebeat.co/badges/2f105d8e-4512-4449-be5f-de37d0fa99a7)](https://codebeat.co/projects/github-com-obiyuta-tsumamigui-master)
3
3
 
4
4
  Tsumamigui(つまみぐい) is a simple and hussle-free Ruby web scraping library.
5
5
 
@@ -13,7 +13,7 @@ module Tsumamigui
13
13
  end
14
14
  end
15
15
 
16
- INTERVAL = 1.0..3.0 # sec
16
+ INTERVAL = (1.0..3.0).freeze # sec
17
17
 
18
18
  attr_reader :urls
19
19
 
@@ -36,6 +36,7 @@ module Tsumamigui
36
36
  # @param [String] url
37
37
  # @return [Tsumamigui::Response] response
38
38
  # @raise [Tsumamigui::RequestError]
39
+ # rubocop:disable Security/Open
39
40
  def fetch(url)
40
41
  charset = nil
41
42
  sleep(sleep_interval)
@@ -48,6 +49,7 @@ module Tsumamigui
48
49
  rescue => e
49
50
  raise RequestError, e.message
50
51
  end
52
+ # rubocop:enable Security/Open
51
53
 
52
54
  # @return [Float] sec 1.0-3.0秒
53
55
  def sleep_interval
@@ -56,8 +58,8 @@ module Tsumamigui
56
58
 
57
59
  # @return [Hash] options
58
60
  def request_options
59
- homepage = 'https://github.com/obiyuta/tsumamigui'
60
- {'User-Agent' => "Tsumamigui/#{Tsumamigui::VERSION} (+#{homepage})"}
61
+ site = 'https://github.com/obiyuta/tsumamigui'
62
+ {'User-Agent' => "Tsumamigui/#{Tsumamigui::VERSION} (+#{site})"}
61
63
  end
62
64
  end
63
65
  end
@@ -1,3 +1,3 @@
1
1
  module Tsumamigui
2
- VERSION = '0.1.3'.freeze
2
+ VERSION = '0.1.4'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tsumamigui
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - obiyuta
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-10-29 00:00:00.000000000 Z
11
+ date: 2019-06-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -163,6 +163,7 @@ files:
163
163
  - ".pryrc"
164
164
  - ".rspec"
165
165
  - ".rubocop.yml"
166
+ - ".travis.yml"
166
167
  - CHANGELOG.md
167
168
  - CODE_OF_CONDUCT.md
168
169
  - Gemfile
@@ -197,8 +198,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
197
198
  - !ruby/object:Gem::Version
198
199
  version: '0'
199
200
  requirements: []
200
- rubyforge_project:
201
- rubygems_version: 2.6.11
201
+ rubygems_version: 3.0.4
202
202
  signing_key:
203
203
  specification_version: 4
204
204
  summary: The simple and hussle-free Ruby web scraper