latinum 0.5.0 → 0.5.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: c6565ff801afd8f7700bd6723059fae97fec8718
4
- data.tar.gz: 3c2d9ca868c490c9ab0e35bc520ca4a6c434b620
3
+ metadata.gz: 537e2473bf2fb2a9a16e4f2fe523ead753b907f8
4
+ data.tar.gz: fe5bdebcc019e19d6e2af6f9b71fea19f8a5d652
5
5
  SHA512:
6
- metadata.gz: 0c6a80ff70d4a87dfe53404389fe86159aeb0209a5f370d26c5f201fabe114805b09cbe33fc1646426361695106c24a3a5c5f5328fa304e86ea50e8b396a3540
7
- data.tar.gz: 4c2aed581bc0637765e498d4207aa879e833905c67cedfbd1d1c6748f14f39a8aad1a89ab7fd2306ea158882766c4c0fbfed5ca451305841e1e787a14121dd85
6
+ metadata.gz: d3d54ac16ff8c3abcb5aa025f6a89ea60d960c9370e9af1149b3dd78e9488d504d3d9e0af59ac94785776b747c79dfcbd213712bac624f7d32bf9d08b6790638
7
+ data.tar.gz: 19965530b9ebbfd754ecf0f595d98a4fe93ad58dbfc12aff7f1c5c1183c8a8bce9e660e964085fc8d8de011b8e7c45d4e40b12ca10b76e1343dff32df596aa66
@@ -81,10 +81,12 @@ module Latinum
81
81
  self.new(amount, name || default_name)
82
82
  end
83
83
 
84
- alias load parse
84
+ def load(string)
85
+ parse(string) if string
86
+ end
85
87
 
86
88
  def dump(resource)
87
- resource.to_s
89
+ resource.to_s if resource
88
90
  end
89
91
  end
90
92
 
@@ -1,4 +1,4 @@
1
- # Copyright, 2012, by Samuel G. D. Williams. <http://www.codeotaku.com>
1
+ # Copyright, 2015, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  # of this software and associated documentation files (the "Software"), to deal
@@ -19,5 +19,5 @@
19
19
  # THE SOFTWARE.
20
20
 
21
21
  module Latinum
22
- VERSION = "0.5.0"
22
+ VERSION = "0.5.1"
23
23
  end
@@ -35,5 +35,10 @@ module Latinum::ResourceSpec
35
35
 
36
36
  expect(loaded_resource).to be == loaded_resource
37
37
  end
38
+
39
+ it "should load and dump nil correctly" do
40
+ expect(Latinum::Resource.load(nil)).to be nil
41
+ expect(Latinum::Resource.dump(nil)).to be nil
42
+ end
38
43
  end
39
44
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: latinum
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams