docker-swarm 0.5.1 → 0.5.3

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: 105ef84c13fc75bc0d3b41a9da37f7d5ac5f5698690695ef926fbe664ec28f69
4
- data.tar.gz: 6df837db29f9073f5e2de7fe8d5b995c49980fb61117bcf8b21530d53be59ebc
3
+ metadata.gz: eff62dbb2cde8d0e147463814a7d0a24006816bbd47e5d653eaf4509dfeffa0e
4
+ data.tar.gz: caddf055cebef26efa50937c93821a44c2fd24d85f74eb90ebc3cfa7c37a383a
5
5
  SHA512:
6
- metadata.gz: e95adaafd40842adc5da3615752e311448b2220f6d1a39aa919e10ba90ee8f984adb6cdbb4acb54f2af96a7e4effbcb42ba32009f9b3ed3e1a0f2fd3145c6bf1
7
- data.tar.gz: 0e05ecde75047867f481cfc0bb878f5d93c5fe97704f2d59e33d955287bdaed6acd5c1e1b877d9926256a7804679492e834d9e8e5831b19641dcfb514d3d930e
6
+ metadata.gz: 12a814dcb83bdd56ae1f2bb968131959d2c6f76d4d44b88ca059e21ce5b1e023b89cb626fb86d38664a3556767bb27d52c61214e5ae08d3267958eb07adf3995
7
+ data.tar.gz: 21802ca76f9eaecf8846c473609429ea460e0a23b9fb1c752ea313ebd0627e15d4b1f302b2eae4393d357df27c54a3141d1dc30005bff1a5fcadc2114065918d
@@ -6,22 +6,21 @@ module DockerSwarm
6
6
  extend ActiveSupport::Concern
7
7
 
8
8
  def inspect
9
- inspection = if respond_to?(:ID) && ID.present?
10
- "ID: #{ID}"
11
- else
12
- "not persisted"
13
- end
9
+ return "#<#{self.class.name} not persisted>" unless persisted?
14
10
 
15
- # Intentar añadir el nombre si existe
16
- name_attr = attributes["Name"] || (respond_to?(:Name) ? Name : nil)
17
- inspection += ", Name: #{name_attr}" if name_attr.present?
11
+ parts = []
12
+ parts << "ID: #{ID}" if respond_to?(:ID) && ID.present?
13
+ parts << "Name: #{Name}" if respond_to?(:Name) && Name.present?
14
+ parts << "CreatedAt: #{CreatedAt}" if respond_to?(:CreatedAt) && CreatedAt.present?
15
+ parts << "UpdatedAt: #{UpdatedAt}" if respond_to?(:UpdatedAt) && UpdatedAt.present?
16
+ parts << "Version: #{Version}" if respond_to?(:Version) && Version.present?
18
17
 
19
- # Intentar añadir la imagen para servicios/contenedores
20
- spec = attributes["Spec"] || (respond_to?(:Spec) ? Spec : nil)
21
- image = spec&.dig("TaskTemplate", "ContainerSpec", "Image") || attributes["Image"] || (respond_to?(:Image) ? Image : nil)
22
- inspection += ", Image: #{image}" if image.present?
18
+ if respond_to?(:Spec) && Spec.present?
19
+ spec_str = Spec.map { |k, v| "#{k}=#{v.inspect}" }.join(", ")
20
+ parts << "Spec(#{spec_str})"
21
+ end
23
22
 
24
- "#<#{self.class.name} #{inspection}>"
23
+ "#<#{self.class.name} #{parts.join(", ")}>"
25
24
  end
26
25
  end
27
26
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DockerSwarm
4
- VERSION = "0.5.1"
4
+ VERSION = "0.5.3"
5
5
  end
data/skill/SKILL.md CHANGED
@@ -6,7 +6,7 @@ Skill de conocimiento completo sobre DockerSwarm. Consultame para cualquier preg
6
6
 
7
7
  **Base** — Clase ORM base que hereda de ActiveModel::Model. Provee accessors dinámicos PascalCase, `find`, `all`, `where`, `reload`, `payload_for_docker`. Todos los modelos heredan de ella.
8
8
 
9
- **Concern** — Mixin ActiveSupport::Concern que agrega comportamiento CRUD a un modelo: Creatable (POST), Updatable (POST con Version.Index), Deletable (DELETE), Loggable (logs streaming), Inspectable (#inspect legible).
9
+ **Concern** — Mixin ActiveSupport::Concern que agrega comportamiento CRUD a un modelo: Creatable (POST), Updatable (POST con Version.Index), Deletable (DELETE), Loggable (logs streaming), Inspectable (#inspect legible). **Nota:** Los atributos dinámicos en Inspectable deben invocarse con `send(:ID)` para evitar `NameError` por interpretación como constante.
10
10
 
11
11
  **Middleware** — Capa Excon que procesa request/response: RequestEncoder (serialización body), ResponseJSONParser (parsing + indifferent access), ErrorHandler (status HTTP → excepción).
12
12
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: docker-swarm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriel
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-04-06 00:00:00.000000000 Z
11
+ date: 2026-04-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport