gemnasium-parser 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |gem|
4
4
  gem.name = "gemnasium-parser"
5
- gem.version = "0.1.6"
5
+ gem.version = "0.1.7"
6
6
 
7
7
  gem.authors = "Steve Richert"
8
8
  gem.email = "steve.richert@gmail.com"
@@ -1,7 +1,7 @@
1
1
  module Gemnasium
2
2
  module Parser
3
3
  module Patterns
4
- GEM_NAME = /[a-zA-Z0-9\-_]+/
4
+ GEM_NAME = /[a-zA-Z0-9\-_\.]+/
5
5
  QUOTED_GEM_NAME = /(?:(?<gq>["'])(?<name>#{GEM_NAME})\k<gq>|%q<(?<name>#{GEM_NAME})>)/
6
6
 
7
7
  MATCHER = /(?:=|!=|>|<|>=|<=|~>)/
@@ -43,6 +43,12 @@ describe Gemnasium::Parser::Gemfile do
43
43
  dependencies.size.should == 0
44
44
  end
45
45
 
46
+ it "parses gems with a period in the name" do
47
+ content(%(gem "pygment.rb", ">= 0.8.7"))
48
+ dependency.name.should == "pygment.rb"
49
+ dependency.requirement.should == ">= 0.8.7"
50
+ end
51
+
46
52
  it "parses non-requirement gems" do
47
53
  content(%(gem "rake"))
48
54
  dependency.name.should == "rake"
@@ -55,6 +55,16 @@ describe Gemnasium::Parser::Gemspec do
55
55
  dependencies.size.should == 0
56
56
  end
57
57
 
58
+ it "parses gems with a period in the name" do
59
+ content(<<-EOF)
60
+ Gem::Specification.new do |gem|
61
+ gem.add_dependency "pygment.rb", ">= 0.8.7"
62
+ end
63
+ EOF
64
+ dependency.name.should == "pygment.rb"
65
+ dependency.requirement.should == ">= 0.8.7"
66
+ end
67
+
58
68
  it "parses non-requirement gems" do
59
69
  content(<<-EOF)
60
70
  Gem::Specification.new do |gem|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gemnasium-parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-18 00:00:00.000000000 Z
12
+ date: 2012-10-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
16
- requirement: !ruby/object:Gem::Requirement
16
+ requirement: &70295486928120 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,15 +21,10 @@ dependencies:
21
21
  version: 0.8.7
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
27
- - - ! '>='
28
- - !ruby/object:Gem::Version
29
- version: 0.8.7
24
+ version_requirements: *70295486928120
30
25
  - !ruby/object:Gem::Dependency
31
26
  name: rspec
32
- requirement: !ruby/object:Gem::Requirement
27
+ requirement: &70295486927640 !ruby/object:Gem::Requirement
33
28
  none: false
34
29
  requirements:
35
30
  - - ~>
@@ -37,12 +32,7 @@ dependencies:
37
32
  version: '2.4'
38
33
  type: :development
39
34
  prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ~>
44
- - !ruby/object:Gem::Version
45
- version: '2.4'
35
+ version_requirements: *70295486927640
46
36
  description: Safely parse Gemfiles and gemspecs
47
37
  email: steve.richert@gmail.com
48
38
  executables: []
@@ -77,21 +67,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
77
67
  - - ! '>='
78
68
  - !ruby/object:Gem::Version
79
69
  version: '0'
80
- segments:
81
- - 0
82
- hash: 2307865923813949579
83
70
  required_rubygems_version: !ruby/object:Gem::Requirement
84
71
  none: false
85
72
  requirements:
86
73
  - - ! '>='
87
74
  - !ruby/object:Gem::Version
88
75
  version: '0'
89
- segments:
90
- - 0
91
- hash: 2307865923813949579
92
76
  requirements: []
93
77
  rubyforge_project:
94
- rubygems_version: 1.8.24
78
+ rubygems_version: 1.8.10
95
79
  signing_key:
96
80
  specification_version: 3
97
81
  summary: Safely parse Gemfiles and gemspecs