miriamtech-gocd 0.2.0 → 0.2.1

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: 8a10182274162c0b910f57a828489a5e86fa51db950d91587edd67f0b615f559
4
- data.tar.gz: c6cc4e741228ce382ec5d560e18cc413f533aaa022d1f652ac5c13485b28985c
3
+ metadata.gz: ec40d765f933489b7972e351f0418faa1efb8a0defe529a220976c87ce59b749
4
+ data.tar.gz: b05a5aadaaaa94bd8f910ac27d2f5e60df9daf73457937ab027d4a4795b37d29
5
5
  SHA512:
6
- metadata.gz: e01bb5e1af5fc7b3371e0c9ec67757e54c3c0bac6ed75b867218d25d08c12bd511a3090ed863b5499c0b7acf27008cf4852ac1e03b84a0e8dbd376bc4b0223b2
7
- data.tar.gz: 9b5bf6810a10726ee56810a24fdf3d17031b06a68dd92c1dd30887262f5a70ae563a8657afa21ef2dbf9fc0a8c3c338f737735f0d624567f170a67ab50844808
6
+ metadata.gz: d5519976cdceffc140092378f3c0acc6c13e97ddaec701eddc3cf84cce8e4d4cf15e737fa4224c9e22e57864ebfbfe8548b881bb2ba0d43f025f4b03e8233bb2
7
+ data.tar.gz: 97f440935f20faa4599d0c9250506e812f2c544c6b4871add01059ae291a36287c9750f345e536879eb065b05dc6990683ae069cb9d7202242f433f9a00d69fb
@@ -2,7 +2,7 @@ module MiriamTech
2
2
  module GoCD
3
3
  module DSL
4
4
  def with_artifacts_volume(prefix = project_name, &block)
5
- artifacts_volume = "#{prefix}#{build_tag}".gsub('[/:]', '_')
5
+ artifacts_volume = sanitized_volume_name("#{prefix}#{build_tag}")
6
6
  docker "volume create #{artifacts_volume}"
7
7
  yield artifacts_volume
8
8
  ensure
@@ -20,6 +20,12 @@ module MiriamTech
20
20
  docker "rm -v #{container_id}"
21
21
  end
22
22
  end
23
+
24
+ private
25
+
26
+ def sanitized_volume_name(name)
27
+ name.gsub(/[^-_\.A-Za-z0-9]/, '_')
28
+ end
23
29
  end
24
30
  end
25
31
  end
@@ -1,5 +1,5 @@
1
1
  module MiriamTech
2
2
  module GoCD
3
- VERSION = "0.2.0"
3
+ VERSION = "0.2.1"
4
4
  end
5
5
  end
@@ -29,4 +29,6 @@ Gem::Specification.new do |spec|
29
29
  spec.add_development_dependency "bundler", "~> 2.0"
30
30
  spec.add_development_dependency "rake", ">= 10.0"
31
31
  spec.add_development_dependency "minitest", "~> 5.0"
32
+ spec.add_development_dependency 'rspec-expectations'
33
+ spec.add_development_dependency 'rspec-mocks'
32
34
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: miriamtech-gocd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ken Treis
@@ -52,6 +52,34 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '5.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec-expectations
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rspec-mocks
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
55
83
  description:
56
84
  email:
57
85
  - ken@miriamtech.com