activefacts-api 1.3.1 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MDQ4NDI5MjZjODFjNWU0MTNlY2ZlMmQ1NmFhYzA2OGRlZjY2Y2IwZg==
4
+ Nzc4MDM2ZjYzMWUzMTgyOTRhZTNmN2U3YTI1MTdjZTM1MzA3YjViNg==
5
5
  data.tar.gz: !binary |-
6
- YTZhZDNmMmQ4OWQ2MDQzMDZkYjM5ZDY0MzFmY2JmZDBmYTI1OWU2MA==
6
+ Nzg3NGZmNGZhMzhmYzYwM2E2ZWVlNDc4ZTE0Njc2ODI4N2UxMzI4NA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YjU4YTg4OTc4MTNmMDUwYTRhNzQ0ZWM2NmNmZDI4MmUwYTUwOTViNzI2MjQ3
10
- OTNhZjk2NTIxNjM4YzEyYTc4MzUxMDE4MDRiNmNiZmUzYmQzNThiMTJlZTMz
11
- OWYwNGEyZmZjODVhNWY3YjlkY2JhYmNjOTc0OWQyMTNlOGFlNzU=
9
+ YjgxMDgwYzNlZGI1ZDg0ZDVjZTA0YzgwY2M4ODRkZjUzOTJhY2E4ZWVkZmJh
10
+ NThlYzNlYmEyZmNiNjAwMzhlMTU3MTJlZDJmOGMyODBmZDJlNDA2ZTg5MzFm
11
+ NzIwMDhhZjVmYzQzN2UwN2I1ZWI0MjdmNWNlZjIzMTRlOGU1MWQ=
12
12
  data.tar.gz: !binary |-
13
- OTM0YmNkMDEyMTJiNWVjOTMxYTQ1MDUzYzg5M2E3YzRkMzE1ODBkNzE4NDU5
14
- NjM4MjRiYTNlOWRkNDIzM2UzZjQ3MDA2MTFmY2QwYzEwZTQyM2I0YjJmODJh
15
- MWNlNTFkNjY4MTRlM2M0ZWIxOGFjZjIzMWI2ODI0NzExODk0MDI=
13
+ ZTAxOGM3YTY2YjFiZTMyMzIxNzU3N2VmMGI0NTQ5MjBlMTFjMWRjYTFjNDli
14
+ ZWNlYjNhM2RiNTY1NTQ2MTM1MjJiYzllNDllYzliM2VjZTJjN2M3ZTRjNGUy
15
+ ZDZlYzM0Y2ExMDI3MDYyZWUxZGIwNzMxMGY0MTAxZjQ5MDRmNjY=
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.3.1
1
+ 1.4.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.3.1 ruby lib
5
+ # stub: activefacts-api 1.4.0 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "activefacts-api"
9
- s.version = "1.3.1"
9
+ s.version = "1.4.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-09-09"
14
+ s.date = "2014-10-21"
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 = [
@@ -27,6 +27,11 @@ module ActiveFacts
27
27
  "KeyArray"+super
28
28
  end
29
29
 
30
+ # This is used by RBTree for searching, and we need it to use eql? semantics to be like a Hash
31
+ def ==(other)
32
+ self.eql? other
33
+ end
34
+
30
35
  def <=>(other)
31
36
  unless other.is_a?(Array) # Any kind of Array, not just KeyArray
32
37
  return 1
@@ -47,6 +47,10 @@ module ActiveFacts
47
47
  @sort ? @a.values : @a
48
48
  end
49
49
 
50
+ def to_ary
51
+ to_a
52
+ end
53
+
50
54
  def keys
51
55
  @sort ? @a.keys : @a
52
56
  end
@@ -28,7 +28,7 @@ class String #:nodoc:
28
28
  end
29
29
 
30
30
  def snakecase
31
- gsub(/([a-z])([A-Z])/,'\1_\2').downcase
31
+ gsub(/([^_])([A-Z][a-z])/,'\1_\2').downcase
32
32
  end
33
33
 
34
34
  def camelwords
@@ -327,7 +327,7 @@ describe "An Entity Type" do
327
327
  end
328
328
 
329
329
  it "should be in the constellation's index under the new identifier" do
330
- @c.Room.keys[0].should == [['Mackay'], @r.number]
330
+ @c.Room(['Mackay'], @r.number).should_not be_nil
331
331
  end
332
332
 
333
333
  it "should be included in the counterparts of the new identifier roles" do
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.3.1
4
+ version: 1.4.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-09-09 00:00:00.000000000 Z
11
+ date: 2014-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rbtree-pure