sequitur 0.0.12 → 0.0.13
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 +8 -8
- data/CHANGELOG.md +3 -0
- data/lib/sequitur/constants.rb +1 -1
- data/lib/sequitur/dynamic_grammar.rb +1 -1
- data/lib/sequitur/production.rb +1 -2
- data/spec/sequitur/production_ref_spec.rb +6 -0
- data/spec/sequitur/production_spec.rb +18 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
N2UxOWM5ZGY4OGM2YzY1NzRiOWU5OTRlNjVhOTJhNGJmM2FiZTE0Nw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZGYzMTZhNjIwMTRhMWNmYTNiMWUyOTdkMTFkMjU0NTU2YmE0OWU4Mg==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MTdkNDI3MDMyMmRlOTNlOTViOGQ4ODY3YzdkMjY4MDJlNWJjNGQxZTllMTgx
|
10
|
+
MmIzZjA3MGVlNzRiNDU2NmJlYjFlNTZiYTlmOGE0YjFmYzY3NDYxOTk1Mzcy
|
11
|
+
YWYwMjljMjdkMmE0MGIzNjMyZThiYzJhMjA4NTA5ZDEwY2RkNDI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NTNmN2M5NTUyMjg2MTEyNDNhMjk2NWVmNDFiYmU0ZmVmM2E5NGIwZjM3MDRk
|
14
|
+
NjYwZTlhMWYyZjYzMjNiNzdlZWQyNmUwMzY2YTMxZTE0YjAwNDU1YmExNGU0
|
15
|
+
ODAzNjgzNzMyYzA5YzVmMmY2MjAxMTZiNWJkNTg1MzdiNzU4MjA=
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
### 0.0.13 / 2014-08-24
|
2
|
+
* [CHANGE] Test coverage for all classes but SequiturGrammar is 100%
|
3
|
+
|
1
4
|
### 0.0.12 / 2014-08-24
|
2
5
|
* [CHANGE] Significant internal refactoring.
|
3
6
|
* [CHANGE] Method `ObjectSpace::id2ref` is no more used => one obstacle to JRuby porting is removed.
|
data/lib/sequitur/constants.rb
CHANGED
data/lib/sequitur/production.rb
CHANGED
@@ -69,6 +69,12 @@ describe ProductionRef do
|
|
69
69
|
expect(target.refcount).to eq(0)
|
70
70
|
expect(another_target.refcount).to eq(1)
|
71
71
|
end
|
72
|
+
|
73
|
+
it 'should complain when binding to something else than production' do
|
74
|
+
subject.bind_to(target)
|
75
|
+
msg = "Illegal production type String"
|
76
|
+
expect {subject.bind_to('WRONG') }.to raise_error(StandardError, msg)
|
77
|
+
end
|
72
78
|
|
73
79
|
it 'should compare to other production (reference)' do
|
74
80
|
same = ProductionRef.new(target)
|
@@ -43,6 +43,24 @@ describe Production do
|
|
43
43
|
expect(subject.last_digram).to be_nil
|
44
44
|
end
|
45
45
|
end # context
|
46
|
+
|
47
|
+
context 'Provided services:' do
|
48
|
+
|
49
|
+
it 'should compare to another production' do
|
50
|
+
expect(p_a).to eq(p_a)
|
51
|
+
expect(p_a).not_to eq(p_bc)
|
52
|
+
end
|
53
|
+
|
54
|
+
it 'should compare to a production reference' do
|
55
|
+
ref_a = ProductionRef.new(p_a)
|
56
|
+
expect(p_a).to eq(ref_a)
|
57
|
+
expect(p_bc).not_to eq(ref_a)
|
58
|
+
|
59
|
+
ref_bc = ProductionRef.new(p_bc)
|
60
|
+
expect(p_a).not_to eq(ref_bc)
|
61
|
+
expect(p_bc).to eq(ref_bc)
|
62
|
+
end
|
63
|
+
end # context
|
46
64
|
|
47
65
|
context 'Knowing its rhs:' do
|
48
66
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sequitur
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dimitri Geshef
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-09-
|
11
|
+
date: 2014-09-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|