bundle_info 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
- # bundler_info
1
+ # bundle_info
2
2
 
3
- When exploring an existing Ruby project, the Gemfile or gemspec can be a good place to start. Sometimes there's a few gems you don't recognise. Rather than having to Google each one, bundle_info will show a summary of all the gems.
3
+ When exploring an existing Ruby project, the `Gemfile` or `.gemspec` can be a good place to start. Sometimes there's a few gems you don't recognise. Rather than having to Google for each one individually, just run `bundle_info` to show a short summary of them all.
4
+
5
+ Works with a `Gemfile` or `.gemspec`.
4
6
 
5
7
  ## Installation
6
8
 
@@ -11,6 +13,12 @@ When exploring an existing Ruby project, the Gemfile or gemspec can be a good pl
11
13
  $ cd some_project
12
14
  $ bundle_info
13
15
 
16
+ webby: *Webby* is a fantastic little website management system. It would be called a...
17
+ coderay: Fast and easy syntax highlighting for selected languages, written in Ruby. Co...
18
+ RedCloth: Textile parser for Ruby.
19
+ configuration: description: configuration kicks the ass
20
+ rdiscount: Fast Implementation of Gruber's Markdown in C
21
+
14
22
  ## Contributing
15
23
 
16
24
  1. Fork it
data/bin/bundle_info CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- #$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib')
3
+ $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib')
4
4
 
5
- require_relative '../lib/bundle_info'
5
+ require 'bundle_info'
6
6
 
7
7
  BundleInfo::CommandLine.invoke(ARGV)
data/bundler_info.gemspec CHANGED
@@ -18,6 +18,7 @@ Gem::Specification.new do |gem|
18
18
  gem.add_dependency "gemnasium-parser"
19
19
  gem.add_dependency "gems"
20
20
  gem.add_dependency "activesupport"
21
+ gem.add_dependency "colored"
21
22
  gem.add_development_dependency "rspec"
22
23
  gem.add_development_dependency "vcr"
23
24
  gem.add_development_dependency "webmock"
@@ -1,3 +1,3 @@
1
1
  module BundleInfo
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/lib/bundle_info.rb CHANGED
@@ -1,14 +1,13 @@
1
- require_relative "bundle_info/version"
1
+ require "bundle_info/version"
2
2
  require 'gemnasium/parser'
3
3
  require 'gems'
4
4
  require 'active_support/core_ext/string'
5
+ require 'colored'
5
6
 
6
7
  module BundleInfo
7
8
  class CommandLine
8
- def self.invoke(args)
9
- if args.any?
10
- target = args.first
11
- elsif Dir.glob('*.gemspec').any?
9
+ def self.invoke(args)
10
+ if Dir.glob('*.gemspec').any?
12
11
  gemspec_path = Dir.glob('*.gemspec').first
13
12
  gemspec = File.open(gemspec_path).read
14
13
  gems = Gemnasium::Parser::Gemspec.new(gemspec)
@@ -16,18 +15,14 @@ module BundleInfo
16
15
  gemfile = File.open('Gemfile').read
17
16
  gems = Gemnasium::Parser::Gemfile.new(gemfile)
18
17
  else
19
- puts "No Gemfile or gemspec found in current directory"
18
+ puts "No Gemfile or .gemspec found in current directory"
20
19
  exit
21
20
  end
22
-
23
21
  gems.dependencies.map do |dep|
24
22
  info = Gems.info dep.name
25
- puts "#{dep.name}: #{info['info'].truncate(80)}"
23
+ desc = info['info'].gsub(/\n/, '')
24
+ puts "#{dep.name}:".green + " #{desc.truncate(80)}"
26
25
  end
27
26
  end
28
27
  end
29
- end
30
-
31
-
32
-
33
-
28
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bundle_info
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
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-09-14 00:00:00.000000000 Z
12
+ date: 2012-09-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: gemnasium-parser
@@ -59,6 +59,22 @@ dependencies:
59
59
  - - ! '>='
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
+ - !ruby/object:Gem::Dependency
63
+ name: colored
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ type: :runtime
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
62
78
  - !ruby/object:Gem::Dependency
63
79
  name: rspec
64
80
  requirement: !ruby/object:Gem::Requirement