jsgf 0.2 → 0.2.1

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: fdf13c6642d0aa9a9faaa005d72563af8151ac68
4
- data.tar.gz: 3014db9c26234c9744262e9c50a0198c9c81b466
3
+ metadata.gz: e5f37d8d1978f31b192515183e6be841c83f4dc4
4
+ data.tar.gz: 3179b3009527599016cafec61255e4d38003f841
5
5
  SHA512:
6
- metadata.gz: 140f2abe3f92727e630bf4aab4e4f33ba92afa09fc57e38f2e50d6669769a60fdc23ef0aa6c2565fa68b925874bffbec645507f6fd4afdc10500c3272293e907
7
- data.tar.gz: aae7b624c87f88c923a2d6db6bb8e63ea6963860d50178cfb0b5128a74b4aee223abef8754343db1e725af6bff5ba93a6c124bbae0b08a0cad070d0069154825
6
+ metadata.gz: 17d0b2333de1dd3ee537f091b79fe4aaa44eec199528c14af461a328fbd009ee5f5976187bfc6c7a6a3d077c41d8bedaaf782760d653bec7503bd3e89196beaf
7
+ data.tar.gz: f9f966bd54797f0aa5e49fbe60b5ebd015d9dc9ea3f755ea2053add15a6a83fe2910a2231875309b8409a58750ce8d0d77d6142931f16984b8697cfb55f1f5b5
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- Jsgf
1
+ JSGF
2
2
  ====
3
3
 
