gem_paths 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/exe/gem_paths +5 -0
- data/exe/gempaths +2 -0
- data/lib/bundler/command.rb +15 -0
- data/lib/gem_paths/list.rb +2 -2
- data/lib/gem_paths/plugin.rb +23 -0
- data/lib/gem_paths/version.rb +1 -1
- data/plugins.rb +3 -0
- metadata +11 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c522fb82a3a57e7993a08933a7f2180ae6a2775a00466988e985916c325e4064
|
4
|
+
data.tar.gz: 431be503f4a09b0936f00bfa8f2b2c4bfa0ec1a5cf13dbedcc90d23391e92401
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d07a8877d5e69ed1906aabe8271d42f02d90c7523bc3f140d61bbba016ad813637431b1e55cfe1d634e063eb846ecdf3a9f15b6cc97dd7cdcf12a8c01e7f833a
|
7
|
+
data.tar.gz: c2fab0f2ba02b8274808d1e569f15cb5d5a5ac5187d1c975eadbf5a7749e4940e2540c370378c19fb099b141ae92d8b4d4743d62cb529adf9ff556fae8872731
|
data/Gemfile.lock
CHANGED
data/exe/gem_paths
ADDED
data/exe/gempaths
CHANGED
@@ -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/list.rb
CHANGED
@@ -11,7 +11,7 @@ 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
15
|
end
|
16
16
|
|
17
17
|
def self.to_yaml
|
@@ -23,7 +23,7 @@ module GemPaths
|
|
23
23
|
|
24
24
|
def self.to_json
|
25
25
|
require 'json'
|
26
|
-
JSON.pretty_generate(gem_name_path_map)
|
26
|
+
JSON.pretty_generate(Hash[*gem_name_path_map.flatten])
|
27
27
|
end
|
28
28
|
|
29
29
|
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.3.0
|
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: 2020-09-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -99,6 +99,7 @@ description: This gem is used to get the paths for all gems known to Bundler in
|
|
99
99
|
email:
|
100
100
|
- torben@ic-factory.com
|
101
101
|
executables:
|
102
|
+
- gem_paths
|
102
103
|
- gempaths
|
103
104
|
extensions: []
|
104
105
|
extra_rdoc_files: []
|
@@ -113,17 +114,21 @@ files:
|
|
113
114
|
- Rakefile
|
114
115
|
- bin/console
|
115
116
|
- bin/setup
|
117
|
+
- exe/gem_paths
|
116
118
|
- exe/gempaths
|
117
119
|
- gem_paths.gemspec
|
120
|
+
- lib/bundler/command.rb
|
118
121
|
- lib/gem_paths.rb
|
119
122
|
- lib/gem_paths/cli.rb
|
120
123
|
- lib/gem_paths/list.rb
|
124
|
+
- lib/gem_paths/plugin.rb
|
121
125
|
- lib/gem_paths/version.rb
|
126
|
+
- plugins.rb
|
122
127
|
homepage: https://github.com/ic-factory/gem_paths
|
123
128
|
licenses:
|
124
129
|
- LGPL-3.0
|
125
130
|
metadata: {}
|
126
|
-
post_install_message:
|
131
|
+
post_install_message:
|
127
132
|
rdoc_options: []
|
128
133
|
require_paths:
|
129
134
|
- lib
|
@@ -138,9 +143,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
138
143
|
- !ruby/object:Gem::Version
|
139
144
|
version: '0'
|
140
145
|
requirements: []
|
141
|
-
rubyforge_project:
|
146
|
+
rubyforge_project:
|
142
147
|
rubygems_version: 2.7.7
|
143
|
-
signing_key:
|
148
|
+
signing_key:
|
144
149
|
specification_version: 4
|
145
150
|
summary: Gem to be used in plugin for Bundler, which can list gem paths in various
|
146
151
|
output formats, eg. GNU Make.
|