grub 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 306499cfdaa4d796bba7cfcb5104912e73db4601
4
- data.tar.gz: a7ba997f3eaba6b7339625e2f8b34fe16fcedc4d
3
+ metadata.gz: 7c7a1f210bf90d85627851cf147ba42e702ad20b
4
+ data.tar.gz: a3ba8f5768e9e296da9b2009e2dd6fc4d2ae75fa
5
5
  SHA512:
6
- metadata.gz: e67ad918f019680c8adf272258be4cf2d6188ca07481192a0d49db465295fe9fcb0ea3c0cb6c3aaf171722dd616e95d0d4b2ce5e4e37f4b41d6c6271fb15b8e8
7
- data.tar.gz: 20b025bdd744295afebb01347d92881a72155d340e839a0fb73b99f8e4dd48e4f3048ea11da7e98b1290f5dd33eac94ad2763180de72f54e17a8df9fede16c9a
6
+ metadata.gz: 007a117427640980f7d9c90bea70ba8bb0ff51edf3302dad429aed87255d75dddae51a1d40f1b4765c1707862539fd7dc4cc500654a75c0d8889244f046bbc40
7
+ data.tar.gz: 0bd248d1b8a94cc4afe7b49a9e1ad42d841befdff0147359be11bec2d647ea42820f800a50587abf1087bcbedc44de6d53f37a1f88e65b754ebc2bbf8237596f
data/README.md CHANGED
@@ -1,66 +1 @@
1
- # Grub
2
-
3
- `grub` is command line tool that will add useful comments to your Gemfile. For each gem, `grub` will create a comment with the gem's description and the gem's website. For example, a Gemfile containing the following
4
-
5
- ```ruby
6
- gem "rails"
7
- gem "nokogiri"
8
- gem "brakeman"
9
- ```
10
-
11
- will be converted into something that is more descriptive and is self-documenting:
12
-
13
- ```ruby
14
- # Full-stack web application framework. (http://www.rubyonrails.org)
15
- gem "rails"
16
- # Nokogiri (鋸) is an HTML, XML, SAX, and Reader parser (http://nokogiri.org)
17
- gem "nokogiri"
18
- # Security vulnerability scanner for Ruby on Rails. (http://brakemanscanner.org)
19
- gem "brakeman"
20
- ```
21
-
22
- The motivation for `grub` is that developers often open a Gemfile and not know what many of the listed gems are actually for. It's hard to track down which gem is providing which functionality. This is a common problem since many gem names do not reflect the actual feature.
23
-
24
- ## Installation
25
-
26
- ```
27
- $ gem install grub
28
- ```
29
-
30
- ## Usage
31
-
32
- Running `grub` itself will add comments to the current directory's `Gemfile`.
33
-
34
- ```
35
- $ cat Gemfile
36
- source 'https://rubygems.org'
37
-
38
- # Specify your gem's dependencies in grub.gemspec
39
- gemspec
40
-
41
- gem "pry"
42
- $ grub
43
- $ cat Gemfile
44
- source 'https://rubygems.org'
45
-
46
- # Specify your gem's dependencies in grub.gemspec
47
- gemspec
48
-
49
- # An IRB alternative and runtime developer console (http://pryrepl.org)
50
- gem "pry"
51
- ```
52
-
53
- `grub` has several options and you can see them via `grub -h`. `grub` also works with specifying a single gem name:
54
-
55
- ```
56
- $ grub aasm
57
- State machine mixin for Ruby objects (https://github.com/aasm/aasm)
58
- ```
59
-
60
- ## Contributing
61
-
62
- 1. Fork it ( https://github.com/ivantsepp/grub/fork )
63
- 2. Create your feature branch (`git checkout -b my-new-feature`)
64
- 3. Commit your changes (`git commit -am 'Add some feature'`)
65
- 4. Push to the branch (`git push origin my-new-feature`)
66
- 5. Create a new Pull Request
1
+ This project has moved to https://github.com/ivantsepp/annotate_gem!
data/bin/grub CHANGED
@@ -5,4 +5,5 @@ $:.unshift(File.join(File.dirname(__FILE__), "../lib"))
5
5
  require "grub/cli"
6
6
  require "grub"
7
7
 
8
+ warn "This project has been renamed to annotate_gem. Please see https://github.com/ivantsepp/annotate_gem and https://rubygems.org/gems/annotate_gem"
8
9
  Grub::CLI.new.run(ARGV)
@@ -10,12 +10,17 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["ivan.tse1@gmail.com"]
11
11
  spec.summary = Grub::DESCRIPTION
12
12
  spec.description = <<-DESCRIPTION.gsub(/^\s+/, "").gsub(/\n/, " ")
13
- Clarify your dependencies by adding a detailed comment to each line in Gemfile specifying the
14
- gem's summary and its website if any.
13
+ This project has been renamed to annotate_gem. Please go to https://rubygems.org/gems/annotate_gem.
15
14
  DESCRIPTION
16
- spec.homepage = "https://github.com/ivantsepp/grub"
15
+ spec.homepage = "https://github.com/ivantsepp/annotate_gem"
17
16
  spec.license = "MIT"
18
17
 
18
+ spec.post_install_message = <<-MESSAGE
19
+ ! The 'grub' gem has been deprecated and has been replaced by 'annotate_gem'.
20
+ ! See: https://rubygems.org/gems/annotate_gem
21
+ ! And: https://github.com/ivantsepp/annotate_gem
22
+ MESSAGE
23
+
19
24
  spec.files = `git ls-files -z`.split("\x0")
20
25
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
21
26
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
@@ -3,12 +3,13 @@ module Grub
3
3
 
4
4
  attr_accessor :name, :original_line, :location, :prev_line_comment, :spec, :options
5
5
 
6
- def initialize(name:, original_line: nil, location: nil, prev_line_comment: nil, options: {})
7
- @name = name
8
- @original_line = original_line
9
- @location = location
10
- @prev_line_comment = prev_line_comment
11
- @options = options
6
+ def initialize(*args)
7
+ named_params = args.last.respond_to?(:[]) && args.last
8
+ @name = (named_params && named_params[:name]) || args[0]
9
+ @original_line = (named_params && named_params[:original_line]) || args[1]
10
+ @location = (named_params && named_params[:location]) || args[2]
11
+ @prev_line_comment = (named_params && named_params[:prev_line_comment]) || args[3]
12
+ @options = (named_params && named_params[:options]) || named_params
12
13
  end
13
14
 
14
15
  def comment
@@ -1,4 +1,4 @@
1
1
  module Grub
2
- VERSION = "0.0.7".freeze
2
+ VERSION = "0.0.8".freeze
3
3
  DESCRIPTION = "Add comments to your Gemfile with each dependency's description.".freeze
4
4
  end
@@ -1,6 +1,6 @@
1
1
  source "https://rubygems.org"
2
2
 
3
- # Full-stack web application framework. (http://www.rubyonrails.org)
3
+ # Full-stack web application framework. (http://rubyonrails.org)
4
4
  gem 'rails', '4.2.1'
5
5
  # This module allows Ruby programs to interface with the SQLite3 database engine (http://www.sqlite.org) (https://github.com/sparklemotion/sqlite3-ruby)
6
6
  gem 'sqlite3'
@@ -72,9 +72,7 @@ class Grub::GemLineTest < Minitest::Test
72
72
 
73
73
  def create_gem_line(options = {})
74
74
  Grub::GemLine.new(
75
- name: "grub",
76
- original_line: "gem 'grub'",
77
- **options
75
+ { name: "grub", original_line: "gem 'grub'" }.merge(options)
78
76
  )
79
77
  end
80
78
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grub
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Tse
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-27 00:00:00.000000000 Z
11
+ date: 2016-04-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -66,8 +66,7 @@ dependencies:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '1.1'
69
- description: 'Clarify your dependencies by adding a detailed comment to each line
70
- in Gemfile specifying the gem''s summary and its website if any. '
69
+ description: 'This project has been renamed to annotate_gem. Please go to https://rubygems.org/gems/annotate_gem. '
71
70
  email:
72
71
  - ivan.tse1@gmail.com
73
72
  executables:
@@ -96,11 +95,14 @@ files:
96
95
  - test/grub/gemfile_test.rb
97
96
  - test/grub/spec_finder_test.rb
98
97
  - test/test_helper.rb
99
- homepage: https://github.com/ivantsepp/grub
98
+ homepage: https://github.com/ivantsepp/annotate_gem
100
99
  licenses:
101
100
  - MIT
102
101
  metadata: {}
103
- post_install_message:
102
+ post_install_message: |2
103
+ ! The 'grub' gem has been deprecated and has been replaced by 'annotate_gem'.
104
+ ! See: https://rubygems.org/gems/annotate_gem
105
+ ! And: https://github.com/ivantsepp/annotate_gem
104
106
  rdoc_options: []
105
107
  require_paths:
106
108
  - lib