prebundler 0.14.1 → 0.15.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2d4afddbb8d00634313f892422e9c2b379b9bf5d1740ea4f2797cd92f8d5e603
4
- data.tar.gz: 12d9ee04ea5d4799914980894b9c206d4b4bd33ed452f66f127aabd7918ac202
3
+ metadata.gz: c4367b16dd270ecc8daa363de78e174123030871509d0fae9051194e82c086cb
4
+ data.tar.gz: 4d72e1df239d66f4774b4c330f6d9af90fb0c98649338e7cca6c56b2c4dbb776
5
5
  SHA512:
6
- metadata.gz: 7f868e1979de154b496ea55734d1929b13a63cb34851da9347bb721c0f8cc47e7ee2e0eb82746fc5899e24de63490250fcb1525f98e4944c9accbad2d3786799
7
- data.tar.gz: 80182f23a6473242cea7cb8b3eb05c44903e94fbc237d3d8bd20b6b28b2e4187de0afc66f4e9f03039aae9f872b3fd17cf77a48750d89450f18786cd65099d1f
6
+ metadata.gz: 0f7db5d69593de1cc601990a74a6d2dce27c9ff2f4d36dd7128201120386cb42b485edd1dc71fda4abf2c5a33a8b7b215351facc22718c8d6b6038b61600db8a
7
+ data.tar.gz: 611ad14c794f56d6e986e69f5dc03434ae08d3d09e22e23cd98049da74aa69032894612dab35ffd35d308db36889f50106e261613ff8a46bbf21c5e1e8891ced
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## 0.15.1
2
+ * Specify file path when evaling other gemfiles.
3
+ - `instance_eval` takes two additional arguments, the first of which populates the value of the `__FILE__` constant. This argument was not being passed in several cases, which led to an unexpected working directory when calling `eval_gemfile` with relative paths.
4
+
5
+ ## 0.15.0
6
+ * Add the `prebundle lock` command, which simply invokes `bundle lock`.
7
+
1
8
  ## 0.14.1
2
9
  * Set file permissions when extracting tarballs.
3
10
 
data/Gemfile CHANGED
@@ -5,6 +5,7 @@ gemspec
5
5
  group :development, :test do
6
6
  gem 'pry-byebug'
7
7
  gem 'rake'
8
+ gem 'rexml'
8
9
  end
9
10
 
10
11
  group :test do
@@ -110,12 +110,19 @@ module Prebundler
110
110
  command :binstubs do
111
111
  end
112
112
 
113
+ desc 'Generate binstubs. Accepts the same arguments as `bundle lock`.'
114
+ command :lock do
115
+ end
116
+
113
117
  singleton_class.send(:prepend, Module.new do
114
118
  def run(args)
115
- if args[0] == 'binstubs'
116
- exec "bundle binstubs #{args[1..-1].join(' ')}"
117
- else
118
- super
119
+ case args[0]
120
+ when 'binstubs'
121
+ exec "bundle binstubs #{args[1..-1].join(' ')}"
122
+ when 'lock'
123
+ exec "bundle lock #{args[1..-1].join(' ')}"
124
+ else
125
+ super
119
126
  end
120
127
  end
121
128
  end)
@@ -14,7 +14,8 @@ module Prebundler
14
14
  @gemfile_path = gemfile_path
15
15
  @bundle_path = bundle_path
16
16
  @prefix = options[:prefix]
17
- instance_eval(File.read(gemfile_path))
17
+ gemfile_path = File.expand_path(gemfile_path)
18
+ instance_eval(File.read(gemfile_path), gemfile_path, 0)
18
19
 
19
20
  lockfile = Bundler::LockfileParser.new(File.read("#{gemfile_path}.lock"))
20
21
 
@@ -75,7 +76,8 @@ module Prebundler
75
76
  end
76
77
 
77
78
  def eval_gemfile(path)
78
- instance_eval(File.read(path))
79
+ path = File.expand_path(path)
80
+ instance_eval(File.read(path), path, 0)
79
81
  end
80
82
  end
81
83
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Prebundler
4
- VERSION = '0.14.1'
4
+ VERSION = '0.15.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prebundler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.1
4
+ version: 0.15.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cameron Dutro
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-05 00:00:00.000000000 Z
11
+ date: 2023-08-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -130,7 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
130
130
  - !ruby/object:Gem::Version
131
131
  version: '0'
132
132
  requirements: []
133
- rubygems_version: 3.3.3
133
+ rubygems_version: 3.3.19
134
134
  signing_key:
135
135
  specification_version: 4
136
136
  summary: Gem dependency prebuilder