ezid-client 1.4.0 → 1.4.1

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: f2baebf2aca4cada19d44f70e2e6614ad9e206ea
4
- data.tar.gz: 1cbc73e6739a91a88d2cd3a7f5698d8dab1bfa3a
3
+ metadata.gz: ac92a9017e776a4c88d7577881022af87f2d755d
4
+ data.tar.gz: 3be1a1ee6ee37c784ce6bf07810ca0d3be2d4fc9
5
5
  SHA512:
6
- metadata.gz: 042582d5276928c9444bf60eb1d1ed851795d072145c2e33e13d8a08d25be121bb797992ed941a2e1eba5cae1a9f980d26c24196f4ffa59edbf9a3d1d5a46161
7
- data.tar.gz: f6be1c6c06c59f8aec88b78664927aa0fbd8c92d090f920ad5c4c9edf99202c397f6a8444b2210da12c1f5c1ebc7240401286dc09fb447b7ef9f9ee65cccc414
6
+ metadata.gz: bb1f24f662eeed776a0c1380759ff9200e2e4619b04e553658c8ef96dc999985363abbfc5e454a6630cd9e38d5da9e6b25b6a98f1a85d1ab1274cb3fa371f630
7
+ data.tar.gz: 5467514182de6d43ef1128065b6193440e42345d72e80e9b91e6f29dde5db927d7cb65ab9e772e523c05dc27b9a9dd9486ad3db9fbd745ab7c9b7a36325acac4
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.4.0
1
+ 1.4.1
@@ -35,7 +35,7 @@ module Ezid
35
35
  end
36
36
  if id.nil?
37
37
  warn "[DEPRECATION] Calling `create` without an id will raise an exception in 2.0. Use `mint` instead. (called from #{caller.first})"
38
- shoulder = metadata.delete(:shoulder)
38
+ shoulder = metadata ? metadata.delete(:shoulder) : nil
39
39
  mint(shoulder, metadata)
40
40
  else
41
41
  new(id, metadata) { |i| i.save }
@@ -2,10 +2,31 @@ module Ezid
2
2
  RSpec.describe Identifier do
3
3
  describe "class methods" do
4
4
  describe ".create" do
5
- let(:args) { ["id", {profile: "dc", target: "http://example.com"}] }
6
- it "instantiates a new Identifier and saves it" do
7
- expect_any_instance_of(described_class).to receive(:save) { double(id: "id") }
8
- described_class.create(*args)
5
+ describe "with id and metadata args" do
6
+ it "instantiates a new Identifier and saves it" do
7
+ expect_any_instance_of(described_class).to receive(:save) { double(id: "id") }
8
+ described_class.create("id", profile: "dc", target: "http://example.com")
9
+ end
10
+ end
11
+ describe "with an id arg" do
12
+ it "instantiates a new Identifier and saves it" do
13
+ expect_any_instance_of(described_class).to receive(:save) { double(id: "id") }
14
+ described_class.create("id")
15
+ end
16
+ end
17
+ describe "with a hash metadata arg" do
18
+ it "mints a new Identifier" do
19
+ skip "DEPRECATED"
20
+ expect(described_class).to receive(:mint).with(nil, profile: "dc", target: "http://example.com")
21
+ described_class.create(profile: "dc", target: "http://example.com")
22
+ end
23
+ end
24
+ describe "with no args" do
25
+ it "mints a new Identifier" do
26
+ skip "DEPRECATED"
27
+ expect(described_class).to receive(:mint).with(nil, nil)
28
+ described_class.create
29
+ end
9
30
  end
10
31
  end
11
32
  describe ".mint" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ezid-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Chandek-Stark