archivist-client 0.1.4 → 0.1.5

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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MTZkNjQ0ZjExM2RhYWI2ZTRjZGYxYWRhMzZmZmFiMDQzNDYxYzA3NA==
4
+ Mzk5MTRjNGM2MWNiZjUwMWY4ODI0N2M5OWI3ZmM5YzUxYjQxMmJjMA==
5
5
  data.tar.gz: !binary |-
6
- MzA3MDBlNWJkNjBiODA5MjQ3OGIwNGQ3MWY5MjUyZDI4YmYyOTFkMw==
6
+ YTAyOWNlYTk3OTFlNzBkOTQ3MTBjZjgzZTY0MjY1YTE2M2E1NjgxZg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZTI2YjIzNDI0NTA2MDczYWMxNzI0MzhhMDYyMTA0NmFhZDY4ZjcwNmJiYzc2
10
- MjNmNjU3YzU2ZmExNzBiMzg5MDdkZWVjNmFiMTRhZWQyYTVmYjZlNWMzYTBl
11
- OGIwN2ViNTM3ZjA1NDFhOTU3NjA2MTA4OTY4YTM5NDRkNDU4NTY=
9
+ NDE4YWEwMDM2NTdjY2E3OTYzMjJmNzJiMGVkNjM5MjE5YjY5NzJiZDM2OGM4
10
+ NDFjMjQ5OGE3YThjYjRkZjFjZDIwMzk0NDc5ZGIyZDA1ZDc0YmQ3ZDVmN2Iy
11
+ ZjRlNjg3ZGQ3NjYwYTIzOTNmNGYzODUxOTczYjc1ZGU3NDRiYzY=
12
12
  data.tar.gz: !binary |-
13
- ZjE4Y2FjZTQ2MTIyZDgwNjYwNmI5OGU1MzI1NzI0YjhjZTRhN2UyODQwY2I1
14
- ZGQwOWYwMDAwMTY4YTkwYzYyN2I4MDQ4Nzc2ODRkOGU1Y2I2Y2U2MzJhMzNk
15
- MDkxN2I4OWIyYTU3NTMzMWJmZjA0MjdlZDdkNmQ0ZDgwZWE5NzE=
13
+ OWMzNWZhOWQyYWY4ZGU3NmFmMjVkMTI0MGY3ODVhMjVlZGY0NWJjM2RmNjI1
14
+ MDFlYzgzMzRhNDY5MmMzNjliYWQyZDAwYzIzMTNlMDNlYmE3YjQwN2JjMDVl
15
+ MWYxNjJmOTcwOTkxNTc4M2ZhODZhM2VjZjEzMTdmNzlkODljZTA=
@@ -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/canadaduane/archivist-client"
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
- DEFAULT_CONNECTION = Faraday.new(url: 'http://archive.org') do |faraday|
21
- faraday.use FaradayMiddleware::FollowRedirects
22
- faraday.request :url_encoded # form-encode POST params
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
@@ -1,5 +1,5 @@
1
1
  module Archivist
2
2
  module Client
3
- VERSION = '0.1.4'
3
+ VERSION = '0.1.5'
4
4
  end
5
5
  end
@@ -7,12 +7,9 @@ module Archivist
7
7
  module Model
8
8
  class Document
9
9
  include Virtus.model
10
- DEFAULT_CONNECTION = Faraday.new(url: 'http://archive.org') do |faraday|
11
- faraday.use FaradayMiddleware::FollowRedirects
12
- # faraday.response :logger # log requests to STDOUT
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
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: 2013-12-31 00:00:00.000000000 Z
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/canadaduane/archivist-client
281
+ homepage: http://github.com/wordtreefoundation/archivist-client
281
282
  licenses:
282
283
  - MIT
283
284
  metadata: {}