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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 316e9f376011c7c35dbb2193672ddf50c1f342a3
4
- data.tar.gz: 7c2ffcd17765293e1e6068bc16b6421b567352c4
3
+ metadata.gz: e0575368e36de9bcdb5ccec88a51326b01714ba3
4
+ data.tar.gz: 429c0170ab64f042f7e5ea0a2f14cd2ef5695965
5
5
  SHA512:
6
- metadata.gz: a1231d0cc4b62f96cbce91002ec62fa8ac3f92cb76c31966527213b897deeb3d1c3bf2721b5bad087baa1a007b0b6fe23ae96bcf903ba5c862a2035ec3385bdb
7
- data.tar.gz: 62029a7903f490202b09aef180abcdc291923385efb05708ea25b8b3351ea3689eaf5025b9b07ce191a0caa3f6f013f50e6a3f5238578f38deae5b2e26bb76cd
6
+ metadata.gz: e763cc4c8dee02074532ecd91289267d07e1b8f6c42e1eb5daa59b0dbbfdf1c9814673dac6fe05c0ca37f9b339755a68391cedd80939b844b3797589cb02818a
7
+ data.tar.gz: 11e8b5774f723d2d0817cc37fd4510bbb04248b41697d39a745314f7cec83cea2dfc3945e7a5def7846aa6e1a172555b8ceeae33c1ec529c9869bc172d3cd94f
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.5.0
1
+ 1.6.0
@@ -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.0 ruby lib
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.5.0"
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 = "2014-12-09"
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 = [
@@ -390,7 +390,9 @@ module ActiveFacts
390
390
  else
391
391
  role.counterpart.object_type.assert_instance(constellation, Array(v))
392
392
  end
393
- instance.send(:"#{k}=", value)
393
+ constellation.when_admitted {
394
+ instance.send(:"#{k}=", value)
395
+ }
394
396
  end
395
397
  end
396
398
 
@@ -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
- # An exception here leaves the object as a candidate,
118
- # but without the offending role (re-)assigned.
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
- instance.send(:"#{k}=", v)
120
+ constellation.when_admitted {
121
+ instance.send(:"#{k}=", v)
122
+ }
121
123
  end
122
124
 
123
125
  instance
@@ -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.5.0
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: 2014-12-09 00:00:00.000000000 Z
11
+ date: 2015-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rbtree-pure