shiplane 0.2.28 → 0.2.29
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/lib/shiplane/build.rb +2 -1
- data/lib/shiplane/compose_hash.rb +2 -1
- data/lib/shiplane/configuration.rb +3 -1
- data/lib/shiplane/deploy/container_configuration.rb +1 -0
- data/lib/shiplane/host.rb +3 -1
- data/lib/shiplane/safe_yaml_loading.rb +23 -0
- data/lib/shiplane/version.rb +1 -1
- metadata +7 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b2ea5d4baf2676256974282972611a395344d73afccc81cff676560cd89f1410
|
|
4
|
+
data.tar.gz: 890da5156c4d5868acfc6e718aaff0258af6c7f1c24b042ea7f5590cb20d065e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0d02813438dbfbfd83b6681657a4bc54feeaadd423066041a05c2e045e707d0987505ba5249da9cba95408fee8f765482832fa397f5d01e3116f1f30e2b61e9d
|
|
7
|
+
data.tar.gz: 3b5fb0d6a04ccd3a56662bbc943362db2c9a0110229210365429d5f20229c2662f9c704ab43d5d1767eb27e8f9024b7c4d9e1b556639f101e60f17cb544d519e
|
data/lib/shiplane/build.rb
CHANGED
|
@@ -5,6 +5,7 @@ require_relative 'checkout_artifact'
|
|
|
5
5
|
require_relative 'convert_compose_file'
|
|
6
6
|
require_relative 'convert_dockerfile'
|
|
7
7
|
require_relative 'configuration'
|
|
8
|
+
require_relative 'safe_yaml_loading'
|
|
8
9
|
|
|
9
10
|
module Shiplane
|
|
10
11
|
class Build
|
|
@@ -139,7 +140,7 @@ module Shiplane
|
|
|
139
140
|
end
|
|
140
141
|
|
|
141
142
|
def docker_config
|
|
142
|
-
@docker_config ||=
|
|
143
|
+
@docker_config ||= Shiplane::SafeYamlLoading.load_file(docker_compose_filepath)
|
|
143
144
|
end
|
|
144
145
|
|
|
145
146
|
def buildable_artifacts
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
require_relative 'extensions'
|
|
2
|
+
require_relative 'safe_yaml_loading'
|
|
2
3
|
|
|
3
4
|
module Shiplane
|
|
4
5
|
class ComposeHash
|
|
@@ -14,7 +15,7 @@ module Shiplane
|
|
|
14
15
|
end
|
|
15
16
|
|
|
16
17
|
def compose_hash
|
|
17
|
-
@compose_hash ||=
|
|
18
|
+
@compose_hash ||= Shiplane::SafeYamlLoading.load(compose_file)
|
|
18
19
|
end
|
|
19
20
|
|
|
20
21
|
def whitelisted_hash
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
require_relative 'safe_yaml_loading'
|
|
2
|
+
|
|
1
3
|
module Shiplane
|
|
2
4
|
class Configuration
|
|
3
5
|
attr_accessor :project_folder, :stage
|
|
@@ -12,7 +14,7 @@ module Shiplane
|
|
|
12
14
|
end
|
|
13
15
|
|
|
14
16
|
def config
|
|
15
|
-
@config ||=
|
|
17
|
+
@config ||= Shiplane::SafeYamlLoading.load_file(shiplane_config_file)
|
|
16
18
|
end
|
|
17
19
|
|
|
18
20
|
def build_config
|
|
@@ -91,6 +91,7 @@ module Shiplane
|
|
|
91
91
|
"--network=#{networks.first}",
|
|
92
92
|
"--network-alias=#{network_alias}",
|
|
93
93
|
virtual_host ? "-e VIRTUAL_HOST=#{virtual_host}" : nil,
|
|
94
|
+
"-e VIRTUAL_PORT=#{port}",
|
|
94
95
|
letsencrypt_host ? "-e LETSENCRYPT_HOST=#{letsencrypt_host}" : nil,
|
|
95
96
|
letsencrypt_email ? "-e LETSENCRYPT_EMAIL=#{letsencrypt_email}" : nil,
|
|
96
97
|
environment.map{ |key, value| "-e #{key}=#{value}" },
|
data/lib/shiplane/host.rb
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
require 'sshkit'
|
|
2
2
|
require 'sshkit/dsl'
|
|
3
3
|
|
|
4
|
+
require_relative 'safe_yaml_loading'
|
|
5
|
+
|
|
4
6
|
module Shiplane
|
|
5
7
|
class Host
|
|
6
8
|
extend Forwardable
|
|
@@ -82,7 +84,7 @@ module Shiplane
|
|
|
82
84
|
end
|
|
83
85
|
|
|
84
86
|
def self.config
|
|
85
|
-
@config ||=
|
|
87
|
+
@config ||= Shiplane::SafeYamlLoading.load_file(config_filepath)
|
|
86
88
|
end
|
|
87
89
|
|
|
88
90
|
def self.config_filepath
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
require 'yaml'
|
|
2
|
+
|
|
3
|
+
module Shiplane
|
|
4
|
+
class SafeYamlLoading
|
|
5
|
+
def self.load_file(filepath)
|
|
6
|
+
load(File.read(filepath))
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
def self.load_with_aliases(yaml)
|
|
10
|
+
YAML.load(yaml, aliases: true)
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def self.load_without_aliases(yaml)
|
|
14
|
+
YAML.load(yaml)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
if Psych && Gem::Version.new(Psych::VERSION) > Gem::Version.new("4.0.0")
|
|
18
|
+
define_singleton_method :load, method(:load_with_aliases)
|
|
19
|
+
else
|
|
20
|
+
define_singleton_method :load, method(:load_without_aliases)
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
data/lib/shiplane/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: shiplane
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.29
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- John Epperson
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2024-11-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: shiplane_bootstrappers_chef
|
|
@@ -16,28 +16,28 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - '='
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 0.2.
|
|
19
|
+
version: 0.2.29
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - '='
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: 0.2.
|
|
26
|
+
version: 0.2.29
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: shiplane_deployers_capistrano_docker
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
30
30
|
requirements:
|
|
31
31
|
- - '='
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: 0.2.
|
|
33
|
+
version: 0.2.29
|
|
34
34
|
type: :runtime
|
|
35
35
|
prerelease: false
|
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
37
|
requirements:
|
|
38
38
|
- - '='
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: 0.2.
|
|
40
|
+
version: 0.2.29
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
42
|
name: dotenv
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -150,6 +150,7 @@ files:
|
|
|
150
150
|
- lib/shiplane/host.rb
|
|
151
151
|
- lib/shiplane/railtie.rb
|
|
152
152
|
- lib/shiplane/safe_build.rb
|
|
153
|
+
- lib/shiplane/safe_yaml_loading.rb
|
|
153
154
|
- lib/shiplane/tasks/install.rake
|
|
154
155
|
- lib/shiplane/version.rb
|
|
155
156
|
homepage: https://github.com/kirillian/shiplane
|