bundler-commentate 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +5 -5
- data/Gemfile.lock +11 -12
- data/bundler-commentate.gemspec +3 -0
- data/lib/bundler/commentate/version.rb +1 -1
- data/lib/bundler/commentate.rb +13 -12
- metadata +22 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 858151d17473612c68fc5f72b651189c708391e0e5ca9efc4306ec96b83eb505
|
4
|
+
data.tar.gz: 3b6d3e347822e4638a8b1dcc5ed27dc182b8c19a4f69c37baa205fe6a2ef62a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de06867dca2bd437399b308876d6b40e96f927708cbb121ad881e25a09846f9960efacaed933854d8becc35ac9f751a5eaf8d2563658d336362b0fd5ed2bc7d2
|
7
|
+
data.tar.gz: 33ac1e3537dcbc374f874692a09e1ac2e418d9099057e76317213e01834ce03d709c0ecae146a9d74cb0430c5cee8ccacbfd23f5c50178645cd7adf9613a905a
|
data/Gemfile
CHANGED
@@ -5,12 +5,12 @@ source 'https://rubygems.org'
|
|
5
5
|
# Specify your gem's dependencies in bundler-commentate.gemspec
|
6
6
|
gemspec
|
7
7
|
|
8
|
-
gem
|
8
|
+
gem("rake", "~> 13.0") # "Rake is a Make-like program implemented in Ruby"
|
9
9
|
|
10
|
-
gem
|
10
|
+
gem("minitest", "~> 5.0") # "minitest provides a complete suite of testing facilities supporting TDD, BDD, mocking, and benchmarking"
|
11
11
|
|
12
|
-
gem
|
13
|
-
gem
|
14
|
-
gem
|
12
|
+
gem("rubocop", "~> 1.7") # "Automatic Ruby code style checking tool."
|
13
|
+
gem("rubocop-minitest") # "Automatic Minitest code style checking tool."
|
14
|
+
gem("rubocop-rake") # "A RuboCop plugin for Rake"
|
15
15
|
|
16
16
|
plugin 'bundler-commentate', path: '.'
|
data/Gemfile.lock
CHANGED
@@ -1,27 +1,24 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
bundler-commentate (0.
|
4
|
+
bundler-commentate (0.3.0)
|
5
5
|
parser (~> 3.0)
|
6
|
+
unparser (~> 0.6)
|
6
7
|
|
7
8
|
GEM
|
8
9
|
remote: https://rubygems.org/
|
9
10
|
specs:
|
10
11
|
ast (2.4.2)
|
11
|
-
|
12
|
-
method_source (1.0.0)
|
12
|
+
diff-lcs (1.4.4)
|
13
13
|
minitest (5.14.4)
|
14
14
|
parallel (1.21.0)
|
15
|
-
parser (3.0.
|
15
|
+
parser (3.0.3.1)
|
16
16
|
ast (~> 2.4.1)
|
17
|
-
pry (0.14.1)
|
18
|
-
coderay (~> 1.1)
|
19
|
-
method_source (~> 1.0)
|
20
17
|
rainbow (3.0.0)
|
21
18
|
rake (13.0.6)
|
22
19
|
regexp_parser (2.1.1)
|
23
20
|
rexml (3.2.5)
|
24
|
-
rubocop (1.
|
21
|
+
rubocop (1.23.0)
|
25
22
|
parallel (~> 1.10)
|
26
23
|
parser (>= 3.0.0.0)
|
27
24
|
rainbow (>= 2.2.2, < 4.0)
|
@@ -30,14 +27,17 @@ GEM
|
|
30
27
|
rubocop-ast (>= 1.12.0, < 2.0)
|
31
28
|
ruby-progressbar (~> 1.7)
|
32
29
|
unicode-display_width (>= 1.4.0, < 3.0)
|
33
|
-
rubocop-ast (1.
|
30
|
+
rubocop-ast (1.13.0)
|
34
31
|
parser (>= 3.0.1.1)
|
35
|
-
rubocop-minitest (0.
|
32
|
+
rubocop-minitest (0.17.0)
|
36
33
|
rubocop (>= 0.90, < 2.0)
|
37
34
|
rubocop-rake (0.6.0)
|
38
35
|
rubocop (~> 1.0)
|
39
36
|
ruby-progressbar (1.11.0)
|
40
37
|
unicode-display_width (2.1.0)
|
38
|
+
unparser (0.6.2)
|
39
|
+
diff-lcs (~> 1.3)
|
40
|
+
parser (>= 3.0.0)
|
41
41
|
|
42
42
|
PLATFORMS
|
43
43
|
ruby
|
@@ -45,11 +45,10 @@ PLATFORMS
|
|
45
45
|
DEPENDENCIES
|
46
46
|
bundler-commentate!
|
47
47
|
minitest (~> 5.0)
|
48
|
-
pry (~> 0.14.1)
|
49
48
|
rake (~> 13.0)
|
50
49
|
rubocop (~> 1.7)
|
51
50
|
rubocop-minitest
|
52
51
|
rubocop-rake
|
53
52
|
|
54
53
|
BUNDLED WITH
|
55
|
-
2.
|
54
|
+
2.1.4
|
data/bundler-commentate.gemspec
CHANGED
@@ -17,6 +17,8 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.metadata['source_code_uri'] = spec.homepage
|
18
18
|
spec.metadata['changelog_uri'] = spec.homepage
|
19
19
|
|
20
|
+
spec.metadata['rubygems_mfa_required'] = 'true'
|
21
|
+
|
20
22
|
# Specify which files should be added to the gem when it is released.
|
21
23
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
22
24
|
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
@@ -29,6 +31,7 @@ Gem::Specification.new do |spec|
|
|
29
31
|
spec.require_paths = ['lib']
|
30
32
|
|
31
33
|
spec.add_dependency 'parser', '~> 3.0'
|
34
|
+
spec.add_dependency 'unparser', '~> 0.6'
|
32
35
|
|
33
36
|
# For more information and examples about making a new gem, checkout our
|
34
37
|
# guide at: https://bundler.io/guides/creating_gem.html
|
data/lib/bundler/commentate.rb
CHANGED
@@ -3,7 +3,9 @@
|
|
3
3
|
require_relative 'commentate/version'
|
4
4
|
|
5
5
|
require 'optparse'
|
6
|
+
|
6
7
|
require 'parser/current'
|
8
|
+
require 'unparser'
|
7
9
|
|
8
10
|
module Bundler
|
9
11
|
# Add gem summaries to a Gemfile.
|
@@ -20,10 +22,9 @@ module Bundler
|
|
20
22
|
OptionParser.new { |opts|
|
21
23
|
opts.banner = 'commentate [OPTIONS] [GEM, GEM, ...]'
|
22
24
|
|
23
|
-
opts.on('-i' , '--in-place'
|
24
|
-
opts.on('-g GEMFILE' , '--gemfile'
|
25
|
-
opts.on('-o GEMFILE' , '--outfile'
|
26
|
-
opts.on('-v' , '--[no-]verbose' , 'Run verbosely' )
|
25
|
+
opts.on('-i' , '--in-place' , 'Overwrite Gemfile' )
|
26
|
+
opts.on('-g GEMFILE' , '--gemfile' , 'Gemfile input, "-" for STDIN; default is "Gemfile"')
|
27
|
+
opts.on('-o GEMFILE' , '--outfile' , 'Gemfile output, "-" for STDOUT; default is STDOUT' )
|
27
28
|
}.parse!(args, into: (opts={}))
|
28
29
|
|
29
30
|
raise OptionParser::ParseError.new('Conflicting options: in-place, output') if opts[:'in-place'] and opts[:output]
|
@@ -57,22 +58,22 @@ module Bundler
|
|
57
58
|
# Use { } for blocks that return values
|
58
59
|
# Use do / end for blocks that are executed for side effects
|
59
60
|
input.read.tap do output.truncate(0) end.lines.each { |line|
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
61
|
+
parsed_line = Parser::CurrentRuby.parse(line)
|
62
|
+
unparsed_line = Unparser.unparse(parsed_line)
|
63
|
+
|
64
|
+
case parsed_line.to_a
|
65
|
+
in [nil, :gem, gem, *_rest]
|
66
|
+
output.print _commentate_line(gem, unparsed_line)
|
65
67
|
else
|
66
68
|
output.print line
|
67
69
|
end
|
68
70
|
}
|
69
71
|
end
|
70
72
|
|
71
|
-
def _commentate_line(gem,
|
73
|
+
def _commentate_line(gem, line)
|
72
74
|
g = gem.deconstruct[1]
|
73
|
-
v = ver.deconstruct[1] if ver
|
74
75
|
c = Gem.latest_spec_for(g).summary
|
75
|
-
"
|
76
|
+
"#{line.chomp}\t# #{c.inspect}\n"
|
76
77
|
end
|
77
78
|
end
|
78
79
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bundler-commentate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Frank J. Cameron
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-11-
|
11
|
+
date: 2021-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parser
|
@@ -24,7 +24,21 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '3.0'
|
27
|
-
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: unparser
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0.6'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0.6'
|
41
|
+
description:
|
28
42
|
email:
|
29
43
|
- fjc@fastmail.net
|
30
44
|
executables: []
|
@@ -51,7 +65,8 @@ metadata:
|
|
51
65
|
homepage_uri: https://gitlab.com/fjc/bundler-commentate
|
52
66
|
source_code_uri: https://gitlab.com/fjc/bundler-commentate
|
53
67
|
changelog_uri: https://gitlab.com/fjc/bundler-commentate
|
54
|
-
|
68
|
+
rubygems_mfa_required: 'true'
|
69
|
+
post_install_message:
|
55
70
|
rdoc_options: []
|
56
71
|
require_paths:
|
57
72
|
- lib
|
@@ -66,8 +81,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
66
81
|
- !ruby/object:Gem::Version
|
67
82
|
version: '0'
|
68
83
|
requirements: []
|
69
|
-
rubygems_version: 3.
|
70
|
-
signing_key:
|
84
|
+
rubygems_version: 3.2.5
|
85
|
+
signing_key:
|
71
86
|
specification_version: 4
|
72
87
|
summary: Bundler plugin to add gem summaries to a Gemfile
|
73
88
|
test_files: []
|