all_images 0.9.0 โ†’ 0.10.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fa4d01730649fb7a048de62b9631e710aa02e7fe823ab00ca19d996405d94ace
4
- data.tar.gz: e921fec235b5ffb2a7e8269619764503a5333bd67fc11847188af55ba1dbb84f
3
+ metadata.gz: 42e3e498acf5bf4cc5451d1a1ab60124af4dcb7acdb43685ae809250e02b15c4
4
+ data.tar.gz: 8703e332ac65a45e8ee31925544cc6a73463d26a62ef68ab7506303d0c71a75b
5
5
  SHA512:
6
- metadata.gz: 511009dab751e51c4bd45c124e6797fba4e20eb697a1c5e859e3b62222ffcaa7a6b9131f4086c6ef470b22b557dd8487b634ebb98aa943ddf2ceb445a624e3c1
7
- data.tar.gz: a54813653587cc987946acb99a1212272304c408221179aef52e30d2e9a56b030d15c932798591555be3078af1d94b6ad42b0c4efc8d889de19651526afb0a2a
6
+ metadata.gz: c816dd193e4843fc2e3592e9b54b12bc1073753a980723f4283338ddd15603ca500c79706b96a62f08b59f2bac79e6fb47c81add60be82deff8af2756a4aeee7
7
+ data.tar.gz: a9be280b27cad42406bbde54451ed44cecbdc737e2f72a7c6451a1d36535ade126d4ba9055b670d95c5cd622a36dc859f51b99f2af402d02b9047e6bf5fa5ca7
data/CHANGES.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # Changes
2
2
 
3
+ ## 2025-12-21 v0.10.0
4
+
5
+ - Updated `rubygems_version` from **3.6.9** to **4.0.2**
6
+ - Updated `gem_hadar` development dependency from **~> 2.7** to **~> 2.12**
7
+ - Enhanced README.md with comprehensive documentation including architecture
8
+ overview, component descriptions, usage examples, installation instructions,
9
+ configuration details, and advanced features
10
+ - Added detailed command examples and configuration file structure
11
+ documentation
12
+ - Enhanced security considerations and error handling sections
13
+ - Accurately documented `run_all`, `run`, `debug`, `ls`, and `help` commands
14
+ - Documented Docker integration, environment variable handling, and interactive debugging
15
+ - Maintained proper documentation of YAML configuration format including
16
+ `dockerfile`, `script`, `fail_fast`, and `images` sections
17
+ - Preserved accurate description of `SearchUI` integration for interactive
18
+ image selection
19
+ - Changed `bundle update` command to `bundle update --all` for consistent
20
+ dependency updates
21
+ - Added `ruby:4.0-rc-alpine` image configuration to CI pipeline
22
+ - Maintains existing Ruby version support for **3.4**, **3.3**, and **3.2**
23
+ - Improves CI coverage for upcoming Ruby **4.0** release candidate
24
+
3
25
  ## 2025-10-09 v0.9.0
4
26
 
5
27
  - Bumped **gem_hadar** dependency from **2.4** to **2.7**
data/README.md CHANGED
@@ -1,26 +1,301 @@
1
1
  # AllImages - Runs a script in all of the docker images
2
2
 
3
- ## Description
3
+ ## Description ๐Ÿ“
4
4
 
5
- Run with
5
+ AllImages is a Ruby-based command-line tool that automates running scripts
6
+ across multiple Docker images. It provides a configuration-driven approach to
7
+ testing and executing code in containerized environments, supporting both batch
8
+ execution and interactive debugging.
6
9
 
10
+ ## Architecture Overview ๐Ÿ—๏ธ
11
+
12
+ AllImages follows a well-defined architectural pattern with clear separation of
13
+ concerns between several key components:
14
+
15
+ ### Core Components ๐Ÿงฉ
16
+
17
+ **Application Class** (`AllImages::App`)
18
+ - The central hub managing command-line interface, configuration loading, and
19
+ Docker operations ๐Ÿ”„
20
+ - Handles command processing and execution flow ๐Ÿšฆ
21
+ - Manages Docker image building, tagging, and cleanup ๐Ÿ”ง
22
+ - Provides environment variable handling and error reporting ๐Ÿ›ก๏ธ
23
+
24
+ **Configuration Manager** (`AllImages::Config`)
25
+ - Centralized configuration handling via YAML files ๐Ÿ“„
26
+ - Manages default configuration generation and loading ๐Ÿ”„
27
+ - Provides example configuration templates ๐Ÿ“‹
28
+
29
+ ### Component Interactions ๐Ÿ”„
30
+
31
+ ```mermaid
32
+ graph LR
33
+ A[AllImages::App] --> B[Configuration]
34
+ A --> C[Docker Operations]
35
+ A --> D[SearchUI]
36
+ B --> E[YAML Files]
37
+ C --> F[Docker Engine]
38
+ D --> G[User Interface]
7
39
  ```
