ruby-ipfs-api 0.3.0 → 0.4.1

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,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4e12832ab225871a45af126b0d9f44bfa8f62f45
4
- data.tar.gz: 28ae276440460f49731372b1377a3cc1fcd0a401
3
+ metadata.gz: c77ff43cc141faaf34d664f16c0c7b10e8d42a00
4
+ data.tar.gz: 4ab2dcd154b4f87a49e14370fd7434aca890bcd3
5
5
  SHA512:
6
- metadata.gz: ed342f1e0f2a0c1e162d0096d2c9ca67632d9eb5ee339a53ea08eceb4931d2b871dc86d4f896771631f55d5b353c880e0dc35e6ad211054ec7ab93de736c53a8
7
- data.tar.gz: ce0d390bf86ae14915e4cb22c5f01da2f9de0e4a0f2e65b2756833eca69a9b86e8b679a185149be55f030318cee0e9e4ffb2e92ca78ea129b1662f4ae98e4078
6
+ metadata.gz: ad07486909d6881a3fa13c952a088be1264b201cae2fda691e98df9cda1404b3c4158cfc79a1f80d2476cc211063c8405dcf72a45d62e2ecd7255586c9cc738c
7
+ data.tar.gz: d1dbd86b6ab786e8c393c59922f35689b8cced15f9268108806950fc1476f6cfb8f3b953f957b98a67c95c6eea7ca872bcf229842e64d73dac483fa4f443ae5c
@@ -1,4 +1,4 @@
1
- require_relative './request'
1
+ require_relative './http_api'
2
2
  require_relative './api/generic/id'
3
3
  require_relative './api/generic/version'
4
4
  require_relative './api/files/cat'
@@ -8,7 +8,7 @@ require_relative './multihash'
8
8
  module Ipfs
9
9
  class Client
10
10
  def initialize(server = {})
11
- @request = Request.new server
11
+ @http_api = HttpApi.new server
12
12
  end
13
13
 
14
14
  def id
@@ -30,7 +30,7 @@ module Ipfs
30
30
  private
31
31
 
32
32
  def execute(command, *args)
33
- command.parse_response @request.call_api command.build_request *args
33
+ command.parse_response @http_api.call command.build_request *args
34
34
  end
35
35
  end
36
36
  end
@@ -2,7 +2,7 @@ require 'http'
2
2
  require 'uri'
3
3
 
4
4
  module Ipfs
5
- class Request
5
+ class HttpApi
6
6
  attr_reader :host, :port, :base_path
7
7
 
8
8
  DEFAULT_HOST = 'localhost'
@@ -15,7 +15,7 @@ module Ipfs
15
15
  @base_path = api_server[:base_path] || DEFAULT_BASE_PATH
16
16
  end
17
17
 
18
- def call_api(command)
18
+ def call(command)
19
19
  HTTP.request(
20
20
  command[:verb],
21
21
  url(command[:path]),
@@ -0,0 +1,7 @@
1
+ require_relative './client'
2
+
3
+ module Ipfs
4
+ class Client
5
+ VERSION = '0.4.1'
6
+ end
7
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-ipfs-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Benett
@@ -10,7 +10,21 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
  date: 2017-11-27 00:00:00.000000000 Z
13
- dependencies: []
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: http
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - "~>"
19
+ - !ruby/object:Gem::Version
20
+ version: '2.2'
21
+ type: :runtime
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - "~>"
26
+ - !ruby/object:Gem::Version
27
+ version: '2.2'
14
28
  description: A client library for the IPFS HTTP API, implemented in Ruby
15
29
  email: tom@benett.io
16
30
  executables: []
@@ -22,11 +36,12 @@ files:
22
36
  - lib/api/generic/id.rb
23
37
  - lib/api/generic/version.rb
24
38
  - lib/base.rb
39
+ - lib/client.rb
25
40
  - lib/dagstream.rb
26
41
  - lib/errors.rb
27
- - lib/ipfs-api.rb
42
+ - lib/http_api.rb
43
+ - lib/ipfs_api.rb
28
44
  - lib/multihash.rb
29
- - lib/request.rb
30
45
  homepage: https://github.com/mahloun/ruby-ipfs-api
31
46
  licenses:
32
47
  - MIT
@@ -39,7 +54,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
39
54
  requirements:
40
55
  - - ">="
41
56
  - !ruby/object:Gem::Version
42
- version: '0'
57
+ version: '2.4'
43
58
  required_rubygems_version: !ruby/object:Gem::Requirement
44
59
  requirements:
45
60
  - - ">="