unific 0.10 → 0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/History.txt +7 -0
- data/README.rdoc +4 -4
- data/README.txt +4 -4
- data/examples/database.rb +5 -2
- data/lib/unific.rb +1 -1
- metadata +26 -25
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 0cffd941f46277c184647c88bea6f1f4109b19ff
|
4
|
+
data.tar.gz: 3f92e05f3920f8d3c547de271f9556987984ece6
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 6ec0c948ea62147038eb0f1d15ba82c7c1ac701acb0553c7af222e9359d3957d214a1a423173a5b15fa721fed486b5fb0817ba6e1d03355338c5e13d913d5bc8
|
7
|
+
data.tar.gz: 74d2195fe659a91cc25721684227e8ec75a8fa8550c17ed242ed0ca26c10edfd8945427dce0c665c64ed88f77e27677f0f63e6746b77a7cf8da15e36ed5d2677
|
data/History.txt
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
=== 0.11 / 2013-03-30
|
2
|
+
|
3
|
+
* Update database example to work with Ruby 1.9 (where hashes keep insertion
|
4
|
+
order).
|
5
|
+
|
6
|
+
* Minor documentation tweaks, including mentioning support for Ruby 2.0.0
|
7
|
+
|
1
8
|
=== 0.10 / 2012-01-30
|
2
9
|
|
3
10
|
* Added a simple example program -- a mock database using unification for
|
data/README.rdoc
CHANGED
@@ -12,7 +12,7 @@ Unific is a ruby unification engine.
|
|
12
12
|
|
13
13
|
A unification engine is an essential part of a logic programming environment
|
14
14
|
(the whole logic programming environment this is taken from is available as
|
15
|
-
the in-development Rulog[http://github.com/jimwise/rulog]
|
15
|
+
the in-development Rulog[http://github.com/jimwise/rulog] (Ruby With Logic)
|
16
16
|
gem), but can also be useful on its own as a pattern matching engine which
|
17
17
|
can enforce consistency across multiple matches.
|
18
18
|
|
@@ -20,7 +20,7 @@ can enforce consistency across multiple matches.
|
|
20
20
|
|
21
21
|
To get started, include this gem using
|
22
22
|
|
23
|
-
require 'rubygems'
|
23
|
+
require 'rubygems' # only need on Ruby 1.8.x, but harmless elsewhere
|
24
24
|
require 'unific'
|
25
25
|
|
26
26
|
This gem provides the Unific module. This module provides several methods
|
@@ -288,8 +288,8 @@ and generate the RDoc.
|
|
288
288
|
|
289
289
|
== REQUIREMENTS:
|
290
290
|
|
291
|
-
This gem is tested and should run fine under Ruby 1.8.7
|
292
|
-
experience any issues, please let me know.
|
291
|
+
This gem is tested and should run fine under Ruby 1.8.7, 1.9.x, or 2.0.x.
|
292
|
+
If you experience any issues, please let me know.
|
293
293
|
|
294
294
|
== LICENSE:
|
295
295
|
|
data/README.txt
CHANGED
@@ -12,7 +12,7 @@ Unific is a ruby unification engine.
|
|
12
12
|
|
13
13
|
A unification engine is an essential part of a logic programming environment
|
14
14
|
(the whole logic programming environment this is taken from is available as
|
15
|
-
the in-development Rulog[http://github.com/jimwise/rulog]
|
15
|
+
the in-development Rulog[http://github.com/jimwise/rulog] (Ruby With Logic)
|
16
16
|
gem), but can also be useful on its own as a pattern matching engine which
|
17
17
|
can enforce consistency across multiple matches.
|
18
18
|
|
@@ -20,7 +20,7 @@ can enforce consistency across multiple matches.
|
|
20
20
|
|
21
21
|
To get started, include this gem using
|
22
22
|
|
23
|
-
require 'rubygems'
|
23
|
+
require 'rubygems' # only need on Ruby 1.8.x, but harmless elsewhere
|
24
24
|
require 'unific'
|
25
25
|
|
26
26
|
This gem provides the Unific module. This module provides several methods
|
@@ -288,8 +288,8 @@ and generate the RDoc.
|
|
288
288
|
|
289
289
|
== REQUIREMENTS:
|
290
290
|
|
291
|
-
This gem is tested and should run fine under Ruby 1.8.7
|
292
|
-
experience any issues, please let me know.
|
291
|
+
This gem is tested and should run fine under Ruby 1.8.7, 1.9.x, or 2.0.x.
|
292
|
+
If you experience any issues, please let me know.
|
293
293
|
|
294
294
|
== LICENSE:
|
295
295
|
|
data/examples/database.rb
CHANGED
@@ -13,11 +13,14 @@ DATA = [
|
|
13
13
|
|
14
14
|
# q is a hash with one or more values filled in
|
15
15
|
def query q
|
16
|
-
q2 =
|
17
|
-
|
16
|
+
q2 = {}
|
17
|
+
# note that as of Ruby 1.9, order matters
|
18
|
+
KEYS.each {|k| q2[k] = q[k] = Unific::_}
|
18
19
|
r = DATA.select {|d| Unific::unify d, q2}
|
19
20
|
end
|
20
21
|
|
22
|
+
Unific::trace if ENV['UNIFIC_TRACE']
|
23
|
+
|
21
24
|
johns = query :first => "John"
|
22
25
|
forties = query :age => 40
|
23
26
|
john_forties = query :first => "John", :age => 40
|
data/lib/unific.rb
CHANGED
metadata
CHANGED
@@ -1,50 +1,51 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unific
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
5
|
-
prerelease:
|
4
|
+
version: '0.11'
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Jim Wise
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2013-03-30 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: rdoc
|
16
|
-
requirement:
|
17
|
-
none: false
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
18
16
|
requirements:
|
19
17
|
- - ~>
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '3.10'
|
22
20
|
type: :development
|
23
21
|
prerelease: false
|
24
|
-
version_requirements:
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '3.10'
|
25
27
|
- !ruby/object:Gem::Dependency
|
26
28
|
name: hoe
|
27
|
-
requirement:
|
28
|
-
none: false
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
29
30
|
requirements:
|
30
31
|
- - ~>
|
31
32
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
33
|
+
version: '3.5'
|
33
34
|
type: :development
|
34
35
|
prerelease: false
|
35
|
-
version_requirements:
|
36
|
-
|
37
|
-
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '3.5'
|
41
|
+
description: |-
|
42
|
+
Unific is a ruby unification engine.
|
38
43
|
|
39
44
|
A unification engine is an essential part of a logic programming environment
|
40
|
-
|
41
45
|
(the whole logic programming environment this is taken from is available as
|
42
|
-
|
43
|
-
the in-development Rulog[http://github.com/jimwise/rulog]] (Ruby With Logic)
|
44
|
-
|
46
|
+
the in-development Rulog[http://github.com/jimwise/rulog] (Ruby With Logic)
|
45
47
|
gem), but can also be useful on its own as a pattern matching engine which
|
46
|
-
|
47
|
-
can enforce consistency across multiple matches.'
|
48
|
+
can enforce consistency across multiple matches.
|
48
49
|
email:
|
49
50
|
- jwise@draga.com
|
50
51
|
executables: []
|
@@ -52,6 +53,7 @@ extensions: []
|
|
52
53
|
extra_rdoc_files:
|
53
54
|
- History.txt
|
54
55
|
- Manifest.txt
|
56
|
+
- README.rdoc
|
55
57
|
- README.txt
|
56
58
|
files:
|
57
59
|
- .autotest
|
@@ -66,29 +68,28 @@ files:
|
|
66
68
|
- .gemtest
|
67
69
|
homepage: https://github.com/jimwise/unific
|
68
70
|
licenses: []
|
71
|
+
metadata: {}
|
69
72
|
post_install_message:
|
70
73
|
rdoc_options:
|
71
74
|
- --main
|
72
|
-
- README.
|
75
|
+
- README.rdoc
|
73
76
|
require_paths:
|
74
77
|
- lib
|
75
78
|
required_ruby_version: !ruby/object:Gem::Requirement
|
76
|
-
none: false
|
77
79
|
requirements:
|
78
|
-
- -
|
80
|
+
- - '>='
|
79
81
|
- !ruby/object:Gem::Version
|
80
82
|
version: '0'
|
81
83
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
82
|
-
none: false
|
83
84
|
requirements:
|
84
|
-
- -
|
85
|
+
- - '>='
|
85
86
|
- !ruby/object:Gem::Version
|
86
87
|
version: '0'
|
87
88
|
requirements: []
|
88
89
|
rubyforge_project: unific
|
89
|
-
rubygems_version:
|
90
|
+
rubygems_version: 2.0.0
|
90
91
|
signing_key:
|
91
|
-
specification_version:
|
92
|
+
specification_version: 4
|
92
93
|
summary: Unific is a ruby unification engine
|
93
94
|
test_files:
|
94
95
|
- test/test_unific.rb
|