File tree 8 files changed +64
-13
lines changed
8 files changed +64
-13
lines changed Original file line number Diff line number Diff line change
1
+ --color
2
+ --format progress
Original file line number Diff line number Diff line change 1
1
# -*- encoding: utf-8 -*-
2
2
lib = File . expand_path ( '../lib' , __FILE__ )
3
3
$LOAD_PATH. unshift ( lib ) unless $LOAD_PATH. include? ( lib )
4
- require 'foy-ruby-parser /version'
4
+ require 'foy_ruby_parser /version'
5
5
6
6
Gem ::Specification . new do |gem |
7
- gem . name = "foy-ruby-parser "
7
+ gem . name = "foy_ruby_parser "
8
8
gem . version = Foy ::Ruby ::Parser ::VERSION
9
9
gem . authors = [ "Roberto Soares" ]
10
10
11
- gem . description = %q{TODO: Write a gem description }
12
- gem . summary = %q{TODO: Write a gem summary }
11
+ gem . summary = %q{Gemfile/gemspec parser used by foy-worker }
12
+ gem . description = %q{Gemfile/gemspec parser used by foy-worker }
13
13
gem . homepage = ""
14
14
15
15
gem . files = `git ls-files` . split ( $/)
16
16
gem . executables = gem . files . grep ( %r{^bin/} ) . map { |f | File . basename ( f ) }
17
17
gem . test_files = gem . files . grep ( %r{^(test|spec|features)/} )
18
18
gem . require_paths = [ "lib" ]
19
+
20
+ gem . add_dependency ( 'bundler' , '>= 1.3.1' )
21
+
22
+ gem . add_development_dependency ( 'rake' , '>= 10.0.3' )
23
+ gem . add_development_dependency ( 'rspec' , '>= 2.13.0' )
19
24
end
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ require "foy_ruby_parser/version"
2
+ require "bundler"
3
+
4
+ module Foy
5
+ module Ruby
6
+ module Parser
7
+ class << self
8
+ def parse ( file )
9
+ Bundler ::LockfileParser . new ( File . open ( file , 'r' ) . read )
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end
File renamed without changes.
Original file line number Diff line number Diff line change
1
+ Gemfile content
Original file line number Diff line number Diff line change
1
+ require 'spec_helper'
2
+
3
+ require 'foy_ruby_parser'
4
+
5
+ describe Foy ::Ruby ::Parser do
6
+
7
+ describe "#parse" do
8
+ context "Gemfile.lock" do
9
+ it "uses bundler parser" do
10
+ Bundler ::LockfileParser . should_receive ( :new ) . with ( "Gemfile content\n " ) . and_return ( nil )
11
+ Foy ::Ruby ::Parser . parse ( "spec/fixtures/Gemfile" )
12
+ end
13
+
14
+ it "returns current dependencies (name and version)" do
15
+ Foy ::Ruby ::Parser . parse ( "spec/fixtures/Gemfile.lock" ) . specs . collect { |d | [ d . name , d . version ] }
16
+ end
17
+ end
18
+
19
+ context "gemspec" #TODO
20
+ end
21
+ end
Original file line number Diff line number Diff line change
1
+ # This file was generated by the `rspec --init` command. Conventionally, all
2
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
3
+ # Require this file using `require "spec_helper"` to ensure that it is only
4
+ # loaded once.
5
+ #
6
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
7
+ RSpec . configure do |config |
8
+ config . treat_symbols_as_metadata_keys_with_true_values = true
9
+ config . run_all_when_everything_filtered = true
10
+ config . filter_run :focus
11
+
12
+ # Run specs in random order to surface order dependencies. If you find an
13
+ # order dependency and want to debug it, you can fix the order by providing
14
+ # the seed, which is printed after each run.
15
+ # --seed 1234
16
+ config . order = 'random'
17
+ end
You can’t perform that action at this time.
0 commit comments