gherkin 2.7.6-x86-mswin32 → 2.7.7-x86-mswin32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. data/History.md +6 -0
  2. data/README.md +1 -1
  3. data/gherkin.gemspec +2 -2
  4. data/lib/1.8/gherkin_lexer_ar.so +0 -0
  5. data/lib/1.8/gherkin_lexer_bg.so +0 -0
  6. data/lib/1.8/gherkin_lexer_ca.so +0 -0
  7. data/lib/1.8/gherkin_lexer_cs.so +0 -0
  8. data/lib/1.8/gherkin_lexer_cy_gb.so +0 -0
  9. data/lib/1.8/gherkin_lexer_da.so +0 -0
  10. data/lib/1.8/gherkin_lexer_de.so +0 -0
  11. data/lib/1.8/gherkin_lexer_en.so +0 -0
  12. data/lib/1.8/gherkin_lexer_en_au.so +0 -0
  13. data/lib/1.8/gherkin_lexer_en_lol.so +0 -0
  14. data/lib/1.8/gherkin_lexer_en_pirate.so +0 -0
  15. data/lib/1.8/gherkin_lexer_en_scouse.so +0 -0
  16. data/lib/1.8/gherkin_lexer_en_tx.so +0 -0
  17. data/lib/1.8/gherkin_lexer_eo.so +0 -0
  18. data/lib/1.8/gherkin_lexer_es.so +0 -0
  19. data/lib/1.8/gherkin_lexer_et.so +0 -0
  20. data/lib/1.8/gherkin_lexer_fi.so +0 -0
  21. data/lib/1.8/gherkin_lexer_fr.so +0 -0
  22. data/lib/1.8/gherkin_lexer_he.so +0 -0
  23. data/lib/1.8/gherkin_lexer_hr.so +0 -0
  24. data/lib/1.8/gherkin_lexer_hu.so +0 -0
  25. data/lib/1.8/gherkin_lexer_id.so +0 -0
  26. data/lib/1.8/gherkin_lexer_is.so +0 -0
  27. data/lib/1.8/gherkin_lexer_it.so +0 -0
  28. data/lib/1.8/gherkin_lexer_ja.so +0 -0
  29. data/lib/1.8/gherkin_lexer_ko.so +0 -0
  30. data/lib/1.8/gherkin_lexer_lt.so +0 -0
  31. data/lib/1.8/gherkin_lexer_lu.so +0 -0
  32. data/lib/1.8/gherkin_lexer_lv.so +0 -0
  33. data/lib/1.8/gherkin_lexer_nl.so +0 -0
  34. data/lib/1.8/gherkin_lexer_no.so +0 -0
  35. data/lib/1.8/gherkin_lexer_pl.so +0 -0
  36. data/lib/1.8/gherkin_lexer_pt.so +0 -0
  37. data/lib/1.8/gherkin_lexer_ro.so +0 -0
  38. data/lib/1.8/gherkin_lexer_ru.so +0 -0
  39. data/lib/1.8/gherkin_lexer_sk.so +0 -0
  40. data/lib/1.8/gherkin_lexer_sr_cyrl.so +0 -0
  41. data/lib/1.8/gherkin_lexer_sr_latn.so +0 -0
  42. data/lib/1.8/gherkin_lexer_sv.so +0 -0
  43. data/lib/1.8/gherkin_lexer_tr.so +0 -0
  44. data/lib/1.8/gherkin_lexer_uk.so +0 -0
  45. data/lib/1.8/gherkin_lexer_uz.so +0 -0
  46. data/lib/1.8/gherkin_lexer_vi.so +0 -0
  47. data/lib/1.8/gherkin_lexer_zh_cn.so +0 -0
  48. data/lib/1.8/gherkin_lexer_zh_tw.so +0 -0
  49. data/lib/1.9/gherkin_lexer_ar.so +0 -0
  50. data/lib/1.9/gherkin_lexer_bg.so +0 -0
  51. data/lib/1.9/gherkin_lexer_ca.so +0 -0
  52. data/lib/1.9/gherkin_lexer_cs.so +0 -0
  53. data/lib/1.9/gherkin_lexer_cy_gb.so +0 -0
  54. data/lib/1.9/gherkin_lexer_da.so +0 -0
  55. data/lib/1.9/gherkin_lexer_de.so +0 -0
  56. data/lib/1.9/gherkin_lexer_en.so +0 -0
  57. data/lib/1.9/gherkin_lexer_en_au.so +0 -0
  58. data/lib/1.9/gherkin_lexer_en_lol.so +0 -0
  59. data/lib/1.9/gherkin_lexer_en_pirate.so +0 -0
  60. data/lib/1.9/gherkin_lexer_en_scouse.so +0 -0
  61. data/lib/1.9/gherkin_lexer_en_tx.so +0 -0
  62. data/lib/1.9/gherkin_lexer_eo.so +0 -0
  63. data/lib/1.9/gherkin_lexer_es.so +0 -0
  64. data/lib/1.9/gherkin_lexer_et.so +0 -0
  65. data/lib/1.9/gherkin_lexer_fi.so +0 -0
  66. data/lib/1.9/gherkin_lexer_fr.so +0 -0
  67. data/lib/1.9/gherkin_lexer_he.so +0 -0
  68. data/lib/1.9/gherkin_lexer_hr.so +0 -0
  69. data/lib/1.9/gherkin_lexer_hu.so +0 -0
  70. data/lib/1.9/gherkin_lexer_id.so +0 -0
  71. data/lib/1.9/gherkin_lexer_is.so +0 -0
  72. data/lib/1.9/gherkin_lexer_it.so +0 -0
  73. data/lib/1.9/gherkin_lexer_ja.so +0 -0
  74. data/lib/1.9/gherkin_lexer_ko.so +0 -0
  75. data/lib/1.9/gherkin_lexer_lt.so +0 -0
  76. data/lib/1.9/gherkin_lexer_lu.so +0 -0
  77. data/lib/1.9/gherkin_lexer_lv.so +0 -0
  78. data/lib/1.9/gherkin_lexer_nl.so +0 -0
  79. data/lib/1.9/gherkin_lexer_no.so +0 -0
  80. data/lib/1.9/gherkin_lexer_pl.so +0 -0
  81. data/lib/1.9/gherkin_lexer_pt.so +0 -0
  82. data/lib/1.9/gherkin_lexer_ro.so +0 -0
  83. data/lib/1.9/gherkin_lexer_ru.so +0 -0
  84. data/lib/1.9/gherkin_lexer_sk.so +0 -0
  85. data/lib/1.9/gherkin_lexer_sr_cyrl.so +0 -0
  86. data/lib/1.9/gherkin_lexer_sr_latn.so +0 -0
  87. data/lib/1.9/gherkin_lexer_sv.so +0 -0
  88. data/lib/1.9/gherkin_lexer_tr.so +0 -0
  89. data/lib/1.9/gherkin_lexer_uk.so +0 -0
  90. data/lib/1.9/gherkin_lexer_uz.so +0 -0
  91. data/lib/1.9/gherkin_lexer_vi.so +0 -0
  92. data/lib/1.9/gherkin_lexer_zh_cn.so +0 -0
  93. data/lib/1.9/gherkin_lexer_zh_tw.so +0 -0
  94. data/lib/gherkin/formatter/ansi_escapes.rb +2 -0
  95. data/lib/gherkin/i18n.rb +11 -11
  96. data/lib/gherkin/lexer/i18n_lexer.rb +0 -1
  97. data/spec/gherkin/formatter/ansi_escapes_spec.rb +19 -6
  98. data/spec/gherkin/json_parser_spec.rb +10 -6
  99. data/tasks/compile.rake +1 -1
  100. data/tasks/ragel_task.rb +12 -1
  101. metadata +26 -26