4
4
  [![Build Status](https://travis-ci.org/bfoz/jsgf-ruby.png)](https://travis-ci.org/bfoz/jsgf-ruby)
data/jsgf.gemspec CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "jsgf"
7
- spec.version = '0.2'
7
+ spec.version = '0.2.1'
8
8
  spec.authors = ["Brandon Fosdick"]
9
9
  spec.email = ["bfoz@bfoz.net"]
10
10
  spec.summary = %q{Java Speech Grammar Format}
data/lib/jsgf/grammar.rb CHANGED
@@ -32,7 +32,7 @@ module JSGF
32
32
  "public <#{name}> = #{atoms};"
33
33
  end
34
34
 
35
- [header, grammar_header, *public_rule_array, *private_rule_array].join('\n')
35
+ [header, grammar_header, *public_rule_array, *private_rule_array].join("\n")
36
36
  end
37
37
 
38
38
  private
data/test/jsgf/grammar.rb CHANGED
@@ -4,63 +4,63 @@ require 'jsgf/parser'
4
4
  describe JSGF::Grammar do
5
5
  it 'must unparse a header' do
6
6
  grammar = JSGF::Parser.new('#JSGF; grammar header_grammar;').parse
7
- grammar.to_s.must_equal '#JSGF;\ngrammar header_grammar;'
7
+ grammar.to_s.must_equal "#JSGF;\ngrammar header_grammar;"
8
8
  end
9
9
 
10
10
  it 'must unparse a header with a version' do
11
11
  grammar = JSGF::Parser.new('#JSGF V1.0; grammar header_grammar;').parse
12
- grammar.to_s.must_equal '#JSGF V1.0;\ngrammar header_grammar;'
12
+ grammar.to_s.must_equal "#JSGF V1.0;\ngrammar header_grammar;"
13
13
  end
14
14
 
15
15
  it 'must unparse a header with a version and a character encoding' do
16
16
  grammar = JSGF::Parser.new('#JSGF V1.0 ENCODING; grammar header_grammar;').parse
17
- grammar.to_s.must_equal '#JSGF V1.0 ENCODING;\ngrammar header_grammar;'
17
+ grammar.to_s.must_equal "#JSGF V1.0 ENCODING;\ngrammar header_grammar;"
18
18
  end
19
19
 
20
20
  it 'must unparse a simple rule' do
21
21
  grammar = JSGF::Parser.new('#JSGF V1.0; grammar header_grammar;<rule>=one;').parse
22
- grammar.to_s.must_equal '#JSGF V1.0;\ngrammar header_grammar;\n<rule> = one;'
22
+ grammar.to_s.must_equal "#JSGF V1.0;\ngrammar header_grammar;\n<rule> = one;"
23
23
  end
24
24
 
25
25
  it 'must unparse a public rule' do
26
26
  grammar = JSGF::Parser.new('#JSGF V1.0; grammar header_grammar;public <rule>=one;').parse
27
- grammar.to_s.must_equal '#JSGF V1.0;\ngrammar header_grammar;\npublic <rule> = one;'
27
+ grammar.to_s.must_equal "#JSGF V1.0;\ngrammar header_grammar;\npublic <rule> = one;"
28
28
  end
29
29
 
30
30
  it 'must unparse a multi-atom rule' do
31
31
  grammar = JSGF::Parser.new('#JSGF V1.0; grammar header_grammar;<rule>=one two;').parse
32
- grammar.to_s.must_equal '#JSGF V1.0;\ngrammar header_grammar;\n<rule> = one two;'
32
+ grammar.to_s.must_equal "#JSGF V1.0;\ngrammar header_grammar;\n<rule> = one two;"
33
33
  end
34
34
 
35
35
  it 'must unparse a multi-atom optional' do
36
36
  grammar = JSGF::Parser.new('#JSGF V1.0; grammar header_grammar;<rule>=[one two];').parse
37
- grammar.to_s.must_equal '#JSGF V1.0;\ngrammar header_grammar;\n<rule> = [one two];'
37
+ grammar.to_s.must_equal "#JSGF V1.0;\ngrammar header_grammar;\n<rule> = [one two];"
38
38
  end
39
39
 
40
40
  it 'must unparse an alternation' do
41
41
  grammar = JSGF::Parser.new('#JSGF V1.0; grammar header_grammar;<rule>=one | two;').parse
42
- grammar.to_s.must_equal '#JSGF V1.0;\ngrammar header_grammar;\n<rule> = one | two;'
42
+ grammar.to_s.must_equal "#JSGF V1.0;\ngrammar header_grammar;\n<rule> = one | two;"
43
43
  end
44
44
 
45
45
  it 'must unparse an optional alternation' do
46
46
  grammar = JSGF::Parser.new('#JSGF V1.0; grammar header_grammar;<rule>=[one | two];').parse
47
- grammar.to_s.must_equal '#JSGF V1.0;\ngrammar header_grammar;\n<rule> = [one | two];'
47
+ grammar.to_s.must_equal "#JSGF V1.0;\ngrammar header_grammar;\n<rule> = [one | two];"
48
48
  end
49
49
 
50
50
  it 'must unparse an alternation with a nested group' do
51
51
  grammar = JSGF::Parser.new('#JSGF V1.0; grammar header_grammar;<rule>=(one two) | three;').parse
52
- grammar.to_s.must_equal '#JSGF V1.0;\ngrammar header_grammar;\n<rule> = (one two) | three;'
52
+ grammar.to_s.must_equal "#JSGF V1.0;\ngrammar header_grammar;\n<rule> = (one two) | three;"
53
53
  end
54
54
 
55
55
  describe 'when unparsing rule references' do
56
56
  it 'must unparse a rule reference' do
57
57
  grammar = JSGF::Parser.new('#JSGF V1.0; grammar header_grammar;<rule>=(one <rule2>) | three; <rule2>=two;').parse
58
- grammar.to_s.must_equal '#JSGF V1.0;\ngrammar header_grammar;\n<rule> = (one <rule2>) | three;\n<rule2> = two;'
58
+ grammar.to_s.must_equal "#JSGF V1.0;\ngrammar header_grammar;\n<rule> = (one <rule2>) | three;\n<rule2> = two;"
59
59
  end
60
60
 
61
61
  it 'must unparse a weighted rule reference' do
62
62
  grammar = JSGF::Parser.new('#JSGF V1.0; grammar header_grammar;<rule>= /0.5/ one | /0.5/ <rule2>; <rule2>=two;').parse
63
- grammar.to_s.must_equal '#JSGF V1.0;\ngrammar header_grammar;\n<rule> = /0.5/ one | /0.5/ <rule2>;\n<rule2> = two;'
63
+ grammar.to_s.must_equal "#JSGF V1.0;\ngrammar header_grammar;\n<rule> = /0.5/ one | /0.5/ <rule2>;\n<rule2> = two;"
64
64
  end
65
65
  end
66
66
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jsgf
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.2'
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Fosdick