label_weaver 0.0.11 → 0.0.12
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 +4 -4
- data/label_weaver.gemspec +1 -1
- data/lib/label_weaver/temp_repo.rb +8 -7
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 05fe807fe77e2b113196ff90e2aaba53c75594a68d95c1164e304640836b7ba0
|
4
|
+
data.tar.gz: 95325968105011a5ab6a3252f6cc445c5e7df848114f2c456e4d15d93e913098
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ac762eebf1ece654e3dd2ef6e37e8154d2e5a9794d999bfed55ae52a92b86b0066e333c209cac5c844d12e898aef172752bd36803ccefc609cae03ee2c7f58a
|
7
|
+
data.tar.gz: 1d2a7cace4b93d1d04939382f892d5442abe36861855926218c7682f62b5182007fea0b09910addb7ee427ab5d6a230b19b5ea3a608887bdc3a1fcaf920605b5
|
data/label_weaver.gemspec
CHANGED
@@ -31,7 +31,7 @@ module LabelWeaver
|
|
31
31
|
# @return [Time] the last time the file was part of a commit, closest we can get to an mtime
|
32
32
|
#
|
33
33
|
def timestamp_for(file)
|
34
|
-
|
34
|
+
git.log(1).path(file).first.date
|
35
35
|
end
|
36
36
|
|
37
37
|
def digest_for(file)
|
@@ -52,11 +52,12 @@ module LabelWeaver
|
|
52
52
|
end
|
53
53
|
|
54
54
|
if repository_path.exist?
|
55
|
-
logger.info "Pulling latest changes from remote repository (#{repository_url})..."
|
55
|
+
logger.info "Pulling latest changes from remote repository (#{repository_url}##{branch})..."
|
56
56
|
|
57
|
-
|
57
|
+
git.fetch(all: true, force: true)
|
58
|
+
git.checkout(branch)
|
58
59
|
else
|
59
|
-
logger.info "Cloning remote repository, this might take a while..."
|
60
|
+
logger.info "Cloning remote repository (#{repository_url}##{branch}), this might take a while..."
|
60
61
|
|
61
62
|
Git.clone(
|
62
63
|
repository_url,
|
@@ -101,7 +102,7 @@ module LabelWeaver
|
|
101
102
|
logger.info "Updating repository timestamps..."
|
102
103
|
repository_path.glob("**/*", File::FNM_DOTMATCH).each do |file|
|
103
104
|
# Set the file modification times to the last time they were updated in a commit
|
104
|
-
time =
|
105
|
+
time = git.all.log.path(file).first.date
|
105
106
|
file.utime(time, time)
|
106
107
|
end
|
107
108
|
end
|
@@ -135,8 +136,8 @@ module LabelWeaver
|
|
135
136
|
repository_path.glob("**/*", File::FNM_DOTMATCH).select { _1.file? || _1.symlink? }
|
136
137
|
end
|
137
138
|
|
138
|
-
def
|
139
|
-
@
|
139
|
+
def git
|
140
|
+
@git ||= Git.open(repository_path)
|
140
141
|
end
|
141
142
|
end
|
142
143
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: label_weaver
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stefan Exner
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-12-
|
11
|
+
date: 2024-12-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cogger
|