archivist-client 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/archivist-client.gemspec +1 -1
- data/lib/archivist/client/base.rb +4 -5
- data/lib/archivist/client/constants.rb +13 -0
- data/lib/archivist/client/version.rb +1 -1
- data/lib/archivist/models/document.rb +3 -6
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
Mzk5MTRjNGM2MWNiZjUwMWY4ODI0N2M5OWI3ZmM5YzUxYjQxMmJjMA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YTAyOWNlYTk3OTFlNzBkOTQ3MTBjZjgzZTY0MjY1YTE2M2E1NjgxZg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NDE4YWEwMDM2NTdjY2E3OTYzMjJmNzJiMGVkNjM5MjE5YjY5NzJiZDM2OGM4
|
10
|
+
NDFjMjQ5OGE3YThjYjRkZjFjZDIwMzk0NDc5ZGIyZDA1ZDc0YmQ3ZDVmN2Iy
|
11
|
+
ZjRlNjg3ZGQ3NjYwYTIzOTNmNGYzODUxOTczYjc1ZGU3NDRiYzY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OWMzNWZhOWQyYWY4ZGU3NmFmMjVkMTI0MGY3ODVhMjVlZGY0NWJjM2RmNjI1
|
14
|
+
MDFlYzgzMzRhNDY5MmMzNjliYWQyZDAwYzIzMTNlMDNlYmE3YjQwN2JjMDVl
|
15
|
+
MWYxNjJmOTcwOTkxNTc4M2ZhODZhM2VjZjEzMTdmNzlkODljZTA=
|
data/archivist-client.gemspec
CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |gem|
|
|
7
7
|
gem.name = "archivist-client"
|
8
8
|
gem.summary = "archivist-client is an archive.org client library"
|
9
9
|
gem.description = "archivist-client queries archive.org for book data and downloads some things."
|
10
|
-
gem.homepage = "http://github.com/
|
10
|
+
gem.homepage = "http://github.com/wordtreefoundation/archivist-client"
|
11
11
|
gem.authors = ['Duane Johnson','Peter Boling']
|
12
12
|
gem.email = ['duane.johnson@gmail.com', 'peter.boling@gmail.com']
|
13
13
|
gem.licenses = ["MIT"]
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'faraday'
|
2
2
|
require 'faraday_middleware'
|
3
|
+
require 'archivist/client/constants'
|
3
4
|
require 'archivist/client/filters'
|
4
5
|
require 'archivist/representations'
|
5
6
|
|
@@ -17,11 +18,9 @@ module Archivist
|
|
17
18
|
# puts book.download
|
18
19
|
# end
|
19
20
|
class Base
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
faraday.adapter Faraday.default_adapter # make requests with Net::HTTP
|
24
|
-
end
|
21
|
+
|
22
|
+
include Archivist::Client::Constants
|
23
|
+
|
25
24
|
attr_reader :conn
|
26
25
|
attr_accessor :filters # will be a Filters.new object
|
27
26
|
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module Archivist
|
2
|
+
module Client
|
3
|
+
module Constants
|
4
|
+
|
5
|
+
DEFAULT_CONNECTION = Faraday.new(url: 'http://archive.org') do |faraday|
|
6
|
+
faraday.use FaradayMiddleware::FollowRedirects
|
7
|
+
faraday.request :url_encoded # form-encode POST params
|
8
|
+
faraday.adapter Faraday.default_adapter # make requests with Net::HTTP
|
9
|
+
end
|
10
|
+
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -7,12 +7,9 @@ module Archivist
|
|
7
7
|
module Model
|
8
8
|
class Document
|
9
9
|
include Virtus.model
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
faraday.request :url_encoded # form-encode POST params
|
14
|
-
faraday.adapter Faraday.default_adapter # make requests with Net::HTTP
|
15
|
-
end
|
10
|
+
|
11
|
+
include Archivist::Client::Constants
|
12
|
+
|
16
13
|
attr_reader :conn
|
17
14
|
|
18
15
|
attribute :identifier, String
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: archivist-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Duane Johnson
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2014-01-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -239,6 +239,7 @@ files:
|
|
239
239
|
- archivist-client.gemspec
|
240
240
|
- README.md
|
241
241
|
- lib/archivist/client/base.rb
|
242
|
+
- lib/archivist/client/constants.rb
|
242
243
|
- lib/archivist/client/filters.rb
|
243
244
|
- lib/archivist/client/version.rb
|
244
245
|
- lib/archivist/client.rb
|
@@ -277,7 +278,7 @@ files:
|
|
277
278
|
- spec/representations/format_index_spec.rb
|
278
279
|
- spec/representations/query_response_spec.rb
|
279
280
|
- spec/spec_helper.rb
|
280
|
-
homepage: http://github.com/
|
281
|
+
homepage: http://github.com/wordtreefoundation/archivist-client
|
281
282
|
licenses:
|
282
283
|
- MIT
|
283
284
|
metadata: {}
|