webpage_update_checker 1.0.0 → 1.1.0

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
  SHA256:
3
- metadata.gz: 1d02d9b92d3ab8891e12c9cc7eaff8c75219158adb258bdbaeffbe5234d6d8f5
4
- data.tar.gz: 9fd76ab55f4c9a7277e525d86672792fb98c18b0bdaf32a23da1f80bdfe9aa50
3
+ metadata.gz: d2bee192848bb12321f3d4bb66533b292136a6d2668917de9f606a9a44ea080d
4
+ data.tar.gz: 95ce7313f61e8ad058c064fadc3460772155a006ba587a21d6027a32854c5cec
5
5
  SHA512:
6
- metadata.gz: 5f5174a32a8f062b53b4270dabee2c6a15c100993298a2907c01311d96a39df4895acd676951041cee97753f8de69f3a6b42622cc81b3dcc4c0059184a840a36
7
- data.tar.gz: 4f7e0e712e24b25fb1c78cf9ad91440542db28481065e25bc976b7c9cb2dd042c0154f6136bfadde47d0326fcce3f25a87b3e8953d2d650fa586a0c38b4b025c
6
+ metadata.gz: ad50f41b2a46758ba35545a11eb27e1e795a328ee9a99ca968a9b74eba1757a4aac0591c3386588e1adaaf828bd8bed707a1df10d99db5e17f06c0fdfd390d6f
7
+ data.tar.gz: f00ab47146876b62b340ef724c184e197552cfffc216b8cb9c033a4f6d64f3387f5a6217833fe87cb0574b11eed21d30311a80921ab705213592c9af60d248fb
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- webpage_update_checker (1.0.0)
4
+ webpage_update_checker (1.1.0)
5
5
  mechanize
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -17,7 +17,7 @@ $ bundle install
17
17
  ```ruby
18
18
  require 'webpage_update_checker'
19
19
 
20
- checker = WebpageUpdateChecker::Judge.new
20
+ checker = WebpageUpdateChecker::Client.new
21
21
  target_page_md5 = WebpageUpdateChecker::Methods::Md5.new(uri: 'http://www.ne.jp/asahi/pursuits/ootsuki/pc/X68k/x680x0.xhtml')
22
22
 
23
23
  checker.current_diff_value(target_page_md5) #=> fb2eeb524e6b5637ef7fa4bed48f1d67
@@ -25,6 +25,24 @@ checker.updated?(target_page_md5, previous_diff_value: 'fb2eeb524e6b5637ef7fa4be
25
25
  checker.updated?(target_page_md5, previous_diff_value: '12345678901234567890123456789012') #=> true (updated)
26
26
  ```
27
27
 
28
+ # Methods
29
+ You can use these `Methods`.
30
+
31
+ - LastModified
32
+ - Md5
33
+ - Sha1
34
+ - Sha256
35
+ - Sha384
36
+ - Sha512
37
+
38
+ # methods
39
+ You can use these methods in each `Methods`.
40
+
41
+ - `#updated?(checked_object, previous_diff_value:)`
42
+ - `#=> true or false`
43
+ - `#current_diff_value(checked_object)`
44
+ - `#=> object such as Time or String (MD5, SHA512...)`
45
+
28
46
  # TODO
29
47
  - [Coveralls](https://coveralls.io/)
30
48
  - [Code Climate](https://codeclimate.com/)
@@ -2,7 +2,7 @@ require 'mechanize'
2
2
  Dir[File.expand_path('methods', __dir__) << '/*.rb'].each { |file| require file }
3
3
 
4
4
  module WebpageUpdateChecker
5
- class Judge
5
+ class Client
6
6
  def updated?(checked_object, previous_diff_value:)
7
7
  current_diff_value(checked_object) != previous_diff_value
8
8
  end
@@ -1,3 +1,3 @@
1
1
  module WebpageUpdateChecker
2
- VERSION = '1.0.0'.freeze
2
+ VERSION = '1.1.0'.freeze
3
3
  end
@@ -1,5 +1,5 @@
1
1
  require 'webpage_update_checker/version'
2
- require 'webpage_update_checker/judge'
2
+ require 'webpage_update_checker/client'
3
3
 
4
4
  module WebpageUpdateChecker
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webpage_update_checker
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Osamu Takiya
@@ -254,7 +254,7 @@ files:
254
254
  - bin/console
255
255
  - bin/setup
256
256
  - lib/webpage_update_checker.rb
257
- - lib/webpage_update_checker/judge.rb
257
+ - lib/webpage_update_checker/client.rb
258
258
  - lib/webpage_update_checker/methods/last_modified.rb
259
259
  - lib/webpage_update_checker/methods/md5.rb
260
260
  - lib/webpage_update_checker/methods/sha1.rb