trustev 0.3.1 → 0.3.2

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: 87e1f0b1ee2848ecc84ad5c84159c8a0f3bd8d55
4
- data.tar.gz: 995f35faa76aa2c43bed0e21932c36380e3ec1c7
3
+ metadata.gz: 5e9a776e416ec41456e29afd91623c31bb0c6ca9
4
+ data.tar.gz: c05ff41e28b2471d362f10c11064f1ebcab1091b
5
5
  SHA512:
6
- metadata.gz: 7bddd211841cf93b3691ca8c6e5d10bc811828bdb1b84c041c7aeb20320af4a5f2be3f1bbef5aac2f2054d49ce7a738a40b0cf6b3d7c7caec0d67c2f157601fb
7
- data.tar.gz: 591815c862cde864ffb41d0b398838d486d6045003fa52c4eec9feb84a6add0fd200c69fc4033c03a64043022f4cab3f7c649a72c76b0be52b275ad8105384e6
6
+ metadata.gz: 5ca4704b5609dbc04abccfced2121caaeed7c803f76adfeacbc3915b4df75debe7c9b152092d2e38a34f3c4d6743b625340dfb2e575e9f15bf9ef23b3d1c4a84
7
+ data.tar.gz: 7d27c2a3e56052f58c30e158b4e00735d8f34ea31a55a140107d2592438ec6f47431edb10a13185860841f13856c1b5cf8f39fc294f95caff92172d92e9156ca
data/README.md CHANGED
@@ -248,7 +248,7 @@ This is similar `Trustev::Social.create`, but only accepts ONE hash, instead of
248
248
  ```ruby
249
249
  # profile = Trustev::Profile.new(transaction_number)
250
250
  # profile.retrieve_scores
251
- Trustev::Profile.retrieve('1234abcd')
251
+ profile = Trustev::Profile.new('1234abcd')
252
252
  profile.retrieve_scores
253
253
  ```
254
254
 
@@ -287,7 +287,7 @@ This returns a hash with the Trustev Score.
287
287
  ```ruby
288
288
  # profile = Trustev::Profile.new(transaction_number)
289
289
  # profile.get_overall_score
290
- Trustev::Profile.retrieve('1234abcd')
290
+ profile = Trustev::Profile.new('1234abcd')
291
291
  profile.get_overall_score
292
292
  ```
293
293
 
@@ -297,7 +297,7 @@ This returns the overall Trustev score
297
297
  ```ruby
298
298
  # profile = Trustev::Profile.new(transaction_number)
299
299
  # profile.get_score(source_id, parameter_id)
300
- Trustev::Profile.retrieve('1234abcd')
300
+ profile = Trustev::Profile.new('1234abcd')
301
301
  profile.get_score(Trustev::SCORE_SOURCES[:trustev], Trustev::SCORE_PARAMETERS[:overall])
302
302
  ```
303
303
 
@@ -1,4 +1,4 @@
1
- require 'digest'
1
+ require 'openssl'
2
2
 
3
3
  module Trustev
4
4
  class Authenticate
@@ -36,12 +36,12 @@ module Trustev
36
36
  end
37
37
 
38
38
  def self.generate_hash(modifier, time)
39
- sha256 = Digest::SHA256.new
39
+ sha256 = OpenSSL::Digest::SHA256.new
40
40
  sha256 << "#{time.strftime '%Y%m%d%H%M%S'}.#{modifier}"
41
41
  hash_part_1 = sha256.hexdigest
42
- sha256 = Digest::SHA256.new
42
+ sha256 = OpenSSL::Digest::SHA256.new
43
43
  sha256 << "#{hash_part_1}.#{Trustev.shared_secret}"
44
44
  sha256.hexdigest
45
45
  end
46
46
  end
47
- end
47
+ end
@@ -1,4 +1,4 @@
1
- require 'digest'
1
+ require 'openssl'
2
2
 
3
3
  module Trustev
4
4
  class DigitalSignature
@@ -37,11 +37,11 @@ module Trustev
37
37
  private
38
38
 
39
39
  def build_signature
40
- sha256 = Digest::SHA256.new
40
+ sha256 = OpenSSL::Digest::SHA256.new
41
41
  sha256 << "#{Trustev.username}.#{Trustev.private_key}.#{@timestamp}#{@stage_1}"
42
42
  stage_2 = sha256.hexdigest
43
43
 
44
- sha256 = Digest::SHA256.new
44
+ sha256 = OpenSSL::Digest::SHA256.new
45
45
  sha256 << "#{stage_2}.#{Trustev.private_key}.#{@session_id}"
46
46
  sha256.hexdigest
47
47
  end
@@ -1,3 +1,3 @@
1
1
  module Trustev
2
- VERSION = '0.3.1'
2
+ VERSION = '0.3.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trustev
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonah Hirsch
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-05 00:00:00.000000000 Z
11
+ date: 2014-12-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler