spira 0.7.1 → 1.1.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: 71e2e4088580a360ed92e576474e161788e396ac
4
- data.tar.gz: 242a7175fcc3b056b6511f0ab191b14d0d8c449b
3
+ metadata.gz: 67941fa34ff100d0330f499f459a24c8e9d5c1be
4
+ data.tar.gz: 45a7cecd46dfde2605ab969a2955654414c35b2c
5
5
  SHA512:
6
- metadata.gz: 3ca7a18ca083cb74acc73514977090965515323bea4990a9d64d35794238d801871b508b4f8a4523713e04ce86f5eae9b14cf9af093f0d09fb87ca4fb340cdd1
7
- data.tar.gz: 440546c7c94d665ddfd1c71688d39910541d9796b8511ac3bd80c9d20c7d26e7ebff0be5b6d66d8951fad75a84f6fda5f14f14fdecbb567263784e12c3259540
6
+ metadata.gz: 9c5ec796da4d9d60541bfc20d526b73155b7c46acb1fd1dfff32468eb69579b65fa178b2bcfd2b19e803269097b3f2c1867d3ac8254d232ac68013caf60576f1
7
+ data.tar.gz: eafe04bca18c94e973944716784d96e9804aa3846b87e881853b037f43d93824b470da7e7bd08db14bc1524c912f2e8a7bede7ca6ebdf2041c2829a6383ebed9
data/README.md CHANGED
@@ -221,7 +221,7 @@ rolling_stones = Album.for RDF::URI.new('http://example.org/cds/rolling-stones-h
221
221
  # See RDF.rb at http://rdf.rubyforge.org/RDF/Enumerable.html for more information about #has_predicate?
222
222
  rolling_stones.has_predicate?(RDF.type) #=> true
223
223
  Album.type #=> RDF::URI('http://example.org/types/album')
224
- `
224
+ ```
225
225
 
226
226
  In addition, one can count the members of a class with a `type` defined:
227
227
 
@@ -242,7 +242,8 @@ end
242
242
  All assigned types are accessible via "types":
243
243
 
244
244
  ```ruby
245
- Man.types #=> #<Set: {#<RDF::URI:0xd5ebc0(http://example.org/people/father)>, #<RDF::URI:0xd5e4b8(http://example.org/people/cop)>}>
245
+ Man.types
246
+ # => #<Set: {#<RDF::URI:0xd5ebc0(http://example.org/people/father)>, #<RDF::URI:0xd5e4b8(http://example.org/people/cop)>}>
246
247
  ```
247
248
 
248
249
  Also note that "type" actually returns a first type from the list of types.
@@ -286,8 +287,10 @@ use `property`. The semantics are otherwise the same. A `has_many` property
286
287
  will always return a list, including an empty list for no value. All options
287
288
  for `property` work for `has_many`.
288
289
 
289
- property :artist, :type => :artist #=> cd.artist returns a single value
290
- has_many :cds, :type => :cd #=> artist.cds returns an array
290
+ ```ruby
291
+ property :artist, :type => :artist #=> cd.artist returns a single value
292
+ has_many :cds, :type => :cd #=> artist.cds returns an array
293
+ ```
291
294
 
292
295
  Property always takes a symbol name as a name, and a variable list of options. The supported options are:
293
296
 
@@ -380,8 +383,8 @@ are implemented:
380
383
  * `Any`
381
384
 
382
385
  The default type for a Spira property is `Spira::Types::Any`, which uses
383
- `RDF::Literal`'s automatic boxing/unboxing of XSD types as best it can. See
384
- `[RDF::Literal](http://rdf.rubyforge.org/RDF/Literal.html)` for more information.
386
+ `RDF::Literal`'s automatic boxing/unboxing of XSD types as best it can.
387
+ See [`RDF::Literal`](http://rdf.rubyforge.org/RDF/Literal.html) for more information.
385
388
 
386
389
  You can implement your own types as well. Your class' serialize method should
387
390
  turn an RDF::Value into a ruby object, and vice versa.
@@ -451,12 +454,12 @@ repositories.map(&:size).join(', ') # 1, 1, 1
451
454
  ## Validations
452
455
 
453
456
  [removed]
454
- See the description of ActiveModel::Validations.
457
+ See the description of `ActiveModel::Validations`.
455
458
 
456
459
  ## Hooks
457
460
 
458
461
  [removed]
459
- See the description of ActiveModel::Callbacks.
462
+ See the description of `ActiveModel::Callbacks`.
460
463
 
461
464
  ## Using Model Objects as RDF.rb Objects
462
465
 
@@ -493,4 +496,4 @@ This repository uses [Git Flow](https://github.com/nvie/gitflow) to mange develo
493
496
  explicit [public domain dedication][PDD] on record from you.
494
497
 
495
498
  [public-rdf-ruby w3c mailing list]: http://lists.w3.org/Archives/Public/public-rdf-ruby/
496
- [RDF.rb]: http://rubygems.org/gems/rdf
499
+ [RDF.rb]: http://rubygems.org/gems/rdf
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.1
1
+ 1.1.1
@@ -2,8 +2,18 @@ module Spira
2
2
  module Validations
3
3
  class UniquenessValidator < ActiveModel::EachValidator
4
4
  # Unfortunately, we have to tie Uniqueness validators to a class.
5
- def setup(klass)
6
- @klass = klass
5
+ # Note: the `setup` hook has been deprecated in rails 4.1 and completely
6
+ # removed in rails 4.2; the klass is now found in #{options[:class]}.
7
+ if ActiveModel::VERSION::MAJOR <= 3 ||
8
+ (ActiveModel::VERSION::MAJOR == 4 && ActiveModel::VERSION::MINOR < 1)
9
+ def setup(klass)
10
+ @klass = klass
11
+ end
12
+ else
13
+ def initialize(options)
14
+ super
15
+ @klass = options.fetch(:class)
16
+ end
7
17
  end
8
18
 
9
19
  def validate_each(record, attribute, value)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spira
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Lavender
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir:
10
10
  - bin
11
11
  cert_chain: []
12
- date: 2014-01-28 00:00:00.000000000 Z
12
+ date: 2015-09-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rdf
@@ -18,6 +18,9 @@ dependencies:
18
18
  - - "~>"
19
19
  - !ruby/object:Gem::Version
20
20
  version: '1.1'
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 1.1.16.1
21
24
  type: :runtime
22
25
  prerelease: false
23
26
  version_requirements: !ruby/object:Gem::Requirement
@@ -25,6 +28,9 @@ dependencies:
25
28
  - - "~>"
26
29
  - !ruby/object:Gem::Version
27
30
  version: '1.1'
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 1.1.16.1
28
34
  - !ruby/object:Gem::Dependency
29
35
  name: rdf-isomorphic
30
36
  requirement: !ruby/object:Gem::Requirement
@@ -59,28 +65,84 @@ dependencies:
59
65
  requirements:
60
66
  - - ">"
61
67
  - !ruby/object:Gem::Version
62
- version: '3.0'
68
+ version: '3'
63
69
  type: :runtime
64
70
  prerelease: false
65
71
  version_requirements: !ruby/object:Gem::Requirement
66
72
  requirements:
67
73
  - - ">"
68
74
  - !ruby/object:Gem::Version
69
- version: '3.0'
75
+ version: '3'
70
76
  - !ruby/object:Gem::Dependency
71
77
  name: activesupport
72
78
  requirement: !ruby/object:Gem::Requirement
73
79
  requirements:
74
80
  - - ">"
75
81
  - !ruby/object:Gem::Version
76
- version: '3.0'
82
+ version: '3'
77
83
  type: :runtime
78
84
  prerelease: false
79
85
  version_requirements: !ruby/object:Gem::Requirement
80
86
  requirements:
81
87
  - - ">"
82
88
  - !ruby/object:Gem::Version
83
- version: '3.0'
89
+ version: '3'
90
+ - !ruby/object:Gem::Dependency
91
+ name: rdf-spec
92
+ requirement: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '1.1'
97
+ type: :development
98
+ prerelease: false
99
+ version_requirements: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '1.1'
104
+ - !ruby/object:Gem::Dependency
105
+ name: rspec
106
+ requirement: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: 3.2.0
111
+ type: :development
112
+ prerelease: false
113
+ version_requirements: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: 3.2.0
118
+ - !ruby/object:Gem::Dependency
119
+ name: rspec-its
120
+ requirement: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: '1.0'
125
+ type: :development
126
+ prerelease: false
127
+ version_requirements: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '1.0'
132
+ - !ruby/object:Gem::Dependency
133
+ name: yard
134
+ requirement: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: '0.8'
139
+ type: :development
140
+ prerelease: false
141
+ version_requirements: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: '0.8'
84
146
  description: Spira is a framework for using the information in RDF.rb repositories
85
147
  as model objects.
86
148
  email: blavender@gmail.com
@@ -145,7 +207,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
145
207
  version: '0'
146
208
  requirements: []
147
209
  rubyforge_project: spira
148
- rubygems_version: 2.2.1
210
+ rubygems_version: 2.4.7
149
211
  signing_key:
150
212
  specification_version: 4
151
213
  summary: A framework for using the information in RDF.rb repositories as model objects.