gem_paths 0.2.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -0
- data/Gemfile.lock +31 -29
- data/README.md +5 -1
- data/exe/gem_paths +5 -0
- data/exe/gempaths +2 -0
- data/gem_paths.gemspec +2 -2
- data/lib/bundler/command.rb +15 -0
- data/lib/gem_paths/cli.rb +3 -1
- data/lib/gem_paths/list.rb +6 -2
- data/lib/gem_paths/plugin.rb +23 -0
- data/lib/gem_paths/version.rb +1 -1
- data/plugins.rb +3 -0
- metadata +23 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2743068daad1413c929972a69571da069b8857b602a052ea9b6993c2e85afa1c
|
4
|
+
data.tar.gz: 13b0e922f785fc7644fab404f5421346b01bd4b8b055a93ad7450aaaf4f68eb7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b4f95309fdc702989a64e17f15d2c72d93220f8c882e81dc3d9822494a678ac69852dc54037b614f2fbb5d4afc7896cafde3a72419adfd4de6c1cc93e25993b9
|
7
|
+
data.tar.gz: f136a167aa590ccefd9aba2d246e4af4ee9a361b409116e9e607e55d9933787040e0d871592a02fc3a32f0ecd8cb0a137d38e14d65c9adc7e1306e45195a78ba
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,26 +1,25 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
gem_paths (0.
|
4
|
+
gem_paths (0.4.1)
|
5
5
|
bundler (~> 2.0)
|
6
|
-
thor (~> 0.
|
6
|
+
thor (~> 1.0, > 1.0.0)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
aruba (0.14.
|
12
|
-
childprocess (>= 0.6.3, <
|
11
|
+
aruba (0.14.14)
|
12
|
+
childprocess (>= 0.6.3, < 4.0.0)
|
13
13
|
contracts (~> 0.9)
|
14
14
|
cucumber (>= 1.3.19)
|
15
15
|
ffi (~> 1.9)
|
16
16
|
rspec-expectations (>= 2.99)
|
17
|
-
thor (
|
18
|
-
backports (3.
|
19
|
-
builder (3.2.
|
20
|
-
childprocess (
|
21
|
-
|
22
|
-
|
23
|
-
cucumber (3.1.2)
|
17
|
+
thor (>= 0.19, < 2.0)
|
18
|
+
backports (3.21.0)
|
19
|
+
builder (3.2.4)
|
20
|
+
childprocess (3.0.0)
|
21
|
+
contracts (0.16.1)
|
22
|
+
cucumber (3.2.0)
|
24
23
|
builder (>= 2.1.2)
|
25
24
|
cucumber-core (~> 3.2.0)
|
26
25
|
cucumber-expressions (~> 6.0.1)
|
@@ -36,26 +35,26 @@ GEM
|
|
36
35
|
cucumber-expressions (6.0.1)
|
37
36
|
cucumber-tag_expressions (1.1.1)
|
38
37
|
cucumber-wire (0.0.1)
|
39
|
-
diff-lcs (1.
|
40
|
-
ffi (1.
|
38
|
+
diff-lcs (1.4.4)
|
39
|
+
ffi (1.15.4)
|
41
40
|
gherkin (5.1.0)
|
42
|
-
multi_json (1.
|
41
|
+
multi_json (1.15.0)
|
43
42
|
multi_test (0.1.2)
|
44
|
-
rake (
|
45
|
-
rspec (3.
|
46
|
-
rspec-core (~> 3.
|
47
|
-
rspec-expectations (~> 3.
|
48
|
-
rspec-mocks (~> 3.
|
49
|
-
rspec-core (3.
|
50
|
-
rspec-support (~> 3.
|
51
|
-
rspec-expectations (3.
|
43
|
+
rake (13.0.6)
|
44
|
+
rspec (3.10.0)
|
45
|
+
rspec-core (~> 3.10.0)
|
46
|
+
rspec-expectations (~> 3.10.0)
|
47
|
+
rspec-mocks (~> 3.10.0)
|
48
|
+
rspec-core (3.10.1)
|
49
|
+
rspec-support (~> 3.10.0)
|
50
|
+
rspec-expectations (3.10.1)
|
52
51
|
diff-lcs (>= 1.2.0, < 2.0)
|
53
|
-
rspec-support (~> 3.
|
54
|
-
rspec-mocks (3.
|
52
|
+
rspec-support (~> 3.10.0)
|
53
|
+
rspec-mocks (3.10.2)
|
55
54
|
diff-lcs (>= 1.2.0, < 2.0)
|
56
|
-
rspec-support (~> 3.
|
57
|
-
rspec-support (3.
|
58
|
-
thor (
|
55
|
+
rspec-support (~> 3.10.0)
|
56
|
+
rspec-support (3.10.2)
|
57
|
+
thor (1.1.0)
|
59
58
|
|
60
59
|
PLATFORMS
|
61
60
|
ruby
|
@@ -64,8 +63,11 @@ DEPENDENCIES
|
|
64
63
|
aruba (~> 0.14)
|
65
64
|
cucumber (~> 3.1)
|
66
65
|
gem_paths!
|
67
|
-
rake (
|
66
|
+
rake (>= 12.3.3)
|
68
67
|
rspec (~> 3.0)
|
69
68
|
|
69
|
+
RUBY VERSION
|
70
|
+
ruby 2.7.2p137
|
71
|
+
|
70
72
|
BUNDLED WITH
|
71
|
-
2.
|
73
|
+
2.1.4
|
data/README.md
CHANGED
@@ -30,7 +30,11 @@ To display the path for each installed gem, do:
|
|
30
30
|
|
31
31
|
## Development
|
32
32
|
|
33
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run
|
33
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run :
|
34
|
+
|
35
|
+
$ bundle exec rspec
|
36
|
+
$ bundle exec cucumber features
|
37
|
+
|
34
38
|
to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
35
39
|
|
36
40
|
To install your local copy of this gem onto your local machine, run `bundle exec rake install`.
|
data/exe/gem_paths
ADDED
data/exe/gempaths
CHANGED
data/gem_paths.gemspec
CHANGED
@@ -23,8 +23,8 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.require_paths = ["lib"]
|
24
24
|
|
25
25
|
spec.add_dependency "bundler", "~> 2.0"
|
26
|
-
spec.add_dependency "thor", "~> 0.
|
27
|
-
spec.add_development_dependency "rake", "
|
26
|
+
spec.add_dependency "thor", "~> 1.0", "> 1.0.0"
|
27
|
+
spec.add_development_dependency "rake", ">= 12.3.3"
|
28
28
|
spec.add_development_dependency "rspec", "~> 3.0"
|
29
29
|
spec.add_development_dependency "cucumber", "~> 3.1"
|
30
30
|
spec.add_development_dependency "aruba", "~> 0.14"
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'gem_paths/list'
|
2
|
+
require 'fileutils'
|
3
|
+
|
4
|
+
module Bundler
|
5
|
+
class Command
|
6
|
+
Plugin::API.command('gem_paths', self)
|
7
|
+
|
8
|
+
def exec(command_name, args)
|
9
|
+
gem_paths_make_file = (Bundler::SharedHelpers.root + '.bundle' + 'gem_paths.make')
|
10
|
+
puts "Updating #{gem_paths_make_file} ..."
|
11
|
+
FileUtils.mkdir_p gem_paths_make_file.dirname unless File.directory?(gem_paths_make_file.dirname)
|
12
|
+
File.write(gem_paths_make_file, GemPaths::List.to_make.join("\n") + "\n")
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
data/lib/gem_paths/cli.rb
CHANGED
@@ -12,11 +12,13 @@ module GemPaths
|
|
12
12
|
begin
|
13
13
|
case opt['format']
|
14
14
|
when 'yaml'
|
15
|
-
|
15
|
+
puts GemPaths::List.to_yaml
|
16
16
|
when 'json'
|
17
17
|
puts GemPaths::List.to_json
|
18
18
|
when 'make'
|
19
19
|
puts GemPaths::List.to_make
|
20
|
+
when 'sh'
|
21
|
+
puts GemPaths::List.to_sh
|
20
22
|
else
|
21
23
|
shell.error set_color("Invalid value for --format option. Try 'gempaths help list' for more info.", Thor::Shell::Color::RED)
|
22
24
|
exit(2)
|
data/lib/gem_paths/list.rb
CHANGED
@@ -11,7 +11,11 @@ module GemPaths
|
|
11
11
|
|
12
12
|
|
13
13
|
def self.to_make
|
14
|
-
gem_name_path_map.map { |pair| "gem-path-#{pair[0]} := #{pair[1]}" }
|
14
|
+
gem_name_path_map.map { |pair| "export gem-path-#{pair[0]} := #{pair[1]}" }
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.to_sh
|
18
|
+
gem_name_path_map.map { |pair| "export gem-path-#{pair[0]}=#{pair[1]}" }
|
15
19
|
end
|
16
20
|
|
17
21
|
def self.to_yaml
|
@@ -23,7 +27,7 @@ module GemPaths
|
|
23
27
|
|
24
28
|
def self.to_json
|
25
29
|
require 'json'
|
26
|
-
JSON.pretty_generate(gem_name_path_map)
|
30
|
+
JSON.pretty_generate(Hash[*gem_name_path_map.flatten])
|
27
31
|
end
|
28
32
|
|
29
33
|
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'gem_paths/list'
|
2
|
+
require 'fileutils'
|
3
|
+
|
4
|
+
module GemPaths
|
5
|
+
module Plugin
|
6
|
+
|
7
|
+
class << self
|
8
|
+
# Registers the plugin and adds all needed hooks
|
9
|
+
# Will call troubleshoot via the `after-install` hook if the install does not succeed
|
10
|
+
def register
|
11
|
+
return if defined?(@registered) && @registered
|
12
|
+
@registered = true
|
13
|
+
Bundler::Plugin.add_hook('after-install-all') do |spec_install|
|
14
|
+
gem_paths_make_file = (Bundler::SharedHelpers.root + '.bundle' + 'gem_paths.make')
|
15
|
+
puts "Updating #{gem_paths_make_file} ..."
|
16
|
+
FileUtils.mkdir_p gem_paths_make_file.dirname unless File.directory?(gem_paths_make_file.dirname)
|
17
|
+
File.write(gem_paths_make_file, GemPaths::List.to_make.join("\n") + "\n")
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
end
|
data/lib/gem_paths/version.rb
CHANGED
data/plugins.rb
ADDED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gem_paths
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Torben Jacobsen
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-09-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -30,28 +30,34 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0
|
33
|
+
version: '1.0'
|
34
|
+
- - ">"
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: 1.0.0
|
34
37
|
type: :runtime
|
35
38
|
prerelease: false
|
36
39
|
version_requirements: !ruby/object:Gem::Requirement
|
37
40
|
requirements:
|
38
41
|
- - "~>"
|
39
42
|
- !ruby/object:Gem::Version
|
40
|
-
version: '0
|
43
|
+
version: '1.0'
|
44
|
+
- - ">"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 1.0.0
|
41
47
|
- !ruby/object:Gem::Dependency
|
42
48
|
name: rake
|
43
49
|
requirement: !ruby/object:Gem::Requirement
|
44
50
|
requirements:
|
45
|
-
- - "
|
51
|
+
- - ">="
|
46
52
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
53
|
+
version: 12.3.3
|
48
54
|
type: :development
|
49
55
|
prerelease: false
|
50
56
|
version_requirements: !ruby/object:Gem::Requirement
|
51
57
|
requirements:
|
52
|
-
- - "
|
58
|
+
- - ">="
|
53
59
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
60
|
+
version: 12.3.3
|
55
61
|
- !ruby/object:Gem::Dependency
|
56
62
|
name: rspec
|
57
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -99,6 +105,7 @@ description: This gem is used to get the paths for all gems known to Bundler in
|
|
99
105
|
email:
|
100
106
|
- torben@ic-factory.com
|
101
107
|
executables:
|
108
|
+
- gem_paths
|
102
109
|
- gempaths
|
103
110
|
extensions: []
|
104
111
|
extra_rdoc_files: []
|
@@ -113,17 +120,21 @@ files:
|
|
113
120
|
- Rakefile
|
114
121
|
- bin/console
|
115
122
|
- bin/setup
|
123
|
+
- exe/gem_paths
|
116
124
|
- exe/gempaths
|
117
125
|
- gem_paths.gemspec
|
126
|
+
- lib/bundler/command.rb
|
118
127
|
- lib/gem_paths.rb
|
119
128
|
- lib/gem_paths/cli.rb
|
120
129
|
- lib/gem_paths/list.rb
|
130
|
+
- lib/gem_paths/plugin.rb
|
121
131
|
- lib/gem_paths/version.rb
|
132
|
+
- plugins.rb
|
122
133
|
homepage: https://github.com/ic-factory/gem_paths
|
123
134
|
licenses:
|
124
135
|
- LGPL-3.0
|
125
136
|
metadata: {}
|
126
|
-
post_install_message:
|
137
|
+
post_install_message:
|
127
138
|
rdoc_options: []
|
128
139
|
require_paths:
|
129
140
|
- lib
|
@@ -138,9 +149,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
138
149
|
- !ruby/object:Gem::Version
|
139
150
|
version: '0'
|
140
151
|
requirements: []
|
141
|
-
|
142
|
-
|
143
|
-
signing_key:
|
152
|
+
rubygems_version: 3.1.4
|
153
|
+
signing_key:
|
144
154
|
specification_version: 4
|
145
155
|
summary: Gem to be used in plugin for Bundler, which can list gem paths in various
|
146
156
|
output formats, eg. GNU Make.
|