nypl-collections 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/.document +5 -0
- data/Gemfile +31 -0
- data/Gemfile.lock +126 -0
- data/LICENSE.txt +20 -0
- data/README.md +165 -0
- data/Rakefile +53 -0
- data/VERSION +1 -0
- data/coverage/.last_run.json +5 -0
- data/coverage/.resultset.json +193 -0
- data/coverage/assets/0.8.0/application.css +799 -0
- data/coverage/assets/0.8.0/application.js +1559 -0
- data/coverage/assets/0.8.0/colorbox/border.png +0 -0
- data/coverage/assets/0.8.0/colorbox/controls.png +0 -0
- data/coverage/assets/0.8.0/colorbox/loading.gif +0 -0
- data/coverage/assets/0.8.0/colorbox/loading_background.png +0 -0
- data/coverage/assets/0.8.0/favicon_green.png +0 -0
- data/coverage/assets/0.8.0/favicon_red.png +0 -0
- data/coverage/assets/0.8.0/favicon_yellow.png +0 -0
- data/coverage/assets/0.8.0/loading.gif +0 -0
- data/coverage/assets/0.8.0/magnify.png +0 -0
- data/coverage/assets/0.8.0/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/coverage/assets/0.8.0/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/coverage/assets/0.8.0/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/coverage/assets/0.8.0/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/coverage/assets/0.8.0/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/coverage/assets/0.8.0/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/coverage/assets/0.8.0/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/coverage/assets/0.8.0/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/coverage/assets/0.8.0/smoothness/images/ui-icons_222222_256x240.png +0 -0
- data/coverage/assets/0.8.0/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
- data/coverage/assets/0.8.0/smoothness/images/ui-icons_454545_256x240.png +0 -0
- data/coverage/assets/0.8.0/smoothness/images/ui-icons_888888_256x240.png +0 -0
- data/coverage/assets/0.8.0/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/coverage/index.html +770 -0
- data/lib/nypl_collections.rb +19 -0
- data/lib/nypl_collections/client.rb +122 -0
- data/lib/nypl_collections/configuration.rb +15 -0
- data/nypl-collections.gemspec +103 -0
- data/spec/fixtures/return_captures_for_uuid.json +1 -0
- data/spec/nypl_collections/client_spec.rb +29 -0
- data/spec/nypl_collections/configuration_spec.rb +1 -0
- data/spec/nypl_collections_spec.rb +19 -0
- data/spec/spec_helper.rb +30 -0
- metadata +200 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 61701b0e8d3f9b9ac6901ae24bbc8acb40e013b6
|
4
|
+
data.tar.gz: f2c44737597bd384de9216974f41af89016ddef4
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 91745dae4eb43afe74f8589c977d8eb787f5aad6b436c32e41592c775aec5f21c4df8dcb8ff3dd72296b50e8463c016c757461cc55dc22dbdc2a8c1cf01597b0
|
7
|
+
data.tar.gz: 8b3b26fafa1bb8c4771f919955d89814040a1e2bc672e16a076a09b4e1b075599beb366629fc7cab0d4e06480902955b48f336440555f3581ba97a8ea14fd064
|
data/.document
ADDED
data/Gemfile
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
source "http://rubygems.org"
|
2
|
+
# Add dependencies required to use your gem here.
|
3
|
+
# Example:
|
4
|
+
# gem "activesupport", ">= 2.3.5"
|
5
|
+
|
6
|
+
# Add dependencies to develop your gem here.
|
7
|
+
# Include everything needed to run rake, tests, features, etc.
|
8
|
+
|
9
|
+
# Use HTTParty for HTTP requests
|
10
|
+
gem 'httparty'
|
11
|
+
|
12
|
+
# Use dotenv to keep api keys private
|
13
|
+
gem 'dotenv'
|
14
|
+
|
15
|
+
gem 'rake'
|
16
|
+
|
17
|
+
group :development do
|
18
|
+
gem "shoulda", ">= 0"
|
19
|
+
gem "rdoc", "~> 3.12"
|
20
|
+
gem "bundler", "~> 1.0"
|
21
|
+
gem "jeweler", "~> 1.8.7"
|
22
|
+
gem 'pry'
|
23
|
+
end
|
24
|
+
|
25
|
+
group :test do
|
26
|
+
gem 'rspec'
|
27
|
+
gem "simplecov"
|
28
|
+
gem 'coveralls', require: false
|
29
|
+
gem 'shoulda-matchers'
|
30
|
+
gem 'webmock'
|
31
|
+
end
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,126 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
activesupport (4.0.2)
|
5
|
+
i18n (~> 0.6, >= 0.6.4)
|
6
|
+
minitest (~> 4.2)
|
7
|
+
multi_json (~> 1.3)
|
8
|
+
thread_safe (~> 0.1)
|
9
|
+
tzinfo (~> 0.3.37)
|
10
|
+
addressable (2.3.5)
|
11
|
+
atomic (1.1.14)
|
12
|
+
builder (3.2.2)
|
13
|
+
coderay (1.1.0)
|
14
|
+
coveralls (0.7.0)
|
15
|
+
multi_json (~> 1.3)
|
16
|
+
rest-client
|
17
|
+
simplecov (>= 0.7)
|
18
|
+
term-ansicolor
|
19
|
+
thor
|
20
|
+
crack (0.4.1)
|
21
|
+
safe_yaml (~> 0.9.0)
|
22
|
+
diff-lcs (1.2.5)
|
23
|
+
docile (1.1.1)
|
24
|
+
dotenv (0.9.0)
|
25
|
+
faraday (0.8.8)
|
26
|
+
multipart-post (~> 1.2.0)
|
27
|
+
git (1.2.6)
|
28
|
+
github_api (0.10.1)
|
29
|
+
addressable
|
30
|
+
faraday (~> 0.8.1)
|
31
|
+
hashie (>= 1.2)
|
32
|
+
multi_json (~> 1.4)
|
33
|
+
nokogiri (~> 1.5.2)
|
34
|
+
oauth2
|
35
|
+
hashie (2.0.5)
|
36
|
+
highline (1.6.20)
|
37
|
+
httparty (0.12.0)
|
38
|
+
json (~> 1.8)
|
39
|
+
multi_xml (>= 0.5.2)
|
40
|
+
httpauth (0.2.0)
|
41
|
+
i18n (0.6.9)
|
42
|
+
jeweler (1.8.8)
|
43
|
+
builder
|
44
|
+
bundler (~> 1.0)
|
45
|
+
git (>= 1.2.5)
|
46
|
+
github_api (= 0.10.1)
|
47
|
+
highline (>= 1.6.15)
|
48
|
+
nokogiri (= 1.5.10)
|
49
|
+
rake
|
50
|
+
rdoc
|
51
|
+
json (1.8.1)
|
52
|
+
jwt (0.1.8)
|
53
|
+
multi_json (>= 1.5)
|
54
|
+
method_source (0.8.2)
|
55
|
+
mime-types (2.0)
|
56
|
+
minitest (4.7.5)
|
57
|
+
multi_json (1.8.2)
|
58
|
+
multi_xml (0.5.5)
|
59
|
+
multipart-post (1.2.0)
|
60
|
+
nokogiri (1.5.10)
|
61
|
+
oauth2 (0.9.2)
|
62
|
+
faraday (~> 0.8)
|
63
|
+
httpauth (~> 0.2)
|
64
|
+
jwt (~> 0.1.4)
|
65
|
+
multi_json (~> 1.0)
|
66
|
+
multi_xml (~> 0.5)
|
67
|
+
rack (~> 1.2)
|
68
|
+
pry (0.9.12.4)
|
69
|
+
coderay (~> 1.0)
|
70
|
+
method_source (~> 0.8)
|
71
|
+
slop (~> 3.4)
|
72
|
+
rack (1.5.2)
|
73
|
+
rake (10.1.0)
|
74
|
+
rdoc (3.12.2)
|
75
|
+
json (~> 1.4)
|
76
|
+
rest-client (1.6.7)
|
77
|
+
mime-types (>= 1.16)
|
78
|
+
rspec (2.14.1)
|
79
|
+
rspec-core (~> 2.14.0)
|
80
|
+
rspec-expectations (~> 2.14.0)
|
81
|
+
rspec-mocks (~> 2.14.0)
|
82
|
+
rspec-core (2.14.7)
|
83
|
+
rspec-expectations (2.14.4)
|
84
|
+
diff-lcs (>= 1.1.3, < 2.0)
|
85
|
+
rspec-mocks (2.14.4)
|
86
|
+
safe_yaml (0.9.7)
|
87
|
+
shoulda (3.5.0)
|
88
|
+
shoulda-context (~> 1.0, >= 1.0.1)
|
89
|
+
shoulda-matchers (>= 1.4.1, < 3.0)
|
90
|
+
shoulda-context (1.1.6)
|
91
|
+
shoulda-matchers (2.4.0)
|
92
|
+
activesupport (>= 3.0.0)
|
93
|
+
simplecov (0.8.2)
|
94
|
+
docile (~> 1.1.0)
|
95
|
+
multi_json
|
96
|
+
simplecov-html (~> 0.8.0)
|
97
|
+
simplecov-html (0.8.0)
|
98
|
+
slop (3.4.7)
|
99
|
+
term-ansicolor (1.2.2)
|
100
|
+
tins (~> 0.8)
|
101
|
+
thor (0.18.1)
|
102
|
+
thread_safe (0.1.3)
|
103
|
+
atomic
|
104
|
+
tins (0.13.1)
|
105
|
+
tzinfo (0.3.38)
|
106
|
+
webmock (1.16.0)
|
107
|
+
addressable (>= 2.2.7)
|
108
|
+
crack (>= 0.3.2)
|
109
|
+
|
110
|
+
PLATFORMS
|
111
|
+
ruby
|
112
|
+
|
113
|
+
DEPENDENCIES
|
114
|
+
bundler (~> 1.0)
|
115
|
+
coveralls
|
116
|
+
dotenv
|
117
|
+
httparty
|
118
|
+
jeweler (~> 1.8.7)
|
119
|
+
pry
|
120
|
+
rake
|
121
|
+
rdoc (~> 3.12)
|
122
|
+
rspec
|
123
|
+
shoulda
|
124
|
+
shoulda-matchers
|
125
|
+
simplecov
|
126
|
+
webmock
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2013 Emma Spencer
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,165 @@
|
|
1
|
+
[![Build Status](https://travis-ci.org/enspencer/nypl-collections.png?branch=master)](https://travis-ci.org/enspencer/nypl-collections)[![Coverage Status](https://coveralls.io/repos/enspencer/nypl-collections/badge.png)](https://coveralls.io/r/enspencer/nypl-collections)
|
2
|
+
|
3
|
+
# nypl-collections
|
4
|
+
|
5
|
+
This will be a Ruby gem for the [New York Public Library Digital Collections API](http://api.repo.nypl.org/). Just got started on December 4, 2013, so check back for when it's usable, or contribute to make it happen!
|
6
|
+
|
7
|
+
## Setting Up
|
8
|
+
|
9
|
+
Sign up for an [API key](http://api.repo.nypl.org/) to start.
|
10
|
+
|
11
|
+
Setup a new instance:
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
@client = Collections::Client.new
|
15
|
+
@client.configure do |config|
|
16
|
+
config.auth_token = YOUR_AUTH_TOKEN
|
17
|
+
end
|
18
|
+
```
|
19
|
+
|
20
|
+
## Methods
|
21
|
+
|
22
|
+
### return_captures_for_uuid(uuid, options= {})
|
23
|
+
Takes a UUID for any bibliographic level, including container (a/k/a parent), collection or item-level records. Takes optional parameters of withTitles, per_page, and page.
|
24
|
+
|
25
|
+
Returns all captures for a parent-level UUID or a item-level UUID, and display the uuid, imageID, itemLink and title (optional) for each capture.
|
26
|
+
|
27
|
+
Example:
|
28
|
+
|
29
|
+
```ruby
|
30
|
+
@client.return_captures_for_uuid('5fa75050-c6c7-012f-e24b-58d385a7bc34', per_page: '10', page: '2')
|
31
|
+
```
|
32
|
+
|
33
|
+
returns:
|
34
|
+
```json
|
35
|
+
{"nyplAPI"=>
|
36
|
+
{"request"=>
|
37
|
+
{"uuid"=>"5fa75050-c6c7-012f-e24b-58d385a7bc34",
|
38
|
+
"perPage"=>"10",
|
39
|
+
"page"=>"2",
|
40
|
+
"totalPages"=>"13",
|
41
|
+
"startTime"=>"Beginning of Time",
|
42
|
+
"endTime"=>"Till Now"},
|
43
|
+
"response"=>
|
44
|
+
{"headers"=>{"status"=>"success", "code"=>"200", "message"=>"ok"},
|
45
|
+
"numResults"=>"125",
|
46
|
+
"capture"=>
|
47
|
+
[{"uuid"=>"510d47e3-6c44-a3d9-e040-e00a18064a99",
|
48
|
+
"typeOfResource"=>"still image",
|
49
|
+
"imageID"=>"1582671",
|
50
|
+
"sortString"=>"0000000001|0000000011|0000000001",
|
51
|
+
"itemLink"=>"http://digitalgallery.nypl.org/nypldigital/id?1582671",
|
52
|
+
"dateDigitized"=>"2012-08-16T00:34:10Z"},
|
53
|
+
{"uuid"=>"510d47e3-6c45-a3d9-e040-e00a18064a99",
|
54
|
+
"typeOfResource"=>"still image",
|
55
|
+
"imageID"=>"1582672",
|
56
|
+
"sortString"=>"0000000001|0000000012|0000000001",
|
57
|
+
"itemLink"=>"http://digitalgallery.nypl.org/nypldigital/id?1582672",
|
58
|
+
"dateDigitized"=>"2012-08-16T00:34:10Z"},
|
59
|
+
{"uuid"=>"510d47e3-6c46-a3d9-e040-e00a18064a99",
|
60
|
+
"typeOfResource"=>"still image",
|
61
|
+
"imageID"=>"1582673",
|
62
|
+
"sortString"=>"0000000001|0000000013|0000000001",
|
63
|
+
"itemLink"=>"http://digitalgallery.nypl.org/nypldigital/id?1582673",
|
64
|
+
"dateDigitized"=>"2012-08-16T00:34:11Z"},
|
65
|
+
{"uuid"=>"510d47e3-6c47-a3d9-e040-e00a18064a99",
|
66
|
+
"typeOfResource"=>"still image",
|
67
|
+
"imageID"=>"1582674",
|
68
|
+
"sortString"=>"0000000001|0000000014|0000000001",
|
69
|
+
"itemLink"=>"http://digitalgallery.nypl.org/nypldigital/id?1582674",
|
70
|
+
"dateDigitized"=>"2012-08-16T00:34:11Z"},
|
71
|
+
{"uuid"=>"510d47e3-6c48-a3d9-e040-e00a18064a99",
|
72
|
+
"typeOfResource"=>"still image",
|
73
|
+
"imageID"=>"1582675",
|
74
|
+
"sortString"=>"0000000001|0000000015|0000000001",
|
75
|
+
"itemLink"=>"http://digitalgallery.nypl.org/nypldigital/id?1582675",
|
76
|
+
"dateDigitized"=>"2012-08-16T00:34:11Z"},
|
77
|
+
{"uuid"=>"510d47e3-6c49-a3d9-e040-e00a18064a99",
|
78
|
+
"typeOfResource"=>"still image",
|
79
|
+
"imageID"=>"1582676",
|
80
|
+
"sortString"=>"0000000001|0000000016|0000000001",
|
81
|
+
"itemLink"=>"http://digitalgallery.nypl.org/nypldigital/id?1582676",
|
82
|
+
"dateDigitized"=>"2012-08-16T00:34:11Z"},
|
83
|
+
{"uuid"=>"510d47e3-6c4a-a3d9-e040-e00a18064a99",
|
84
|
+
"typeOfResource"=>"still image",
|
85
|
+
"imageID"=>"1582677",
|
86
|
+
"sortString"=>"0000000001|0000000017|0000000001",
|
87
|
+
"itemLink"=>"http://digitalgallery.nypl.org/nypldigital/id?1582677",
|
88
|
+
"dateDigitized"=>"2012-08-16T00:34:11Z"},
|
89
|
+
{"uuid"=>"510d47e3-6c4b-a3d9-e040-e00a18064a99",
|
90
|
+
"typeOfResource"=>"still image",
|
91
|
+
"imageID"=>"1582678",
|
92
|
+
"sortString"=>"0000000001|0000000018|0000000001",
|
93
|
+
"itemLink"=>"http://digitalgallery.nypl.org/nypldigital/id?1582678",
|
94
|
+
"dateDigitized"=>"2012-08-16T00:34:11Z"},
|
95
|
+
{"uuid"=>"510d47e3-6c4c-a3d9-e040-e00a18064a99",
|
96
|
+
"typeOfResource"=>"still image",
|
97
|
+
"imageID"=>"1582679",
|
98
|
+
"sortString"=>"0000000001|0000000019|0000000001",
|
99
|
+
"itemLink"=>"http://digitalgallery.nypl.org/nypldigital/id?1582679",
|
100
|
+
"dateDigitized"=>"2012-08-16T00:34:11Z"},
|
101
|
+
{"uuid"=>"510d47e3-6c4d-a3d9-e040-e00a18064a99",
|
102
|
+
"typeOfResource"=>"still image",
|
103
|
+
"imageID"=>"1582680",
|
104
|
+
"sortString"=>"0000000001|0000000020|0000000001",
|
105
|
+
"itemLink"=>"http://digitalgallery.nypl.org/nypldigital/id?1582680",
|
106
|
+
"dateDigitized"=>"2012-08-16T00:34:11Z"}]}}}
|
107
|
+
```
|
108
|
+
### return_uuid_for_local_identifier(local_id_name, local_id_value)
|
109
|
+
|
110
|
+
Takes parameters of local identifier field name and local identifier value.
|
111
|
+
|
112
|
+
Returns uuid for a local identifier.Local_identifier field names can be found in the "type" attribute of the MODS <identifier> element (e.g. <identifier type="local_[identifier-field-name]">).
|
113
|
+
|
114
|
+
What is MODS, you ask? [Here you go.](http://www.loc.gov/standards/mods/)
|
115
|
+
|
116
|
+
Also returns page, perPage, totalPages, numResults.
|
117
|
+
|
118
|
+
example:
|
119
|
+
```ruby
|
120
|
+
@client.return_uuid_for_local_identifier('local_hades', '1017240')
|
121
|
+
```
|
122
|
+
|
123
|
+
returns:
|
124
|
+
```json
|
125
|
+
{"nyplAPI"=>
|
126
|
+
{"request"=>
|
127
|
+
{"uuid"=>"ecaf7d80-c55f-012f-e3c7-58d385a7bc34",
|
128
|
+
"perPage"=>"10",
|
129
|
+
"page"=>"1",
|
130
|
+
"totalPages"=>"1",
|
131
|
+
"startTime"=>"Beginning of Time",
|
132
|
+
"endTime"=>"Till Now"},
|
133
|
+
"response"=>
|
134
|
+
{"headers"=>{"status"=>"success", "code"=>"200", "message"=>"ok"},
|
135
|
+
"numResults"=>"2",
|
136
|
+
"capture"=>
|
137
|
+
[{"uuid"=>"510d47e2-8e15-a3d9-e040-e00a18064a99",
|
138
|
+
"typeOfResource"=>"still image",
|
139
|
+
"imageID"=>"836959",
|
140
|
+
"sortString"=>"0000000001|0000001105|0000000015|0000000001",
|
141
|
+
"itemLink"=>"http://digitalgallery.nypl.org/nypldigital/id?836959",
|
142
|
+
"dateDigitized"=>"2013-02-28T20:39:36Z"},
|
143
|
+
{"uuid"=>"510d47e2-8e16-a3d9-e040-e00a18064a99",
|
144
|
+
"typeOfResource"=>"still image",
|
145
|
+
"imageID"=>"836960",
|
146
|
+
"sortString"=>"0000000001|0000001105|0000000015|0000000002",
|
147
|
+
"itemLink"=>"http://digitalgallery.nypl.org/nypldigital/id?836960",
|
148
|
+
"dateDigitized"=>"2013-02-28T20:39:36Z"}]}}}
|
149
|
+
```
|
150
|
+
|
151
|
+
## Contributing to nypl-collections
|
152
|
+
|
153
|
+
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
|
154
|
+
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
|
155
|
+
* Fork the project.
|
156
|
+
* Start a feature/bugfix branch.
|
157
|
+
* Commit and push until you are happy with your contribution.
|
158
|
+
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
159
|
+
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
160
|
+
|
161
|
+
## Copyright
|
162
|
+
|
163
|
+
Copyright (c) 2013 Emma Spencer. See LICENSE.txt for
|
164
|
+
further details.
|
165
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
require 'bundler'
|
5
|
+
begin
|
6
|
+
Bundler.setup(:default, :development)
|
7
|
+
rescue Bundler::BundlerError => e
|
8
|
+
$stderr.puts e.message
|
9
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
10
|
+
exit e.status_code
|
11
|
+
end
|
12
|
+
require 'rake'
|
13
|
+
|
14
|
+
require 'jeweler'
|
15
|
+
Jeweler::Tasks.new do |gem|
|
16
|
+
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
17
|
+
gem.name = "nypl-collections"
|
18
|
+
gem.homepage = "http://github.com/enspencer/nypl-collections"
|
19
|
+
gem.license = "MIT"
|
20
|
+
gem.summary = %Q{A gem for interacting with the NYPL Digital Collections API}
|
21
|
+
gem.description = %Q{A gem for interacting with the NYPL Digital Collections API}
|
22
|
+
gem.email = "emma.n.spencer@gmail.com"
|
23
|
+
gem.authors = ["Emma Spencer"]
|
24
|
+
# dependencies defined in Gemfile
|
25
|
+
end
|
26
|
+
Jeweler::RubygemsDotOrgTasks.new
|
27
|
+
|
28
|
+
require 'rake/testtask'
|
29
|
+
Rake::TestTask.new(:test) do |test|
|
30
|
+
test.libs << 'lib' << 'test'
|
31
|
+
test.pattern = 'test/**/test_*.rb'
|
32
|
+
test.verbose = true
|
33
|
+
end
|
34
|
+
|
35
|
+
# require 'rcov/rcovtask'
|
36
|
+
# Rcov::RcovTask.new do |test|
|
37
|
+
# test.libs << 'test'
|
38
|
+
# test.pattern = 'test/**/test_*.rb'
|
39
|
+
# test.verbose = true
|
40
|
+
# test.rcov_opts << '--exclude "gems/*"'
|
41
|
+
# end
|
42
|
+
|
43
|
+
task :default => :test
|
44
|
+
|
45
|
+
require 'rdoc/task'
|
46
|
+
Rake::RDocTask.new do |rdoc|
|
47
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
48
|
+
|
49
|
+
rdoc.rdoc_dir = 'rdoc'
|
50
|
+
rdoc.title = "nypl-collections #{version}"
|
51
|
+
rdoc.rdoc_files.include('README*')
|
52
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
53
|
+
end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.0.1
|
@@ -0,0 +1,193 @@
|
|
1
|
+
{
|
2
|
+
"RSpec": {
|
3
|
+
"coverage": {
|
4
|
+
"/Users/emmaspencer/Code/rubygems/nypl-collections/lib/nypl_collections.rb": [
|
5
|
+
1,
|
6
|
+
null,
|
7
|
+
1,
|
8
|
+
1,
|
9
|
+
null,
|
10
|
+
1,
|
11
|
+
5,
|
12
|
+
null,
|
13
|
+
null,
|
14
|
+
1,
|
15
|
+
2,
|
16
|
+
2,
|
17
|
+
null,
|
18
|
+
null,
|
19
|
+
1,
|
20
|
+
0,
|
21
|
+
null,
|
22
|
+
null,
|
23
|
+
null
|
24
|
+
],
|
25
|
+
"/Users/emmaspencer/Code/rubygems/nypl-collections/lib/nypl_collections/client.rb": [
|
26
|
+
1,
|
27
|
+
1,
|
28
|
+
1,
|
29
|
+
1,
|
30
|
+
1,
|
31
|
+
1,
|
32
|
+
null,
|
33
|
+
1,
|
34
|
+
1,
|
35
|
+
1,
|
36
|
+
1,
|
37
|
+
null,
|
38
|
+
1,
|
39
|
+
1,
|
40
|
+
null,
|
41
|
+
1,
|
42
|
+
3,
|
43
|
+
null,
|
44
|
+
null,
|
45
|
+
1,
|
46
|
+
2,
|
47
|
+
1,
|
48
|
+
null,
|
49
|
+
null,
|
50
|
+
null,
|
51
|
+
null,
|
52
|
+
1,
|
53
|
+
1,
|
54
|
+
1,
|
55
|
+
1,
|
56
|
+
null,
|
57
|
+
1,
|
58
|
+
null,
|
59
|
+
1,
|
60
|
+
1,
|
61
|
+
1,
|
62
|
+
null,
|
63
|
+
null,
|
64
|
+
1,
|
65
|
+
2,
|
66
|
+
null,
|
67
|
+
null,
|
68
|
+
1,
|
69
|
+
null,
|
70
|
+
null,
|
71
|
+
null,
|
72
|
+
null,
|
73
|
+
null,
|
74
|
+
null,
|
75
|
+
null,
|
76
|
+
null,
|
77
|
+
1,
|
78
|
+
0,
|
79
|
+
0,
|
80
|
+
0,
|
81
|
+
0,
|
82
|
+
null,
|
83
|
+
0,
|
84
|
+
null,
|
85
|
+
0,
|
86
|
+
null,
|
87
|
+
null,
|
88
|
+
null,
|
89
|
+
null,
|
90
|
+
null,
|
91
|
+
null,
|
92
|
+
null,
|
93
|
+
null,
|
94
|
+
null,
|
95
|
+
null,
|
96
|
+
1,
|
97
|
+
0,
|
98
|
+
0,
|
99
|
+
0,
|
100
|
+
0,
|
101
|
+
null,
|
102
|
+
0,
|
103
|
+
null,
|
104
|
+
0,
|
105
|
+
null,
|
106
|
+
null,
|
107
|
+
null,
|
108
|
+
null,
|
109
|
+
null,
|
110
|
+
null,
|
111
|
+
1,
|
112
|
+
0,
|
113
|
+
0,
|
114
|
+
0,
|
115
|
+
null,
|
116
|
+
0,
|
117
|
+
null,
|
118
|
+
0,
|
119
|
+
null,
|
120
|
+
null,
|
121
|
+
null,
|
122
|
+
null,
|
123
|
+
null,
|
124
|
+
1,
|
125
|
+
1,
|
126
|
+
1,
|
127
|
+
1,
|
128
|
+
null,
|
129
|
+
1,
|
130
|
+
null,
|
131
|
+
1,
|
132
|
+
null,
|
133
|
+
null,
|
134
|
+
null,
|
135
|
+
null,
|
136
|
+
null,
|
137
|
+
null,
|
138
|
+
null,
|
139
|
+
null,
|
140
|
+
null,
|
141
|
+
null,
|
142
|
+
null,
|
143
|
+
null,
|
144
|
+
null,
|
145
|
+
null,
|
146
|
+
null,
|
147
|
+
1
|
148
|
+
],
|
149
|
+
"/Users/emmaspencer/Code/rubygems/nypl-collections/lib/nypl_collections/configuration.rb": [
|
150
|
+
1,
|
151
|
+
1,
|
152
|
+
null,
|
153
|
+
1,
|
154
|
+
null,
|
155
|
+
1,
|
156
|
+
2,
|
157
|
+
null,
|
158
|
+
null,
|
159
|
+
1,
|
160
|
+
3,
|
161
|
+
3,
|
162
|
+
null,
|
163
|
+
null,
|
164
|
+
null
|
165
|
+
],
|
166
|
+
"/Users/emmaspencer/Code/rubygems/nypl-collections/spec/nypl_collections/configuration_spec.rb": [
|
167
|
+
null
|
168
|
+
],
|
169
|
+
"/Users/emmaspencer/Code/rubygems/nypl-collections/spec/nypl_collections_spec.rb": [
|
170
|
+
1,
|
171
|
+
null,
|
172
|
+
1,
|
173
|
+
1,
|
174
|
+
1,
|
175
|
+
1,
|
176
|
+
null,
|
177
|
+
null,
|
178
|
+
null,
|
179
|
+
1,
|
180
|
+
1,
|
181
|
+
1,
|
182
|
+
1,
|
183
|
+
null,
|
184
|
+
null,
|
185
|
+
1,
|
186
|
+
null,
|
187
|
+
null,
|
188
|
+
null
|
189
|
+
]
|
190
|
+
},
|
191
|
+
"timestamp": 1386366628
|
192
|
+
}
|
193
|
+
}
|