nis-ruby 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +22 -0
  3. data/bin/nis +3 -2
  4. data/lib/nis/version.rb +1 -1
  5. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 243cf43c7f000b402bc53492589b09e6fcace49d
4
- data.tar.gz: da5160e721669987b8c75e4edb47c9504882150c
3
+ metadata.gz: adebde300e51f8f5c6fb4e8ab89b1576f1da53ce
4
+ data.tar.gz: dba85ef747580684ac4033edd2f7176d60bc4c27
5
5
  SHA512:
6
- metadata.gz: b7905478e1bc79efc732b110aa97bde382f0c530d57e3d54b3901cbcc54e9ee1a3519e43db1272f79da7d9f8b37ce1911c6c43404a4702ab6e3b251cd587789d
7
- data.tar.gz: ccff172070610b806ad272f50a4ef42bd7262caa4f30f58db63c52208254d542810896e27f12066e88a9e4a46216c380b3d681da2e35d0dcf629fa28953a0a07
6
+ metadata.gz: 32f3f47e8e3a7a1469349289bb5c3d4c70380f3c22d4eb91b257affd5a1acb87ad131194c51062cf29082037c24e0d9fd8698adcfaef64052ed20ec16c5a363e
7
+ data.tar.gz: fad93a592a019513e28d9cca729d481b3bd6c8e0d29fa0873e5647fcf12b93a47012e32304af6dcd5ce03d2f402eef07e4a04ac3f190273a2901565bc7f71774
data/README.md CHANGED
@@ -63,6 +63,28 @@ Available at [rubydoc.info](http://www.rubydoc.info/gems/nis-ruby).
63
63
  ```bash
64
64
  $ nis status # => {"code":6,"type":4,"message":"status"}
65
65
  $ nis heartbeat # => {"code":1,"type":2,"message":"ok"}
66
+ $ nis request get account/get --params=address:TALICELCD3XPH4FFI5STGGNSNSWPOTG5E4DS2TOS
67
+ # => [AccountMetaDataPair structure]
68
+ ```
69
+
70
+
71
+ ## Connection
72
+
73
+ ### Environment Variable
74
+
75
+ ```bash
76
+ $ export NIS_URL=http://bigalice3.nem.ninja:7890
77
+ $ nis heartbeat # => {"code":1,"type":2,"message":"ok"}
78
+ ```
79
+
80
+ ### Hash
81
+
82
+ ```ruby
83
+ # Passing hostname
84
+ Nis.new(host: 'bigalice3.nem.ninja')
85
+
86
+ # Passing url
87
+ Nis.new(url: 'http://bigalice3.nem.ninja:7890')
66
88
  ```
67
89
 
68
90
 
data/bin/nis CHANGED
@@ -30,8 +30,9 @@ class Nis
30
30
  end
31
31
 
32
32
  desc 'request', 'Send request to NIS'
33
- def request(method, path, params = nil)
34
- puts Nis.new.request(method, path, params)
33
+ option :params, type: :hash
34
+ def request(method, path)
35
+ puts Nis.new.request(method, path, options['params'])
35
36
  setting_debug_mode
36
37
  rescue => e
37
38
  output_error_if_debug_mode(e)
data/lib/nis/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  class Nis
2
- VERSION = '0.0.3'.freeze
2
+ VERSION = '0.0.4'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nis-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yoshiyuki Ieyama
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-02 00:00:00.000000000 Z
11
+ date: 2017-04-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake