stratumn_sdk 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6d2abf779f1c0a8fcad745acab0014ea92a5b4e7
4
- data.tar.gz: f9dd2942de0d88d5d7ca5da57e940e4169488224
3
+ metadata.gz: 96a0f25a4a3767eeb3f3c54518300534355fda7a
4
+ data.tar.gz: d6e7507e0b4c4773988e0f593d72e3abc220b5c8
5
5
  SHA512:
6
- metadata.gz: 015046b2b340eec30585a45d9d1c55e9686f741923b251ae865086dd5242e30ef1b67697fcf21753a3b17a11d04da0a6538f1c5f403e84afb4f1a8e458acca68
7
- data.tar.gz: 18f15da26bb9ba77c65dd5ee5c7f9f6f58ac33b20f13bdc92018ab753687315e9ff765eea7e58c29ed6493886522c613bc9150925bb998f0345658c0c3a964bf
6
+ metadata.gz: ec904a1adfe462f1eaf95b3b544239ba4fc842c477f63f6e73f7f3389640fdb5712ff9178a4bcbb903a45019c34daf7f6f08fc2647611eb76f01bff09ae3136e
7
+ data.tar.gz: b3ff43ad083c509e8026967149466663fae9b08ed6dd4fbd149d965cf79005feaeeed99aba920dfeb7bd28658f4fc844ae0533a5effd9e3ab75f8b4532cd7ba4
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- stratumn_sdk (0.1.0)
4
+ stratumn_sdk (0.2.0)
5
5
  http (~> 2.0)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -63,6 +63,7 @@ Returns an existing link.
63
63
  ```ruby
64
64
  application = StratumnSdk::Application.load('quickstart')
65
65
  link = application.get_link('aee5427')
66
+ puts link.link_hash
66
67
  ```
67
68
 
68
69
  #### StratumnSdk::get_map(map_id, tags = [])
@@ -95,7 +96,7 @@ previous = link.previous
95
96
 
96
97
  #### StratumnSdk::Link#load
97
98
 
98
- Load a full link. Can be useful when you only have the meta data of links.
99
+ Loads a full link. Can be useful when you only have the meta data of links.
99
100
 
100
101
  ```ruby
101
102
  application = StratumnSdk::Application.load('quickstart')
@@ -5,7 +5,7 @@ module StratumnSdk
5
5
  include Request
6
6
  include Helper
7
7
 
8
- attr_accessor :application, :meta, :state, :link, :linkHash
8
+ attr_accessor :application, :meta, :state, :link, :link_hash
9
9
 
10
10
  def initialize(application, obj)
11
11
  self.application = application
@@ -13,7 +13,7 @@ module StratumnSdk
13
13
  self.link = obj['link']
14
14
  self.meta = link['meta']
15
15
  self.state = link['state']
16
- self.linkHash = obj['meta']['linkHash']
16
+ self.link_hash = obj['meta']['linkHash']
17
17
 
18
18
  application.agent_info['functions'].each do |(method, _)|
19
19
  add_transition_method(method)
@@ -25,11 +25,11 @@ module StratumnSdk
25
25
  end
26
26
 
27
27
  def get_branches(tags)
28
- application.get_branches(linkHash, tags)
28
+ application.get_branches(link_hash, tags)
29
29
  end
30
30
 
31
31
  def load
32
- application.get_link(linkHash)
32
+ application.get_link(link_hash)
33
33
  end
34
34
 
35
35
  def self.load(segment)
@@ -47,7 +47,7 @@ module StratumnSdk
47
47
 
48
48
  def add_transition_method(method)
49
49
  define_singleton_method(method) do |*args|
50
- url = "#{application.url}/links/#{linkHash}/#{method}"
50
+ url = "#{application.url}/links/#{link_hash}/#{method}"
51
51
 
52
52
  result = post(url, json: args)
53
53
 
@@ -1,3 +1,3 @@
1
1
  module StratumnSdk
2
- VERSION = '0.1.0'.freeze
2
+ VERSION = '0.2.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stratumn_sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stratumn Team
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-08-12 00:00:00.000000000 Z
11
+ date: 2016-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler