spira 0.0.12 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- data/AUTHORS +2 -0
- data/CHANGES.md +6 -3
- data/{README → README.md} +91 -120
- data/lib/rdf/ext/uri.rb +37 -0
- data/lib/spira.rb +47 -86
- data/lib/spira/association_reflection.rb +25 -0
- data/lib/spira/base.rb +353 -4
- data/lib/spira/exceptions.rb +13 -7
- data/lib/spira/persistence.rb +531 -0
- data/lib/spira/reflections.rb +19 -0
- data/lib/spira/resource.rb +165 -60
- data/lib/spira/serialization.rb +27 -0
- data/lib/spira/type.rb +7 -7
- data/lib/spira/types.rb +8 -11
- data/lib/spira/types/boolean.rb +3 -3
- data/lib/spira/types/date.rb +4 -5
- data/lib/spira/types/dateTime.rb +26 -0
- data/lib/spira/types/decimal.rb +2 -2
- data/lib/spira/types/float.rb +3 -3
- data/lib/spira/types/gYear.rb +26 -0
- data/lib/spira/types/int.rb +27 -0
- data/lib/spira/types/integer.rb +3 -3
- data/lib/spira/types/long.rb +27 -0
- data/lib/spira/types/negativeInteger.rb +27 -0
- data/lib/spira/types/nonNegativeInteger.rb +27 -0
- data/lib/spira/types/nonPositiveInteger.rb +27 -0
- data/lib/spira/types/positiveInteger.rb +27 -0
- data/lib/spira/types/string.rb +1 -1
- data/lib/spira/utils.rb +29 -0
- data/lib/spira/validations.rb +77 -0
- data/lib/spira/validations/uniqueness.rb +33 -0
- data/lib/spira/version.rb +3 -6
- metadata +218 -123
- data/lib/spira/errors.rb +0 -94
- data/lib/spira/extensions.rb +0 -14
- data/lib/spira/resource/class_methods.rb +0 -260
- data/lib/spira/resource/dsl.rb +0 -279
- data/lib/spira/resource/instance_methods.rb +0 -567
- data/lib/spira/resource/validations.rb +0 -47
data/lib/spira/types/float.rb
CHANGED
@@ -18,11 +18,11 @@ module Spira::Types
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def self.serialize(value)
|
21
|
-
RDF::Literal.new(value.to_f, :datatype => XSD.double)
|
21
|
+
RDF::Literal.new(value.to_f, :datatype => RDF::XSD.double)
|
22
22
|
end
|
23
23
|
|
24
|
-
register_alias XSD.float
|
25
|
-
register_alias XSD.double
|
24
|
+
register_alias RDF::XSD.float
|
25
|
+
register_alias RDF::XSD.double
|
26
26
|
|
27
27
|
end
|
28
28
|
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module Spira::Types
|
2
|
+
|
3
|
+
##
|
4
|
+
# A {Spira::Type} for gYear. Values will be associated with the
|
5
|
+
# `XSD.gYear` type.
|
6
|
+
#
|
7
|
+
# A {Spira::Resource} property can reference this type as
|
8
|
+
# `Spira::Types::GYear`, `GYear`, or `XSD.gYear`.
|
9
|
+
#
|
10
|
+
# @see Spira::Type
|
11
|
+
# @see http://rdf.rubyforge.org/RDF/Literal.html
|
12
|
+
class GYear
|
13
|
+
include Spira::Type
|
14
|
+
|
15
|
+
def self.unserialize(value)
|
16
|
+
object = value.object.to_i
|
17
|
+
end
|
18
|
+
|
19
|
+
def self.serialize(value)
|
20
|
+
RDF::Literal.new(value, :datatype => XSD.gYear)
|
21
|
+
end
|
22
|
+
|
23
|
+
register_alias XSD.gYear
|
24
|
+
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module Spira::Types
|
2
|
+
|
3
|
+
##
|
4
|
+
# A {Spira::Type} for integer values. Values will be associated with the
|
5
|
+
# `XSD.int` type.
|
6
|
+
#
|
7
|
+
# A {Spira::Resource} property can reference this type as
|
8
|
+
# `Spira::Types::Int`, `Int`, or `XSD.int`.
|
9
|
+
#
|
10
|
+
# @see Spira::Type
|
11
|
+
# @see http://rdf.rubyforge.org/RDF/Literal.html
|
12
|
+
class Int
|
13
|
+
|
14
|
+
include Spira::Type
|
15
|
+
|
16
|
+
def self.unserialize(value)
|
17
|
+
value.object.to_i
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.serialize(value)
|
21
|
+
RDF::Literal.new(value, :datatype => XSD.int)
|
22
|
+
end
|
23
|
+
|
24
|
+
register_alias XSD.int
|
25
|
+
|
26
|
+
end
|
27
|
+
end
|
data/lib/spira/types/integer.rb
CHANGED
@@ -14,14 +14,14 @@ module Spira::Types
|
|
14
14
|
include Spira::Type
|
15
15
|
|
16
16
|
def self.unserialize(value)
|
17
|
-
value.object
|
17
|
+
value.object.to_i
|
18
18
|
end
|
19
19
|
|
20
20
|
def self.serialize(value)
|
21
|
-
RDF::Literal.new(value)
|
21
|
+
RDF::Literal.new(value, :datatype => XSD.integer)
|
22
22
|
end
|
23
23
|
|
24
|
-
register_alias XSD.integer
|
24
|
+
register_alias RDF::XSD.integer
|
25
25
|
|
26
26
|
end
|
27
27
|
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module Spira::Types
|
2
|
+
|
3
|
+
##
|
4
|
+
# A {Spira::Type} for integer values. Values will be associated with the
|
5
|
+
# `XSD.long` type.
|
6
|
+
#
|
7
|
+
# A {Spira::Resource} property can reference this type as
|
8
|
+
# `Spira::Types::Long`, `Long`, or `XSD.long`.
|
9
|
+
#
|
10
|
+
# @see Spira::Type
|
11
|
+
# @see http://rdf.rubyforge.org/RDF/Literal.html
|
12
|
+
class Long
|
13
|
+
|
14
|
+
include Spira::Type
|
15
|
+
|
16
|
+
def self.unserialize(value)
|
17
|
+
value.object.to_i
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.serialize(value)
|
21
|
+
RDF::Literal.new(value, :datatype => XSD.long)
|
22
|
+
end
|
23
|
+
|
24
|
+
register_alias XSD.long
|
25
|
+
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module Spira::Types
|
2
|
+
|
3
|
+
##
|
4
|
+
# A {Spira::Type} for negative integer values. Values will be associated with the
|
5
|
+
# `XSD.negativeInteger` type.
|
6
|
+
#
|
7
|
+
# A {Spira::Resource} property can reference this type as
|
8
|
+
# `Spira::Types::NegativeInteger`, `NegativeInteger`, or `XSD.negativeInteger`.
|
9
|
+
#
|
10
|
+
# @see Spira::Type
|
11
|
+
# @see http://rdf.rubyforge.org/RDF/Literal.html
|
12
|
+
class NegativeInteger
|
13
|
+
|
14
|
+
include Spira::Type
|
15
|
+
|
16
|
+
def self.unserialize(value)
|
17
|
+
value.object.to_i
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.serialize(value)
|
21
|
+
RDF::Literal.new(value, :datatype => XSD.negativeInteger)
|
22
|
+
end
|
23
|
+
|
24
|
+
register_alias XSD.negativeInteger
|
25
|
+
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module Spira::Types
|
2
|
+
|
3
|
+
##
|
4
|
+
# A {Spira::Type} for nonnegative integer values. Values will be associated with the
|
5
|
+
# `XSD.nonNegativeInteger` type.
|
6
|
+
#
|
7
|
+
# A {Spira::Resource} property can reference this type as
|
8
|
+
# `Spira::Types::NonNegativeInteger`, `NonNegativeInteger`, or `XSD.nonNegativeInteger`.
|
9
|
+
#
|
10
|
+
# @see Spira::Type
|
11
|
+
# @see http://rdf.rubyforge.org/RDF/Literal.html
|
12
|
+
class NonNegativeInteger
|
13
|
+
|
14
|
+
include Spira::Type
|
15
|
+
|
16
|
+
def self.unserialize(value)
|
17
|
+
value.object.to_i
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.serialize(value)
|
21
|
+
RDF::Literal.new(value, :datatype => XSD.nonNegativeInteger)
|
22
|
+
end
|
23
|
+
|
24
|
+
register_alias XSD.nonNegativeInteger
|
25
|
+
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module Spira::Types
|
2
|
+
|
3
|
+
##
|
4
|
+
# A {Spira::Type} for nonpositive integer values. Values will be associated with the
|
5
|
+
# `XSD.nonPositiveInteger` type.
|
6
|
+
#
|
7
|
+
# A {Spira::Resource} property can reference this type as
|
8
|
+
# `Spira::Types::NonPositiveInteger`, `NonPositiveInteger`, or `XSD.nonPositiveInteger`.
|
9
|
+
#
|
10
|
+
# @see Spira::Type
|
11
|
+
# @see http://rdf.rubyforge.org/RDF/Literal.html
|
12
|
+
class NonPositiveInteger
|
13
|
+
|
14
|
+
include Spira::Type
|
15
|
+
|
16
|
+
def self.unserialize(value)
|
17
|
+
value.object.to_i
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.serialize(value)
|
21
|
+
RDF::Literal.new(value, :datatype => XSD.nonPositiveInteger)
|
22
|
+
end
|
23
|
+
|
24
|
+
register_alias XSD.nonPositiveInteger
|
25
|
+
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module Spira::Types
|
2
|
+
|
3
|
+
##
|
4
|
+
# A {Spira::Type} for positive integer values. Values will be associated with the
|
5
|
+
# `XSD.positiveInteger` type.
|
6
|
+
#
|
7
|
+
# A {Spira::Resource} property can reference this type as
|
8
|
+
# `Spira::Types::PositiveInteger`, `PositiveInteger`, or `XSD.positiveInteger`.
|
9
|
+
#
|
10
|
+
# @see Spira::Type
|
11
|
+
# @see http://rdf.rubyforge.org/RDF/Literal.html
|
12
|
+
class PositiveInteger
|
13
|
+
|
14
|
+
include Spira::Type
|
15
|
+
|
16
|
+
def self.unserialize(value)
|
17
|
+
value.object.to_i
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.serialize(value)
|
21
|
+
RDF::Literal.new(value, :datatype => XSD.positiveInteger)
|
22
|
+
end
|
23
|
+
|
24
|
+
register_alias XSD.positiveInteger
|
25
|
+
|
26
|
+
end
|
27
|
+
end
|
data/lib/spira/types/string.rb
CHANGED
data/lib/spira/utils.rb
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
module Spira
|
2
|
+
module Utils
|
3
|
+
##
|
4
|
+
# Rename a resource in the repository to the new given subject.
|
5
|
+
# Changes are immediately saved to the repository.
|
6
|
+
#
|
7
|
+
# @param [RDF::Resource] old_subject
|
8
|
+
# @param [RDF::Resource] new_subject
|
9
|
+
# @param [RDF::Repository] repository
|
10
|
+
def rename!(old_subject, new_subject, repository = nil)
|
11
|
+
repository ||= Spira.repository(:default)
|
12
|
+
update_repository = RDF::Repository.new
|
13
|
+
|
14
|
+
old_subject_statements = repository.query(:subject => old_subject)
|
15
|
+
old_subject_statements.each do |statement|
|
16
|
+
update_repository << RDF::Statement.new(new_subject, statement.predicate, statement.object)
|
17
|
+
end
|
18
|
+
|
19
|
+
old_object_statements = repository.query(:object => old_subject)
|
20
|
+
old_object_statements.each do |statement|
|
21
|
+
update_repository << RDF::Statement.new(statement.subject, statement.predicate, new_subject)
|
22
|
+
end
|
23
|
+
|
24
|
+
repository.insert *update_repository
|
25
|
+
repository.delete *(old_subject_statements + old_object_statements)
|
26
|
+
end
|
27
|
+
module_function :rename!
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,77 @@
|
|
1
|
+
module Spira
|
2
|
+
# = Spira RecordInvalid
|
3
|
+
#
|
4
|
+
# Raised by <tt>save!</tt> and <tt>create!</tt> when the record is invalid. Use the
|
5
|
+
# +record+ method to retrieve the record which did not validate.
|
6
|
+
#
|
7
|
+
# begin
|
8
|
+
# complex_operation_that_calls_save!_internally
|
9
|
+
# rescue Spira::RecordInvalid => invalid
|
10
|
+
# puts invalid.record.errors
|
11
|
+
# end
|
12
|
+
class RecordInvalid < SpiraError
|
13
|
+
attr_reader :record
|
14
|
+
def initialize(record)
|
15
|
+
@record = record
|
16
|
+
errors = @record.errors.full_messages.join(", ")
|
17
|
+
# TODO: use I18n later
|
18
|
+
# super(I18n.t("activerecord.errors.messages.record_invalid", :errors => errors))
|
19
|
+
super "invalid record"
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
module Validations
|
24
|
+
extend ActiveSupport::Concern
|
25
|
+
include ActiveModel::Validations
|
26
|
+
|
27
|
+
module ClassMethods
|
28
|
+
# Creates an object just like Base.create but calls <tt>save!</tt> instead of +save+
|
29
|
+
# so an exception is raised if the record is invalid.
|
30
|
+
def create!(properties = {}, options = {}, &block)
|
31
|
+
if properties.is_a?(Array)
|
32
|
+
properties.collect { |attr| create!(attr, options, &block) }
|
33
|
+
else
|
34
|
+
object = new(properties, options)
|
35
|
+
yield(object) if block_given?
|
36
|
+
object.save!
|
37
|
+
object
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
# The validation process on save can be skipped by passing <tt>:validate => false</tt>. The regular Base#save method is
|
43
|
+
# replaced with this when the validations module is mixed in, which it is by default.
|
44
|
+
def save(options={})
|
45
|
+
perform_validations(options) ? super : false
|
46
|
+
end
|
47
|
+
|
48
|
+
# Attempts to save the record just like Base#save but will raise a +RecordInvalid+ exception instead of returning false
|
49
|
+
# if the record is not valid.
|
50
|
+
def save!(options={})
|
51
|
+
perform_validations(options) ? super : raise(RecordInvalid.new(self))
|
52
|
+
end
|
53
|
+
|
54
|
+
# Runs all the validations within the specified context. Returns true if no errors are found,
|
55
|
+
# false otherwise.
|
56
|
+
#
|
57
|
+
# If the argument is false (default is +nil+), the context is set to <tt>:create</tt> if
|
58
|
+
# <tt>new_record?</tt> is true, and to <tt>:update</tt> if it is not.
|
59
|
+
#
|
60
|
+
# Validations with no <tt>:on</tt> option will run no matter the context. Validations with
|
61
|
+
# some <tt>:on</tt> option will only run in the specified context.
|
62
|
+
def valid?(context = nil)
|
63
|
+
context ||= (new_record? ? :create : :update)
|
64
|
+
output = super(context)
|
65
|
+
errors.empty? && output
|
66
|
+
end
|
67
|
+
|
68
|
+
protected
|
69
|
+
|
70
|
+
def perform_validations(options={})
|
71
|
+
perform_validation = options[:validate] != false
|
72
|
+
perform_validation ? valid?(options[:context]) : true
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
require "spira/validations/uniqueness"
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module Spira
|
2
|
+
module Validations
|
3
|
+
class UniquenessValidator < ActiveModel::EachValidator
|
4
|
+
# Unfortunately, we have to tie Uniqueness validators to a class.
|
5
|
+
def setup(klass)
|
6
|
+
@klass = klass
|
7
|
+
end
|
8
|
+
|
9
|
+
def validate_each(record, attribute, value)
|
10
|
+
@klass.find_each(:conditions => {attribute => value}) do |other_record|
|
11
|
+
if other_record.subject != record.subject
|
12
|
+
record.errors.add(attribute, "is already taken")
|
13
|
+
break
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
module ClassMethods
|
20
|
+
# Validates whether the value of the specified attributes are unique across the system.
|
21
|
+
# Useful for making sure that only one user
|
22
|
+
# can be named "davidhh".
|
23
|
+
#
|
24
|
+
# class Person < Spira::Base
|
25
|
+
# validates_uniqueness_of :user_name
|
26
|
+
# end
|
27
|
+
#
|
28
|
+
def validates_uniqueness_of(*attr_names)
|
29
|
+
validates_with UniquenessValidator, _merge_attributes(attr_names)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
data/lib/spira/version.rb
CHANGED
@@ -1,12 +1,9 @@
|
|
1
1
|
module Spira
|
2
2
|
module VERSION
|
3
|
-
|
4
|
-
MINOR =
|
5
|
-
TINY = 12
|
6
|
-
EXTRA = nil
|
3
|
+
VERSION_FILE = File.join(File.expand_path(File.dirname(__FILE__)), "..", "..", "VERSION")
|
4
|
+
MAJOR, MINOR, TINY, EXTRA = File.read(VERSION_FILE).chop.split(".")
|
7
5
|
|
8
|
-
STRING = [MAJOR, MINOR, TINY].join('.')
|
9
|
-
STRING << ".#{EXTRA}" if EXTRA
|
6
|
+
STRING = [MAJOR, MINOR, TINY, EXTRA].compact.join('.')
|
10
7
|
|
11
8
|
##
|
12
9
|
# @return [String]
|
metadata
CHANGED
@@ -1,181 +1,276 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: spira
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
6
|
-
- 0
|
7
|
-
- 0
|
8
|
-
- 12
|
9
|
-
version: 0.0.12
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.5.0
|
5
|
+
prerelease:
|
10
6
|
platform: ruby
|
11
|
-
authors:
|
7
|
+
authors:
|
12
8
|
- Ben Lavender
|
13
9
|
autorequire:
|
14
|
-
bindir:
|
10
|
+
bindir:
|
15
11
|
- bin
|
16
12
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
dependencies:
|
21
|
-
- !ruby/object:Gem::Dependency
|
13
|
+
date: 2013-03-01 00:00:00.000000000 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
22
16
|
name: rdf-spec
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
segments:
|
30
|
-
- 0
|
31
|
-
- 2
|
32
|
-
- 2
|
33
|
-
version: 0.2.2
|
17
|
+
requirement: !ruby/object:Gem::Requirement
|
18
|
+
none: false
|
19
|
+
requirements:
|
20
|
+
- - ~>
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '1.0'
|
34
23
|
type: :development
|
35
|
-
version_requirements: *id001
|
36
|
-
- !ruby/object:Gem::Dependency
|
37
|
-
name: rspec
|
38
24
|
prerelease: false
|
39
|
-
|
40
|
-
none: false
|
41
|
-
requirements:
|
42
|
-
- -
|
43
|
-
- !ruby/object:Gem::Version
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
none: false
|
27
|
+
requirements:
|
28
|
+
- - ~>
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
version: '1.0'
|
31
|
+
- !ruby/object:Gem::Dependency
|
32
|
+
name: rspec
|
33
|
+
requirement: !ruby/object:Gem::Requirement
|
34
|
+
none: false
|
35
|
+
requirements:
|
36
|
+
- - ~>
|
37
|
+
- !ruby/object:Gem::Version
|
38
|
+
version: 2.12.0
|
49
39
|
type: :development
|
50
|
-
|
51
|
-
|
40
|
+
prerelease: false
|
41
|
+
version_requirements: !ruby/object:Gem::Requirement
|
42
|
+
none: false
|
43
|
+
requirements:
|
44
|
+
- - ~>
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 2.12.0
|
47
|
+
- !ruby/object:Gem::Dependency
|
52
48
|
name: yard
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.8.3
|
55
|
+
type: :development
|
56
|
+
prerelease: false
|
57
|
+
version_requirements: !ruby/object:Gem::Requirement
|
58
|
+
none: false
|
59
|
+
requirements:
|
60
|
+
- - ~>
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: 0.8.3
|
63
|
+
- !ruby/object:Gem::Dependency
|
64
|
+
name: redcarpet
|
65
|
+
requirement: !ruby/object:Gem::Requirement
|
66
|
+
none: false
|
67
|
+
requirements:
|
68
|
+
- - ~>
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: 2.2.2
|
71
|
+
type: :development
|
53
72
|
prerelease: false
|
54
|
-
|
55
|
-
none: false
|
56
|
-
requirements:
|
57
|
-
- -
|
58
|
-
- !ruby/object:Gem::Version
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
73
|
+
version_requirements: !ruby/object:Gem::Requirement
|
74
|
+
none: false
|
75
|
+
requirements:
|
76
|
+
- - ~>
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: 2.2.2
|
79
|
+
- !ruby/object:Gem::Dependency
|
80
|
+
name: guard
|
81
|
+
requirement: !ruby/object:Gem::Requirement
|
82
|
+
none: false
|
83
|
+
requirements:
|
84
|
+
- - ~>
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
version: 1.2.3
|
64
87
|
type: :development
|
65
|
-
version_requirements: *id003
|
66
|
-
- !ruby/object:Gem::Dependency
|
67
|
-
name: rdf
|
68
88
|
prerelease: false
|
69
|
-
|
70
|
-
none: false
|
71
|
-
requirements:
|
72
|
-
- -
|
73
|
-
- !ruby/object:Gem::Version
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
89
|
+
version_requirements: !ruby/object:Gem::Requirement
|
90
|
+
none: false
|
91
|
+
requirements:
|
92
|
+
- - ~>
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
version: 1.2.3
|
95
|
+
- !ruby/object:Gem::Dependency
|
96
|
+
name: guard-rspec
|
97
|
+
requirement: !ruby/object:Gem::Requirement
|
98
|
+
none: false
|
99
|
+
requirements:
|
100
|
+
- - ~>
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: 1.1.0
|
103
|
+
type: :development
|
104
|
+
prerelease: false
|
105
|
+
version_requirements: !ruby/object:Gem::Requirement
|
106
|
+
none: false
|
107
|
+
requirements:
|
108
|
+
- - ~>
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 1.1.0
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: guard-ctags-bundler
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
none: false
|
115
|
+
requirements:
|
116
|
+
- - ~>
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: 0.1.1
|
119
|
+
type: :development
|
120
|
+
prerelease: false
|
121
|
+
version_requirements: !ruby/object:Gem::Requirement
|
122
|
+
none: false
|
123
|
+
requirements:
|
124
|
+
- - ~>
|
125
|
+
- !ruby/object:Gem::Version
|
126
|
+
version: 0.1.1
|
127
|
+
- !ruby/object:Gem::Dependency
|
128
|
+
name: rdf
|
129
|
+
requirement: !ruby/object:Gem::Requirement
|
130
|
+
none: false
|
131
|
+
requirements:
|
132
|
+
- - ~>
|
133
|
+
- !ruby/object:Gem::Version
|
134
|
+
version: '1.0'
|
79
135
|
type: :runtime
|
80
|
-
|
81
|
-
|
136
|
+
prerelease: false
|
137
|
+
version_requirements: !ruby/object:Gem::Requirement
|
138
|
+
none: false
|
139
|
+
requirements:
|
140
|
+
- - ~>
|
141
|
+
- !ruby/object:Gem::Version
|
142
|
+
version: '1.0'
|
143
|
+
- !ruby/object:Gem::Dependency
|
82
144
|
name: rdf-isomorphic
|
145
|
+
requirement: !ruby/object:Gem::Requirement
|
146
|
+
none: false
|
147
|
+
requirements:
|
148
|
+
- - ~>
|
149
|
+
- !ruby/object:Gem::Version
|
150
|
+
version: '1.0'
|
151
|
+
type: :runtime
|
83
152
|
prerelease: false
|
84
|
-
|
85
|
-
none: false
|
86
|
-
requirements:
|
87
|
-
- -
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
153
|
+
version_requirements: !ruby/object:Gem::Requirement
|
154
|
+
none: false
|
155
|
+
requirements:
|
156
|
+
- - ~>
|
157
|
+
- !ruby/object:Gem::Version
|
158
|
+
version: '1.0'
|
159
|
+
- !ruby/object:Gem::Dependency
|
160
|
+
name: promise
|
161
|
+
requirement: !ruby/object:Gem::Requirement
|
162
|
+
none: false
|
163
|
+
requirements:
|
164
|
+
- - ~>
|
165
|
+
- !ruby/object:Gem::Version
|
93
166
|
version: 0.3.0
|
94
167
|
type: :runtime
|
95
|
-
version_requirements: *id005
|
96
|
-
- !ruby/object:Gem::Dependency
|
97
|
-
name: promise
|
98
168
|
prerelease: false
|
99
|
-
|
100
|
-
none: false
|
101
|
-
requirements:
|
102
|
-
- -
|
103
|
-
- !ruby/object:Gem::Version
|
104
|
-
segments:
|
105
|
-
- 0
|
106
|
-
- 3
|
107
|
-
- 0
|
169
|
+
version_requirements: !ruby/object:Gem::Requirement
|
170
|
+
none: false
|
171
|
+
requirements:
|
172
|
+
- - ~>
|
173
|
+
- !ruby/object:Gem::Version
|
108
174
|
version: 0.3.0
|
175
|
+
- !ruby/object:Gem::Dependency
|
176
|
+
name: activemodel
|
177
|
+
requirement: !ruby/object:Gem::Requirement
|
178
|
+
none: false
|
179
|
+
requirements:
|
180
|
+
- - ~>
|
181
|
+
- !ruby/object:Gem::Version
|
182
|
+
version: '3'
|
109
183
|
type: :runtime
|
110
|
-
|
111
|
-
|
184
|
+
prerelease: false
|
185
|
+
version_requirements: !ruby/object:Gem::Requirement
|
186
|
+
none: false
|
187
|
+
requirements:
|
188
|
+
- - ~>
|
189
|
+
- !ruby/object:Gem::Version
|
190
|
+
version: '3'
|
191
|
+
- !ruby/object:Gem::Dependency
|
192
|
+
name: activesupport
|
193
|
+
requirement: !ruby/object:Gem::Requirement
|
194
|
+
none: false
|
195
|
+
requirements:
|
196
|
+
- - ~>
|
197
|
+
- !ruby/object:Gem::Version
|
198
|
+
version: '3'
|
199
|
+
type: :runtime
|
200
|
+
prerelease: false
|
201
|
+
version_requirements: !ruby/object:Gem::Requirement
|
202
|
+
none: false
|
203
|
+
requirements:
|
204
|
+
- - ~>
|
205
|
+
- !ruby/object:Gem::Version
|
206
|
+
version: '3'
|
207
|
+
description: Spira is a framework for using the information in RDF.rb repositories
|
208
|
+
as model objects.
|
112
209
|
email: blavender@gmail.com
|
113
210
|
executables: []
|
114
|
-
|
115
211
|
extensions: []
|
116
|
-
|
117
212
|
extra_rdoc_files: []
|
118
|
-
|
119
|
-
files:
|
213
|
+
files:
|
120
214
|
- CHANGES.md
|
121
215
|
- AUTHORS
|
122
|
-
- README
|
216
|
+
- README.md
|
123
217
|
- UNLICENSE
|
218
|
+
- lib/rdf/ext/uri.rb
|
219
|
+
- lib/spira/association_reflection.rb
|
124
220
|
- lib/spira/base.rb
|
125
|
-
- lib/spira/errors.rb
|
126
221
|
- lib/spira/exceptions.rb
|
127
|
-
- lib/spira/
|
128
|
-
- lib/spira/
|
129
|
-
- lib/spira/resource/dsl.rb
|
130
|
-
- lib/spira/resource/instance_methods.rb
|
131
|
-
- lib/spira/resource/validations.rb
|
222
|
+
- lib/spira/persistence.rb
|
223
|
+
- lib/spira/reflections.rb
|
132
224
|
- lib/spira/resource.rb
|
225
|
+
- lib/spira/serialization.rb
|
133
226
|
- lib/spira/type.rb
|
134
227
|
- lib/spira/types/any.rb
|
135
228
|
- lib/spira/types/boolean.rb
|
136
229
|
- lib/spira/types/date.rb
|
230
|
+
- lib/spira/types/dateTime.rb
|
137
231
|
- lib/spira/types/decimal.rb
|
138
232
|
- lib/spira/types/float.rb
|
233
|
+
- lib/spira/types/gYear.rb
|
234
|
+
- lib/spira/types/int.rb
|
139
235
|
- lib/spira/types/integer.rb
|
236
|
+
- lib/spira/types/long.rb
|
140
237
|
- lib/spira/types/native.rb
|
238
|
+
- lib/spira/types/negativeInteger.rb
|
239
|
+
- lib/spira/types/nonNegativeInteger.rb
|
240
|
+
- lib/spira/types/nonPositiveInteger.rb
|
241
|
+
- lib/spira/types/positiveInteger.rb
|
141
242
|
- lib/spira/types/string.rb
|
142
243
|
- lib/spira/types/uri.rb
|
143
244
|
- lib/spira/types.rb
|
245
|
+
- lib/spira/utils.rb
|
246
|
+
- lib/spira/validations/uniqueness.rb
|
247
|
+
- lib/spira/validations.rb
|
144
248
|
- lib/spira/version.rb
|
145
249
|
- lib/spira.rb
|
146
|
-
has_rdoc: yard
|
147
250
|
homepage: http://spira.rubyforge.org
|
148
|
-
licenses:
|
251
|
+
licenses:
|
149
252
|
- Public Domain
|
150
253
|
post_install_message:
|
151
254
|
rdoc_options: []
|
152
|
-
|
153
|
-
require_paths:
|
255
|
+
require_paths:
|
154
256
|
- lib
|
155
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
257
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
156
258
|
none: false
|
157
|
-
requirements:
|
158
|
-
- -
|
159
|
-
- !ruby/object:Gem::Version
|
160
|
-
|
161
|
-
|
162
|
-
- 8
|
163
|
-
- 2
|
164
|
-
version: 1.8.2
|
165
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
259
|
+
requirements:
|
260
|
+
- - ! '>='
|
261
|
+
- !ruby/object:Gem::Version
|
262
|
+
version: 1.9.2
|
263
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
166
264
|
none: false
|
167
|
-
requirements:
|
168
|
-
- -
|
169
|
-
- !ruby/object:Gem::Version
|
170
|
-
|
171
|
-
- 0
|
172
|
-
version: "0"
|
265
|
+
requirements:
|
266
|
+
- - ! '>='
|
267
|
+
- !ruby/object:Gem::Version
|
268
|
+
version: '0'
|
173
269
|
requirements: []
|
174
|
-
|
175
270
|
rubyforge_project: spira
|
176
|
-
rubygems_version: 1.
|
271
|
+
rubygems_version: 1.8.25
|
177
272
|
signing_key:
|
178
273
|
specification_version: 3
|
179
274
|
summary: A framework for using the information in RDF.rb repositories as model objects.
|
180
275
|
test_files: []
|
181
|
-
|
276
|
+
has_rdoc: yard
|