ipfs 0.2.0 → 0.2.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: 9b8e46e448a734cedb238ad0f2bc34bef85aa9ea
4
- data.tar.gz: 7f9c352411166b441f5837473df07a1cff62caa5
3
+ metadata.gz: 3b627cffcb5c7f4cd191b75694bdb8562edb2d0a
4
+ data.tar.gz: 850e634f1bad6014d20f1c66a72c6053283c0d16
5
5
  SHA512:
6
- metadata.gz: 38e528fa12618cdd253c4f81536c677835eeab19b5ae98b6b8463f6c098a905f22ca4e50ead4347e6345612b3690ccc2066561419761be38960e1c4f466915d2
7
- data.tar.gz: 93998f7fbdaa22e5ecf10de7298295ae85665b0e3b550af06ede9f0c12ccea3ad2cb67614e5f152c3a1fe8d211bb36e4216d6a175b1add97115b920169cbd739
6
+ metadata.gz: ab8cb99336c4bafa0d267e508f83657aeaf84cecf89bef9e639fed091be613e3520e6cf3b8b3de3976eb661c1f5eadb751b6616010aa2ec5c5d50ef754996c8c
7
+ data.tar.gz: eac6418ae148eacdfc595273666d1d885db1e3477c958b1e0ebb3120e5ef713e851ecfec4c6cf55b6e7ca5c2979e614f2caa5526acab57f0c0bd7e24fdab4d50
data/.gitignore CHANGED
@@ -2,6 +2,7 @@
2
2
  /.yardoc
3
3
  /Gemfile.lock
4
4
  /_yardoc/
5
+ /.idea/
5
6
  /coverage/
6
7
  /doc/
7
8
  /pkg/
data/README.md CHANGED
@@ -71,6 +71,12 @@ client.cat 'QmaVwjMgqjBD25apiuVVnaDqU8SsiiREAAy3Amb1Bs2XHs'
71
71
  # => "This is some example content."
72
72
  ```
73
73
 
74
+ ### pin rm
75
+ ```ruby
76
+ client.pin_rm 'QmaVwjMgqjBD25apiuVVnaDqU8SsiiREAAy3Amb1Bs2XHs', recursive: true
77
+ # => HTTP::Response
78
+ ```
79
+
74
80
  ## Development
75
81
 
76
82
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -1,6 +1,7 @@
1
1
  require 'ipfs/commands/ls'
2
2
  require 'ipfs/commands/cat'
3
3
  require 'ipfs/commands/add'
4
+ require 'ipfs/commands/pin_rm'
4
5
 
5
6
  module IPFS
6
7
  class Client
@@ -34,5 +35,9 @@ module IPFS
34
35
  def add(file)
35
36
  Commands::Add.call self, file
36
37
  end
38
+
39
+ def pin_rm(node, recursive: true)
40
+ Commands::PinRm.call self, node, recursive: recursive
41
+ end
37
42
  end
38
43
  end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'http'
4
+ require 'json'
5
+
6
+ module IPFS
7
+ module Commands
8
+ class PinRm
9
+ # @return [HTTP::Response]
10
+ def self.call(client, node, recursive:)
11
+ HTTP.get "#{client.api_url}/pin/rm?arg=#{node}&recursive=#{recursive}"
12
+ end
13
+ end
14
+ end
15
+ end
@@ -1,3 +1,3 @@
1
1
  module IPFS
2
- VERSION = "0.2.0"
2
+ VERSION = '0.2.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ipfs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pierpaolo Frasa
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-11-07 00:00:00.000000000 Z
11
+ date: 2017-11-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http
@@ -130,6 +130,7 @@ files:
130
130
  - lib/ipfs/commands/add.rb
131
131
  - lib/ipfs/commands/cat.rb
132
132
  - lib/ipfs/commands/ls.rb
133
+ - lib/ipfs/commands/pin_rm.rb
133
134
  - lib/ipfs/content/link.rb
134
135
  - lib/ipfs/content/node.rb
135
136
  - lib/ipfs/version.rb