gem_paths 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 2e3d058c9c410d4ea5dc5cb24eafb7dbf7ddca4370f19931e8efe2c85be0b178
4
+ data.tar.gz: 9372762550102ec570e2b2d4b438ba9b35159de9d872339e0a270d909293757c
5
+ SHA512:
6
+ metadata.gz: 3b6a76a7da04548498ab5a70e1f24878abacb554efa5e043828a8ed20365cbb71f739d72aa514df706177443c90efd22ed09523e37d1653b5f9b81d4d63cb7f8
7
+ data.tar.gz: 34f371a1d60d58fafa8c436907a9d989e845c5a4d4254b2b5f92c6f220f945bce4060d4ff03fbb82adac036c00b01e960f157461ded2d349f98bb0fd24fbe0b6
data/.gitignore ADDED
@@ -0,0 +1,11 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+
10
+ # rspec failure tracking
11
+ .rspec_status
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.travis.yml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ sudo: false
3
+ language: ruby
4
+ cache: bundler
5
+ rvm:
6
+ - 2.4.4
7
+ before_install: gem install bundler -v 2.0.1
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "https://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in gem_paths.gemspec
4
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,71 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ gem_paths (0.1.0)
5
+ bundler (~> 2.0)
6
+ thor (~> 0.20)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ aruba (0.14.8)
12
+ childprocess (>= 0.6.3, < 1.1.0)
13
+ contracts (~> 0.9)
14
+ cucumber (>= 1.3.19)
15
+ ffi (~> 1.9)
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)
24
+ builder (>= 2.1.2)
25
+ cucumber-core (~> 3.2.0)
26
+ cucumber-expressions (~> 6.0.1)
27
+ cucumber-wire (~> 0.0.1)
28
+ diff-lcs (~> 1.3)
29
+ gherkin (~> 5.1.0)
30
+ multi_json (>= 1.7.5, < 2.0)
31
+ multi_test (>= 0.1.2)
32
+ cucumber-core (3.2.1)
33
+ backports (>= 3.8.0)
34
+ cucumber-tag_expressions (~> 1.1.0)
35
+ gherkin (~> 5.0)
36
+ cucumber-expressions (6.0.1)
37
+ cucumber-tag_expressions (1.1.1)
38
+ cucumber-wire (0.0.1)
39
+ diff-lcs (1.3)
40
+ ffi (1.10.0)
41
+ gherkin (5.1.0)
42
+ multi_json (1.13.1)
43
+ 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)
52
+ diff-lcs (>= 1.2.0, < 2.0)
53
+ rspec-support (~> 3.8.0)
54
+ rspec-mocks (3.8.0)
55
+ diff-lcs (>= 1.2.0, < 2.0)
56
+ rspec-support (~> 3.8.0)
57
+ rspec-support (3.8.0)
58
+ thor (0.20.3)
59
+
60
+ PLATFORMS
61
+ ruby
62
+
63
+ DEPENDENCIES
64
+ aruba (~> 0.14)
65
+ cucumber (~> 3.1)
66
+ gem_paths!
67
+ rake (~> 10.0)
68
+ rspec (~> 3.0)
69
+
70
+ BUNDLED WITH
71
+ 2.0.1
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2019
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "gem_paths"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
data/exe/gempaths ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'gem_paths/cli'
4
+
5
+ GemPaths::CLI.start
data/gem_paths.gemspec ADDED
@@ -0,0 +1,31 @@
1
+
2
+ lib = File.expand_path("../lib", __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require "gem_paths/version"
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "gem_paths"
8
+ spec.version = GemPaths::VERSION
9
+ spec.authors = ["Torben Jacobsen"]
10
+ spec.email = ["torben@ic-factory.com"]
11
+ spec.licenses = ['LGPL-3.0']
12
+ spec.summary = %q{Gem to be used in plugin for Bundler, which can list gem paths in various output formats, eg. GNU Make.}
13
+ spec.description = %q{This gem is used to get the paths for all gems known to Bundler in a given project. The paths can be printed in various formats.}
14
+ spec.homepage = "https://github.com/ic-factory/gem_paths"
15
+
16
+ # Specify which files should be added to the gem when it is released.
17
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
18
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
19
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
20
+ end
21
+ spec.bindir = "exe"
22
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
23
+ spec.require_paths = ["lib"]
24
+
25
+ spec.add_dependency "bundler", "~> 2.0"
26
+ spec.add_dependency "thor", "~> 0.20"
27
+ spec.add_development_dependency "rake", "~> 10.0"
28
+ spec.add_development_dependency "rspec", "~> 3.0"
29
+ spec.add_development_dependency "cucumber", "~> 3.1"
30
+ spec.add_development_dependency "aruba", "~> 0.14"
31
+ end
@@ -0,0 +1,14 @@
1
+ require 'thor'
2
+ require 'gem_paths'
3
+
4
+ module GemPaths
5
+ class CLI < Thor
6
+
7
+ desc "list", "List path of each gem"
8
+ # option :format, :type => :string, :banner => 'text|make', :desc => 'Specify the output format'
9
+ def list
10
+ puts GemPaths::List.to_make
11
+ end
12
+
13
+ end
14
+ end
@@ -0,0 +1,21 @@
1
+ module GemPaths
2
+ class List
3
+
4
+
5
+ def self.gem_name_path_map
6
+ Bundler.load.specs.sort_by(&:name).map { |s|
7
+ [
8
+ s.name,
9
+ s.full_gem_path,
10
+ ]
11
+ }
12
+ end
13
+ private_class_method :gem_name_path_map
14
+
15
+
16
+ def self.to_make
17
+ gem_name_path_map.map { |pair| "gempath(#{pair[0]}) := #{pair[1]}" }
18
+ end
19
+ end
20
+
21
+ end
@@ -0,0 +1,3 @@
1
+ module GemPaths
2
+ VERSION = "0.1.0"
3
+ end
data/lib/gem_paths.rb ADDED
@@ -0,0 +1,2 @@
1
+ require "gem_paths/version"
2
+ require 'gem_paths/list'
metadata ADDED
@@ -0,0 +1,146 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: gem_paths
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Torben Jacobsen
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2019-03-12 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '2.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '2.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: thor
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '0.20'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '0.20'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '10.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '10.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '3.0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '3.0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: cucumber
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '3.1'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '3.1'
83
+ - !ruby/object:Gem::Dependency
84
+ name: aruba
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '0.14'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '0.14'
97
+ description: This gem is used to get the paths for all gems known to Bundler in a
98
+ given project. The paths can be printed in various formats.
99
+ email:
100
+ - torben@ic-factory.com
101
+ executables:
102
+ - gempaths
103
+ extensions: []
104
+ extra_rdoc_files: []
105
+ files:
106
+ - ".gitignore"
107
+ - ".rspec"
108
+ - ".travis.yml"
109
+ - Gemfile
110
+ - Gemfile.lock
111
+ - LICENSE
112
+ - Rakefile
113
+ - bin/console
114
+ - bin/setup
115
+ - exe/gempaths
116
+ - gem_paths.gemspec
117
+ - lib/gem_paths.rb
118
+ - lib/gem_paths/cli.rb
119
+ - lib/gem_paths/list.rb
120
+ - lib/gem_paths/version.rb
121
+ homepage: https://github.com/ic-factory/gem_paths
122
+ licenses:
123
+ - LGPL-3.0
124
+ metadata: {}
125
+ post_install_message:
126
+ rdoc_options: []
127
+ require_paths:
128
+ - lib
129
+ required_ruby_version: !ruby/object:Gem::Requirement
130
+ requirements:
131
+ - - ">="
132
+ - !ruby/object:Gem::Version
133
+ version: '0'
134
+ required_rubygems_version: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ requirements: []
140
+ rubyforge_project:
141
+ rubygems_version: 2.7.7
142
+ signing_key:
143
+ specification_version: 4
144
+ summary: Gem to be used in plugin for Bundler, which can list gem paths in various
145
+ output formats, eg. GNU Make.
146
+ test_files: []