active-triples 0.1.1 → 0.1.2

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: c8f2271397f8aecc1c96f8bd3cf63744e87e0989
4
- data.tar.gz: 25d4b23e7404fafd3c437e4cf0ff4de54f9c7c54
3
+ metadata.gz: b0897ad47a3f52ca7c4afc3bd20f71ceebc0ba11
4
+ data.tar.gz: 1efc69bcae93fa717de7f912ace62640e5efbc72
5
5
  SHA512:
6
- metadata.gz: b4645aa5fc8dd320fe19fe46268b500533fad11836093dcd8ad594b7b9052f5f531e61332b625a4284ebae92b8de2651ca29e8aa0c9833b5a5a0a9e635a3a75a
7
- data.tar.gz: fed0f9f047b36fd5f84bb231e83f021da0aa27991239697b58c173df75685b4a30a4a5715095cf538d709fd4c4336debf93b1814df0b73d0be0a3fc11a01becf
6
+ metadata.gz: 8d79708ef4df9af5e354542a29fb4d59d2b7db75aaa1ee9ec229c4196e351f780db45c63fa2876dd2a054bfd2b8dc8fb77f96b62748d199e9a7b94bbe9c9dfe5
7
+ data.tar.gz: 3c9f2db7dfddf893d9d90eb2f9c475b91543955d1d371ce79f8d213e3b03416493f7ff01d99f31acf287386fd58d9895f9d97edb350f92bf7acd9a087ea3c6de
@@ -16,6 +16,7 @@ module ActiveTriples
16
16
  end
17
17
 
18
18
  def class_name
19
+ return nil if @class_name.nil?
19
20
  raise "class_name for #{term} is a #{@class_name.class}; must be a class" unless @class_name.kind_of? Class or @class_name.kind_of? String
20
21
  if @class_name.kind_of?(String)
21
22
  begin
@@ -1,3 +1,3 @@
1
1
  module ActiveTriples
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -195,6 +195,10 @@ describe ActiveTriples::Resource do
195
195
  d.relation = RDF::DC.type
196
196
  expect { d.relation.first }.to raise_error "class_name for relation is a RDF::URI; must be a class"
197
197
  end
198
+
199
+ it 'should return nil when none is given' do
200
+ expect(DummyResource.properties['title'][:class_name]).to be_nil
201
+ end
198
202
  end
199
203
 
200
204
  describe 'attributes' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active-triples
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Johnson