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 +4 -4
- data/README.md +1 -66
- data/bin/grub +1 -0
- data/grub.gemspec +8 -3
- data/lib/grub/gem_line.rb +7 -6
- data/lib/grub/version.rb +1 -1
- data/test/fixtures/Gemfile_grubbed +1 -1
- data/test/grub/gem_line_test.rb +1 -3
- metadata +8 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7c7a1f210bf90d85627851cf147ba42e702ad20b
|
4
|
+
data.tar.gz: a3ba8f5768e9e296da9b2009e2dd6fc4d2ae75fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 007a117427640980f7d9c90bea70ba8bb0ff51edf3302dad429aed87255d75dddae51a1d40f1b4765c1707862539fd7dc4cc500654a75c0d8889244f046bbc40
|
7
|
+
data.tar.gz: 0bd248d1b8a94cc4afe7b49a9e1ad42d841befdff0147359be11bec2d647ea42820f800a50587abf1087bcbedc44de6d53f37a1f88e65b754ebc2bbf8237596f
|
data/README.md
CHANGED
@@ -1,66 +1 @@
|
|
1
|
-
|
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
data/grub.gemspec
CHANGED
@@ -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
|
-
|
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/
|
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)/})
|
data/lib/grub/gem_line.rb
CHANGED
@@ -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(
|
7
|
-
|
8
|
-
@
|
9
|
-
@
|
10
|
-
@
|
11
|
-
@
|
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
|
data/lib/grub/version.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
source "https://rubygems.org"
|
2
2
|
|
3
|
-
# Full-stack web application framework. (http://
|
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'
|
data/test/grub/gem_line_test.rb
CHANGED
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.
|
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-
|
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: '
|
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/
|
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
|