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.
- checksums.yaml +4 -4
- data/README.md +22 -0
- data/bin/nis +3 -2
- data/lib/nis/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: adebde300e51f8f5c6fb4e8ab89b1576f1da53ce
|
4
|
+
data.tar.gz: dba85ef747580684ac4033edd2f7176d60bc4c27
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
34
|
-
|
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
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.
|
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-
|
11
|
+
date: 2017-04-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|