all_images 0.4.1 → 0.5.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: f1e9a30544cd8da8ff78b08273145dc8c43f30ee61aee97e035444c7eca98b1d
4
- data.tar.gz: faba9ac223de4a106c77fd1dc943ab4933cde3b4a052c7411390e1b7335780d1
3
+ metadata.gz: 05e803f38074cc12ba26b4720f6fadc89e2e4a684ae9755b60d97773c4f8992f
4
+ data.tar.gz: 42864bc243ebf51e1c72285bdbcc7cd1fe37620120bbdfe16d71a4867d73f1e9
5
5
  SHA512:
6
- metadata.gz: 3a95b63a886db349cf62083638f4686a4adefa2e013da197b5ae016cac16fc3f967a35b679a47ba2a86bbecceb85181c7fd85c1411b442891945f2d91ecbe8d8
7
- data.tar.gz: cfb5b0bf0a330623bfb37579f5606da2b2099511f31c7d28263dd249388856418d984d86f00889e1db2825b752ff30a74bf9de1dc90110b886220181ec92d458
6
+ metadata.gz: 1c7900c9400afa3ec720879299212395cb63a77bcba30a02c8d31f687df1d23c697b41e139b5e262e418a42e91d50166af6fd6438c42de73e79364401c24b6df
7
+ data.tar.gz: efc3e9241153ee54b8cc5ce2701040be5ab0b5cd0181b89744c891f2caf8fedbfcc7fde069ca57783997dec763485c1f3da6785c89edfab6151929963ea5afa6
data/CHANGES.md ADDED
@@ -0,0 +1,77 @@
1
+ # Changes
2
+
3
+ ## 2024-09-01 v0.5.0
4
+
5
+ * **Update image processing for parallel execution**:
6
+ + Added random suffix to image names to prevent conflicts between concurrent processes.
7
+ * Added `CHANGES.md` file
8
+
9
+ ## 2024-08-08 v0.4.1
10
+
11
+ * **License File Added**: A license file was added in written form.
12
+
13
+ ## 2024-02-07 v0.4.0
14
+
15
+ * Added support for outputting colors in addition to existing functionality.
16
+
17
+ ## 2023-08-17 v0.3.0
18
+
19
+ * **New Feature**: Allow running scripts within a Docker container, enabling
20
+ more flexible and isolated testing environments.
21
+
22
+ ## 2023-08-17 v0.2.5
23
+
24
+ * Corrected actual checking logic.
25
+
26
+ ## 2023-08-17 v0.2.4
27
+
28
+ * **Improved Error Handling**:
29
+ * Added checks to prevent premature failure in critical sections of the code.
30
+
31
+ ## 2023-06-01 v0.2.3
32
+
33
+ * **New Features**
34
+ + Added support for Ruby 3.2
35
+ * **Changes**
36
+ + Bumped build version
37
+ + Removed support for Ruby 2.5
38
+ * **Bug Fixes**
39
+ + Repaired `fail_fast` mode
40
+
41
+ ## 2023-04-19 v0.2.2
42
+
43
+ * **New Version Features**
44
+ + Progress into the future of ruby development
45
+ + Progress into the future
46
+ * **Significant Changes**
47
+ + Removed development dependency (again)
48
+
49
+ ## 2022-11-17 v0.2.1
50
+
51
+ * Added a new `help` command.
52
+
53
+ ## 2022-11-17 v0.2.0
54
+
55
+ * **New Features**
56
+ + Added commands to run and debug single images
57
+ + Added a debug debugger feature
58
+
59
+ ## 2022-11-17 v0.1.0
60
+
61
+ * Added `fail_fast` configuration option.
62
+
63
+ ## 2022-07-11 v0.0.2
64
+
65
+ * **Security Fix**: Local config files are now properly sanitized to prevent potential security vulnerabilities.
66
+
67
+ ## 2022-05-16 v0.0.1
68
+
69
+ * **Bug Fix**: Fixed bug in `required_ruby_version` functionality, which was causing issues with certain RubyGems releases.
70
+
71
+ ### Significant Changes
72
+ * Removed buggy implementation of `required_ruby_version`
73
+ * Improved stability and compatibility with RubyGems releases
74
+
75
+ ## 2022-05-15 v0.0.0
76
+
77
+ * Start
data/all_images.gemspec CHANGED
@@ -1,19 +1,19 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: all_images 0.4.1 ruby lib
2
+ # stub: all_images 0.5.0 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "all_images".freeze
6
- s.version = "0.4.1".freeze
6
+ s.version = "0.5.0".freeze
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
9
9
  s.require_paths = ["lib".freeze]
10
10
  s.authors = ["Florian Frank".freeze]
11
- s.date = "2024-08-08"
11
+ s.date = "2024-08-31"
12
12
  s.description = "A script that runs a script in all of the configured docker images".freeze
13
13
  s.email = "flori@ping.de".freeze
14
14
  s.executables = ["all_images".freeze]
