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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ab575f0abbcb7374009cff4885ece82452980429f918a9295d6ae0f4788532ef
4
- data.tar.gz: a8fa38a8bb06e89517f98f9f0614be555a7d0edcaa1a15bae60244cbdac1fe55
3
+ metadata.gz: 2743068daad1413c929972a69571da069b8857b602a052ea9b6993c2e85afa1c
4
+ data.tar.gz: 13b0e922f785fc7644fab404f5421346b01bd4b8b055a93ad7450aaaf4f68eb7
5
5
  SHA512:
6
- metadata.gz: 90679cc1226dbb20828748c06dd60d213550322a12b576f38f04d218f7caef772723f56cade9300be929af467edd6c254eeef9891f345d9d29b3b8478ebf5520
7
- data.tar.gz: 195b1933fac5e118dcc56dca7324801148be81f0cb7ebb4c42d22aed737db161a956b594c6d6b6093db83b33995aa2d2cbe5be9d17741e476b6c0234d618d54e
6
+ metadata.gz: b4f95309fdc702989a64e17f15d2c72d93220f8c882e81dc3d9822494a678ac69852dc54037b614f2fbb5d4afc7896cafde3a72419adfd4de6c1cc93e25993b9
7
+ data.tar.gz: f136a167aa590ccefd9aba2d246e4af4ee9a361b409116e9e607e55d9933787040e0d871592a02fc3a32f0ecd8cb0a137d38e14d65c9adc7e1306e45195a78ba
data/Gemfile CHANGED
@@ -1,4 +1,5 @@
1
1
  source "https://rubygems.org"
2
+ ruby "2.7.2"
2
3
 
3
4
  # Specify your gem's dependencies in gem_paths.gemspec
4
5
  gemspec
data/Gemfile.lock CHANGED
@@ -1,26 +1,25 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gem_paths (0.2.0)
4
+ gem_paths (0.4.1)
5
5
  bundler (~> 2.0)
6
- thor (~> 0.20)
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.8)
12
- childprocess (>= 0.6.3, < 1.1.0)
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 (~> 0.19)
18
- backports (3.12.0)
19
- builder (3.2.3)
20
- childprocess (1.0.1)
21
- rake (< 13.0)
22
- contracts (0.16.0)
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.3)
40
- ffi (1.10.0)
38
+ diff-lcs (1.4.4)
39
+ ffi (1.15.4)
41
40
  gherkin (5.1.0)
42
- multi_json (1.13.1)
41
+ multi_json (1.15.0)
43
42
  multi_test (0.1.2)
44
- rake (10.5.0)
45
- rspec (3.8.0)
46
- rspec-core (~> 3.8.0)
47
- rspec-expectations (~> 3.8.0)
48
- rspec-mocks (~> 3.8.0)
49
- rspec-core (3.8.0)
50
- rspec-support (~> 3.8.0)
51
- rspec-expectations (3.8.2)
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.8.0)
54
- rspec-mocks (3.8.0)
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.8.0)
57
- rspec-support (3.8.0)
58
- thor (0.20.3)
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 (~> 10.0)
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.0.1
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 `rake spec` and `cucumber features`
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
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'gem_paths/cli'
4
+
5
+ GemPaths::CLI.start
data/exe/gempaths CHANGED
@@ -1,5 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
+ #Legacy command name. It will be removed in version 1.0.0.
4
+ #Use 'gem_paths' command instead
3
5
  require 'gem_paths/cli'
4
6
 
5
7
  GemPaths::CLI.start
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.20"
27
- spec.add_development_dependency "rake", "~> 10.0"
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
- say GemPaths::List.to_yaml
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)
@@ -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
@@ -1,3 +1,3 @@
1
1
  module GemPaths
2
- VERSION = "0.2.0"
2
+ VERSION = "0.4.1"
3
3
  end
data/plugins.rb ADDED
@@ -0,0 +1,3 @@
1
+ require 'bundler/command'
2
+ require 'gem_paths/plugin'
3
+ GemPaths::Plugin.register
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.2.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: 2019-03-14 00:00:00.000000000 Z
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.20'
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.20'
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: '10.0'
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: '10.0'
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
- rubyforge_project:
142
- rubygems_version: 2.7.7
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.