stack_car 0.16.0 → 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/ISSUE_TEMPLATE.md +18 -0
- data/.github/PULL_REQUEST_TEMPLATE.md +18 -0
- data/lib/stack_car/cli.rb +6 -6
- data/lib/stack_car/version.rb +1 -1
- data/lib/stack_car.rb +10 -0
- data/stack_car.gemspec +3 -4
- data/templates/decrypt-secrets +1 -1
- metadata +13 -25
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aed65228d5800ad11558a876bec39f0a8d39e7d26ee8f8129034b96dddce254b
|
4
|
+
data.tar.gz: 34d44f3b1b014a2a47d0b9bbbd2bfd811fbc60eb1a4b3918530742e716dc4757
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee8538051ee7aec8475b020825baa714f3044ed470d7bb65fee76a629667a442c91b38b6fbfa3d56284822b14f4b8b5ebc9bd3add7d09320c697c187b0aca0a6
|
7
|
+
data.tar.gz: 66642618c3291966017e0f22c3b7d1e3e504d12dbeb5f37fcefac3f68fb12dcd2fb454b7550e456f32ee7f42e05fa976266b3a6005f2aad3724511198e8613ff
|
data/lib/stack_car/cli.rb
CHANGED
@@ -2,7 +2,7 @@ require 'thor'
|
|
2
2
|
require 'erb'
|
3
3
|
require 'dotenv'
|
4
4
|
require 'json'
|
5
|
-
|
5
|
+
|
6
6
|
module StackCar
|
7
7
|
class HammerOfTheGods < Thor
|
8
8
|
include Thor::Actions
|
@@ -172,7 +172,7 @@ module StackCar
|
|
172
172
|
sha = `git rev-parse HEAD`[0..8]
|
173
173
|
registry = "#{ENV['REGISTRY_HOST']}#{ENV['REGISTRY_URI']}"
|
174
174
|
tag = ENV["TAG"] || 'latest'
|
175
|
-
unless File.
|
175
|
+
unless File.exist?("#{ENV['HOME']}/.docker/config.json") && File.readlines("#{ENV['HOME']}/.docker/config.json").grep(/#{ENV['REGISTRY_HOST']}/).size > 0
|
176
176
|
run_with_exit("#{dotenv(environment)} docker login #{ENV['REGISTRY_HOST']}")
|
177
177
|
end
|
178
178
|
run_with_exit("#{dotenv(environment)} docker tag #{registry}:#{tag} #{registry}:#{environment}-#{timestamp}")
|
@@ -284,7 +284,7 @@ module StackCar
|
|
284
284
|
template("solrcloud-assign-configset.sh", "bin/solrcloud-assign-configset.sh")
|
285
285
|
end
|
286
286
|
|
287
|
-
if File.
|
287
|
+
if File.exist?('README.md')
|
288
288
|
prepend_to_file "README.md" do
|
289
289
|
File.read("#{self.class.source_root}/README.md")
|
290
290
|
end
|
@@ -385,7 +385,7 @@ module StackCar
|
|
385
385
|
|
386
386
|
def find_config(dir)
|
387
387
|
path = File.join(dir, '.stackcar_rc')
|
388
|
-
if File.
|
388
|
+
if File.exist?(path)
|
389
389
|
return path
|
390
390
|
elsif dir == "/"
|
391
391
|
return nil
|
@@ -395,7 +395,7 @@ module StackCar
|
|
395
395
|
end
|
396
396
|
|
397
397
|
def ensure_development_env
|
398
|
-
if !File.
|
398
|
+
if !File.exist?('.env.development')
|
399
399
|
template(".env.development.erb", ".env.development")
|
400
400
|
end
|
401
401
|
end
|
@@ -405,7 +405,7 @@ module StackCar
|
|
405
405
|
end
|
406
406
|
|
407
407
|
def setup
|
408
|
-
if File.
|
408
|
+
if File.exist?('stack_car')
|
409
409
|
@sc_dir = true
|
410
410
|
Dir.chdir('stack_car')
|
411
411
|
self.destination_root += "/stack_car"
|
data/lib/stack_car/version.rb
CHANGED
data/lib/stack_car.rb
CHANGED
@@ -2,6 +2,16 @@ require "stack_car/version"
|
|
2
2
|
require "stack_car/cli"
|
3
3
|
require "stack_car/dot_rc"
|
4
4
|
|
5
|
+
##
|
6
|
+
# Ruby 3.x removed {File.exists?} in favor of {File.exist?}. This shim ensures that we can run
|
7
|
+
# stack_car in both Ruby 2.7 and Ruby 3.x land.
|
8
|
+
unless File.respond_to?(:exists?)
|
9
|
+
# We're aliasing the class method exist?, hence the `class << File` antics.
|
10
|
+
class << File
|
11
|
+
alias exists? exist?
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
5
15
|
module StackCar
|
6
16
|
# Your code goes here...
|
7
17
|
end
|
data/stack_car.gemspec
CHANGED
@@ -19,14 +19,13 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
20
|
spec.require_paths = ["lib"]
|
21
21
|
|
22
|
-
spec.add_development_dependency "bundler"
|
23
|
-
spec.add_development_dependency "
|
24
|
-
spec.add_development_dependency "rake", "~> 10.0"
|
22
|
+
spec.add_development_dependency "bundler"
|
23
|
+
spec.add_development_dependency "rake"
|
25
24
|
spec.add_development_dependency "rspec", "~> 3.0"
|
26
25
|
spec.add_development_dependency "yard"
|
27
26
|
spec.add_development_dependency "yard-thor"
|
28
27
|
spec.add_development_dependency "pry"
|
29
|
-
spec.add_runtime_dependency "dotenv"
|
28
|
+
spec.add_runtime_dependency "dotenv"
|
30
29
|
spec.add_runtime_dependency "json", "~> 2.3"
|
31
30
|
spec.add_runtime_dependency "thor", "~> 0.19"
|
32
31
|
end
|
data/templates/decrypt-secrets
CHANGED
@@ -13,7 +13,7 @@ Dir.chdir(File.join(parent_dir))
|
|
13
13
|
].each do |files|
|
14
14
|
Dir.glob(files).each do |file|
|
15
15
|
if file.match(/enc/)
|
16
|
-
next unless File.
|
16
|
+
next unless File.exist?(file)
|
17
17
|
cmd = "sops --decrypt #{file} > #{file.gsub(/.enc$/, '')}"
|
18
18
|
puts cmd
|
19
19
|
`#{cmd}`
|
metadata
CHANGED
@@ -1,31 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stack_car
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.17.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rob Kaufman
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-12-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '1.13'
|
20
|
-
type: :development
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '1.13'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: byebug
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|
30
16
|
requirements:
|
31
17
|
- - ">="
|
@@ -42,16 +28,16 @@ dependencies:
|
|
42
28
|
name: rake
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|
44
30
|
requirements:
|
45
|
-
- - "
|
31
|
+
- - ">="
|
46
32
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
33
|
+
version: '0'
|
48
34
|
type: :development
|
49
35
|
prerelease: false
|
50
36
|
version_requirements: !ruby/object:Gem::Requirement
|
51
37
|
requirements:
|
52
|
-
- - "
|
38
|
+
- - ">="
|
53
39
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
40
|
+
version: '0'
|
55
41
|
- !ruby/object:Gem::Dependency
|
56
42
|
name: rspec
|
57
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -112,16 +98,16 @@ dependencies:
|
|
112
98
|
name: dotenv
|
113
99
|
requirement: !ruby/object:Gem::Requirement
|
114
100
|
requirements:
|
115
|
-
- - "
|
101
|
+
- - ">="
|
116
102
|
- !ruby/object:Gem::Version
|
117
|
-
version: '
|
103
|
+
version: '0'
|
118
104
|
type: :runtime
|
119
105
|
prerelease: false
|
120
106
|
version_requirements: !ruby/object:Gem::Requirement
|
121
107
|
requirements:
|
122
|
-
- - "
|
108
|
+
- - ">="
|
123
109
|
- !ruby/object:Gem::Version
|
124
|
-
version: '
|
110
|
+
version: '0'
|
125
111
|
- !ruby/object:Gem::Dependency
|
126
112
|
name: json
|
127
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -159,6 +145,8 @@ executables:
|
|
159
145
|
extensions: []
|
160
146
|
extra_rdoc_files: []
|
161
147
|
files:
|
148
|
+
- ".github/ISSUE_TEMPLATE.md"
|
149
|
+
- ".github/PULL_REQUEST_TEMPLATE.md"
|
162
150
|
- ".github/workflows/rspec-action.yaml"
|
163
151
|
- ".gitignore"
|
164
152
|
- ".gitlab-ci.yml"
|
@@ -267,7 +255,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
267
255
|
- !ruby/object:Gem::Version
|
268
256
|
version: '0'
|
269
257
|
requirements: []
|
270
|
-
rubygems_version: 3.
|
258
|
+
rubygems_version: 3.4.19
|
271
259
|
signing_key:
|
272
260
|
specification_version: 4
|
273
261
|
summary: A tool to make rails + docker easy
|