gemnasium-parser 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
data/.travis.yml CHANGED
@@ -1,3 +1,4 @@
1
1
  rvm:
2
2
  - 1.9.2
3
3
  - 1.9.3
4
+ - ruby-head
@@ -1,19 +1,19 @@
1
- # -*- encoding: utf-8 -*-
2
- require File.expand_path('../lib/gemnasium/parser/version', __FILE__)
1
+ # encoding: utf-8
3
2
 
4
3
  Gem::Specification.new do |gem|
5
- gem.authors = "Steve Richert"
6
- gem.email = "steve.richert@gmail.com"
7
- gem.description = "Safely parse Gemfiles and gemspecs"
8
- gem.summary = "Safely parse Gemfiles and gemspecs"
9
- gem.homepage = "https://github.com/laserlemon/gemnasium-parser"
4
+ gem.name = "gemnasium-parser"
5
+ gem.version = "0.1.5"
10
6
 
11
- gem.files = `git ls-files`.split("\n")
12
- gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
13
- gem.name = "gemnasium-parser"
14
- gem.require_paths = ["lib"]
15
- gem.version = Gemnasium::Parser::VERSION
7
+ gem.authors = "Steve Richert"
8
+ gem.email = "steve.richert@gmail.com"
9
+ gem.description = "Safely parse Gemfiles and gemspecs"
10
+ gem.summary = gem.description
11
+ gem.homepage = "https://github.com/laserlemon/gemnasium-parser"
16
12
 
17
13
  gem.add_development_dependency "rake", ">= 0.8.7"
18
14
  gem.add_development_dependency "rspec", "~> 2.4"
15
+
16
+ gem.files = `git ls-files`.split($\)
17
+ gem.test_files = gem.files.grep(/^spec\//)
18
+ gem.require_paths = ["lib"]
19
19
  end
@@ -25,7 +25,7 @@ module Gemnasium
25
25
  GEM_CALL = /^[ \t]*gem\(?[ \t]*#{QUOTED_GEM_NAME}(?:[ \t]*,[ \t]*#{REQUIREMENT_LIST})?(?:[ \t]*,[ \t]*(?<opts>#{OPTIONS}))?[ \t]*\)?[ \t]*#{COMMENT}$/
26
26
 
27
27
  SYMBOLS = /#{SYMBOL}([ \t]*,[ \t]*#{SYMBOL})*/
28
- GROUP_CALL = /^(?<i1>[ \t]*)group\(?[ \t]*(?<grps>#{SYMBOLS})[ \t]*\)?[ \t]+do[ \t]*?\n(?<blk>[^\n]*?)\n^\k<i1>end[ \t]*$/m
28
+ GROUP_CALL = /^(?<i1>[ \t]*)group\(?[ \t]*(?<grps>#{SYMBOLS})[ \t]*\)?[ \t]+do[ \t]*?\n(?<blk>.*?)\n^\k<i1>end[ \t]*$/m
29
29
 
30
30
  GIT_CALL = /^(?<i1>[ \t]*)git[ \(][^\n]*?do[ \t]*?\n(?<blk>.*?)\n^\k<i1>end[ \t]*$/m
31
31
 
@@ -145,6 +145,28 @@ describe Gemnasium::Parser::Gemfile do
145
145
  dependency.groups.should == [:development, :test]
146
146
  end
147
147
 
148
+ it "parses multiple gems in a group" do
149
+ content(<<-EOF)
150
+ group :development do
151
+ gem "rake"
152
+ gem "sqlite3"
153
+ end
154
+ EOF
155
+ dependencies[0].groups.should == [:development]
156
+ dependencies[1].groups.should == [:development]
157
+ end
158
+
159
+ it "parses multiple gems in multiple groups" do
160
+ content(<<-EOF)
161
+ group :development, :test do
162
+ gem "rake"
163
+ gem "sqlite3"
164
+ end
165
+ EOF
166
+ dependencies[0].groups.should == [:development, :test]
167
+ dependencies[1].groups.should == [:development, :test]
168
+ end
169
+
148
170
  it "ignores h4x" do
149
171
  path = File.expand_path("../h4x.txt", __FILE__)
150
172
  content(%(gem "h4x", :require => "\#{`touch #{path}`}"))
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.4
4
+ version: 0.1.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-03-23 00:00:00.000000000 Z
12
+ date: 2012-04-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -61,7 +61,6 @@ files:
61
61
  - lib/gemnasium/parser/gemfile.rb
62
62
  - lib/gemnasium/parser/gemspec.rb
63
63
  - lib/gemnasium/parser/patterns.rb
64
- - lib/gemnasium/parser/version.rb
65
64
  - spec/gemnasium/parser/gemfile_spec.rb
66
65
  - spec/gemnasium/parser/gemspec_spec.rb
67
66
  - spec/gemnasium/parser_spec.rb
@@ -1,5 +0,0 @@
1
- module Gemnasium
2
- module Parser
3
- VERSION = "0.1.4"
4
- end
5
- end