stack_car 0.16.0 → 0.18.0

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: f65e5a4cb61c3b0ae89c7a41866723cfb7caf9e1853a566279eb178181746774
4
- data.tar.gz: 6624f7b9f2bb1dc6faea803a4d8f19cf97fdc03939a90082c20600c4021066f6
3
+ metadata.gz: a6ed8d5c6219471376a05ccc900ef285e6dd0409c4b6954a115282280fdbfb38
4
+ data.tar.gz: f87e0c76404381eda7bcf77e08ea24a937f197556cb77ad0e677540db09eba08
5
5
  SHA512:
6
- metadata.gz: ef5bd6bfac0e8c0301778a79bdb17cb7f23d22cdab0e661d951f734b16de61a69288eb4c923aee552de339811f0a45b55a5645e55042b067e86965cb0421ac30
7
- data.tar.gz: b7fd067e699c6a93f38d4c384de5f7270b6a7fc61b6e28fce4c380bdf77599e278f57d762e825a80f893fe2c435c73679c7542aff9fee32fe37ebb5fa8c7c702
6
+ metadata.gz: 348b12ba0d514385f5b1b1263581e987aae3e2714c8a61aa888305a69fff5ce18b1a83906f04a349054dd4dd275a7df9d7ccbc005ecf3b03be0f0769ab1f25e0
7
+ data.tar.gz: c83f60d3aadd3b9e8aae2bd2fec26ed27759fdf4a8be6a1ef088f1e76eb841625cc00ce2982aab1f1c6261579f06a06eafe303953092aa90125053da970a3c7e
@@ -0,0 +1,18 @@
1
+ # Story
2
+
3
+ # Acceptance Criteria
4
+
5
+ - [ ]
6
+
7
+ # Screenshots / Video
8
+
9
+ <details>
10
+ <summary></summary>
11
+
12
+ </details>
13
+
14
+ # Testing Instructions and Sample Files
15
+
16
+ -
17
+
18
+ # Notes
@@ -0,0 +1,18 @@
1
+ # Story
2
+
3
+ Refs
4
+
5
+ - #issuenumber
6
+
7
+ # Expected Behavior Before Changes
8
+
9
+ # Expected Behavior After Changes
10
+
11
+ # Screenshots / Video
12
+
13
+ <details>
14
+ <summary></summary>
15
+
16
+ </details>
17
+
18
+ # Notes
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
- require 'byebug'
5
+
6
6
  module StackCar
7
7
  class HammerOfTheGods < Thor
8
8
  include Thor::Actions
@@ -18,11 +18,11 @@ module StackCar
18
18
  method_option :service, default: 'web', type: :string, aliases: '-s'
19
19
  method_option :build, default: false, type: :boolean, aliases: '-b'
20
20
  method_option :logs, default: true, type: :boolean
21
- desc "up", "starts docker compose with rebuild and orphan removal, defaults to web"
21
+ desc "up", "starts docker compose with rebuild, defaults to web"
22
22
  def up
23
23
  setup
24
24
  ensure_development_env
25
- args = ['--remove-orphans']
25
+ args = []
26
26
  args << '--build' if options[:build]
27
27
  if options[:build]
28
28
  run("#{dotenv} docker compose pull #{options[:service]}")
@@ -42,7 +42,6 @@ module StackCar
42
42
 
43
43
  method_option :volumes, aliases: '-v'
44
44
  method_option :rmi
45
- method_option :'remove-orphans'
46
45
  method_option :service, aliases: '-s'
47
46
  method_option :timeout, aliases: '-t'
48
47
  method_option :all, aliases: '-a'
@@ -75,13 +74,12 @@ module StackCar
75
74
 
76
75
  args = []
77
76
  if options[:all]
78
- prompt_run_confirmation('--all will remove all containers, volumes, networks, local images, and orphaned containers. Continue?')
77
+ prompt_run_confirmation('--all will remove all containers, volumes, networks, and local images. Continue?')
79
78
 
80
- args = %w[--volumes --rmi=local --remove-orphans]
79
+ args = %w[--volumes --rmi=local]
81
80
  else
82
81
  args << '--volumes' if options[:volumes]
83
82
  args << '--rmi=local' if options[:rmi]
84
- args << '--remove-orphans' if options[:'remove-orphans']
85
83
  args << '--timeout' if options[:timeout]
86
84
  end
87
85
 
@@ -172,7 +170,7 @@ module StackCar
172
170
  sha = `git rev-parse HEAD`[0..8]
173
171
  registry = "#{ENV['REGISTRY_HOST']}#{ENV['REGISTRY_URI']}"
174
172
  tag = ENV["TAG"] || 'latest'
175
- unless File.exists?("#{ENV['HOME']}/.docker/config.json") && File.readlines("#{ENV['HOME']}/.docker/config.json").grep(/#{ENV['REGISTRY_HOST']}/).size > 0
173
+ unless File.exist?("#{ENV['HOME']}/.docker/config.json") && File.readlines("#{ENV['HOME']}/.docker/config.json").grep(/#{ENV['REGISTRY_HOST']}/).size > 0
176
174
  run_with_exit("#{dotenv(environment)} docker login #{ENV['REGISTRY_HOST']}")
177
175
  end
178
176
  run_with_exit("#{dotenv(environment)} docker tag #{registry}:#{tag} #{registry}:#{environment}-#{timestamp}")
@@ -284,7 +282,7 @@ module StackCar
284
282
  template("solrcloud-assign-configset.sh", "bin/solrcloud-assign-configset.sh")
285
283
  end
286
284
 
287
- if File.exists?('README.md')
285
+ if File.exist?('README.md')
288
286
  prepend_to_file "README.md" do
289
287
  File.read("#{self.class.source_root}/README.md")
290
288
  end
@@ -385,7 +383,7 @@ module StackCar
385
383
 
386
384
  def find_config(dir)
387
385
  path = File.join(dir, '.stackcar_rc')
388
- if File.exists?(path)
386
+ if File.exist?(path)
389
387
  return path
390
388
  elsif dir == "/"
391
389
  return nil
@@ -395,7 +393,7 @@ module StackCar
395
393
  end
396
394
 
397
395
  def ensure_development_env
398
- if !File.exists?('.env.development')
396
+ if !File.exist?('.env.development')
399
397
  template(".env.development.erb", ".env.development")
400
398
  end
401
399
  end
@@ -405,7 +403,7 @@ module StackCar
405
403
  end
406
404
 
407
405
  def setup
408
- if File.exists?('stack_car')
406
+ if File.exist?('stack_car')
409
407
  @sc_dir = true
410
408
  Dir.chdir('stack_car')
411
409
  self.destination_root += "/stack_car"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module StackCar
4
- VERSION = '0.16.0'
4
+ VERSION = '0.18.0'
5
5
  end
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", "~> 1.13"
23
- spec.add_development_dependency "byebug"
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", "~> 2.2"
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
@@ -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.exists?(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.16.0
4
+ version: 0.18.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: 2023-03-14 00:00:00.000000000 Z
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: '10.0'
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: '10.0'
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: '2.2'
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: '2.2'
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.1.6
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