gzlib 0.2.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +1 -0
- data/gzlib.gemspec +2 -1
- data/lib/gzlib/positions.rb +2 -2
- data/lib/gzlib/search.rb +7 -2
- data/lib/gzlib/version.rb +1 -1
- metadata +23 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: c5e194f2d449b800e33771d78fbf405f8e5b233d02499af28385e7d1ee51d435
|
4
|
+
data.tar.gz: 8eb2ad278eaae83ab5eeefebd58a3206d5b5cf56f3280fc5068ceac2bafc4a66
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79f60d04ca2f827b6e0cdd38038dac3f614d3535519d453d220af6bd30765eebead1ff6e2bfc6d1fb37568d69efa239ee1521de067ef44db418832dfcd8ae7ef
|
7
|
+
data.tar.gz: e1e8d72951bd3fe0d50cda2d66cf8216dbc8d6e7347c5fba49fa951b084d86fba1394428937068f219d3c1b0cb41fe4fcd6f5830f9ae435f6ac662129bc8e005
|
data/.gitignore
CHANGED
data/gzlib.gemspec
CHANGED
@@ -17,9 +17,10 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.executables = ['gzlib']
|
18
18
|
spec.require_paths = ['lib']
|
19
19
|
|
20
|
-
spec.add_development_dependency 'bundler', '
|
20
|
+
spec.add_development_dependency 'bundler', '> 1.9'
|
21
21
|
spec.add_development_dependency 'rake', '~> 10.0'
|
22
22
|
spec.add_development_dependency 'minitest', '~> 5.0'
|
23
23
|
|
24
24
|
spec.add_dependency 'nokogiri', '~> 1.6'
|
25
|
+
spec.add_dependency 'webrick', '~> 1.7'
|
25
26
|
end
|
data/lib/gzlib/positions.rb
CHANGED
data/lib/gzlib/search.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'webrick/httputils'
|
2
2
|
require 'nokogiri'
|
3
|
-
require '
|
3
|
+
require 'net/http'
|
4
4
|
require 'gzlib/book'
|
5
5
|
|
6
6
|
module Gzlib
|
@@ -58,7 +58,8 @@ module Gzlib
|
|
58
58
|
private
|
59
59
|
|
60
60
|
def getHtml
|
61
|
-
|
61
|
+
html = Net::HTTP.get(URI("#{Search}#{para}"))
|
62
|
+
Nokogiri::HTML(html)
|
62
63
|
end
|
63
64
|
|
64
65
|
def escape(str)
|
@@ -83,5 +84,9 @@ module Gzlib
|
|
83
84
|
@para.merge!({page: curPage+1})
|
84
85
|
end
|
85
86
|
|
87
|
+
def open(str)
|
88
|
+
Net::HTTP.get(URI(str))
|
89
|
+
end
|
90
|
+
|
86
91
|
end
|
87
92
|
end
|
data/lib/gzlib/version.rb
CHANGED
metadata
CHANGED
@@ -1,27 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gzlib
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ken
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.9'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.9'
|
27
27
|
- !ruby/object:Gem::Dependency
|
@@ -66,7 +66,21 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '1.6'
|
69
|
-
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: webrick
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '1.7'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '1.7'
|
83
|
+
description:
|
70
84
|
email:
|
71
85
|
- block24block@gmail.com
|
72
86
|
executables:
|
@@ -93,7 +107,7 @@ homepage: https://github.com/turnon/gzlib
|
|
93
107
|
licenses:
|
94
108
|
- MIT
|
95
109
|
metadata: {}
|
96
|
-
post_install_message:
|
110
|
+
post_install_message:
|
97
111
|
rdoc_options: []
|
98
112
|
require_paths:
|
99
113
|
- lib
|
@@ -108,9 +122,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
108
122
|
- !ruby/object:Gem::Version
|
109
123
|
version: '0'
|
110
124
|
requirements: []
|
111
|
-
|
112
|
-
|
113
|
-
signing_key:
|
125
|
+
rubygems_version: 3.2.3
|
126
|
+
signing_key:
|
114
127
|
specification_version: 4
|
115
128
|
summary: search books on http://opac.gzlib.gov.cn/
|
116
129
|
test_files: []
|