teapot 3.5.1 → 3.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/teapot/command/fetch.rb +10 -2
- data/lib/teapot/command/status.rb +21 -14
- data/lib/teapot/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 07b32fe7cada8717c48838a537d67f16847a2dbe649e7642a36c23c94bcade3f
|
4
|
+
data.tar.gz: 4b8a7bdccf99fd72286e3e39b9c81e276ad7d4cec13328d4cc19db5c0db46224
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc50bb10bfbd6c2055c1c0c1582b21bddf2a5cec6f5f3c0b0e8bba604969c329f24405726cf2dd947531cf527efeb92f54b0c2236aa8513b3376c6832a302a08
|
7
|
+
data.tar.gz: 39cfa9e57f70cac8d1fd719b30c6049f39158e7c8b31a43fee4fd57231c617cc5bf5434c468a124a673d45e6640d45ab3a380a051d194ad43e37c4fc18880053
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/teapot/command/fetch.rb
CHANGED
@@ -122,7 +122,15 @@ module Teapot
|
|
122
122
|
# We should prompt for username/password if required...
|
123
123
|
return Rugged::Credentials::SshKeyFromAgent.new(username: username)
|
124
124
|
end
|
125
|
-
|
125
|
+
|
126
|
+
def modified?(repository)
|
127
|
+
repository.status.each do |path, status|
|
128
|
+
return true if status != [:ignored]
|
129
|
+
end
|
130
|
+
|
131
|
+
return false
|
132
|
+
end
|
133
|
+
|
126
134
|
def clone_or_pull_package(context, configuration, package, package_lock, logger)
|
127
135
|
logger.info "Processing #{package}..." #.color(:cyan)
|
128
136
|
|
@@ -150,7 +158,7 @@ module Teapot
|
|
150
158
|
repository = Rugged::Repository.new(destination_path.to_s)
|
151
159
|
|
152
160
|
# Are there uncommitted changes in the work tree?
|
153
|
-
if repository
|
161
|
+
if modified?(repository)
|
154
162
|
raise FetchError.new(package, "Uncommited local modifications")
|
155
163
|
end
|
156
164
|
|
@@ -35,26 +35,33 @@ module Teapot
|
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|
38
|
+
def repository_for(package)
|
39
|
+
Rugged::Repository.new(package.path.to_s)
|
40
|
+
rescue Rugged::RepositoryError
|
41
|
+
# In some cases, a repository might not exist yet, so just skip the package.
|
42
|
+
nil
|
43
|
+
end
|
44
|
+
|
38
45
|
def process(selection)
|
39
46
|
context = selection.context
|
40
47
|
terminal = self.terminal
|
41
48
|
|
42
49
|
selection.resolved.each do |package|
|
43
|
-
repository =
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
50
|
+
if repository = repository_for(package)
|
51
|
+
changes = {}
|
52
|
+
repository.status do |file, status|
|
53
|
+
unless status == [:ignored]
|
54
|
+
changes[file] = status
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
next if changes.empty?
|
59
|
+
|
60
|
+
terminal.puts "Package #{package.name} (from #{package.path}):"
|
61
|
+
|
62
|
+
changes.each do |file, statuses|
|
63
|
+
terminal.puts "\t#{file} (#{statuses})", style: statuses.last
|
49
64
|
end
|
50
|
-
end
|
51
|
-
|
52
|
-
next if changes.empty?
|
53
|
-
|
54
|
-
terminal.puts "Package #{package.name} (from #{package.path}):"
|
55
|
-
|
56
|
-
changes.each do |file, statuses|
|
57
|
-
terminal.puts "\t#{file} (#{statuses})", style: statuses.last
|
58
65
|
end
|
59
66
|
end
|
60
67
|
end
|
data/lib/teapot/version.rb
CHANGED
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: teapot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.5.
|
4
|
+
version: 3.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
@@ -37,7 +37,7 @@ cert_chain:
|
|
37
37
|
Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
|
38
38
|
voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
|
39
39
|
-----END CERTIFICATE-----
|
40
|
-
date: 2023-04-
|
40
|
+
date: 2023-04-23 00:00:00.000000000 Z
|
41
41
|
dependencies:
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: build
|
metadata.gz.sig
CHANGED
Binary file
|