label_weaver 0.0.11 → 0.0.12

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c0e81d732a25f3c7ed75a3c975633aefcefe0ba5b0c6c33fbb2565d31469e3f4
4
- data.tar.gz: c90c1d33620e1b5c76aac616db225c431fe350f0a2a7cd935a6e77d29b6e4af9
3
+ metadata.gz: 05fe807fe77e2b113196ff90e2aaba53c75594a68d95c1164e304640836b7ba0
4
+ data.tar.gz: 95325968105011a5ab6a3252f6cc445c5e7df848114f2c456e4d15d93e913098
5
5
  SHA512:
6
- metadata.gz: 02ebb42b5c87d1ad2e4a5eeadb0d7baf731566144f0296b853345fbe83d292083fa5b1ff7f63ac07a9538bca53bf247aa0732d7f3306a92153382a8c0ae956c7
7
- data.tar.gz: 78c68d51a19bfc52cc16993bf02b758f5759027f90044d066818a742c541bf45cc7106b0563b0365ff54ee8d6effa2daafa2acbb3ab110b2166037bb408df11c
6
+ metadata.gz: 9ac762eebf1ece654e3dd2ef6e37e8154d2e5a9794d999bfed55ae52a92b86b0066e333c209cac5c844d12e898aef172752bd36803ccefc609cae03ee2c7f58a
7
+ data.tar.gz: 1d2a7cace4b93d1d04939382f892d5442abe36861855926218c7682f62b5182007fea0b09910addb7ee427ab5d6a230b19b5ea3a608887bdc3a1fcaf920605b5
data/label_weaver.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "label_weaver"
5
- spec.version = "0.0.11"
5
+ spec.version = "0.0.12"
6
6
  spec.authors = ["Stefan Exner"]
7
7
  spec.email = ["stex@stex.codes"]
8
8
  spec.homepage = "https://gitlab.com/lopo-tech/label_weaver"
@@ -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
- repo.log(1).path(file).first.date
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
- repo.pull("origin", branch)
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 = repo.all.log.path(file).first.date
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 repo
139
- @repo ||= Git.open(repository_path)
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.11
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 00:00:00.000000000 Z
11
+ date: 2024-12-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cogger