activefacts-api 1.5.0 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/activefacts-api.gemspec +3 -3
- data/lib/activefacts/api/entity.rb +3 -1
- data/lib/activefacts/api/exceptions.rb +1 -1
- data/lib/activefacts/api/value.rb +5 -3
- data/lib/activefacts/tracer.rb +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e0575368e36de9bcdb5ccec88a51326b01714ba3
|
4
|
+
data.tar.gz: 429c0170ab64f042f7e5ea0a2f14cd2ef5695965
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e763cc4c8dee02074532ecd91289267d07e1b8f6c42e1eb5daa59b0dbbfdf1c9814673dac6fe05c0ca37f9b339755a68391cedd80939b844b3797589cb02818a
|
7
|
+
data.tar.gz: 11e8b5774f723d2d0817cc37fd4510bbb04248b41697d39a745314f7cec83cea2dfc3945e7a5def7846aa6e1a172555b8ceeae33c1ec529c9869bc172d3cd94f
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.6.0
|
data/activefacts-api.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: activefacts-api 1.
|
5
|
+
# stub: activefacts-api 1.6.0 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "activefacts-api"
|
9
|
-
s.version = "1.
|
9
|
+
s.version = "1.6.0"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
13
13
|
s.authors = ["Clifford Heath"]
|
14
|
-
s.date = "
|
14
|
+
s.date = "2015-02-24"
|
15
15
|
s.description = "\nThe ActiveFacts API is a Ruby DSL for managing constellations of elementary facts.\nEach fact is either existential (a value or an entity), characteristic (boolean) or\nbinary relational (A rel B). Relational facts are consistently co-referenced, so you\ncan traverse them efficiently in any direction. Each constellation maintains constraints\nover the fact population.\n"
|
16
16
|
s.email = "clifford.heath@gmail.com"
|
17
17
|
s.extra_rdoc_files = [
|
@@ -65,7 +65,7 @@ module ActiveFacts
|
|
65
65
|
|
66
66
|
class RoleNotDefinedException < RuntimeException
|
67
67
|
def initialize klass, role_name
|
68
|
-
super "Role #{klass.basename}.#{role_name} is not defined"
|
68
|
+
super "Role #{klass.basename}.#{role_name} is not defined in #{klass.all_role.keys.map(&:to_s).sort.inspect}"
|
69
69
|
end
|
70
70
|
end
|
71
71
|
|
@@ -114,10 +114,12 @@ module ActiveFacts
|
|
114
114
|
end
|
115
115
|
|
116
116
|
# Assign any extra roles that may have been passed.
|
117
|
-
|
118
|
-
|
117
|
+
# These assignments only take effect after the candidate object have been asserted.
|
118
|
+
# An exception here means the object is asserted but the role not assigned.
|
119
119
|
arg_hash.each do |k, v|
|
120
|
-
|
120
|
+
constellation.when_admitted {
|
121
|
+
instance.send(:"#{k}=", v)
|
122
|
+
}
|
121
123
|
end
|
122
124
|
|
123
125
|
instance
|
data/lib/activefacts/tracer.rb
CHANGED
@@ -31,6 +31,7 @@ module ActiveFacts
|
|
31
31
|
(
|
32
32
|
[ENV["DEBUG_PREFERENCE"]].compact +
|
33
33
|
[
|
34
|
+
'byebug',
|
34
35
|
'pry',
|
35
36
|
'debugger',
|
36
37
|
'ruby-debug'
|
@@ -39,6 +40,11 @@ module ActiveFacts
|
|
39
40
|
begin
|
40
41
|
require debugger
|
41
42
|
puts "Loaded "+debugger
|
43
|
+
if debugger == 'byebug'
|
44
|
+
Kernel.class_eval do
|
45
|
+
alias_method :byebug, :debugger
|
46
|
+
end
|
47
|
+
end
|
42
48
|
success = true
|
43
49
|
break
|
44
50
|
rescue LoadError => e
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activefacts-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Clifford Heath
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-02-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rbtree-pure
|