firespring_dev_commands 2.1.21.pre.alpha.4 → 2.1.21.pre.alpha.6
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 998d0c1c4b6fe67c9cbe55859df58e6981c35b4b290f3f97ca3f5002450ac532
|
4
|
+
data.tar.gz: e5925dcb8074fc053a009ad00039b15ac7c0a18d2e2997d392a7ab3fcb52f2b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ac1ff30a2ab2b72fbd30dbdc2d77699f1e15b648f7d33974bc37a5d1ddd94d385c44739c37b29de74e40bb7bb33215dffd9c65b387abaf001b29b840c160bae0
|
7
|
+
data.tar.gz: 309d92d6c32a731163e0b44a11613079bfb7df216a65e54cfe6a1391f94cd4f74919698eac79b9be5a884a71d728503930a043850afcfc2b7e49c5bc280e0e06
|
@@ -3,13 +3,11 @@ module Dev
|
|
3
3
|
module Coverage
|
4
4
|
# Class for checking code coverage using cobertura
|
5
5
|
class Cobertura
|
6
|
-
attr_reader :
|
6
|
+
attr_reader :local_filename, :container_filename, :filename, :threshold
|
7
7
|
|
8
|
-
def initialize(filename: 'cobertura.xml', threshold: nil, container_path: nil, local_path: nil)
|
8
|
+
def initialize(filename: File.join('coverage', 'cobertura.xml'), threshold: nil, container_path: nil, local_path: nil)
|
9
9
|
@filename = filename
|
10
|
-
@local_path = local_path
|
11
10
|
@local_filename = File.join(local_path || '.', @filename)
|
12
|
-
@container_path = container_path
|
13
11
|
@container_filename = File.join(container_path || '.', @filename)
|
14
12
|
@threshold = threshold.to_f
|
15
13
|
end
|
@@ -29,8 +27,7 @@ module Dev
|
|
29
27
|
# If an application has been specified and the file does not exist locally, attempt to copy it back from the docker container
|
30
28
|
if application && !File.exist?(local_filename)
|
31
29
|
container = Dev::Docker::Compose.new.container_by_name(application)
|
32
|
-
|
33
|
-
Dev::Docker.new.copy_from_container(container, File.join(workdir, filename), local_filename, required: true)
|
30
|
+
Dev::Docker.new.copy_from_container(container, container_filename, local_filename, required: true)
|
34
31
|
end
|
35
32
|
|
36
33
|
# Load the file from disk and parse with ox
|
@@ -139,12 +139,13 @@ module Dev
|
|
139
139
|
end
|
140
140
|
|
141
141
|
# Gets the default working dir of the container
|
142
|
-
def
|
142
|
+
def working_dir(container)
|
143
143
|
container.json['Config']['WorkingDir']
|
144
144
|
end
|
145
145
|
|
146
146
|
# Copies the source path on your local machine to the destination path on the container
|
147
147
|
def copy_to_container(container, source_path, dest_path)
|
148
|
+
dest_path = File.join(working_dir(container), dest_path) unless dest_path.start_with?(File::SEPARATOR)
|
148
149
|
LOG.info "Copying #{source_path} to #{dest_path}... "
|
149
150
|
|
150
151
|
container.archive_in(source_path, dest_path, overwrite: true)
|
@@ -159,6 +160,7 @@ module Dev
|
|
159
160
|
# Copies the source path on the container to the destination path on your local machine
|
160
161
|
# If required is set to true, the command will fail if the source path does not exist on the container
|
161
162
|
def copy_from_container(container, source_path, dest_path, required: true)
|
163
|
+
source_path = File.join(working_dir(container), source_path) unless source_path.start_with?(File::SEPARATOR)
|
162
164
|
LOG.info "Copying #{source_path} to #{dest_path}... "
|
163
165
|
|
164
166
|
tar = StringIO.new
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: firespring_dev_commands
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.21.pre.alpha.
|
4
|
+
version: 2.1.21.pre.alpha.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Firespring
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-12-
|
11
|
+
date: 2023-12-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|