activefacts-api 1.9.11 → 1.9.12

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: 25d2b489a8eae8b845892def91b49758612dfdde
4
- data.tar.gz: 8682af38486aad1436f16503398a1e8d74915a61
3
+ metadata.gz: 6346c5f10c34f3343ad416c31974d71da2988671
4
+ data.tar.gz: e5e2e885e8d8ef9e4bad51aa9326e701f3e08d58
5
5
  SHA512:
6
- metadata.gz: 9506523f2552e1ae21b3e06f5c555b0bd5d99680e2d58b3f8bf6d13469e35193ee46119d9670dd2226f77c837e5a77730493a9f95f858d43402f065198b61c4c
7
- data.tar.gz: 45dd288ac6fa9b6eccddf7579aba79e7e3dee85d3e1149f49fc5e4ebd26745a2ccd89f567eaa188d02bb460a1b0819385f23a1e749188184dab6f35eeee52573
6
+ metadata.gz: c6271a0304e94e3f01ab06df9cd7d704e45e9d941a865ae57df51cf20d39e0ab56588f05410628981fa737f18c90c31910a0a53147049c92cd1b085788f5893a
7
+ data.tar.gz: c8a1d06f294b5fa414fe255e52bc0aebea991da8e8e3a2fb8aedb98e25e67350d4466a31f03e883ea41ef8814bcebc09122a1f297b4ba8da355986a5fc0581d7
@@ -35,7 +35,7 @@ over the fact population.
35
35
  spec.add_runtime_dependency 'tracing', ["~> 2", ">= 2.0.4"]
36
36
 
37
37
  spec.add_development_dependency "bundler", ">= 1.10"
38
- spec.add_development_dependency "rake", "~> 10.0"
38
+ spec.add_development_dependency "rake", "> 10"
39
39
  spec.add_development_dependency "rspec", "~> 3.3"
40
40
  end
41
41
 
@@ -390,6 +390,7 @@ module ActiveFacts
390
390
  unless role.is_identifying && role.object_type == self
391
391
  value =
392
392
  if v == nil
393
+ raise "nil value passed for mandatory #{role.name} of #{role.object_type.name}" if role.mandatory
393
394
  nil
394
395
  elsif role.unary?
395
396
  (v && true) # Preserve nil and false
@@ -1,11 +1,13 @@
1
1
  require 'delegate'
2
2
  require 'securerandom'
3
3
 
4
- def SecureRandom.format_uuid hex32
5
- hex32.sub(
6
- @@format_pattern ||= /(........)(....)(....)(....)(............)/,
7
- @@format_string ||= '\1-\2-\3-\4-\5'
8
- )
4
+ module SecureRandom
5
+ def self.format_uuid hex32
6
+ hex32.sub(
7
+ @@format_pattern ||= /(........)(....)(....)(....)(............)/,
8
+ @@format_string ||= '\1-\2-\3-\4-\5'
9
+ )
10
+ end
9
11
  end
10
12
 
11
13
  unless defined? SecureRandom.uuid
@@ -62,7 +62,7 @@ class Decimal < SimpleDelegator #:nodoc:
62
62
  include ActiveFacts::API::SimpleDelegation
63
63
 
64
64
  def delegate_new(v)
65
- if v.is_a?(BigDecimal) || v.is_a?(Bignum)
65
+ if v.is_a?(BigDecimal) || v.is_a?(Integer)
66
66
  BigDecimal.new(v.to_s)
67
67
  else
68
68
  BigDecimal.new(v)
@@ -17,7 +17,7 @@ module ActiveFacts
17
17
  module ValueClass #:nodoc:
18
18
  def value_type *args, &block #:nodoc:
19
19
  # The inclusion of instance methods triggers ClassMethods to be included in the class too
20
- include ActiveFacts::API::Value
20
+ include ::ActiveFacts::API::Value
21
21
  value_type(*args, &block)
22
22
  end
23
23
  end
@@ -1,5 +1,5 @@
1
1
  module ActiveFacts
2
2
  module API
3
- VERSION = "1.9.11"
3
+ VERSION = "1.9.12"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activefacts-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.11
4
+ version: 1.9.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Clifford Heath
@@ -68,16 +68,16 @@ dependencies:
68
68
  name: rake
69
69
  requirement: !ruby/object:Gem::Requirement
70
70
  requirements:
71
- - - "~>"
71
+ - - ">"
72
72
  - !ruby/object:Gem::Version
73
- version: '10.0'
73
+ version: '10'
74
74
  type: :development
75
75
  prerelease: false
76
76
  version_requirements: !ruby/object:Gem::Requirement
77
77
  requirements:
78
- - - "~>"
78
+ - - ">"
79
79
  - !ruby/object:Gem::Version
80
- version: '10.0'
80
+ version: '10'
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: rspec
83
83
  requirement: !ruby/object:Gem::Requirement
@@ -155,7 +155,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
155
155
  version: '0'
156
156
  requirements: []
157
157
  rubyforge_project:
158
- rubygems_version: 2.4.5
158
+ rubygems_version: 2.6.13
159
159
  signing_key:
160
160
  specification_version: 4
161
161
  summary: A fact-based data model DSL and API