met_museum 1.3.2 → 1.3.7
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 +4 -4
- data/.github/workflows/ruby.yml +32 -0
- data/.rubocop.yml +13 -0
- data/.travis.yml +1 -1
- data/Gemfile +1 -1
- data/Gemfile.lock +27 -6
- data/LICENSE.txt +1 -1
- data/README.md +73 -6
- data/Rakefile +1 -1
- data/lib/met_museum/api_expections.rb +0 -1
- data/lib/met_museum/collection.rb +58 -30
- data/lib/met_museum/http_status_code.rb +23 -6
- data/lib/met_museum/version.rb +1 -1
- data/met_museum.gemspec +6 -6
- metadata +21 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 42eaa0e635711cb6b371d1a7cc524b552f40c402c7506b9cda10ef48487f7f3b
|
|
4
|
+
data.tar.gz: 1259dc15496c35bde977e5a66a0449dfb068d2bee0ef6914294bba38a474ae39
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6d8fb6c6316e77adaf4d700e97f68b8af64bc0f9e24a508486252955387778644621e76dc0754f20aadcbd4aa7df1db89e00b6230ea10b1c5955f2bb4e8c9b50
|
|
7
|
+
data.tar.gz: 625e78ae82ad40f8f533e4cb9d3d94e293511ae411d9cbcf5008475770e76b71382efc7914e1f7d1592ad8d1a85b87b7c8f2f9dee64fb9e8987b61518bcf01c9
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# This workflow uses actions that are not certified by GitHub.
|
|
2
|
+
# They are provided by a third-party and are governed by
|
|
3
|
+
# separate terms of service, privacy policy, and support
|
|
4
|
+
# documentation.
|
|
5
|
+
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
|
|
6
|
+
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
|
|
7
|
+
|
|
8
|
+
name: Ruby
|
|
9
|
+
|
|
10
|
+
on: [push, pull_request]
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
test:
|
|
14
|
+
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
strategy:
|
|
17
|
+
matrix:
|
|
18
|
+
ruby: [ '2.5', '2.6', '2.7' ]
|
|
19
|
+
name: Ruby ${{ matrix.ruby }} spec
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@v2
|
|
22
|
+
- name: Set up Ruby
|
|
23
|
+
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
|
|
24
|
+
# change this to (see https://github.com/ruby/setup-ruby#versioning):
|
|
25
|
+
# uses: ruby/setup-ruby@v1
|
|
26
|
+
uses: ruby/setup-ruby@ec106b438a1ff6ff109590de34ddc62c540232e0
|
|
27
|
+
with:
|
|
28
|
+
ruby-version: ${{ matrix.ruby }}
|
|
29
|
+
- name: Install dependencies
|
|
30
|
+
run: bundle install
|
|
31
|
+
- name: Run spec
|
|
32
|
+
run: bundle exec rake
|
data/.rubocop.yml
ADDED
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,24 +1,31 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
met_museum (1.3.
|
|
4
|
+
met_museum (1.3.7)
|
|
5
5
|
faraday
|
|
6
6
|
oj
|
|
7
7
|
|
|
8
8
|
GEM
|
|
9
9
|
remote: https://rubygems.org/
|
|
10
10
|
specs:
|
|
11
|
+
ast (2.4.1)
|
|
11
12
|
coderay (1.1.2)
|
|
12
13
|
diff-lcs (1.3)
|
|
13
|
-
faraday (0.
|
|
14
|
+
faraday (1.0.1)
|
|
14
15
|
multipart-post (>= 1.2, < 3)
|
|
15
16
|
method_source (0.9.2)
|
|
16
17
|
multipart-post (2.1.1)
|
|
17
|
-
oj (3.
|
|
18
|
+
oj (3.10.0)
|
|
19
|
+
parallel (1.19.2)
|
|
20
|
+
parser (2.7.1.4)
|
|
21
|
+
ast (~> 2.4.1)
|
|
18
22
|
pry (0.12.2)
|
|
19
23
|
coderay (~> 1.1.0)
|
|
20
24
|
method_source (~> 0.9.0)
|
|
21
|
-
|
|
25
|
+
rainbow (3.0.0)
|
|
26
|
+
rake (13.0.1)
|
|
27
|
+
regexp_parser (1.7.1)
|
|
28
|
+
rexml (3.2.4)
|
|
22
29
|
rspec (3.8.0)
|
|
23
30
|
rspec-core (~> 3.8.0)
|
|
24
31
|
rspec-expectations (~> 3.8.0)
|
|
@@ -34,6 +41,19 @@ GEM
|
|
|
34
41
|
rspec-retry (0.6.1)
|
|
35
42
|
rspec-core (> 3.3)
|
|
36
43
|
rspec-support (3.8.0)
|
|
44
|
+
rubocop (0.86.0)
|
|
45
|
+
parallel (~> 1.10)
|
|
46
|
+
parser (>= 2.7.0.1)
|
|
47
|
+
rainbow (>= 2.2.2, < 4.0)
|
|
48
|
+
regexp_parser (>= 1.7)
|
|
49
|
+
rexml
|
|
50
|
+
rubocop-ast (>= 0.0.3, < 1.0)
|
|
51
|
+
ruby-progressbar (~> 1.7)
|
|
52
|
+
unicode-display_width (>= 1.4.0, < 2.0)
|
|
53
|
+
rubocop-ast (0.1.0)
|
|
54
|
+
parser (>= 2.7.0.1)
|
|
55
|
+
ruby-progressbar (1.10.1)
|
|
56
|
+
unicode-display_width (1.7.0)
|
|
37
57
|
|
|
38
58
|
PLATFORMS
|
|
39
59
|
ruby
|
|
@@ -42,9 +62,10 @@ DEPENDENCIES
|
|
|
42
62
|
bundler (~> 2.0)
|
|
43
63
|
met_museum!
|
|
44
64
|
pry
|
|
45
|
-
rake (~>
|
|
65
|
+
rake (~> 13.0)
|
|
46
66
|
rspec (~> 3.0)
|
|
47
67
|
rspec-retry
|
|
68
|
+
rubocop
|
|
48
69
|
|
|
49
70
|
BUNDLED WITH
|
|
50
|
-
2.0.
|
|
71
|
+
2.0.2
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<img src="https://img.shields.io/travis/hyuraku/met_museum.svg"> <img src="https://img.shields.io/github/license/hyuraku/met_museum.svg">
|
|
2
|
-
<img src="https://img.shields.io/gem/v/met_museum.svg">
|
|
2
|
+
<img src="https://img.shields.io/gem/v/met_museum.svg">
|
|
3
3
|
# MetMuseum
|
|
4
4
|
|
|
5
5
|
The Metropolitan Museum of Art Collection API Ruby wrapper
|
|
@@ -92,8 +92,7 @@ collection.objects(metadataDate: Date.new(2018,10,10),departmentIds: 1)
|
|
|
92
92
|
<div>
|
|
93
93
|
|
|
94
94
|
```rb
|
|
95
|
-
|
|
96
|
-
collection.object(1000)
|
|
95
|
+
MetMuseum::Collection.new.object(1000)
|
|
97
96
|
=> {"objectID"=>1000,
|
|
98
97
|
"isHighlight"=>false,
|
|
99
98
|
"accessionNumber"=>"10.149.99",
|
|
@@ -155,7 +154,7 @@ MetMuseum::Collection.department
|
|
|
155
154
|
|
|
156
155
|
```rb
|
|
157
156
|
# show object_ids size and themselves
|
|
158
|
-
|
|
157
|
+
MetMuseum::Collection.new.department
|
|
159
158
|
=> {"departments"=>
|
|
160
159
|
[{"departmentId"=>1, "displayName"=>"American Decorative Arts"},
|
|
161
160
|
{"departmentId"=>3, "displayName"=>"Ancient Near Eastern Art"},
|
|
@@ -177,7 +176,7 @@ MetMuseum::Collection.search
|
|
|
177
176
|
|
|
178
177
|
```rb
|
|
179
178
|
# show object_ids size and themselves
|
|
180
|
-
|
|
179
|
+
MetMuseum::Collection.new.search('ocean')
|
|
181
180
|
=> {"total"=>189,
|
|
182
181
|
"objectIDs"=>
|
|
183
182
|
[250487,
|
|
@@ -189,7 +188,7 @@ collection.search('ocean')
|
|
|
189
188
|
--< omit >--
|
|
190
189
|
|
|
191
190
|
# show specified number of objects
|
|
192
|
-
MetMuseum::Collection.search('akasaka', 1)
|
|
191
|
+
MetMuseum::Collection.new.search('akasaka', {limit: 1})
|
|
193
192
|
=> [{"objectID"=>37231,
|
|
194
193
|
"isHighlight"=>false,
|
|
195
194
|
"accessionNumber"=>"JP787",
|
|
@@ -239,6 +238,74 @@ MetMuseum::Collection.search('akasaka', 1)
|
|
|
239
238
|
"repository"=>"Metropolitan Museum of Art, New York, NY",
|
|
240
239
|
"objectURL"=>"https://www.metmuseum.org/art/collection/search/37231",
|
|
241
240
|
"tags"=>["Buildings", "Men", "Women"]}]
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
# show object_ids size and themselves with certain departmentId --< omit >--
|
|
244
|
+
MetMuseum::Collection.new.search('flower', {departmentId: 12})
|
|
245
|
+
=> {"total"=>7922,
|
|
246
|
+
"objectIDs"=>
|
|
247
|
+
[207138,
|
|
248
|
+
197555,
|
|
249
|
+
207151,
|
|
250
|
+
206979,
|
|
251
|
+
--< omit >--
|
|
252
|
+
|
|
253
|
+
# show object_ids size and themselves which are isOnView
|
|
254
|
+
MetMuseum::Collection.new.search('flower', {isOnView: true})
|
|
255
|
+
=> => {"total"=>2066,
|
|
256
|
+
"objectIDs"=>
|
|
257
|
+
[207138,
|
|
258
|
+
3689,
|
|
259
|
+
11207,
|
|
260
|
+
252906,
|
|
261
|
+
252349,
|
|
262
|
+
--< omit >--
|
|
263
|
+
|
|
264
|
+
# show object_ids size and themselves which are artistOrCulture
|
|
265
|
+
MetMuseum::Collection.new.search('flower', {artistOrCulture: true})
|
|
266
|
+
=> {"total"=>5, "objectIDs"=>[207138, 3689, 196563, 196560, 198662]}
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
# show object_ids size and themselves with certain medium
|
|
270
|
+
MetMuseum::Collection.new.search('flower', {medium: "Paintings"})
|
|
271
|
+
=> {"total"=>706,
|
|
272
|
+
"objectIDs"=>
|
|
273
|
+
[11207,
|
|
274
|
+
436121,
|
|
275
|
+
10481,
|
|
276
|
+
435882,
|
|
277
|
+
--< omit >--
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
# show object_ids size and themselves which are hasImages
|
|
281
|
+
MetMuseum::Collection.new.search('flower', {hasImages: true})
|
|
282
|
+
=> {"total"=>18731,
|
|
283
|
+
"objectIDs"=>
|
|
284
|
+
[207138,
|
|
285
|
+
3689,
|
|
286
|
+
11207,
|
|
287
|
+
252906,
|
|
288
|
+
--< omit >--
|
|
289
|
+
|
|
290
|
+
# show object_ids size and themselves with certain geoLocation
|
|
291
|
+
MetMuseum::Collection.new.search('flower', {geoLocation: "Paris"})
|
|
292
|
+
=> {"total"=>292,
|
|
293
|
+
"objectIDs"=>
|
|
294
|
+
[195320,
|
|
295
|
+
707455,
|
|
296
|
+
193814,
|
|
297
|
+
200432,
|
|
298
|
+
--< omit >--
|
|
299
|
+
|
|
300
|
+
# show object_ids size and themselves with datarange
|
|
301
|
+
MetMuseum::Collection.new.search('flower', {dateBegin: 1700,dateEnd: 1750})
|
|
302
|
+
=> {"total"=>1444,
|
|
303
|
+
"objectIDs"=>
|
|
304
|
+
[9199,
|
|
305
|
+
3759,
|
|
306
|
+
398162,
|
|
307
|
+
666591,
|
|
308
|
+
--< omit >--
|
|
242
309
|
```
|
|
243
310
|
</div>
|
|
244
311
|
</details>
|
data/Rakefile
CHANGED
|
@@ -3,7 +3,6 @@ module MetMuseum
|
|
|
3
3
|
BadRequestError = Class.new(MetMuseumError)
|
|
4
4
|
UnauthorizedError = Class.new(MetMuseumError)
|
|
5
5
|
ForbiddenError = Class.new(MetMuseumError)
|
|
6
|
-
ApiRequestsQuotaReachedError = Class.new(MetMuseumError)
|
|
7
6
|
NotFoundError = Class.new(MetMuseumError)
|
|
8
7
|
UnprocessableEntityError = Class.new(MetMuseumError)
|
|
9
8
|
ApiError = Class.new(MetMuseumError)
|
|
@@ -6,17 +6,18 @@ module MetMuseum
|
|
|
6
6
|
class Collection
|
|
7
7
|
# Return a listing of all valid Object IDs available to use
|
|
8
8
|
# @param [Date] metadataDate Returns any objects with updated data after this date
|
|
9
|
+
# @param [DateTime] metadataDate Returns any objects with updated data after this date
|
|
9
10
|
# @params [Integer] departmentIds Returns any objects in a specific department
|
|
10
11
|
# @return [Hash<total, Integer>] The total number of publicly-available objects
|
|
11
12
|
# @return [Hash<objectIDs, Array<Integer>>] An array containing the object ID of publicly-available object
|
|
12
|
-
def objects(
|
|
13
|
-
|
|
13
|
+
def objects(**args)
|
|
14
|
+
options = {
|
|
14
15
|
metadataDate: nil,
|
|
15
16
|
departmentIds: nil
|
|
16
|
-
}
|
|
17
|
-
options =
|
|
18
|
-
|
|
19
|
-
response =
|
|
17
|
+
}.merge(args)
|
|
18
|
+
options[:metadataDate] = check_date(options[:metadataDate])
|
|
19
|
+
query = { metadataDate: options[:metadataDate], departmentIds: options[:departmentIds] }
|
|
20
|
+
response = new_faraday(API_ENDPOINT, PUBLIC_URI, query)
|
|
20
21
|
return_response(response)
|
|
21
22
|
end
|
|
22
23
|
|
|
@@ -72,8 +73,11 @@ module MetMuseum
|
|
|
72
73
|
# @return [Hash<repository, String>]
|
|
73
74
|
# @return [Hash<objectURL, String>] URL to object's page on metmuseum.org
|
|
74
75
|
# @return [Hash<tags, Array<String>>] An array of subject keyword tags associated with the object
|
|
75
|
-
|
|
76
|
-
|
|
76
|
+
# @return [Hash<objectWikidata_URL, string>] Wikidata URL for the object
|
|
77
|
+
# @return [Hash<isTimelineWork, boolean>] Whether the object is on the Timeline of Art History website
|
|
78
|
+
|
|
79
|
+
def object(object_id)
|
|
80
|
+
response = new_faraday(API_ENDPOINT, "#{PUBLIC_URI}/#{object_id}")
|
|
77
81
|
return_response(response)
|
|
78
82
|
end
|
|
79
83
|
|
|
@@ -82,41 +86,42 @@ module MetMuseum
|
|
|
82
86
|
# @return [Integer] departments Department ID as an integer. The departmentId is to be used as a query parameter on the `/objects` endpoint
|
|
83
87
|
# @return [String] departments Display name for a department
|
|
84
88
|
def department
|
|
85
|
-
response =
|
|
89
|
+
response = new_faraday(API_ENDPOINT, DEPARTMENTS_URI)
|
|
86
90
|
return_response(response)
|
|
87
91
|
end
|
|
88
92
|
|
|
89
93
|
# returns a listing of all Object IDs for objects that contain the search query within the object’s data
|
|
90
94
|
# @param [String] query search term e.g. sunflowers
|
|
91
95
|
# @param [Interger] limit number of objects zthat contain the search query within the object’s data
|
|
96
|
+
# @param [Boolean] Returns objects that match the query and are designated as highlights. Highlights are selected works of art from The Met Museum’s permanent collection representing different cultures and time periods.
|
|
92
97
|
# @return [Integer] total The total number of publicly-available objects
|
|
93
98
|
# @return [Array<Integer>] objectIDs An array containing the object ID of publicly-available object
|
|
94
99
|
# @return [Array<Object>] objects An array containing the objects that contain the search query within the object’s data
|
|
95
|
-
def search(query,
|
|
96
|
-
|
|
100
|
+
def search(query, **args)
|
|
101
|
+
options = default_search_options.merge(args)
|
|
102
|
+
response = new_faraday(API_ENDPOINT, SEARCH_URI, {
|
|
103
|
+
q: query,
|
|
104
|
+
isHighlight: options[:isHighlight],
|
|
105
|
+
departmentId: options[:departmentId],
|
|
106
|
+
isOnView: options[:isOnView],
|
|
107
|
+
artistOrCulture: options[:artistOrCulture],
|
|
108
|
+
medium: options[:medium]&.multi_option,
|
|
109
|
+
hasImages: options[:hasImages],
|
|
110
|
+
geoLocation: options[:geoLocation]&.multi_option,
|
|
111
|
+
dateBegin: options[:dateBegin],
|
|
112
|
+
dateEnd: options[:dateEnd]
|
|
113
|
+
})
|
|
97
114
|
origin_response = return_response(response)
|
|
115
|
+
limit = options[:limit].to_i
|
|
98
116
|
return origin_response if limit <= 0
|
|
99
|
-
|
|
117
|
+
|
|
118
|
+
origin_response["objectIDs"][0..limit - 1].map { |id| MetMuseum::Collection.new.object(id) }
|
|
100
119
|
end
|
|
101
120
|
|
|
102
121
|
private
|
|
103
122
|
|
|
104
|
-
def
|
|
105
|
-
|
|
106
|
-
when HTTP_BAD_REQUEST_CODE
|
|
107
|
-
BadRequestError
|
|
108
|
-
when HTTP_UNAUTHORIZED_CODE
|
|
109
|
-
UnauthorizedError
|
|
110
|
-
when HTTP_FORBIDDEN_CODE
|
|
111
|
-
return ApiRequestsQuotaReachedError if api_requests_quota_reached?
|
|
112
|
-
ForbiddenError
|
|
113
|
-
when HTTP_NOT_FOUND_CODE
|
|
114
|
-
NotFoundError
|
|
115
|
-
when HTTP_UNPROCESSABLE_ENTITY_CODE
|
|
116
|
-
UnprocessableEntityError
|
|
117
|
-
else
|
|
118
|
-
ApiError
|
|
119
|
-
end
|
|
123
|
+
def new_faraday(url, dir, params = nil)
|
|
124
|
+
Faraday.new(url: url).get dir, params
|
|
120
125
|
end
|
|
121
126
|
|
|
122
127
|
def response_successful?(response)
|
|
@@ -124,7 +129,8 @@ module MetMuseum
|
|
|
124
129
|
end
|
|
125
130
|
|
|
126
131
|
def check_date(date)
|
|
127
|
-
return
|
|
132
|
+
return nil if date.nil?
|
|
133
|
+
return date.to_date.to_s if date.is_a? Date
|
|
128
134
|
|
|
129
135
|
raise TypeError, "Write certain date"
|
|
130
136
|
end
|
|
@@ -132,7 +138,29 @@ module MetMuseum
|
|
|
132
138
|
def return_response(response)
|
|
133
139
|
return Oj.load(response.body) if response_successful?(response)
|
|
134
140
|
|
|
135
|
-
raise error_class(response), "Code: #{response.status}, response: #{response.body}"
|
|
141
|
+
raise MetMuseum.error_class(response), "Code: #{response.status}, response: #{response.body}"
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
def multi_option
|
|
145
|
+
return self if is_a? String
|
|
146
|
+
return join("|") if is_a? Array
|
|
147
|
+
|
|
148
|
+
raise TypeError, "Write String or Array type"
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
def default_search_options
|
|
152
|
+
{
|
|
153
|
+
limit: 0,
|
|
154
|
+
isHighlight: false,
|
|
155
|
+
departmentId: nil,
|
|
156
|
+
isOnView: nil,
|
|
157
|
+
artistOrCulture: nil,
|
|
158
|
+
medium: nil,
|
|
159
|
+
hasImages: nil,
|
|
160
|
+
geoLocation: nil,
|
|
161
|
+
dateBegin: 0,
|
|
162
|
+
dateEnd: 2000
|
|
163
|
+
}
|
|
136
164
|
end
|
|
137
165
|
end
|
|
138
166
|
end
|
|
@@ -1,8 +1,25 @@
|
|
|
1
1
|
module MetMuseum
|
|
2
|
-
HTTP_OK_CODE = 200
|
|
3
|
-
HTTP_BAD_REQUEST_CODE = 400
|
|
4
|
-
HTTP_UNAUTHORIZED_CODE = 401
|
|
5
|
-
HTTP_FORBIDDEN_CODE = 403
|
|
6
|
-
HTTP_NOT_FOUND_CODE = 404
|
|
7
|
-
HTTP_UNPROCESSABLE_ENTITY_CODE = 429
|
|
2
|
+
HTTP_OK_CODE = 200
|
|
3
|
+
HTTP_BAD_REQUEST_CODE = 400
|
|
4
|
+
HTTP_UNAUTHORIZED_CODE = 401
|
|
5
|
+
HTTP_FORBIDDEN_CODE = 403
|
|
6
|
+
HTTP_NOT_FOUND_CODE = 404
|
|
7
|
+
HTTP_UNPROCESSABLE_ENTITY_CODE = 429
|
|
8
|
+
|
|
9
|
+
def self.error_class(response)
|
|
10
|
+
case response.status
|
|
11
|
+
when HTTP_BAD_REQUEST_CODE
|
|
12
|
+
BadRequestError
|
|
13
|
+
when HTTP_UNAUTHORIZED_CODE
|
|
14
|
+
UnauthorizedError
|
|
15
|
+
when HTTP_FORBIDDEN_CODE
|
|
16
|
+
ForbiddenError
|
|
17
|
+
when HTTP_NOT_FOUND_CODE
|
|
18
|
+
NotFoundError
|
|
19
|
+
when HTTP_UNPROCESSABLE_ENTITY_CODE
|
|
20
|
+
UnprocessableEntityError
|
|
21
|
+
else
|
|
22
|
+
ApiError
|
|
23
|
+
end
|
|
24
|
+
end
|
|
8
25
|
end
|
data/lib/met_museum/version.rb
CHANGED
data/met_museum.gemspec
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
lib = File.expand_path("../lib", __FILE__)
|
|
1
|
+
lib = File.expand_path("lib", __dir__)
|
|
3
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
3
|
require "met_museum/version"
|
|
5
4
|
|
|
@@ -9,8 +8,8 @@ Gem::Specification.new do |spec|
|
|
|
9
8
|
spec.authors = ["hyuraku"]
|
|
10
9
|
spec.email = ["calenthird@gamil.com"]
|
|
11
10
|
|
|
12
|
-
spec.summary =
|
|
13
|
-
spec.description =
|
|
11
|
+
spec.summary = "MET museum api wrapper"
|
|
12
|
+
spec.description = "The Metropolitan Museum of Art Collection API wrapper "
|
|
14
13
|
spec.homepage = "https://github.com/hyuraku/met_museum"
|
|
15
14
|
spec.license = "MIT"
|
|
16
15
|
|
|
@@ -27,7 +26,7 @@ Gem::Specification.new do |spec|
|
|
|
27
26
|
|
|
28
27
|
# Specify which files should be added to the gem when it is released.
|
|
29
28
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
|
30
|
-
spec.files
|
|
29
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
|
31
30
|
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
|
32
31
|
end
|
|
33
32
|
spec.bindir = "exe"
|
|
@@ -35,9 +34,10 @@ Gem::Specification.new do |spec|
|
|
|
35
34
|
spec.require_paths = ["lib"]
|
|
36
35
|
|
|
37
36
|
spec.add_development_dependency "bundler", "~> 2.0"
|
|
38
|
-
spec.add_development_dependency "rake", "~>
|
|
37
|
+
spec.add_development_dependency "rake", "~> 13.0"
|
|
39
38
|
spec.add_development_dependency "rspec", "~> 3.0"
|
|
40
39
|
spec.add_development_dependency "rspec-retry"
|
|
40
|
+
spec.add_development_dependency "rubocop"
|
|
41
41
|
|
|
42
42
|
spec.add_dependency "faraday"
|
|
43
43
|
spec.add_dependency "oj"
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: met_museum
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.3.
|
|
4
|
+
version: 1.3.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- hyuraku
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2020-07-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -30,14 +30,14 @@ dependencies:
|
|
|
30
30
|
requirements:
|
|
31
31
|
- - "~>"
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: '
|
|
33
|
+
version: '13.0'
|
|
34
34
|
type: :development
|
|
35
35
|
prerelease: false
|
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
37
|
requirements:
|
|
38
38
|
- - "~>"
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: '
|
|
40
|
+
version: '13.0'
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
42
|
name: rspec
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -66,6 +66,20 @@ dependencies:
|
|
|
66
66
|
- - ">="
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
68
|
version: '0'
|
|
69
|
+
- !ruby/object:Gem::Dependency
|
|
70
|
+
name: rubocop
|
|
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'
|
|
69
83
|
- !ruby/object:Gem::Dependency
|
|
70
84
|
name: faraday
|
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -101,8 +115,10 @@ executables: []
|
|
|
101
115
|
extensions: []
|
|
102
116
|
extra_rdoc_files: []
|
|
103
117
|
files:
|
|
118
|
+
- ".github/workflows/ruby.yml"
|
|
104
119
|
- ".gitignore"
|
|
105
120
|
- ".rspec"
|
|
121
|
+
- ".rubocop.yml"
|
|
106
122
|
- ".travis.yml"
|
|
107
123
|
- CODE_OF_CONDUCT.md
|
|
108
124
|
- Gemfile
|
|
@@ -139,7 +155,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
139
155
|
- !ruby/object:Gem::Version
|
|
140
156
|
version: '0'
|
|
141
157
|
requirements: []
|
|
142
|
-
rubygems_version: 3.0.
|
|
158
|
+
rubygems_version: 3.0.3
|
|
143
159
|
signing_key:
|
|
144
160
|
specification_version: 4
|
|
145
161
|
summary: MET museum api wrapper
|