gem-path 0.6.2 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +3 -3
- data/Rakefile +1 -1
- data/gem-path.gemspec +5 -5
- data/lib/rubygems/commands/path_command.rb +16 -2
- data/task/README.md +2 -2
- data/task/gemgem.rb +6 -4
- metadata +7 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 15f18939d8e50af9c2fae87af1fe73ec1e05b286da7e0b2f025e978b96cf48a9
|
4
|
+
data.tar.gz: 02cf2bca584af9727c520ad61278c6fa3959422a57e0598cc611bf0a93719d0c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e445e9f58fe8839b17885347ddc8b821967f20a012883c7f3ae976627a213d823edc30049c36a633f46043fa37a170bbdfeb7522bd822ff79a158581b6417a8
|
7
|
+
data.tar.gz: 5ed3e277e1ec364403613d58bd8b2eb2942ccff0cd6bd69263f9052ab14abea2308785f1d757e911c58f11a8ec1ef9f081b3a8913734e1f093492071d4282a95
|
data/README.md
CHANGED
@@ -24,7 +24,7 @@ Or checkout [gem-eit][], [gem-grep][] for shorthands.
|
|
24
24
|
|
25
25
|
## REQUIREMENTS:
|
26
26
|
|
27
|
-
* Tested with MRI (official CRuby)
|
27
|
+
* Tested with MRI (official CRuby), Rubinius and JRuby.
|
28
28
|
|
29
29
|
## INSTALLATION:
|
30
30
|
|
@@ -62,9 +62,9 @@ This was extracted from [eit-gem][].
|
|
62
62
|
|
63
63
|
## LICENSE:
|
64
64
|
|
65
|
-
Apache License 2.0 (Apache-2)
|
65
|
+
Apache License 2.0 (Apache-2.0)
|
66
66
|
|
67
|
-
Copyright (c) 2013-
|
67
|
+
Copyright (c) 2013-2021, Lin Jen-Shin (godfat)
|
68
68
|
|
69
69
|
Licensed under the Apache License, Version 2.0 (the "License");
|
70
70
|
you may not use this file except in compliance with the License.
|
data/Rakefile
CHANGED
data/gem-path.gemspec
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
# stub: gem-path 0.
|
2
|
+
# stub: gem-path 0.7.0 ruby lib
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "gem-path".freeze
|
6
|
-
s.version = "0.
|
6
|
+
s.version = "0.7.0"
|
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 = "
|
11
|
+
s.date = "2021-08-11"
|
12
12
|
s.description = "Find the path for a given gem or require path for editing or greping.\n\nFor examples, under [fish](http://fishshell.com/):\n\n cd (gem path gem-path)\n vim (gem path gem-path)\n grep require -R (gem path gem-path)\n\nOr checkout [gem-eit][], [gem-grep][] for shorthands.\n\n[gem-eit]: https://github.com/godfat/gem-eit\n[gem-grep]: https://github.com/godfat/gem-grep".freeze
|
13
13
|
s.email = ["godfat (XD) godfat.org".freeze]
|
14
14
|
s.files = [
|
@@ -26,7 +26,7 @@ Gem::Specification.new do |s|
|
|
26
26
|
"task/gemgem.rb".freeze,
|
27
27
|
"test/test.rb".freeze]
|
28
28
|
s.homepage = "https://github.com/godfat/gem-path".freeze
|
29
|
-
s.licenses = ["Apache-2".freeze]
|
30
|
-
s.rubygems_version = "2.
|
29
|
+
s.licenses = ["Apache-2.0".freeze]
|
30
|
+
s.rubygems_version = "3.2.25".freeze
|
31
31
|
s.summary = "Find the path for a given gem or require path for editing or greping.".freeze
|
32
32
|
end
|
@@ -34,8 +34,12 @@ class Gem::Commands::PathCommand < Gem::Command
|
|
34
34
|
def find_gem_path name
|
35
35
|
gem_path = Gem.path.find do |base|
|
36
36
|
gem_path = $LOAD_PATH.find do |path|
|
37
|
-
platforms =
|
38
|
-
|
37
|
+
platforms = [
|
38
|
+
'ruby',
|
39
|
+
sitearch,
|
40
|
+
*univeral_darwin
|
41
|
+
].map(&Regexp.method(:escape)).join('|')
|
42
|
+
|
39
43
|
gem_path = path[
|
40
44
|
%r{\A#{base}/
|
41
45
|
(?:bundler/)?
|
@@ -62,4 +66,14 @@ class Gem::Commands::PathCommand < Gem::Command
|
|
62
66
|
args # this could be a require path, go on searching
|
63
67
|
end
|
64
68
|
end
|
69
|
+
|
70
|
+
def sitearch
|
71
|
+
@sitearch ||= RbConfig::CONFIG['sitearch']
|
72
|
+
end
|
73
|
+
|
74
|
+
def univeral_darwin
|
75
|
+
if sitearch.include?('darwin')
|
76
|
+
'universal-darwin'
|
77
|
+
end
|
78
|
+
end
|
65
79
|
end
|
data/task/README.md
CHANGED
@@ -13,7 +13,7 @@ Provided tasks:
|
|
13
13
|
|
14
14
|
## REQUIREMENTS:
|
15
15
|
|
16
|
-
* Tested with MRI (official CRuby)
|
16
|
+
* Tested with MRI (official CRuby) and JRuby.
|
17
17
|
|
18
18
|
## INSTALLATION:
|
19
19
|
|
@@ -39,7 +39,7 @@ end
|
|
39
39
|
|
40
40
|
Apache License 2.0 (Apache-2.0)
|
41
41
|
|
42
|
-
Copyright (c) 2011-
|
42
|
+
Copyright (c) 2011-2021, 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.
|
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
|
-
|
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
|
@@ -75,8 +77,8 @@ module Gemgem
|
|
75
77
|
|
76
78
|
def gem_release
|
77
79
|
sh_git('tag', gem_tag)
|
78
|
-
sh_git('push')
|
79
|
-
sh_git('push', '--tags')
|
80
|
+
# sh_git('push')
|
81
|
+
# sh_git('push', '--tags')
|
80
82
|
sh_gem('push', gem_path)
|
81
83
|
end
|
82
84
|
|
@@ -316,7 +318,7 @@ task :release => [:spec, :check, :build] do
|
|
316
318
|
end
|
317
319
|
|
318
320
|
task :check do
|
319
|
-
Gemgem.gem_check
|
321
|
+
# Gemgem.gem_check
|
320
322
|
end
|
321
323
|
|
322
324
|
end # of gem namespace
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gem-path
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.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:
|
11
|
+
date: 2021-08-11 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: |-
|
14
14
|
Find the path for a given gem or require path for editing or greping.
|
@@ -44,9 +44,9 @@ files:
|
|
44
44
|
- test/test.rb
|
45
45
|
homepage: https://github.com/godfat/gem-path
|
46
46
|
licenses:
|
47
|
-
- Apache-2
|
47
|
+
- Apache-2.0
|
48
48
|
metadata: {}
|
49
|
-
post_install_message:
|
49
|
+
post_install_message:
|
50
50
|
rdoc_options: []
|
51
51
|
require_paths:
|
52
52
|
- lib
|
@@ -61,9 +61,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
61
61
|
- !ruby/object:Gem::Version
|
62
62
|
version: '0'
|
63
63
|
requirements: []
|
64
|
-
|
65
|
-
|
66
|
-
signing_key:
|
64
|
+
rubygems_version: 3.2.25
|
65
|
+
signing_key:
|
67
66
|
specification_version: 4
|
68
67
|
summary: Find the path for a given gem or require path for editing or greping.
|
69
68
|
test_files: []
|