8
- $ all_images
40
+
41
+ The `AllImages::App` acts as the main coordinator, loading configuration files
42
+ and orchestrating Docker operations. The SearchUI enables interactive image
43
+ selection, while Docker operations handle the actual container execution.
44
+
45
+ ### Loading Mechanism ๐Ÿ“ฅ
46
+
47
+ AllImages supports automatic configuration file generation when none exists:
48
+
49
+ 1. **Automatic initialization** when `.all_images.yml` is missing ๐Ÿšจ
50
+ 2. **Configuration loading** from specified YAML files ๐Ÿ“
51
+ 3. **Default configuration** with example content provided ๐Ÿ“‹
52
+
53
+ ### Command Execution Flow ๐Ÿ”„
54
+
55
+ AllImages supports multiple execution modes:
56
+
57
+ - **Batch execution**: Run scripts across all configured images (`run_all`)
58
+ - **Selective execution**: Run scripts on specific images (`run <image>`)
59
+ - **Interactive debugging**: Debug scripts in containerized environments (`debug <image>`)
60
+ - **Listing**: Display available images (`ls`)
61
+ - **Help**: Show usage information (`help`)
62
+
63
+ ## Use Case: Multi-Version Ruby Testing ๐Ÿงช
64
+
65
+ AllImages is particularly useful for running tests/specs across different Ruby
66
+ versions and platforms. This makes it an excellent tool for:
67
+
68
+ - **Cross-version compatibility testing** - Ensuring your code works across
69
+ multiple Ruby versions
70
+ - **Platform consistency verification** - Testing on different operating
71
+ systems and environments
72
+ - **CI/CD pipeline automation** - Automating test execution across multiple
73
+ environments
74
+ - **Dependency resolution testing** - Verifying how your code behaves with
75
+ different dependency versions
76
+
77
+ ### Example: Ruby Version Testing
78
+
79
+ ```yaml
80
+ dockerfile: |-
81
+ RUN apk add --no-cache build-base yaml-dev openssl-dev git
82
+ RUN gem update --system
83
+ RUN gem install bundler gem_hadar
84
+
85
+ script: &script |-
86
+ echo -e "\e[1m"
87
+ ruby -v
88
+ echo -e "\e[0m"
89
+ bundle update --all
90
+ bundle install --jobs=$(getconf _NPROCESSORS_ONLN)
91
+ rake spec
92
+
93
+ fail_fast: true
94
+
95
+ images:
96
+ ruby:3.4-alpine: *script
97
+ ruby:3.3-alpine: *script
98
+ ruby:3.2-alpine: *script
99
+ ruby:3.1-alpine: *script
9
100
  ```
10
101
 
11
- Configure the generated `.all_images.yml` configuration file and run it again.
102
+ This configuration automatically runs your test suite across Ruby 3.4, 3.3,
103
+ 3.2, and 3.1, ensuring compatibility across versions.
12
104
 
13
- Also supports more than one configuration via
105
+ ## Installation ๐Ÿ“ฆ
14
106
 
107
+ You can install AllImages via RubyGems:
108
+
109
+ ```bash
110
+ gem install all_images
15
111
  ```
