parsr 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (32) hide show
  1. data/.travis.yml +9 -0
  2. data/README.md +3 -1
  3. data/Rakefile +7 -0
  4. data/lib/parsr.rb +4 -23
  5. data/lib/parsr/rules.rb +15 -0
  6. data/lib/parsr/rules/all.rb +14 -0
  7. data/lib/parsr/{array_rule.rb → rules/array.rb} +2 -2
  8. data/lib/parsr/{constants_rule.rb → rules/constants.rb} +1 -1
  9. data/lib/parsr/{float_rule.rb → rules/float.rb} +3 -2
  10. data/lib/parsr/{hash_rule.rb → rules/hash.rb} +1 -1
  11. data/lib/parsr/{integer_rule.rb → rules/integer.rb} +3 -2
  12. data/lib/parsr/rules/numeric.rb +6 -0
  13. data/lib/parsr/{range_rule.rb → rules/range.rb} +2 -2
  14. data/lib/parsr/{raw_string_rule.rb → rules/raw_string.rb} +1 -1
  15. data/lib/parsr/rules/regexp.rb +40 -0
  16. data/lib/parsr/{string_rule.rb → rules/string.rb} +1 -1
  17. data/lib/parsr/{symbol_rule.rb → rules/symbol.rb} +1 -1
  18. data/lib/parsr/version.rb +1 -1
  19. data/parsr.gemspec +1 -0
  20. data/spec/parsr/{array_rule_spec.rb → rules/array_spec.rb} +1 -1
  21. data/spec/parsr/{constants_rule_spec.rb → rules/constants_spec.rb} +1 -1
  22. data/spec/parsr/{float_rule_spec.rb → rules/float_spec.rb} +5 -1
  23. data/spec/parsr/{hash_rule_spec.rb → rules/hash_spec.rb} +1 -1
  24. data/spec/parsr/{integer_rule_spec.rb → rules/integer_spec.rb} +12 -1
  25. data/spec/parsr/{range_rule_spec.rb → rules/range_spec.rb} +1 -1
  26. data/spec/parsr/{raw_string_rule_spec.rb → rules/raw_string_spec.rb} +2 -2
  27. data/spec/parsr/rules/regexp_spec.rb +46 -0
  28. data/spec/parsr/{string_rule_spec.rb → rules/string_spec.rb} +1 -1
  29. data/spec/parsr/{symbol_rule_spec.rb → rules/symbol_spec.rb} +1 -1
  30. data/spec/parsr_spec.rb +2 -2
  31. data/spec/spec_helper.rb +0 -1
  32. metadata +98 -57
@@ -0,0 +1,9 @@
1
+ rvm:
2
+ - 1.8.7 # (current default)
3
+ - 1.9.2
4
+ - 1.9.3
5
+ - rbx
6
+ - jruby
7
+ - ruby-head
8
+ - ree
9
+
data/README.md CHANGED
@@ -6,5 +6,7 @@ just as Python's [ast.literal_eval](http://docs.python.org/library/ast.html#ast.
6
6
  ## Example
7
7
 
8
8
  ```ruby
9
- Parsr.literal_eval(%q{ [1, "2", 3.4 => 5..6, foo: [7] ] })
9
+ Parsr.literal_eval(%q{ [1, "2", 3.4 => 5..6, foo: [7, bar: /(bb|[^b]{2})/ix] ] })
10
10
  ```
