book_toolkit 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +14 -0
- data/.pryrc +3 -0
- data/Gemfile +4 -0
- data/Guardfile +11 -0
- data/LICENSE.txt +22 -0
- data/README.md +41 -0
- data/Rakefile +10 -0
- data/book_toolkit.gemspec +36 -0
- data/lib/book_toolkit/api_parser/campus_books.rb +58 -0
- data/lib/book_toolkit/api_parser/open_library.rb +74 -0
- data/lib/book_toolkit/api_parser.rb +6 -0
- data/lib/book_toolkit/book_data.rb +16 -0
- data/lib/book_toolkit/helper.rb +5 -0
- data/lib/book_toolkit/version.rb +3 -0
- data/lib/book_toolkit.rb +43 -0
- data/spec/book_data_spec.rb +13 -0
- data/spec/book_toolkit_spec.rb +19 -0
- data/spec/spec_helper.rb +18 -0
- metadata +261 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 604bc072f5be7280c018ea0dcae165df84777e6a
|
4
|
+
data.tar.gz: a7c2a3c558aba93a422b7e07179df183619b30a0
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 175e8021e6c139028d7d7f38bb71ac1d281a0f50b8b10d606f4d281a51ba7292cb9f568f1cc77c018fb5f57ad2be3192d376a28cb74a89ae66254057c23f5f7e
|
7
|
+
data.tar.gz: 450592e3428e8105b6fed38d682c253832956f1e6197f44700aeb28ef368455ddfe754175c73085216efb55561a1988d640f826a8e8bd84f54958ebbba0a638c
|
data/.gitignore
ADDED
data/.pryrc
ADDED
data/Gemfile
ADDED
data/Guardfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2015 Yukai Huang
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
# BookToolkit
|
2
|
+
|
3
|
+
幾個常用功能包起來。
|
4
|
+
|
5
|
+
還會支援 openlibrary api 還有 campusbooks api。
|
6
|
+
|
7
|
+
止飢可以[先看這篇](http://yukaihuang93.logdown.com/posts/255688/campusbooks-com-api-usage)。
|
8
|
+
|
9
|
+
## Installation
|
10
|
+
|
11
|
+
Add this line to your application's Gemfile:
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
gem 'book_toolkit'
|
15
|
+
```
|
16
|
+
|
17
|
+
And then execute:
|
18
|
+
|
19
|
+
$ bundle
|
20
|
+
|
21
|
+
Or install it yourself as:
|
22
|
+
|
23
|
+
$ gem install book_toolkit
|
24
|
+
|
25
|
+
## Usage
|
26
|
+
|
27
|
+
```ruby
|
28
|
+
# convert isbn 通.用.技
|
29
|
+
valid_isbn_13 = BookToolkit.to_isbn13("YOUR_ISBN_HERE")
|
30
|
+
|
31
|
+
# will accept length 9/10/12/13
|
32
|
+
checksum = BookToolkit.calculate_checksum("YOUR_ISBN_HERE")
|
33
|
+
```
|
34
|
+
|
35
|
+
## Contributing
|
36
|
+
|
37
|
+
1. Fork it ( https://github.com/[my-github-username]/book_toolkit/fork )
|
38
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
39
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
40
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
41
|
+
5. Create a new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
2
|
+
require 'rspec/core/rake_task'
|
3
|
+
|
4
|
+
# Default directory to look in is `/specs`
|
5
|
+
# Run with `rake spec`
|
6
|
+
RSpec::Core::RakeTask.new(:spec) do |task|
|
7
|
+
task.rspec_opts = ['--color', '--format', 'nested']
|
8
|
+
end
|
9
|
+
|
10
|
+
task :default => :spec
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'book_toolkit/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "book_toolkit"
|
8
|
+
spec.version = BookToolkit::VERSION
|
9
|
+
spec.authors = ["Yukai Huang"]
|
10
|
+
spec.email = ["yukaihuang1993@hotmail.com"]
|
11
|
+
spec.summary = %q{有關書集資料的常用功能}
|
12
|
+
spec.description = %q{有關書集資料的常用功能}
|
13
|
+
spec.homepage = ""
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.7"
|
22
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
23
|
+
spec.add_development_dependency "rspec"
|
24
|
+
spec.add_development_dependency "rspec-nc"
|
25
|
+
spec.add_development_dependency "guard"
|
26
|
+
spec.add_development_dependency "guard-rspec"
|
27
|
+
spec.add_development_dependency "growl"
|
28
|
+
spec.add_development_dependency "pry"
|
29
|
+
spec.add_development_dependency "pry-remote"
|
30
|
+
spec.add_development_dependency "pry-nav"
|
31
|
+
spec.add_development_dependency "simplecov", "~> 0.10"
|
32
|
+
|
33
|
+
spec.add_runtime_dependency "httpclient", "~> 2.6.0.1"
|
34
|
+
spec.add_runtime_dependency "isbn", '~> 2.0.10'
|
35
|
+
spec.add_runtime_dependency 'hashie', '~> 3.4.2'
|
36
|
+
end
|
@@ -0,0 +1,58 @@
|
|
1
|
+
# {
|
2
|
+
# "response": {
|
3
|
+
# "status": "ok",
|
4
|
+
# "version": "13",
|
5
|
+
# "label": {
|
6
|
+
# "plid": "0",
|
7
|
+
# "name": "CampusBooks.com",
|
8
|
+
# "website_id": "0",
|
9
|
+
# "website_name": "CampusBooks.com"
|
10
|
+
# },
|
11
|
+
# "page": {
|
12
|
+
# "name": "books",
|
13
|
+
# "f": "search",
|
14
|
+
# "books": {
|
15
|
+
# "page": 1,
|
16
|
+
# "limit": 1,
|
17
|
+
# "results_returned": 1,
|
18
|
+
# "total_pages": 1,
|
19
|
+
# "total_results": 1,
|
20
|
+
# "book": [
|
21
|
+
# {
|
22
|
+
# "isbn10": "0387290958",
|
23
|
+
# "isbn13": "9780387290959",
|
24
|
+
# "author": "",
|
25
|
+
# "binding": "Hardcover",
|
26
|
+
# "edition": "2006",
|
27
|
+
# "image": {
|
28
|
+
# "width": 50,
|
29
|
+
# "height": 75,
|
30
|
+
# "image": "http:\\/\\/ecx.images-amazon.com\\/images\\/I\\/512-hKSVzuL._SL75_.jpg"
|
31
|
+
# },
|
32
|
+
# "msrp": 219,
|
33
|
+
# "pages": "308",
|
34
|
+
# "publish_date": "2006-02-07",
|
35
|
+
# "publisher": "Springer",
|
36
|
+
# "rank": 2647173,
|
37
|
+
# "rating": 0,
|
38
|
+
# "title": "Orthogonal Frequency Division Multiplexing for Wireless Communications (Signals and Communication Technology)"
|
39
|
+
# }
|
40
|
+
# ]
|
41
|
+
# }
|
42
|
+
# }
|
43
|
+
# }
|
44
|
+
# }
|
45
|
+
|
46
|
+
module BookToolkit
|
47
|
+
module ApiParser
|
48
|
+
class CampusBooks
|
49
|
+
def initialize
|
50
|
+
# sample query_url:
|
51
|
+
# http://api2.campusbooks.com/13/rest/bookinfo?key=PA52HnTGaTSyizTOq4j1&isbn=9780387290959&format=json
|
52
|
+
@host_url = "http://api2.campusbooks.com"
|
53
|
+
@book_info_path = "/13/rest/bookinfo"
|
54
|
+
@api_key = "PA52HnTGaTSyizTOq4j1"
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
@@ -0,0 +1,74 @@
|
|
1
|
+
# {
|
2
|
+
# "ISBN:9780387290959": {
|
3
|
+
# "bib_key": "ISBN:9780387290959",
|
4
|
+
# "preview": "restricted",
|
5
|
+
# "preview_url": "https://archive.org/details/algebraiccombina2003liye",
|
6
|
+
# "info_url": "http://openlibrary.org/books/OL22723183M/Orthogonal_frequency_division_mutiplexing_for_wireless_communications",
|
7
|
+
# "details": {
|
8
|
+
# "publishers": [
|
9
|
+
# "Springer"
|
10
|
+
# ],
|
11
|
+
# "pagination": "xii, 306 p. :",
|
12
|
+
# "identifiers": {
|
13
|
+
# "librarything": [
|
14
|
+
# "6252855"
|
15
|
+
# ],
|
16
|
+
# "goodreads": [
|
17
|
+
# "1539554"
|
18
|
+
# ]
|
19
|
+
# },
|
20
|
+
# "lc_classifications": [
|
21
|
+
# "TK"
|
22
|
+
# ],
|
23
|
+
# "source_records": [
|
24
|
+
# "ia:algebraiccombina2003liye"
|
25
|
+
# ],
|
26
|
+
# "title": "Orthogonal frequency division mutiplexing for wireless communications",
|
27
|
+
# "type": {
|
28
|
+
# "key": "/type/edition"
|
29
|
+
# },
|
30
|
+
# "number_of_pages": 306,
|
31
|
+
# "created": {
|
32
|
+
# "type": "/type/datetime",
|
33
|
+
# "value": "2008-12-19T12:48:38.432497"
|
34
|
+
# },
|
35
|
+
# "languages": [
|
36
|
+
# {
|
37
|
+
# "key": "/languages/eng"
|
38
|
+
# }
|
39
|
+
# ],
|
40
|
+
# "isbn_10": [
|
41
|
+
# "0387290958"
|
42
|
+
# ],
|
43
|
+
# "latest_revision": 4,
|
44
|
+
# "publish_country": "us ",
|
45
|
+
# "key": "/books/OL22723183M",
|
46
|
+
# "last_modified": {
|
47
|
+
# "type": "/type/datetime",
|
48
|
+
# "value": "2014-07-28T10:19:56.239872"
|
49
|
+
# },
|
50
|
+
# "publish_date": "2004",
|
51
|
+
# "publish_places": [
|
52
|
+
# "New York, NY"
|
53
|
+
# ],
|
54
|
+
# "works": [
|
55
|
+
# {
|
56
|
+
# "key": "/works/OL16920397W"
|
57
|
+
# }
|
58
|
+
# ],
|
59
|
+
# "ocaid": "algebraiccombina2003liye",
|
60
|
+
# "by_statement": "edited by Ye (Geoffrey) Li, Gordon Stüber.",
|
61
|
+
# "revision": 4
|
62
|
+
# }
|
63
|
+
# }
|
64
|
+
# }
|
65
|
+
|
66
|
+
module BookToolkit
|
67
|
+
module ApiParser
|
68
|
+
class OpenLibrary
|
69
|
+
def initialize
|
70
|
+
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module BookToolkit
|
2
|
+
class BookData
|
3
|
+
attr_accessor :name, :author, :edition, :publisher, :isbn, :url,
|
4
|
+
:api_data_url, :revision
|
5
|
+
|
6
|
+
def initialize args={}
|
7
|
+
args.each{ |k, v| send("#{k}=v") }
|
8
|
+
|
9
|
+
if !@isbn.nil?
|
10
|
+
@isbn = BookToolkit.to_isbn13 @isbn
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
data/lib/book_toolkit.rb
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
require "book_toolkit/version"
|
2
|
+
|
3
|
+
# gem for isbn converting
|
4
|
+
require 'isbn'
|
5
|
+
|
6
|
+
require 'book_toolkit/book_data'
|
7
|
+
require 'book_toolkit/api_parser'
|
8
|
+
|
9
|
+
module BookToolkit
|
10
|
+
|
11
|
+
class << self
|
12
|
+
def to_isbn13 isbn
|
13
|
+
case isbn.length
|
14
|
+
when 13
|
15
|
+
return ISBN.thirteen isbn
|
16
|
+
when 10
|
17
|
+
return ISBN.thirteen isbn
|
18
|
+
when 12
|
19
|
+
return "#{isbn}#{BookToolkit.calculate_checksum(isbn)}"
|
20
|
+
when 9
|
21
|
+
return ISBN.thirteen("#{isbn}#{BookToolkit.calculate_checksum(isbn)}")
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
def calculate_checksum(isbn)
|
26
|
+
isbn.gsub!(/[^(\d|X)]/, '')
|
27
|
+
c = 0
|
28
|
+
if isbn.length <= 10
|
29
|
+
10.downto(2) {|i| c += isbn[10-i].to_i * i}
|
30
|
+
c %= 11
|
31
|
+
c = 11 - c
|
32
|
+
c ='X' if c == 10
|
33
|
+
return c
|
34
|
+
elsif isbn.length <= 13
|
35
|
+
(1..11).step(2) {|i| c += isbn[i].to_i}
|
36
|
+
c *= 3
|
37
|
+
(0..11).step(2) {|i| c += isbn[i].to_i}
|
38
|
+
c = (220-c) % 10
|
39
|
+
return c
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe BookToolkit do
|
4
|
+
let(:isbn13) { "9780387290959" }
|
5
|
+
let(:invalid_isbn13) { "9780387290951" }
|
6
|
+
let(:isbn10) { "0387290958" }
|
7
|
+
let(:invalid_isbn10) { "0387290951" }
|
8
|
+
|
9
|
+
it 'should convert to valid isbn 13' do
|
10
|
+
|
11
|
+
expect(ISBN.valid?(isbn13)).to eq(true)
|
12
|
+
expect(ISBN.valid?(isbn10)).to eq(true)
|
13
|
+
expect(ISBN.valid?(invalid_isbn13)).to eq(false)
|
14
|
+
expect(ISBN.valid?(invalid_isbn10)).to eq(false)
|
15
|
+
|
16
|
+
expect(ISBN.valid? BookToolkit.to_isbn13(invalid_isbn13)).to eq(true)
|
17
|
+
expect(ISBN.valid? BookToolkit.to_isbn13(invalid_isbn10)).to eq(true)
|
18
|
+
end
|
19
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
$LOAD_PATH << File.join(File.dirname(__FILE__), "..", "lib")
|
2
|
+
|
3
|
+
require 'pry'
|
4
|
+
require 'simplecov'
|
5
|
+
require 'book_toolkit'
|
6
|
+
|
7
|
+
SimpleCov.start
|
8
|
+
|
9
|
+
RSpec.configure do |config|
|
10
|
+
# Use color in STDOUT
|
11
|
+
config.color = true
|
12
|
+
|
13
|
+
# Use color not only in STDOUT but also in pagers and files
|
14
|
+
config.tty = true
|
15
|
+
|
16
|
+
# Use the specified formatter
|
17
|
+
config.formatter = :documentation # :progress, :html, :textmate
|
18
|
+
end
|
metadata
ADDED
@@ -0,0 +1,261 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: book_toolkit
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Yukai Huang
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-07-22 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.7'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.7'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec-nc
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: guard
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: guard-rspec
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: growl
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: pry
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: pry-remote
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: pry-nav
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: simplecov
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - "~>"
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0.10'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - "~>"
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0.10'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: httpclient
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - "~>"
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: 2.6.0.1
|
174
|
+
type: :runtime
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - "~>"
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: 2.6.0.1
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: isbn
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - "~>"
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: 2.0.10
|
188
|
+
type: :runtime
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - "~>"
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: 2.0.10
|
195
|
+
- !ruby/object:Gem::Dependency
|
196
|
+
name: hashie
|
197
|
+
requirement: !ruby/object:Gem::Requirement
|
198
|
+
requirements:
|
199
|
+
- - "~>"
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: 3.4.2
|
202
|
+
type: :runtime
|
203
|
+
prerelease: false
|
204
|
+
version_requirements: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - "~>"
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: 3.4.2
|
209
|
+
description: "有關書集資料的常用功能"
|
210
|
+
email:
|
211
|
+
- yukaihuang1993@hotmail.com
|
212
|
+
executables: []
|
213
|
+
extensions: []
|
214
|
+
extra_rdoc_files: []
|
215
|
+
files:
|
216
|
+
- ".gitignore"
|
217
|
+
- ".pryrc"
|
218
|
+
- Gemfile
|
219
|
+
- Guardfile
|
220
|
+
- LICENSE.txt
|
221
|
+
- README.md
|
222
|
+
- Rakefile
|
223
|
+
- book_toolkit.gemspec
|
224
|
+
- lib/book_toolkit.rb
|
225
|
+
- lib/book_toolkit/api_parser.rb
|
226
|
+
- lib/book_toolkit/api_parser/campus_books.rb
|
227
|
+
- lib/book_toolkit/api_parser/open_library.rb
|
228
|
+
- lib/book_toolkit/book_data.rb
|
229
|
+
- lib/book_toolkit/helper.rb
|
230
|
+
- lib/book_toolkit/version.rb
|
231
|
+
- spec/book_data_spec.rb
|
232
|
+
- spec/book_toolkit_spec.rb
|
233
|
+
- spec/spec_helper.rb
|
234
|
+
homepage: ''
|
235
|
+
licenses:
|
236
|
+
- MIT
|
237
|
+
metadata: {}
|
238
|
+
post_install_message:
|
239
|
+
rdoc_options: []
|
240
|
+
require_paths:
|
241
|
+
- lib
|
242
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
243
|
+
requirements:
|
244
|
+
- - ">="
|
245
|
+
- !ruby/object:Gem::Version
|
246
|
+
version: '0'
|
247
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
248
|
+
requirements:
|
249
|
+
- - ">="
|
250
|
+
- !ruby/object:Gem::Version
|
251
|
+
version: '0'
|
252
|
+
requirements: []
|
253
|
+
rubyforge_project:
|
254
|
+
rubygems_version: 2.4.5
|
255
|
+
signing_key:
|
256
|
+
specification_version: 4
|
257
|
+
summary: "有關書集資料的常用功能"
|
258
|
+
test_files:
|
259
|
+
- spec/book_data_spec.rb
|
260
|
+
- spec/book_toolkit_spec.rb
|
261
|
+
- spec/spec_helper.rb
|