16
- $ all_images other_configuration.yml
112
+
113
+ Or add it to your Gemfile:
114
+
115
+ ```ruby
116
+ gem 'all_images'
117
+ ```
118
+
119
+ ## Usage ๐Ÿ› ๏ธ
120
+
121
+ ### Basic Workflow
122
+
123
+ 1. Run `all_images` to generate a default `.all_images.yml` configuration file
124
+ 2. Customize the configuration file to define your Docker images and scripts
125
+ 3. Execute commands to run scripts across images
126
+
127
+ ### Command Examples ๐Ÿ“‹
128
+
129
+ ```bash
130
+ # Run scripts across all configured images
131
+ all_images run_all
132
+
133
+ # Or
134
+
135
+ all_images
136
+
137
+ # Run script on a specific image
138
+ all_images run ruby:3.4-alpine
139
+
140
+ # Debug script in a specific image interactively
141
+ all_images debug ruby:3.4-alpine
142
+
143
+ # List available images
144
+ all_images ls
145
+
146
+ # Show help information
147
+ all_images help
17
148
  ```
18
149
 
19
- ## Author
150
+ ### Configuration File Structure ๐Ÿ“„
151
+
152
+ Given a configuration file like `.all_images.yml`:
153
+
154
+ ```yaml
155
+ dockerfile: |-
156
+ RUN apk add --no-cache build-base yaml-dev openssl-dev git
157
+ RUN gem update --system
158
+ RUN gem install bundler gem_hadar
159
+
160
+ script: &script |-
161
+ echo -e "\e[1m"
162
+ ruby -v
163
+ echo -e "\e[0m"
164
+ bundle update --all
165
+ bundle install --jobs=$(getconf _NPROCESSORS_ONLN)
166
+ rake spec
167
+
168
+ fail_fast: true
169
+
170
+ images:
171
+ ruby:3.4-alpine: *script
172
+ ruby:3.3-alpine: *script
173
+ ruby:3.2-alpine: *script
174
+ ```
175
+
176
+ ### Environment Variables ๐Ÿงช
177
+
178
+ AllImages supports environment variable handling:
179
+ - Configuration-defined environment variables are passed to containers
180
+ - `TERM` environment variable is automatically included if present
181
+ - Variables can be specified in the configuration file using `env` key
182
+
183
+ ### Docker Integration ๐Ÿ”ง
184
+
185
+ The tool automatically:
186
+ - Pulls base Docker images from Docker Hub
187
+ - Builds custom Docker images with scripts
188
+ - Runs containers with proper volume mounting
189
+ - Cleans up containers after execution
190
+ - Supports both interactive and non-interactive modes
191
+
192
+ ## Advanced Features ๐Ÿš€
193
+
194
+ ### Interactive Debugging ๐Ÿ› ๏ธ
195
+
196
+ ```bash
197
+ # Start interactive session in container
198
+ all_images debug ruby:3.4-alpine
199
+ ```
200
+
201
+ This provides a shell prompt inside the container for debugging scripts.
202
+
203
+ ### Failure Handling โš ๏ธ
204
+
205
+ The `fail_fast` configuration option stops execution on first failure:
206
+ ```yaml
207
+ fail_fast: true
208
+ ```
209
+
210
+ ### Searchable Image Selection ๐ŸŽฏ
211
+
212
+ When no image is specified, AllImages provides an interactive search interface:
213
+ ```bash
214
+ all_images run
215
+ # Shows searchable list of available images
216
+ ```
217
+
218
+ ## Error Handling โš ๏ธ
219
+
220
+ AllImages provides comprehensive error handling for common scenarios:
221
+
222
+ ### Configuration Errors ๐Ÿ“
223
+ - Missing configuration file (automatically generates example)
224
+ - Invalid YAML syntax in configuration files
225
+
226
+ ### Docker Errors ๐Ÿ”ง
227
+ - Failed Docker image pulls
228
+ - Build failures
229
+ - Container execution errors
230
+
231
+ ### Command Errors ๐Ÿšจ
232
+ - Invalid command-line arguments
233
+ - Missing required parameters
234
+
235
+ ### Container Cleanup
236
+
237
+ AllImages ensures proper cleanup of Docker containers even on failures:
238
+ - Automatic removal of containers after execution
239
+ - Temporary build directories are cleaned up automatically
240
+
241
+ ### Logging
242
+
243
+ The tool provides colored output for better visibility:
244
+ - Success messages in green
245
+ - Failure messages in red
246
+ - Informational messages in white with blue background
247
+
248
+ ## Configuration โš™๏ธ
249
+
250
+ ### Default Configuration
251
+
252
+ When no `.all_images.yml` file exists, AllImages generates a default
253
+ configuration with example content:
254
+
255
+ ```yaml
256
+ dockerfile: |-
257
+ RUN apk add --no-cache build-base yaml-dev openssl-dev git
258
+ RUN gem update --system
259
+ RUN gem install bundler gem_hadar
260
+
261
+ script: &script |-
262
+ echo -e "\e[1m"
263
+ ruby -v
264
+ echo -e "\e[0m"
265
+ bundle update --all
266
+ bundle install --jobs=$(getconf _NPROCESSORS_ONLN)
267
+ rake spec
268
+
269
+ fail_fast: true
270
+
271
+ images:
272
+ ruby:3.4-alpine: *script
273
+ ruby:3.3-alpine: *script
274
+ ruby:3.2-alpine: *script
275
+ ```
276
+
277
+ ## Security Considerations โš ๏ธ
278
+
279
+ ### Docker Security
280
+ - Containers run with mounted current directory for script access
281
+ - Temporary build directories are cleaned up automatically
282
+ - No privileged operations are performed
283
+
284
+ ### Script Security
285
+ - Scripts are executed within isolated Docker containers
286
+ - No direct access to host system (except mounted directories)
287
+ - Container cleanup ensures no residual artifacts
288
+
289
+ ## Download ๐Ÿ“ฅ
290
+
291
+ The homepage of this library is located at
292
+
293
+ * https://github.com/flori/all_images
294
+
295
+ ## Author ๐Ÿ‘จโ€๐Ÿ’ป
20
296
 