11
+
12
+ [![Build Status](https://secure.travis-ci.org/byroot/parsr.png)](http://travis-ci.org/byroot/parsr)
data/Rakefile CHANGED
@@ -1 +1,8 @@
1
1
  require "bundler/gem_tasks"
2
+ require 'rspec/core/rake_task'
3
+
4
+ desc 'Default: run specs.'
5
+ task :default => :spec
6
+
7
+ desc "Run specs"
8
+ RSpec::Core::RakeTask.new
@@ -3,18 +3,9 @@ require 'strscan'
3
3
  class Parsr
4
4
 
5
5
  BASE_PATH = File.expand_path(File.join(File.dirname(__FILE__), 'parsr'))
6
-
7
- autoload :ArrayRule, "#{BASE_PATH}/array_rule"
8
- autoload :ConstantsRule, "#{BASE_PATH}/constants_rule"
9
- autoload :FloatRule, "#{BASE_PATH}/float_rule"
10
- autoload :HashRule, "#{BASE_PATH}/hash_rule"
11
- autoload :IntegerRule, "#{BASE_PATH}/integer_rule"
12
- autoload :RangeRule, "#{BASE_PATH}/range_rule"
13
- autoload :RawStringRule, "#{BASE_PATH}/raw_string_rule"
14
- autoload :StringRule, "#{BASE_PATH}/string_rule"
15
- autoload :SymbolRule, "#{BASE_PATH}/symbol_rule"
16
- autoload :Token, "#{BASE_PATH}/token"
17
- autoload :VERSION, "#{BASE_PATH}/version"
6
+ autoload :Rules, "#{BASE_PATH}/rules"
7
+ autoload :Token, "#{BASE_PATH}/token"
8
+ autoload :VERSION, "#{BASE_PATH}/version"
18
9
 
19
10
  Error = Class.new(Exception)
20
11
  IllegalValue = Class.new(Error)
@@ -49,17 +40,7 @@ class Parsr
49
40
  class << self
50
41
 
51
42
  def literal_eval(string)
52
- @literal_parser ||= self.new(
53
- ArrayRule,
54
- HashRule,
55
- RangeRule,
56
- ConstantsRule,
57
- SymbolRule,
58
- FloatRule,
59
- IntegerRule,
60
- RawStringRule,
61
- StringRule
62
- )
43
+ @literal_parser ||= self.new(*Parsr::Rules::All)
63
44
  @literal_parser.parse(string)
64
45
  end
65
46
 
@@ -0,0 +1,15 @@
1
+ module Parsr::Rules
2
+ BASE_PATH = File.expand_path(File.join(File.dirname(__FILE__), 'rules'))
3
+ autoload :All, "#{BASE_PATH}/all"
4
+ autoload :Array, "#{BASE_PATH}/array"
5
+ autoload :Constants, "#{BASE_PATH}/constants"
6
+ autoload :Float, "#{BASE_PATH}/float"
7
+ autoload :Hash, "#{BASE_PATH}/hash"
8
+ autoload :Integer, "#{BASE_PATH}/integer"
9
+ autoload :Numeric, "#{BASE_PATH}/numeric"
10
+ autoload :Range, "#{BASE_PATH}/range"
11
+ autoload :Regexp, "#{BASE_PATH}/regexp"
12
+ autoload :RawString, "#{BASE_PATH}/raw_string"
13
+ autoload :String, "#{BASE_PATH}/string"
14
+ autoload :Symbol, "#{BASE_PATH}/symbol"
15
+ end
@@ -0,0 +1,14 @@
1
+ module Parsr::Rules
2
+ All = [
3
+ Parsr::Rules::Array,
4
+ Parsr::Rules::Hash,
5
+ Parsr::Rules::Range,
6
+ Parsr::Rules::Constants,
7
+ Parsr::Rules::Symbol,
8
+ Parsr::Rules::Float,
9
+ Parsr::Rules::Integer,
10
+ Parsr::Rules::Regexp,
11
+ Parsr::Rules::RawString,
12
+ Parsr::Rules::String
13
+ ]
14
+ end
@@ -1,4 +1,4 @@
1
- module Parsr::ArrayRule
1
+ module Parsr::Rules::Array
2
2
 
3
3
  class Unterminated < Parsr::SyntaxError
4
4
  message "unexpected '%{rest}', expecting ']'"
@@ -31,7 +31,7 @@ module Parsr::ArrayRule
31
31
 
32
32
  def parse_unclosed_hash(scanner, token, &block)
33
33
  hash = []
34
- while pair = Parsr::HashRule.parse_pair(scanner, token, &block)
34
+ while pair = Parsr::Rules::Hash.parse_pair(scanner, token, &block)
35
35
  token = nil
36
36
  hash << pair
37
37
  break unless scanner.scan(/\s*\,\s*/)
@@ -1,4 +1,4 @@
1
- module Parsr::ConstantsRule
1
+ module Parsr::Rules::Constants
2
2
 
3
3
  class << self
4
4
 
@@ -1,6 +1,7 @@
1
- module Parsr::FloatRule
1
+ module Parsr::Rules::Float
2
+ include Parsr::Rules::Numeric
2
3
 
3
- PATTERN = /[\-\+]?\d+\.\d+/
4
+ PATTERN = /#{SIGN}#{DIGITS}\.#{DIGITS}/
4
5
 
5
6
  class << self
6
7
 
@@ -1,4 +1,4 @@
1
- module Parsr::HashRule
1
+ module Parsr::Rules::Hash
2
2
 
3
3
  class MissingValue < Parsr::SyntaxError
4
4
  message "unexpected '%{rest}'"
@@ -1,6 +1,7 @@
1
- module Parsr::IntegerRule
1
+ module Parsr::Rules::Integer
2
+ include Parsr::Rules::Numeric
2
3
 
3
- PATTERN = /[\-\+]?\d+/
4
+ PATTERN = /#{SIGN}#{DIGITS}/
4
5
 
5
6
  class << self
6
7
 
@@ -0,0 +1,6 @@
1
+ module Parsr::Rules::Numeric
2
+
3
+ SIGN = /[\-\+]?/
4
+ DIGITS = /\d(?:[\d\_]*\d)?/
5
+
6
+ end
@@ -1,6 +1,6 @@
1
- module Parsr::RangeRule
1
+ module Parsr::Rules::Range
2
2
 
3
- NUMBER_PATTERN = Regexp.union(Parsr::FloatRule::PATTERN, Parsr::IntegerRule::PATTERN)
3
+ NUMBER_PATTERN = Regexp.union(Parsr::Rules::Float::PATTERN, Parsr::Rules::Integer::PATTERN)
4
4
  PATTERN = /(#{NUMBER_PATTERN})(\.{2,3})(#{NUMBER_PATTERN})/
5
5
 
6
6
  class << self
@@ -1,4 +1,4 @@
1
- module Parsr::RawStringRule
1
+ module Parsr::Rules::RawString
2
2
 
3
3
  class Unterminated < Parsr::SyntaxError
4
4
  message 'unterminated string meets end of file'
@@ -0,0 +1,40 @@
1
+ module Parsr::Rules::Regexp
2
+
3
+ OPTIONS = {
4
+ 'i' => Regexp::IGNORECASE,
5
+ 'm' => Regexp::MULTILINE,
6
+ 'x' => Regexp::EXTENDED,
7
+ }.freeze
8
+
9
+ class Unterminated < Parsr::SyntaxError
10
+ message 'unterminated regexp meets end of file'
11
+ end
12
+
13
+ class << self
14
+
15
+ def match(scanner)
16
+ if scanner.scan(/\//)
17
+ buffer = ''
18
+ while chunk = (parse_content(scanner) || parse_escape(scanner))
19
+ buffer << chunk
20
+ end
21
+ return Parsr::Token.new(Regexp.new(buffer, parse_options(scanner)))
22
+ end
23
+ end
24
+
25
+ def parse_content(scanner)
26
+ scanner.matched if scanner.scan(/[^\\\/]+/)
27
+ end
28
+
29
+ def parse_escape(scanner)
30
+ return scanner.matched if scanner.scan(%r{\\.})
31
+ end
32
+
33
+ def parse_options(scanner)
34
+ raise Unterminated.new(scanner) unless scanner.scan(/\/[imx]*/)
35
+ scanner.matched[1..-1].chars.map{ |o| OPTIONS[o] }.reduce(0) { |a, b| a | b }
36
+ end
37
+
38
+ end
39
+
40
+ end
@@ -1,4 +1,4 @@
1
- module Parsr::StringRule
1
+ module Parsr::Rules::String
2
2
 
3
3
  ESCAPED_CHARS = {'\n' => "\n", '\b' => "\b", '\f' => "\f", '\r' => "\r", '\t' => "\t"}
4
4
 
@@ -1,4 +1,4 @@
1
- module Parsr::SymbolRule
1
+ module Parsr::Rules::Symbol
2
2
 
3
3
  PATTERN = /\:[a-zA-Z_][0-9a-zA-Z_]*/
4
4
 
@@ -1,3 +1,3 @@
1
1
  class Parsr
2
- VERSION = '0.0.3'
2
+ VERSION = '0.0.4'
3
3
  end
@@ -17,4 +17,5 @@ Gem::Specification.new do |s|
17
17
  s.require_paths = ["lib"]
18
18
 
19
19
  s.add_development_dependency "rspec"
20
+ s.add_development_dependency "rake"
20
21
  end
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe Parsr::ArrayRule do
3
+ describe Parsr::Rules::Array do
4
4
  include_context 'rule'
5
5
 
6
6
  describe '.match' do
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe Parsr::ConstantsRule do
3
+ describe Parsr::Rules::Constants do
4
4
  include_context 'rule'
5
5
 
6
6
  describe '.match' do
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe Parsr::FloatRule do
3
+ describe Parsr::Rules::Float do
4
4
  include_context 'rule'
5
5
 
6
6
  describe '.match' do
@@ -21,6 +21,10 @@ describe Parsr::FloatRule do
21
21
  match('-42.42').value.should be == -42.42
22
22
  end
23
23
 
24
+ it 'should match floats with underscores for clarity' do
25
+ match('1_000.000_1').value.should be == 1_000.000_1
26
+ end
27
+
24
28
  end
25
29
 
26
30
  end
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe Parsr::HashRule do
3
+ describe Parsr::Rules::Hash do
4
4
  include_context 'rule'
5
5
 
6
6
  describe '.match' do
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe Parsr::IntegerRule do
3
+ describe Parsr::Rules::Integer do
4
4
  include_context 'rule'
5
5
 
6
6
  describe '.match' do
@@ -32,6 +32,17 @@ describe Parsr::IntegerRule do
32
32
  result.should_not be_a(Parsr::Token)
33
33
  end
34
34
 
35
+ it 'should match integers with containing an underscore for clarity' do
36
+ result = match('1_000')
37
+ result.should be_a Parsr::Token
38
+ result.value.should be == 1_000
39
+ end
40
+
41
+ it 'should not match integers with underscore prefix' do
42
+ result = match('_1_000')
43
+ result.should be_nil
44
+ end
45
+
35
46
  end
36
47
 
37
48
  end
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe Parsr::RangeRule do
3
+ describe Parsr::Rules::Range do
4
4
  include_context 'rule'
5
5
 
6
6
  describe '.match' do
@@ -1,7 +1,7 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  require 'spec_helper'
3
3
 
4
- describe Parsr::RawStringRule do
4
+ describe Parsr::Rules::RawString do
5
5
  include_context 'rule'
6
6
 
7
7
  describe '.match' do
@@ -45,7 +45,7 @@ describe Parsr::RawStringRule do
45
45
  it 'should raise an Parsr::RawStringRule::Unterminated if raw string is not terminated' do
46
46
  expect{
47
47
  match(%q{'bryan\\'s kitchen})
48
- }.to raise_error(Parsr::RawStringRule::Unterminated)
48
+ }.to raise_error(Parsr::Rules::RawString::Unterminated)
49
49
  end
50
50
 
51
51
  end
@@ -0,0 +1,46 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require 'spec_helper'
3
+
4
+ describe Parsr::Rules::Regexp do
5
+ include_context 'rule'
6
+
7
+ describe '.match' do
8
+
9
+ it 'should match an empty regexp' do
10
+ match(%q{//}).value.should be == //
11
+ end
12
+
13
+ it 'should match a simple regexp' do
14
+ match(%q{/foo/}).value.should be == /foo/
15
+ end
16
+
17
+ it 'should match a regexp wth space' do
18
+ match(%q{/foo bar/}).value.should be == /foo bar/
19
+ end
20
+
21
+ it 'should match a regexp containing a backslash' do
22
+ eval(%q{ /\\\\/}).should be == /\\/
23
+ match(%q{/\\\\/}).value.should be == /\\/
24
+ end
25
+
26
+ it 'should match a regexp containing a metacharacters' do
27
+ match(%q{/\d/}).value.should be == /\d/
28
+ end
29
+
30
+ it 'should match a regexp with options' do
31
+ match(%q{/\d/ix}).value.should be == /\d/ix
32
+ end
33
+
34
+ it 'should match a regexp containing an escaped slash' do
35
+ match(%q{/\//}).value.should be == /\//
36
+ end
37
+
38
+ it 'should raise an Parsr::RegexpRule::Unterminated if regexp is not terminated' do
39
+ expect{
40
+ match(%q{/\\/})
41
+ }.to raise_error(Parsr::Rules::Regexp::Unterminated)
42
+ end
43
+
44
+ end
45
+
46
+ end
@@ -1,7 +1,7 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  require 'spec_helper'
3
3
 
4
- describe Parsr::StringRule do
4
+ describe Parsr::Rules::String do
5
5
  include_context 'rule'
6
6
 
7
7
  describe '.match' do
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe Parsr::SymbolRule do
3
+ describe Parsr::Rules::Symbol do
4
4
  include_context 'rule'
5
5
 
6
6
  it 'should match identifiers' do
@@ -40,8 +40,8 @@ describe Parsr do
40
40
 
41
41
  it 'should be able to parse some complexes literals' do
42
42
  Parsr.literal_eval(%q{
43
- [1, "2", foo: {egg: 'spam', 'bar,' => true}, 3 => 4.2]
44
- }).should be == [1, "2", {:foo => {:egg => 'spam', 'bar,' => true}, 3 => 4.2}]
43
+ [1, "2", foo: {egg: /\\d+\\/\\\\/ix, 'bar,' => true}, 3 => 4.2]
44
+ }).should be == [1, "2", {:foo => {:egg => /\d+\/\\/ix, 'bar,' => true}, 3 => 4.2}]
45
45
  end
46
46
 
47
47
  it 'should be able to parse an array included in another array' do
@@ -1,5 +1,4 @@
1
1
  # -*- encoding: utf-8 -*-
2
- require File.dirname(__FILE__) + '/../lib/parsr'
3
2
  require 'rspec'
4
3
 
5
4
  RSpec.configure do |c|
metadata CHANGED
@@ -1,100 +1,141 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: parsr
3
- version: !ruby/object:Gem::Version
4
- version: 0.0.3
3
+ version: !ruby/object:Gem::Version
4
+ hash: 23
5
5
  prerelease:
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 4
10
+ version: 0.0.4
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - Jean Boussier
9
14
  autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
- date: 2011-11-14 00:00:00.000000000Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
17
+
18
+ date: 2012-01-03 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
15
21
  name: rspec
16
- requirement: &70119921863760 !ruby/object:Gem::Requirement
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
17
24
  none: false
18
- requirements:
19
- - - ! '>='
20
- - !ruby/object:Gem::Version
21
- version: '0'
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ hash: 3
29
+ segments:
30
+ - 0
31
+ version: "0"
22
32
  type: :development
33
+ version_requirements: *id001
34
+ - !ruby/object:Gem::Dependency
35
+ name: rake
23
36
  prerelease: false
24
- version_requirements: *70119921863760
25
- description: Parsr aim to provide a way to safely evaluate a ruby expression composed
26
- only with literals, just as Python's ast.literal_eval
27
- email:
37
+ requirement: &id002 !ruby/object:Gem::Requirement
38
+ none: false
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ hash: 3
43
+ segments:
44
+ - 0
45
+ version: "0"
46
+ type: :development
47
+ version_requirements: *id002
48
+ description: Parsr aim to provide a way to safely evaluate a ruby expression composed only with literals, just as Python's ast.literal_eval
49
+ email:
28
50
  - jean.boussier@gmail.com
29
51
  executables: []
52
+
30
53
  extensions: []
54
+
31
55
  extra_rdoc_files: []
32
- files:
56
+
57
+ files:
33
58
  - .gitignore
34
59
  - .rspec
60
+ - .travis.yml
35
61
  - Gemfile
36
62
  - LICENSE
37
63
  - README.md
38
64
  - Rakefile
39
65
  - lib/parsr.rb
40
- - lib/parsr/array_rule.rb
41
- - lib/parsr/constants_rule.rb
42
- - lib/parsr/float_rule.rb
43
- - lib/parsr/hash_rule.rb
44
- - lib/parsr/integer_rule.rb
45
- - lib/parsr/range_rule.rb
46
- - lib/parsr/raw_string_rule.rb
47
- - lib/parsr/string_rule.rb
48
- - lib/parsr/symbol_rule.rb
66
+ - lib/parsr/rules.rb
67
+ - lib/parsr/rules/all.rb
68
+ - lib/parsr/rules/array.rb
69
+ - lib/parsr/rules/constants.rb
70
+ - lib/parsr/rules/float.rb
71
+ - lib/parsr/rules/hash.rb
72
+ - lib/parsr/rules/integer.rb
73
+ - lib/parsr/rules/numeric.rb
74
+ - lib/parsr/rules/range.rb
75
+ - lib/parsr/rules/raw_string.rb
76
+ - lib/parsr/rules/regexp.rb
77
+ - lib/parsr/rules/string.rb
78
+ - lib/parsr/rules/symbol.rb
49
79
  - lib/parsr/token.rb
50
80
  - lib/parsr/version.rb
51
81
  - parsr.gemspec
52
- - spec/parsr/array_rule_spec.rb
53
- - spec/parsr/constants_rule_spec.rb
54
- - spec/parsr/float_rule_spec.rb
55
- - spec/parsr/hash_rule_spec.rb
56
- - spec/parsr/integer_rule_spec.rb
57
- - spec/parsr/range_rule_spec.rb
58
- - spec/parsr/raw_string_rule_spec.rb
59
- - spec/parsr/string_rule_spec.rb
60
- - spec/parsr/symbol_rule_spec.rb
82
+ - spec/parsr/rules/array_spec.rb
83
+ - spec/parsr/rules/constants_spec.rb
84
+ - spec/parsr/rules/float_spec.rb
85
+ - spec/parsr/rules/hash_spec.rb
86
+ - spec/parsr/rules/integer_spec.rb
87
+ - spec/parsr/rules/range_spec.rb
88
+ - spec/parsr/rules/raw_string_spec.rb
89
+ - spec/parsr/rules/regexp_spec.rb
90
+ - spec/parsr/rules/string_spec.rb
91
+ - spec/parsr/rules/symbol_spec.rb
61
92
  - spec/parsr_spec.rb
62
93
  - spec/spec_helper.rb
63
94
  - spec/support/rule_shared_context.rb
64
95
  homepage: https://github.com/byroot/parsr/
65
96
  licenses: []
97
+
66
98
  post_install_message:
67
99
  rdoc_options: []
68
- require_paths:
100
+
101
+ require_paths:
69
102
  - lib
70
- required_ruby_version: !ruby/object:Gem::Requirement
103
+ required_ruby_version: !ruby/object:Gem::Requirement
71
104
  none: false
72
- requirements:
73
- - - ! '>='
74
- - !ruby/object:Gem::Version
75
- version: '0'
76
- required_rubygems_version: !ruby/object:Gem::Requirement
105
+ requirements:
106
+ - - ">="
107
+ - !ruby/object:Gem::Version
108
+ hash: 3
109
+ segments:
110
+ - 0
111
+ version: "0"
112
+ required_rubygems_version: !ruby/object:Gem::Requirement
77
113
  none: false
78
- requirements:
79
- - - ! '>='
80
- - !ruby/object:Gem::Version
81
- version: '0'
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ hash: 3
118
+ segments:
119
+ - 0
120
+ version: "0"
82
121
  requirements: []
122
+
83
123
  rubyforge_project:
84
- rubygems_version: 1.8.6
124
+ rubygems_version: 1.8.10
85
125
  signing_key:
86
126
  specification_version: 3
87
127
  summary: Simple parser to safe eval ruby literals
88
- test_files:
89
- - spec/parsr/array_rule_spec.rb
90
- - spec/parsr/constants_rule_spec.rb
91
- - spec/parsr/float_rule_spec.rb
92
- - spec/parsr/hash_rule_spec.rb
93
- - spec/parsr/integer_rule_spec.rb
94
- - spec/parsr/range_rule_spec.rb
95
- - spec/parsr/raw_string_rule_spec.rb
96
- - spec/parsr/string_rule_spec.rb
97
- - spec/parsr/symbol_rule_spec.rb
128
+ test_files:
129
+ - spec/parsr/rules/array_spec.rb
130
+ - spec/parsr/rules/constants_spec.rb
131
+ - spec/parsr/rules/float_spec.rb
132
+ - spec/parsr/rules/hash_spec.rb
133
+ - spec/parsr/rules/integer_spec.rb
134
+ - spec/parsr/rules/range_spec.rb
135
+ - spec/parsr/rules/raw_string_spec.rb
136
+ - spec/parsr/rules/regexp_spec.rb
137
+ - spec/parsr/rules/string_spec.rb
138
+ - spec/parsr/rules/symbol_spec.rb
98
139
  - spec/parsr_spec.rb
99
140
  - spec/spec_helper.rb
100
141
  - spec/support/rule_shared_context.rb