15
15
  s.extra_rdoc_files = ["README.md".freeze, "lib/all_images.rb".freeze, "lib/all_images/app.rb".freeze, "lib/all_images/config.rb".freeze, "lib/all_images/version.rb".freeze]
16
- s.files = [".utilsrc".freeze, "Gemfile".freeze, "LICENSE".freeze, "README.md".freeze, "Rakefile".freeze, "all_images.gemspec".freeze, "bin/all_images".freeze, "lib/all_images.rb".freeze, "lib/all_images/app.rb".freeze, "lib/all_images/config.rb".freeze, "lib/all_images/version.rb".freeze, "spec/app_spec.rb".freeze, "spec/spec_helper.rb".freeze]
16
+ s.files = [".utilsrc".freeze, "CHANGES.md".freeze, "Gemfile".freeze, "LICENSE".freeze, "README.md".freeze, "Rakefile".freeze, "all_images.gemspec".freeze, "bin/all_images".freeze, "lib/all_images.rb".freeze, "lib/all_images/app.rb".freeze, "lib/all_images/config.rb".freeze, "lib/all_images/version.rb".freeze, "spec/app_spec.rb".freeze, "spec/spec_helper.rb".freeze]
17
17
  s.homepage = "https://github.com/flori/all_images".freeze
18
18
  s.licenses = ["MIT".freeze]
19
19
  s.rdoc_options = ["--title".freeze, "AllImages -- Runs a script in all of the docker images".freeze, "--main".freeze, "README.md".freeze]
@@ -23,7 +23,7 @@ Gem::Specification.new do |s|
23
23
 
24
24
  s.specification_version = 4
25
25
 
26
- s.add_development_dependency(%q<gem_hadar>.freeze, ["~> 1.16.1".freeze])
26
+ s.add_development_dependency(%q<gem_hadar>.freeze, ["~> 1.17.0".freeze])
27
27
  s.add_development_dependency(%q<rake>.freeze, [">= 0".freeze])
28
28
  s.add_development_dependency(%q<simplecov>.freeze, [">= 0".freeze])
29
29
  s.add_development_dependency(%q<rspec>.freeze, [">= 0".freeze])
@@ -1,6 +1,7 @@
1
1
  require 'term/ansicolor'
2
2
  require 'tmpdir'
3
3
  require 'fileutils'
4
+ require 'tins'
4
5
 
5
6
  class AllImages::App
6
7
  include Term::ANSIColor
@@ -12,6 +13,7 @@ class AllImages::App
12
13
  @args = args.dup
13
14
  @command = pick_command
14
15
  @commands = %w[ ls help run debug run_all ].sort
16
+ @suffix = Tins::Token.new(alphabet: Tins::Token::BASE32_ALPHABET, bits: 32)
15
17
  end
16
18
 
17
19
  def run
@@ -43,16 +45,20 @@ class AllImages::App
43
45
 
44
46
  private
45
47
 
48
+ def name
49
+ [ 'all_images', @suffix ] * ?-
50
+ end
51
+
46
52
  def run_image(image, script, interactive: false)
47
53
  dockerfile = @config.fetch('dockerfile').to_s
48
54
  tag = provide_image image, dockerfile, script
49
55
  term = ENV.key?('TERM') ? %{ -e TERM=#{ENV['TERM'].inspect} } : ' '
50
56
  if interactive
51
57
  puts "You can run /script interactively now."
52
- sh "docker run --name all_images -it #{term}-v `pwd`:/work '#{tag}' sh"
58
+ sh "docker run --name #{name} -it #{term}-v `pwd`:/work '#{tag}' sh"
53
59
  return 0
54
60
  else
55
- if sh "docker run --name all_images -it #{term}-v `pwd`:/work '#{tag}' sh -c /script"
61
+ if sh "docker run --name #{name} -it #{term}-v `pwd`:/work '#{tag}' sh -c /script"
56
62
  puts green('SUCCESS')
57
63
  return 0
58
64
  else
@@ -61,7 +67,7 @@ class AllImages::App
61
67
  end
62
68
  end
63
69
  ensure
64
- sh 'docker rm -f all_images >/dev/null'
70
+ sh "docker rm -f #{name} >/dev/null"
65
71
  end
66
72
 
67
73
  def pick_command
@@ -1,6 +1,6 @@
1
1
  module AllImages
2
2
  # AllImages version
3
- VERSION = '0.4.1'
3
+ VERSION = '0.5.0'
4
4
  VERSION_ARRAY = VERSION.split('.').map(&:to_i) # :nodoc:
5
5
  VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
6
6
  VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: all_images
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Frank
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-08 00:00:00.000000000 Z
11
+ date: 2024-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gem_hadar
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.16.1
19
+ version: 1.17.0
20
20
  type: :development
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: 1.16.1
26
+ version: 1.17.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -121,6 +121,7 @@ extra_rdoc_files:
121
121
  - lib/all_images/version.rb
122
122
  files:
123
123
  - ".utilsrc"
124
+ - CHANGES.md
124
125
  - Gemfile
125
126
  - LICENSE
126
127
  - README.md