git-lite-version-bump 0.17.0 → 0.17.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/git-version-bump.rb +16 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 245fa58c69c2530bf29a431acafb3d1c2072dd685322efe95f2e0a486f57a050
|
4
|
+
data.tar.gz: 9a2b6c6cab12d189fdf6e85ff769bffaa64a1ca0d301f5712e2cd124fb5e9528
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 55b0499ada73ff1ee43db28d8388235dde7c2ebe2e36aed80630d61ac1c59a12e942a8ba9461103e02759e093b54dfe10141b664cd52351a70c743c16bae9b6c
|
7
|
+
data.tar.gz: 5c939fe28ce4faba2fda3016b827b407fbeeb7c021dae79a41316825fae1e256ff0364a35c43dc00e9d6c232d9e2f52f49ef8580c5611d3f8196e0b11e711a85
|
data/lib/git-version-bump.rb
CHANGED
@@ -252,9 +252,14 @@ module GitVersionBump
|
|
252
252
|
# within this file, we can't just look at Gem.location_of_caller, but
|
253
253
|
# instead we need to parse the caller stack ourselves to find which
|
254
254
|
# gem we're trying to version all over.
|
255
|
+
#
|
256
|
+
# Caller returns paths of the form `/path/to/file:100:in method...` on *nix
|
257
|
+
# and `C:\path\to\file:in method...` on Windows. Splitting on colon isn't
|
258
|
+
# reliable since the Windows path has a colon at the beginning, split on :num:
|
259
|
+
# instead since that will always be there no matter the platform.
|
255
260
|
Pathname(
|
256
261
|
caller.
|
257
|
-
map { |l| l.split(
|
262
|
+
map { |l| l.split(/:\d+:/)[0] }.
|
258
263
|
find { |l| l != __FILE__ }
|
259
264
|
).realpath.to_s rescue nil
|
260
265
|
end
|
@@ -265,8 +270,16 @@ module GitVersionBump
|
|
265
270
|
# Grovel through all the loaded gems to try and find the gem
|
266
271
|
# that contains the caller's file.
|
267
272
|
Gem.loaded_specs.values.each do |spec|
|
268
|
-
|
269
|
-
|
273
|
+
# On Windows I have encountered gems that already have an absolute
|
274
|
+
# path, verify that the path is relative before appending to it
|
275
|
+
search_dirs = spec.require_paths.map do |path|
|
276
|
+
if Pathname(path).absolute?
|
277
|
+
path
|
278
|
+
else
|
279
|
+
File.join(spec.full_gem_path, path)
|
280
|
+
end
|
281
|
+
end
|
282
|
+
search_dirs << File.join(spec.full_gem_path, spec.bindir)
|
270
283
|
search_dirs.map! do |d|
|
271
284
|
begin
|
272
285
|
Pathname(d).realpath.to_s
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git-lite-version-bump
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.17.
|
4
|
+
version: 0.17.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Palmer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-05-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: github-release
|
@@ -102,7 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '0'
|
104
104
|
requirements: []
|
105
|
-
rubygems_version: 3.
|
105
|
+
rubygems_version: 3.1.2
|
106
106
|
signing_key:
|
107
107
|
specification_version: 4
|
108
108
|
summary: Manage your app version entirely via git tags (even lite tags)
|