21
- Florian Frank mailto:flori@ping.de
297
+ [Florian Frank](mailto:flori@ping.de)
22
298
 
23
- ## License
299
+ ## License ๐Ÿ“„
24
300
 
25
- This software is licensed under the X11 (or MIT) license:
26
- http://www.xfree86.org/3.3.6/COPYRIGHT2.html#3
301
+ This software is licensed under the [MIT license](LICENSE)
data/all_images.gemspec CHANGED
@@ -1,9 +1,9 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: all_images 0.9.0 ruby lib
2
+ # stub: all_images 0.10.0 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "all_images".freeze
6
- s.version = "0.9.0".freeze
6
+ s.version = "0.10.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]
@@ -17,13 +17,13 @@ Gem::Specification.new do |s|
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]
20
- s.rubygems_version = "3.6.9".freeze
20
+ s.rubygems_version = "4.0.2".freeze
21
21
  s.summary = "Runs a script in all of the docker images".freeze
22
22
  s.test_files = ["spec/app_spec.rb".freeze, "spec/spec_helper.rb".freeze]
23
23
 
24
24
  s.specification_version = 4
25
25
 
26
- s.add_development_dependency(%q<gem_hadar>.freeze, ["~> 2.7".freeze])
26
+ s.add_development_dependency(%q<gem_hadar>.freeze, ["~> 2.12".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])
@@ -26,7 +26,7 @@ module AllImages::Config
26
26
  echo -e "\e[1m"
27
27
  ruby -v
28
28
  echo -e "\e[0m"
29
- bundle update
29
+ bundle update --all
30
30
  bundle install --jobs=$(getconf _NPROCESSORS_ONLN)
31
31
  rake spec
32
32
 
@@ -1,6 +1,6 @@
1
1
  module AllImages
2
2
  # AllImages version
3
- VERSION = '0.9.0'
3
+ VERSION = '0.10.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,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: all_images
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Frank
@@ -15,14 +15,14 @@ dependencies:
15
15
  requirements:
16
16
  - - "~>"
17
17
  - !ruby/object:Gem::Version
18
- version: '2.7'
18
+ version: '2.12'
19
19
  type: :development
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - "~>"
24
24
  - !ruby/object:Gem::Version
25
- version: '2.7'
25
+ version: '2.12'
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: rake
28
28
  requirement: !ruby/object:Gem::Requirement
@@ -211,7 +211,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
211
211
  - !ruby/object:Gem::Version
212
212
  version: '0'
213
213
  requirements: []
214
- rubygems_version: 3.6.9
214
+ rubygems_version: 4.0.2
215
215
  specification_version: 4
216
216
  summary: Runs a script in all of the docker images
217
217
  test_files: