tierion 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/CHANGELOG.md +4 -0
- data/README.md +9 -3
- data/lib/tierion/hash_api/client.rb +9 -2
- data/lib/tierion/version.rb +1 -1
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f55bc79b03b76dea30f01803ea139dee262fee6d
|
4
|
+
data.tar.gz: 10250a419d07b51a09a12a0740c360019ea3d30a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 702bc8b1cb1243dac2cc37d6082731bd03c645c134954258ff5ee821c474042c78953a2e8a26f2b08695084766540de8c82d23fa9b7481e503ee9f3880d89ead
|
7
|
+
data.tar.gz: dbce99a7106c62aacec621af5b4ab7f8918143fd0e2db99aab662fb70b442e9f3052304c2bdcf00ac411fc9aa1d995b6f509a91d13d239236a160603a608fdb2
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -98,6 +98,15 @@ an arg to `Client#receipt`
|
|
98
98
|
=> Tierion::HashApi::Receipt ...
|
99
99
|
```
|
100
100
|
|
101
|
+
You can also retrieve an individual receipt later as long as
|
102
|
+
you have the receipt ID and the original SHA256 hash used to
|
103
|
+
create it:
|
104
|
+
|
105
|
+
```
|
106
|
+
> t.receipt_from_id_and_hash('your_receipt_id', 'your_sha256_hash')
|
107
|
+
=> Tierion::HashApi::Receipt ...
|
108
|
+
```
|
109
|
+
|
101
110
|
Or, call `Client#receipts` to loop through each `Hashitem`
|
102
111
|
submitted in this session and collect and cache `Receipts`
|
103
112
|
for each from the API.
|
@@ -253,9 +262,6 @@ interactive prompt that will allow you to experiment.
|
|
253
262
|
|
254
263
|
To install this gem onto your local machine, run `bundle exec rake install`.
|
255
264
|
|
256
|
-
You can run the Command Line Interface (CLI) in development
|
257
|
-
with `bundle exec exe/tierion`. (TODO : Implement CLI)
|
258
|
-
|
259
265
|
The formal release process can be found in [RELEASE.md](https://github.com/grempe/tierion/blob/master/RELEASE.md)
|
260
266
|
|
261
267
|
## Contributing
|
@@ -99,16 +99,23 @@ module Tierion
|
|
99
99
|
if h.hash == r.targetHash && r.valid?
|
100
100
|
return r
|
101
101
|
else
|
102
|
-
raise 'Invalid Receipt
|
102
|
+
raise 'Invalid Receipt. Merkle tree proof validation failed.'
|
103
103
|
end
|
104
104
|
else
|
105
|
-
raise 'Invalid Receipt
|
105
|
+
raise 'Invalid Receipt. Missing type key. Old chainpoint?'
|
106
106
|
end
|
107
107
|
else
|
108
108
|
return nil
|
109
109
|
end
|
110
110
|
end
|
111
111
|
|
112
|
+
# Retrieve a receipt from its HashItem#id and the original SHA256 hash
|
113
|
+
# used to create that HashItem.
|
114
|
+
def receipt_from_id_and_hash(id, hash)
|
115
|
+
hi = Tierion::HashApi::HashItem.new(id: id, hash: hash, timestamp: Time.now.utc.to_i)
|
116
|
+
receipt(hi)
|
117
|
+
end
|
118
|
+
|
112
119
|
def logged_in?
|
113
120
|
@access_token.present? &&
|
114
121
|
@refresh_token.present? &&
|
data/lib/tierion/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tierion
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Glenn Rempe
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
zieXiXZSAojfFx9g91fKdIrlPbInHU/BaCxXSLBwvOM0drE+c2ue9X8gB55XAhzX
|
31
31
|
37oBiw==
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date: 2016-08-
|
33
|
+
date: 2016-08-08 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: httparty
|
metadata.gz.sig
CHANGED
Binary file
|