data/History.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## [2.7.7](https://github.com/cucumber/gherkin/compare/v2.7.6...v2.7.7)
2
+
3
+ * [C] Allow compilation with clang (datanoise)
4
+ * [Ruby] Expose AnsiEscapes methods on the class level as well, for easy calling without inclusion ([#161](https://github.com/cucumber/gherkin/pull/161) Ben Woosley)
5
+ * [Ruby] Lexer load failure fix ([#159](https://github.com/cucumber/gherkin/pull/159) Ben Woosley)
6
+
1
7
  ## [2.7.6](https://github.com/cucumber/gherkin/compare/v2.7.5...v2.7.6)
2
8
 
3
9
  * [Java] Previous release accidentally had pretty formatting for both JSONFormatter and JSONPrettyFormatter (Aslak Hellesøy)
data/README.md CHANGED
@@ -54,7 +54,7 @@ The jar file is in the central Maven repo.
54
54
  <dependency>
55
55
  <groupId>info.cukes</groupId>
56
56
  <artifactId>gherkin</artifactId>
57
- <version>2.7.6</version>
57
+ <version>2.7.7</version>
58
58
  </dependency>
59
59
 
60
60
  You can get it manually from [Maven Central](http://search.maven.org/#browse%7C-2073395818)
@@ -3,7 +3,7 @@
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "gherkin"
5
5
  # If bumping the major version here, comment out the cucumber dependency below and uncomment in the Gemfile to build against a local cucumber.
6
- s.version = "2.7.6"
6
+ s.version = "2.7.7"
7
7
  s.authors = ["Mike Sassak", "Gregory Hnatiuk", "Aslak Hellesøy"]
8
8
  s.description = "A fast Gherkin lexer/parser based on the Ragel State Machine Compiler."
9
9
  s.summary = "#{s.name}-#{s.version}"
@@ -55,7 +55,7 @@ Gem::Specification.new do |s|
55
55
  unless ENV['RUBY_CC_VERSION'] || defined?(JRUBY_VERSION)
56
56
  s.add_development_dependency('therubyracer', '>= 0.9.9') if ENV['GHERKIN_JS']
57
57
  # For Documentation:
58
- s.add_development_dependency('yard', '>= 0.7.4')
58
+ s.add_development_dependency('yard', '>= 0.7.5')
59
59
  s.add_development_dependency('rdiscount', '>= 1.6.8')
60
60
  end
61
61
 
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -90,6 +90,8 @@ module Gherkin
90
90
  def up(n)
91
91
  "\e[#{n}A"
92
92
  end
93
+
94
+ extend self
93
95
  end
94
96
  end
95
97
  end
@@ -4,6 +4,8 @@ require 'gherkin/native'
4
4
 
5
5
  module Gherkin
6
6
  class I18n
7
+ LexerNotFound = Class.new(LoadError)
8
+
7
9
  native_impl('gherkin') unless defined?(BYPASS_NATIVE_IMPL)
8
10
 
9
11
  FEATURE_ELEMENT_KEYS = %w{feature background scenario scenario_outline examples}
@@ -92,20 +94,18 @@ module Gherkin
92
94
  end
93
95
 
94
96
  def lexer(listener, force_ruby=false)
95
- begin
96
- if force_ruby
97
+ if force_ruby
98
+ rb(listener)
99
+ else
100
+ begin
101
+ c(listener)
102
+ rescue NameError, LoadError => e
103
+ warn("WARNING: #{e.message}. Reverting to Ruby lexer.")
97
104
  rb(listener)
98
- else
99
- begin
100
- c(listener)
101
- rescue NameError, LoadError => e
102
- warn("WARNING: #{e.message}. Reverting to Ruby lexer.")
103
- rb(listener)
104
- end
105
105
  end
106
- rescue LoadError => e
107
- raise I18nLexerNotFound, "No lexer was found for #{i18n_language_name} (#{e.message}). Supported languages are listed in gherkin/i18n.yml."
108
106
  end
107
+ rescue LoadError => e
108
+ raise LexerNotFound, "No lexer was found for #{iso_code} (#{e.message}). Supported languages are listed in gherkin/i18n.yml."
109
109
  end
110
110
 
111
111
  def c(listener)
@@ -3,7 +3,6 @@ require 'gherkin/native'
3
3
 
4
4
  module Gherkin
5
5
  module Lexer
6
- I18nLexerNotFound = Class.new(LoadError)
7
6
  LexingError = Class.new(StandardError)
8
7
 
9
8
  # The main entry point to lexing Gherkin source.
@@ -4,16 +4,29 @@ require 'gherkin/formatter/ansi_escapes'
4
4
  module Gherkin
5
5
  module Formatter
6
6
  describe AnsiEscapes do
7
- include Gherkin::Formatter::AnsiEscapes
7
+ describe "instance methods" do
8
+ include AnsiEscapes
8
9
 
9
- it "failed should be red" do
10
- failed.should == "\e[31m"
11
- end
10
+ it "failed should be red" do
11
+ failed.should == "\e[31m"
12
+ end
12
13
 
13
- it "failed arg should be red bold" do
14
- failed_arg.should == "\e[31m\e[1m"
14
+ it "failed_arg should be red bold" do
15
+ failed_arg.should == "\e[31m\e[1m"
16
+ end
15
17
  end
16
18
 
19
+ describe "class methods" do
20
+ subject { AnsiEscapes }
21
+
22
+ it "failed should be red" do
23
+ subject.failed.should == "\e[31m"
24
+ end
25
+
26
+ it "failed_arg should be red bold" do
27
+ subject.failed_arg.should == "\e[31m\e[1m"
28
+ end
29
+ end
17
30
  end
18
31
  end
19
32
  end
@@ -16,13 +16,17 @@ module Gherkin
16
16
  expected = JSON.parse(json)
17
17
  actual = JSON.parse(io.string)
18
18
 
19
- puts "EXPECTED"
20
- puts json
21
- puts "ACTUAL"
22
- puts io.string
23
- puts "======"
19
+ begin
20
+ actual.should == expected
21
+ rescue
22
+ puts "EXPECTED"
23
+ puts json
24
+ puts "ACTUAL"
25
+ puts io.string
26
+ puts "======"
24
27
 
25
- actual.should == expected
28
+ raise
29
+ end
26
30
  end
27
31
 
28
32
  xit "should parse a barely empty feature" do
@@ -81,7 +81,7 @@ langs.each do |i18n|
81
81
  io.write(<<-EOF)
82
82
  require 'mkmf'
83
83
  CONFIG['warnflags'].gsub!(/-Wshorten-64-to-32/, '') if CONFIG['warnflags']
84
- $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc/
84
+ $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc|clang/
85
85
  dir_config("gherkin_lexer_#{i18n.underscored_iso_code}")
86
86
  have_library("c", "main")
87
87
  create_makefile("gherkin_lexer_#{i18n.underscored_iso_code}")
@@ -19,7 +19,10 @@ class RagelTask
19
19
  end
20
20
 
21
21
  def define_tasks
22
- file target => [lang_ragel, common_ragel] do
22
+ deps = [lang_ragel, common_ragel]
23
+ deps.unshift(UGLIFYJS) if(@lang == 'js')
24
+
25
+ file target => deps do
23
26
  mkdir_p(File.dirname(target)) unless File.directory?(File.dirname(target))
24
27
  sh "ragel #{flags} #{lang_ragel} -o #{target}"
25
28
  if(@lang == 'js')
@@ -31,6 +34,14 @@ class RagelTask
31
34
  end
32
35
  end
33
36
 
37
+ file UGLIFYJS do
38
+ unless File.exist?(UGLIFYJS)
39
+ Dir.chdir('js') do
40
+ sh "npm link"
41
+ end
42
+ end
43
+ end
44
+
34
45
  file lang_ragel => lang_erb do
35
46
  write(ERB.new(IO.read(lang_erb)).result(binding), lang_ragel)
36
47
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gherkin
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.7.6
4
+ version: 2.7.7
5
5
  prerelease:
6
6
  platform: x86-mswin32
7
7
  authors:
@@ -11,11 +11,11 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2012-01-25 00:00:00.000000000 Z
14
+ date: 2012-02-08 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: json
18
- requirement: &2151899840 !ruby/object:Gem::Requirement
18
+ requirement: &2157826880 !ruby/object:Gem::Requirement
19
19
  none: false
20
20
  requirements:
21
21
  - - ! '>='
@@ -23,10 +23,10 @@ dependencies:
23
23
  version: 1.4.6
24
24
  type: :runtime
25
25
  prerelease: false
26
- version_requirements: *2151899840
26
+ version_requirements: *2157826880
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: cucumber
29
- requirement: &2151898940 !ruby/object:Gem::Requirement
29
+ requirement: &2157826400 !ruby/object:Gem::Requirement
30
30
  none: false
31
31
  requirements:
32
32
  - - ! '>='
@@ -34,10 +34,10 @@ dependencies:
34
34
  version: 1.1.4
35
35
  type: :development
36
36
  prerelease: false
37
- version_requirements: *2151898940
37
+ version_requirements: *2157826400
38
38
  - !ruby/object:Gem::Dependency
39
39
  name: rake
40
- requirement: &2151898080 !ruby/object:Gem::Requirement
40
+ requirement: &2157825940 !ruby/object:Gem::Requirement
41
41
  none: false
42
42
  requirements:
43
43
  - - ! '>='
@@ -45,10 +45,10 @@ dependencies:
45
45
  version: 0.9.2
46
46
  type: :development
47
47
  prerelease: false
48
- version_requirements: *2151898080
48
+ version_requirements: *2157825940
49
49
  - !ruby/object:Gem::Dependency
50
50
  name: bundler
51
- requirement: &2151896960 !ruby/object:Gem::Requirement
51
+ requirement: &2157825480 !ruby/object:Gem::Requirement
52
52
  none: false
53
53
  requirements:
54
54
  - - ! '>='
@@ -56,10 +56,10 @@ dependencies:
56
56
  version: 1.0.21
57
57
  type: :development
58
58
  prerelease: false
59
- version_requirements: *2151896960
59
+ version_requirements: *2157825480
60
60
  - !ruby/object:Gem::Dependency
61
61
  name: rspec
62
- requirement: &2151895160 !ruby/object:Gem::Requirement
62
+ requirement: &2157825020 !ruby/object:Gem::Requirement
63
63
  none: false
64
64
  requirements:
65
65
  - - ~>
@@ -67,10 +67,10 @@ dependencies:
67
67
  version: 2.7.0
68
68
  type: :development
69
69
  prerelease: false
70
- version_requirements: *2151895160
70
+ version_requirements: *2157825020
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: rubyzip
73
- requirement: &2151894300 !ruby/object:Gem::Requirement
73
+ requirement: &2157824560 !ruby/object:Gem::Requirement
74
74
  none: false
75
75
  requirements:
76
76
  - - ! '>='
@@ -78,10 +78,10 @@ dependencies:
78
78
  version: 0.9.5
79
79
  type: :development
80
80
  prerelease: false
81
- version_requirements: *2151894300
81
+ version_requirements: *2157824560
82
82
  - !ruby/object:Gem::Dependency
83
83
  name: therubyracer
84
- requirement: &2151893120 !ruby/object:Gem::Requirement
84
+ requirement: &2157824020 !ruby/object:Gem::Requirement
85
85
  none: false
86
86
  requirements:
87
87
  - - ! '>='
@@ -89,21 +89,21 @@ dependencies:
89
89
  version: 0.9.9
90
90
  type: :development
91
91
  prerelease: false
92
- version_requirements: *2151893120
92
+ version_requirements: *2157824020
93
93
  - !ruby/object:Gem::Dependency
94
94
  name: yard
95
- requirement: &2151892420 !ruby/object:Gem::Requirement
95
+ requirement: &2157823560 !ruby/object:Gem::Requirement
96
96
  none: false
97
97
  requirements:
98
98
  - - ! '>='
99
99
  - !ruby/object:Gem::Version
100
- version: 0.7.4
100
+ version: 0.7.5
101
101
  type: :development
102
102
  prerelease: false
103
- version_requirements: *2151892420
103
+ version_requirements: *2157823560
104
104
  - !ruby/object:Gem::Dependency
105
105
  name: rdiscount
106
- requirement: &2151891760 !ruby/object:Gem::Requirement
106
+ requirement: &2157823100 !ruby/object:Gem::Requirement
107
107
  none: false
108
108
  requirements:
109
109
  - - ! '>='
@@ -111,10 +111,10 @@ dependencies:
111
111
  version: 1.6.8
112
112
  type: :development
113
113
  prerelease: false
114
- version_requirements: *2151891760
114
+ version_requirements: *2157823100
115
115
  - !ruby/object:Gem::Dependency
116
116
  name: term-ansicolor
117
- requirement: &2151890500 !ruby/object:Gem::Requirement
117
+ requirement: &2157822640 !ruby/object:Gem::Requirement
118
118
  none: false
119
119
  requirements:
120
120
  - - ! '>='
@@ -122,10 +122,10 @@ dependencies:
122
122
  version: 1.0.6
123
123
  type: :development
124
124
  prerelease: false
125
- version_requirements: *2151890500
125
+ version_requirements: *2157822640
126
126
  - !ruby/object:Gem::Dependency
127
127
  name: builder
128
- requirement: &2151888640 !ruby/object:Gem::Requirement
128
+ requirement: &2157822180 !ruby/object:Gem::Requirement
129
129
  none: false
130
130
  requirements:
131
131
  - - ! '>='
@@ -133,7 +133,7 @@ dependencies:
133
133
  version: 2.1.2
134
134
  type: :development
135
135
  prerelease: false
136
- version_requirements: *2151888640
136
+ version_requirements: *2157822180
137
137
  description: A fast Gherkin lexer/parser based on the Ragel State Machine Compiler.
138
138
  email: cukes@googlegroups.com
139
139
  executables: []
@@ -389,7 +389,7 @@ rubyforge_project:
389
389
  rubygems_version: 1.8.10
390
390
  signing_key:
391
391
  specification_version: 3
392
- summary: gherkin-2.7.6
392
+ summary: gherkin-2.7.7
393
393
  test_files:
394
394
  - features/escaped_pipes.feature
395
395
  - features/feature_parser.feature