bundler-bare_symlink 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/bundler-bare_symlink.gemspec +30 -0
- data/lib/bundler/bare_symlink/version.rb +5 -0
- data/lib/bundler/bare_symlink.rb +45 -0
- data/plugins.rb +6 -0
- metadata +60 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 76efd5415cc7c941e108dcd38a2ee6916ad8e24d5c418e7839f5178d0d672b6d
|
4
|
+
data.tar.gz: 896a9f4e3b67f9e41a8198291d30a9ea7013004a70db32f757e1508cb32e7a2e
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 3022f0b26bda6b29cedc83fcc757e40b5aa6d40d2be68d53b2c1cdd1491b8160b3d72b8471717ca0958e79768c9612ca52b0eecd936490a3bb3d4784a655136a
|
7
|
+
data.tar.gz: 6a186819aa1cd1ccb8631f46c1f686103bba9ff0e48f4fc6e1c34679c1aa3221abf8b08c722d9848de7bdc90c7d6f913c67c1de271a16f61c16b2ae2022a4bd5
|
@@ -0,0 +1,30 @@
|
|
1
|
+
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require "bundler/bare_symlink/version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "bundler-bare_symlink"
|
8
|
+
spec.version = Bundler::BareSymlink::VERSION
|
9
|
+
spec.authors = ["Pete Kinnecom", "Matouš Borák"]
|
10
|
+
spec.email = ["git@k7u7.com"]
|
11
|
+
spec.licenses = ["WTFPL"]
|
12
|
+
|
13
|
+
spec.summary = "Post-install hook for bundler to create symlinks all gems from a local directory, using just bare gem names without versions"
|
14
|
+
spec.homepage = "https://github.com/borama/bundler-bare-symlink"
|
15
|
+
|
16
|
+
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
17
|
+
|
18
|
+
spec.files = [
|
19
|
+
"bundler-bare_symlink.gemspec",
|
20
|
+
"plugins.rb",
|
21
|
+
"lib/bundler/bare_symlink.rb",
|
22
|
+
"lib/bundler/bare_symlink/version.rb"
|
23
|
+
]
|
24
|
+
spec.bindir = "exe"
|
25
|
+
spec.executables = []
|
26
|
+
spec.require_paths = ["lib"]
|
27
|
+
|
28
|
+
spec.required_ruby_version = ">= 3.0"
|
29
|
+
spec.add_runtime_dependency "bundler", "~> 2.0"
|
30
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
require "bundler/bare_symlink/version"
|
2
|
+
|
3
|
+
require "tmpdir"
|
4
|
+
require "fileutils"
|
5
|
+
|
6
|
+
module Bundler
|
7
|
+
module BareSymlink
|
8
|
+
def self.call
|
9
|
+
root_path = File.dirname(Bundler.default_gemfile)
|
10
|
+
target_dir = File.join(
|
11
|
+
root_path,
|
12
|
+
'.bundle',
|
13
|
+
'gems'
|
14
|
+
)
|
15
|
+
|
16
|
+
Dir.mktmpdir do |tmpdir|
|
17
|
+
link_dir = File.join(tmpdir, 'gems')
|
18
|
+
FileUtils.mkdir(link_dir)
|
19
|
+
|
20
|
+
Bundler
|
21
|
+
.load
|
22
|
+
.specs
|
23
|
+
.inject({}) { |result, spec| result[spec.name] = spec.full_gem_path; result }
|
24
|
+
.reject { |name, gem_path| gem_path.start_with?(root_path) }
|
25
|
+
.each do |name, gem_path|
|
26
|
+
target = File.join(link_dir, name)
|
27
|
+
FileUtils.ln_s(gem_path, target)
|
28
|
+
end
|
29
|
+
|
30
|
+
FileUtils.mkdir_p(File.dirname(target_dir))
|
31
|
+
Bundler.ui.info("Symlinking bundled gems into #{target_dir}")
|
32
|
+
FileUtils.rm_r(target_dir) if File.exist?(target_dir)
|
33
|
+
FileUtils.cp_r(link_dir, target_dir)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
class Command
|
38
|
+
Plugin::API.command('bare_symlink', self)
|
39
|
+
|
40
|
+
def exec(name, args)
|
41
|
+
BareSymlink.call
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
data/plugins.rb
ADDED
metadata
ADDED
@@ -0,0 +1,60 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: bundler-bare_symlink
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Pete Kinnecom
|
8
|
+
- Matouš Borák
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2025-02-23 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
|
+
email:
|
28
|
+
- git@k7u7.com
|
29
|
+
executables: []
|
30
|
+
extensions: []
|
31
|
+
extra_rdoc_files: []
|
32
|
+
files:
|
33
|
+
- bundler-bare_symlink.gemspec
|
34
|
+
- lib/bundler/bare_symlink.rb
|
35
|
+
- lib/bundler/bare_symlink/version.rb
|
36
|
+
- plugins.rb
|
37
|
+
homepage: https://github.com/borama/bundler-bare-symlink
|
38
|
+
licenses:
|
39
|
+
- WTFPL
|
40
|
+
metadata:
|
41
|
+
allowed_push_host: https://rubygems.org
|
42
|
+
rdoc_options: []
|
43
|
+
require_paths:
|
44
|
+
- lib
|
45
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
46
|
+
requirements:
|
47
|
+
- - ">="
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '3.0'
|
50
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
requirements: []
|
56
|
+
rubygems_version: 3.6.2
|
57
|
+
specification_version: 4
|
58
|
+
summary: Post-install hook for bundler to create symlinks all gems from a local directory,
|
59
|
+
using just bare gem names without versions
|
60
|
+
test_files: []
|