magic-admin 0.1.2 → 0.1.4

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
  SHA256:
3
- metadata.gz: 638cfcae85becbb634195d4662fcae184398d731d31c7a3aef2567375b3e4167
4
- data.tar.gz: afa110a04f413841b9b6ba42a1e279e6277a7e51be1060cb64fd6fd43b48e1a4
3
+ metadata.gz: d48630f04f73c9319c8848eedb1aa966daea86ef81c0480dbc38f499b74b66b2
4
+ data.tar.gz: 0b10a4f8720361eb141d22a8526b3e9e34b4c06b9ca2e5f59b1f8126e8c7d554
5
5
  SHA512:
6
- metadata.gz: d4c8fa130b49e13be60fbecfecd824922a64636add229bd165566d01d9820bf99937cf3b16277964516d9c157824aebb09ad2b883e4e91ddf540d47dc5cbe4f2
7
- data.tar.gz: 7478a88f76da822adc86b396508ebac1fccb703a61eff498d14427026e7587b2c9937c2eb387d99d56f141bf1c6e5a074725b2782580fa83f3539fdc4aaaa925
6
+ metadata.gz: adead0a0d3339935f58961751dfd9a03f9c30d6601ec969f345e0b8b8f68c8dfbb5d15bb8e1fb04d2c50ca041cda42c9c3771867f0ab8f16a2b3b666c538b711
7
+ data.tar.gz: e4cc97b49807a942971578ac50e0599e3be39353621266774042140cfd11a7a3d3ea8ae3f5fcab3621738ce4d9ecd6d8e93c0259973e90b8c4c4f79b1804d931
data/CHANGELOG.md CHANGED
@@ -16,8 +16,22 @@
16
16
 
17
17
  - <PR-#ISSUE> ...
18
18
 
19
+ ## `0.1.4` - 04/05/2022
20
+
21
+ #### Changed
22
+
23
+ - <PR-#16> https://github.com/magiclabs/magic-admin-ruby/issues/15
24
+
25
+ ## `0.1.3` - 03/29/2022
26
+
27
+ #### Changed
28
+
29
+ - <PR-#12> https://github.com/magiclabs/magic-admin-ruby/issues/7
30
+ - <PR-#12> https://github.com/magiclabs/magic-admin-ruby/issues/8
31
+ - <PR-#12> https://github.com/magiclabs/magic-admin-ruby/issues/11
32
+
19
33
  ## `0.1.2` - 10/30/2020
20
34
 
21
35
  #### Changed
22
36
 
23
- - <PR-#5>: https://github.com/magiclabs/magic-admin-ruby/issues/5
37
+ - <PR-#5>: https://github.com/magiclabs/magic-admin-ruby/issues/5
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Magic Admin Ruby SDK
2
2
 
3
- The Magic Admin Ruby SDK provides convenient ways for developers to interact with Magic API endpoints and an array of utilities to handle [DID Token](https://docs.magic.link/tutorials/decentralized-id).
3
+ The Magic Admin Ruby SDK provides convenient ways for developers to interact with Magic API endpoints and an array of utilities to handle [DID Token](https://magic.link/docs/introduction/decentralized-id).
4
4
 
5
5
  ## Table of Contents
6
6
 
@@ -10,7 +10,7 @@ The Magic Admin Ruby SDK provides convenient ways for developers to interact wit
10
10
  * [License](#license)
11
11
 
12
12
  ## Documentation
13
- See the [Magic doc](https://docs.magic.link/admin-sdk/ruby)!
13
+ See the [Magic doc](https://magic.link/docs/api-reference/server-side-sdks/ruby)!
14
14
 
15
15
  ## Installation
16
16
  Add this line to your application's Gemfile:
@@ -20,7 +20,7 @@ module MagicAdmin
20
20
  def validate(did_token)
21
21
  time = Time.now.to_i
22
22
  proof, claim = decode(did_token)
23
- rec_address = rec_pub_address(claim, proof)
23
+ rec_address = rec_pub_address(claim, proof).to_s
24
24
 
25
25
  validate_public_address!(rec_address, did_token)
26
26
  validate_claim_fields!(claim)
@@ -97,11 +97,11 @@ module MagicAdmin
97
97
  end
98
98
 
99
99
  def personal_recover(claim, proof)
100
- Eth::Key.personal_recover(JSON.dump(claim), proof)
100
+ Eth::Signature.personal_recover(JSON.dump(claim), proof)
101
101
  end
102
102
 
103
103
  def rec_pub_address(claim, proof)
104
- Eth::Utils.public_key_to_address personal_recover(claim, proof)
104
+ Eth::Util.public_key_to_address personal_recover(claim, proof)
105
105
  end
106
106
 
107
107
  def claim_fields
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MagicAdmin
4
- VERSION = "0.1.2"
4
+ VERSION = "0.1.4"
5
5
  end
data/magic-admin.gemspec CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
21
21
  s.metadata = {
22
22
  }
23
23
 
24
- s.add_dependency "eth", "~> 0.4"
24
+ s.add_dependency "eth", "~> 0.5"
25
25
  s.add_development_dependency "byebug", "~> 11.0"
26
26
  s.add_development_dependency "rspec", "~> 3.9"
27
27
  s.add_development_dependency "rubocop", "~> 0.80"
@@ -7,7 +7,7 @@ describe MagicAdmin::Resource::Token do
7
7
  describe "public methods" do
8
8
  it "#validate" do
9
9
  claim = { "ext" => 1000, "nbf" => "nbf" }
10
- rec_address = double("rec_address")
10
+ rec_address = double("rec_address").to_s
11
11
  proof = double("proof")
12
12
  time_now = 1_202_020
13
13
  allow(Time).to receive(:now).and_return(time_now)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: magic-admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Magic Labs Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-30 00:00:00.000000000 Z
11
+ date: 2022-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: eth
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.4'
19
+ version: '0.5'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0.4'
26
+ version: '0.5'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: byebug
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -153,7 +153,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
153
153
  - !ruby/object:Gem::Version
154
154
  version: '0'
155
155
  requirements: []
156
- rubygems_version: 3.1.4
156
+ rubygems_version: 3.2.15
157
157
  signing_key:
158
158
  specification_version: 4
159
159
  summary: Ruby bindings for the Magic Admin API