gem-grep 0.7.0 → 1.0.0

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
- SHA1:
3
- metadata.gz: ecbbf3ad67669f6f6513c2673c06c93066015cc9
4
- data.tar.gz: e64d0fea2a56e08401360019481aeceea015bdaf
2
+ SHA256:
3
+ metadata.gz: 20f7aa0ea5d50b54922f48dd38ad844da8e23518eb6ba504a177d0128c4f717d
4
+ data.tar.gz: 8d6566cc0749da6fd0ff20e026abb350eab10ee4bddcc64206092cc7319071b1
5
5
  SHA512:
6
- metadata.gz: f740d838d82bef80f9a2daa40ab582972188458de9ac93e936c4bde5e6b8e4dbdb5cbb056b577c416d06a7fca683a0627598a131377f6b5a6b95df7429882a8a
7
- data.tar.gz: 216a491834432db2273ddd6d02beb3c1f4df66429a6d93e2defe8cbe6a5a938677c36b8aba37ccb6007513aec9b5ddbe610a0d976cec742127f54b722b82affd
6
+ metadata.gz: 1996a3ae335e8a180bc7182a982f53dc3306049bc5a3b7f12eb486d888865f6d4e77a3b2f3aa9cb2269a012cd82017684727e731fa16934196f6638b7655a0a7
7
+ data.tar.gz: 1042fb79b04bea408a636db1f2860e2f975eb9e018665baffe7e0ef06afc9b900140388f9bdf1381f27cee7b109194c07a375a037b788f04036f99a0f31533d9
data/.gitmodules CHANGED
@@ -1,3 +1,3 @@
1
1
  [submodule "task"]
2
2
  path = task
3
- url = git://github.com/godfat/gemgem.git
3
+ url = https://github.com/godfat/gemgem.git
data/CHANGES.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # CHANGES
2
2
 
3
+ ## gem-grep 1.0.0 -- 2024-08-01
4
+
5
+ * Fixed for newer RubyGems
6
+
7
+ ## gem-grep 0.8.0 -- 2017-09-11
8
+
9
+ * Update signature of `grep_command` and `capture_path`.
10
+ Reverse for `grep_command` so that it's easier to extend for
11
+ `gem-bgrep`. Since this changed a public API, a major version
12
+ bump is needed.
13
+
3
14
  ## gem-grep 0.7.0 -- 2017-07-29
4
15
 
5
16
  * Support and recommend ripgrep (rg)
data/README.md CHANGED
@@ -17,7 +17,7 @@ Also checkout [gem-eit][].
17
17
 
18
18
  ## REQUIREMENTS:
19
19
 
20
- * Tested with MRI (official CRuby), Rubinius and JRuby.
20
+ * Tested with MRI (official CRuby) and JRuby.
21
21
  * [gem-path](https://github.com/godfat/gem-path)
22
22
  * `grep` from shell, or set `$GEM_GREP` to `ag` ([The Silver Searcher][ag]),
23
23
  `rg` ([ripgrep][rg]) or other compatible command.
@@ -79,7 +79,7 @@ Also checkout [gem.fish][] for [fish][] completion.
79
79
 
80
80
  Apache License 2.0 (Apache-2.0)
81
81
 
82
- Copyright (c) 2013-2017, Lin Jen-Shin (godfat)
82
+ Copyright (c) 2013-2024, Lin Jen-Shin (godfat)
83
83
 
84
84
  Licensed under the Apache License, Version 2.0 (the "License");
85
85
  you may not use this file except in compliance with the License.
data/Rakefile CHANGED
@@ -8,6 +8,6 @@ end
8
8
 
9
9
  Gemgem.init(__dir__) do |s|
10
10
  s.name = 'gem-grep'
11
- s.version = '0.7.0'
11
+ s.version = '1.0.0'
12
12
  s.add_runtime_dependency('gem-path')
13
13
  end
data/gem-grep.gemspec CHANGED
@@ -1,14 +1,14 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: gem-grep 0.7.0 ruby lib
2
+ # stub: gem-grep 1.0.0 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "gem-grep".freeze
6
- s.version = "0.7.0"
6
+ s.version = "1.0.0".freeze
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
9
9
  s.require_paths = ["lib".freeze]
10
10
  s.authors = ["Lin Jen-Shin (godfat)".freeze]
11
- s.date = "2017-07-29"
11
+ s.date = "2024-08-01"
12
12
  s.description = "grep the gem for a given name or grep the file for a given require path.\n\nAlso checkout [gem-eit][].\n\n[gem-eit]: https://github.com/godfat/gem-eit".freeze
13
13
  s.email = ["godfat (XD) godfat.org".freeze]
14
14
  s.files = [
@@ -26,18 +26,10 @@ Gem::Specification.new do |s|
26
26
  "task/gemgem.rb".freeze]
27
27
  s.homepage = "https://github.com/godfat/gem-grep".freeze
28
28
  s.licenses = ["Apache-2.0".freeze]
29
- s.rubygems_version = "2.6.12".freeze
29
+ s.rubygems_version = "3.5.16".freeze
30
30
  s.summary = "grep the gem for a given name or grep the file for a given require path.".freeze
31
31
 
32
- if s.respond_to? :specification_version then
33
- s.specification_version = 4
32
+ s.specification_version = 4
34
33
 
35
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
36
- s.add_runtime_dependency(%q<gem-path>.freeze, [">= 0"])
37
- else
38
- s.add_dependency(%q<gem-path>.freeze, [">= 0"])
39
- end
40
- else
41
- s.add_dependency(%q<gem-path>.freeze, [">= 0"])
42
- end
34
+ s.add_runtime_dependency(%q<gem-path>.freeze, [">= 0".freeze])
43
35
  end
@@ -22,18 +22,19 @@ class Gem::Commands::GrepCommand < Gem::Command
22
22
  terminate_interaction(1)
23
23
  end
24
24
 
25
- exec(*grep_command(options[:args], options[:build_args]))
25
+ exec(*grep_command(options[:build_args], options[:args]))
26
26
  end
27
27
 
28
- def grep_command path_args, grep_args
29
- [grep_name, *grep_args, *grep_default_args, capture_path(*path_args)]
28
+ def grep_command grep_args, *paths_args
29
+ [grep_name, *grep_args, *grep_default_args,
30
+ *paths_args.map(&method(:capture_path))]
30
31
  end
31
32
 
32
33
  private
33
- def capture_path *path_args
34
+ def capture_path path_args
34
35
  ui = CapturedUI.new
35
36
  Gem::DefaultUserInteraction.use_ui(ui) do
36
- Gem::GemRunner.new.run(['path', *path_args])
37
+ Gem::GemRunner.new.run(['path', *path_args.map(&:to_s)])
37
38
  end
38
39
  ui.outs.string.strip
39
40
  end
data/task/README.md CHANGED
@@ -13,11 +13,11 @@ Provided tasks:
13
13
 
14
14
  ## REQUIREMENTS:
15
15
 
16
- * Tested with MRI (official CRuby), Rubinius and JRuby.
16
+ * Tested with MRI (official CRuby) and JRuby.
17
17
 
18
18
  ## INSTALLATION:
19
19
 
20
- git submodule add git://github.com/godfat/gemgem.git task
20
+ git submodule add https://github.com/godfat/gemgem.git task
21
21
 
22
22
  And in Rakefile:
23
23
 
@@ -39,13 +39,13 @@ end
39
39
 
40
40
  Apache License 2.0 (Apache-2.0)
41
41
 
42
- Copyright (c) 2011-2017, Lin Jen-Shin (godfat)
42
+ Copyright (c) 2011-2023, Lin Jen-Shin (godfat)
43
43
 
44
44
  Licensed under the Apache License, Version 2.0 (the "License");
45
45
  you may not use this file except in compliance with the License.
46
46
  You may obtain a copy of the License at
47
47
 
48
- <http://www.apache.org/licenses/LICENSE-2.0>
48
+ <https://www.apache.org/licenses/LICENSE-2.0>
49
49
 
50
50
  Unless required by applicable law or agreed to in writing, software
51
51
  distributed under the License is distributed on an "AS IS" BASIS,
data/task/gemgem.rb CHANGED
@@ -42,6 +42,7 @@ module Gemgem
42
42
 
43
43
  def gem_install
44
44
  require 'rubygems/commands/install_command'
45
+ require 'rubygems/package'
45
46
  # read ~/.gemrc
46
47
  Gem.use_paths(Gem.configuration[:gemhome], Gem.configuration[:gempath])
47
48
  Gem::Command.extra_args = Gem.configuration[:gem]
@@ -51,7 +52,8 @@ module Gemgem
51
52
  cmd.handle_options([])
52
53
 
53
54
  # install
54
- install = Gem::Installer.new(gem_path, cmd.options)
55
+ gem_package = Gem::Package.new(gem_path)
56
+ install = Gem::Installer.new(gem_package, cmd.options)
55
57
  install.install
56
58
  puts "\e[35mGem installed: \e[33m#{strip_path(install.gem_dir)}\e[0m"
57
59
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gem-grep
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lin Jen-Shin (godfat)
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-29 00:00:00.000000000 Z
11
+ date: 2024-08-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gem-path
@@ -52,7 +52,7 @@ homepage: https://github.com/godfat/gem-grep
52
52
  licenses:
53
53
  - Apache-2.0
54
54
  metadata: {}
55
- post_install_message:
55
+ post_install_message:
56
56
  rdoc_options: []
57
57
  require_paths:
58
58
  - lib
@@ -67,9 +67,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  requirements: []
70
- rubyforge_project:
71
- rubygems_version: 2.6.12
72
- signing_key:
70
+ rubygems_version: 3.5.16
71
+ signing_key:
73
72
  specification_version: 4
74
73
  summary: grep the gem for a given name or grep the file for a given require path.
75
74
  test_files: []