miriamtech-gocd 0.2.7 → 0.4.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 +4 -4
- data/.gitignore +1 -1
- data/.rubocop.yml +70 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +56 -0
- data/Rakefile +5 -5
- data/bin/rubocop +29 -0
- data/lib/miriamtech/gocd/artifacts.rb +13 -9
- data/lib/miriamtech/gocd/docker.rb +34 -6
- data/lib/miriamtech/gocd/dsl.rb +7 -1
- data/lib/miriamtech/gocd/images.rb +5 -9
- data/lib/miriamtech/gocd/paths.rb +3 -2
- data/lib/miriamtech/gocd/tasks.rb +31 -9
- data/lib/miriamtech/gocd/version.rb +1 -1
- data/lib/miriamtech/gocd.rb +2 -2
- data/miriamtech-gocd.gemspec +20 -17
- metadata +36 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e720fa3c10cb4b5bf73916fbeacaefa6175e56dbb60681d8fa5e8e9079d77679
|
|
4
|
+
data.tar.gz: fbad6afa1904d72416c60913b97767de59215b38dc82b0467bc0d4dc944cb058
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f6ee1a59a81b0458c938ce3a88ec90ac9c701f7370639164474aa343898fe57f9b858a2b575b2d864f280c3ca375c19141d2f4b7ccb9c9cf5303c764427ae447
|
|
7
|
+
data.tar.gz: 6b33dd54129028edb50b6e19f1c7247e5287253dc4a512ab788cd7e3ad341dbeaa7c22259ca746e5173cdb34503f4e857a1495852aff703691bd0d7d81a3d018
|
data/.gitignore
CHANGED
data/.rubocop.yml
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
require:
|
|
2
|
+
- rubocop-minitest
|
|
3
|
+
|
|
4
|
+
AllCops:
|
|
5
|
+
Exclude:
|
|
6
|
+
- '**/bin/*'
|
|
7
|
+
- '**/schema.rb'
|
|
8
|
+
- 'node_modules/**/*'
|
|
9
|
+
- 'vendor/bundle/**/*'
|
|
10
|
+
|
|
11
|
+
Layout/EmptyLineAfterGuardClause:
|
|
12
|
+
Enabled: false
|
|
13
|
+
|
|
14
|
+
Layout/MultilineArrayLineBreaks:
|
|
15
|
+
Enabled: true
|
|
16
|
+
|
|
17
|
+
Layout/MultilineHashKeyLineBreaks:
|
|
18
|
+
Enabled: true
|
|
19
|
+
|
|
20
|
+
Layout/MultilineMethodArgumentLineBreaks:
|
|
21
|
+
Enabled: true
|
|
22
|
+
|
|
23
|
+
Lint/AssignmentInCondition:
|
|
24
|
+
Enabled: false
|
|
25
|
+
|
|
26
|
+
Lint/UnusedBlockArgument:
|
|
27
|
+
AutoCorrect: false
|
|
28
|
+
|
|
29
|
+
Lint/UnusedMethodArgument:
|
|
30
|
+
AutoCorrect: false
|
|
31
|
+
|
|
32
|
+
Metrics/AbcSize:
|
|
33
|
+
Enabled: false
|
|
34
|
+
|
|
35
|
+
Metrics/CyclomaticComplexity:
|
|
36
|
+
Enabled: false
|
|
37
|
+
|
|
38
|
+
Metrics/ClassLength:
|
|
39
|
+
Exclude:
|
|
40
|
+
- test/**/*
|
|
41
|
+
|
|
42
|
+
Metrics/MethodLength:
|
|
43
|
+
Exclude:
|
|
44
|
+
- test/**/*
|
|
45
|
+
|
|
46
|
+
Naming/HeredocDelimiterNaming:
|
|
47
|
+
Enabled: false
|
|
48
|
+
|
|
49
|
+
Style/Documentation:
|
|
50
|
+
Enabled: false
|
|
51
|
+
|
|
52
|
+
Style/FrozenStringLiteralComment:
|
|
53
|
+
Enabled: false
|
|
54
|
+
|
|
55
|
+
Style/HashSyntax:
|
|
56
|
+
Exclude:
|
|
57
|
+
- Rakefile
|
|
58
|
+
|
|
59
|
+
Style/SymbolArray:
|
|
60
|
+
Exclude:
|
|
61
|
+
- Rakefile
|
|
62
|
+
|
|
63
|
+
Style/TrailingCommaInArguments:
|
|
64
|
+
EnforcedStyleForMultiline: comma
|
|
65
|
+
|
|
66
|
+
Style/TrailingCommaInArrayLiteral:
|
|
67
|
+
EnforcedStyleForMultiline: comma
|
|
68
|
+
|
|
69
|
+
Style/TrailingCommaInHashLiteral:
|
|
70
|
+
EnforcedStyleForMultiline: comma
|
data/Gemfile
CHANGED
data/Gemfile.lock
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: .
|
|
3
|
+
specs:
|
|
4
|
+
miriamtech-gocd (0.4.0)
|
|
5
|
+
rake (>= 10.0)
|
|
6
|
+
|
|
7
|
+
GEM
|
|
8
|
+
remote: https://rubygems.org/
|
|
9
|
+
specs:
|
|
10
|
+
ast (2.4.2)
|
|
11
|
+
diff-lcs (1.4.4)
|
|
12
|
+
minitest (5.11.3)
|
|
13
|
+
parallel (1.20.1)
|
|
14
|
+
parser (3.0.1.0)
|
|
15
|
+
ast (~> 2.4.1)
|
|
16
|
+
rainbow (3.0.0)
|
|
17
|
+
rake (13.0.6)
|
|
18
|
+
regexp_parser (2.1.1)
|
|
19
|
+
rexml (3.2.5)
|
|
20
|
+
rspec-expectations (3.9.2)
|
|
21
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
22
|
+
rspec-support (~> 3.9.0)
|
|
23
|
+
rspec-mocks (3.9.1)
|
|
24
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
25
|
+
rspec-support (~> 3.9.0)
|
|
26
|
+
rspec-support (3.9.3)
|
|
27
|
+
rubocop (1.13.0)
|
|
28
|
+
parallel (~> 1.10)
|
|
29
|
+
parser (>= 3.0.0.0)
|
|
30
|
+
rainbow (>= 2.2.2, < 4.0)
|
|
31
|
+
regexp_parser (>= 1.8, < 3.0)
|
|
32
|
+
rexml
|
|
33
|
+
rubocop-ast (>= 1.2.0, < 2.0)
|
|
34
|
+
ruby-progressbar (~> 1.7)
|
|
35
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
|
36
|
+
rubocop-ast (1.4.1)
|
|
37
|
+
parser (>= 2.7.1.5)
|
|
38
|
+
rubocop-minitest (0.11.1)
|
|
39
|
+
rubocop (>= 0.90, < 2.0)
|
|
40
|
+
ruby-progressbar (1.11.0)
|
|
41
|
+
unicode-display_width (2.0.0)
|
|
42
|
+
|
|
43
|
+
PLATFORMS
|
|
44
|
+
ruby
|
|
45
|
+
|
|
46
|
+
DEPENDENCIES
|
|
47
|
+
bundler (~> 2.0)
|
|
48
|
+
minitest (~> 5.0)
|
|
49
|
+
miriamtech-gocd!
|
|
50
|
+
rspec-expectations
|
|
51
|
+
rspec-mocks
|
|
52
|
+
rubocop
|
|
53
|
+
rubocop-minitest
|
|
54
|
+
|
|
55
|
+
BUNDLED WITH
|
|
56
|
+
2.2.31
|
data/Rakefile
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
require
|
|
2
|
-
require
|
|
1
|
+
require 'bundler/gem_tasks'
|
|
2
|
+
require 'rake/testtask'
|
|
3
3
|
|
|
4
4
|
Rake::TestTask.new(:test) do |t|
|
|
5
|
-
t.libs <<
|
|
6
|
-
t.libs <<
|
|
7
|
-
t.test_files = FileList[
|
|
5
|
+
t.libs << 'test'
|
|
6
|
+
t.libs << 'lib'
|
|
7
|
+
t.test_files = FileList['test/**/*_test.rb']
|
|
8
8
|
end
|
|
9
9
|
|
|
10
10
|
task :default => :test
|
data/bin/rubocop
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#!/usr/bin/env ruby2.5
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
#
|
|
5
|
+
# This file was generated by Bundler.
|
|
6
|
+
#
|
|
7
|
+
# The application 'rubocop' is installed as part of a gem, and
|
|
8
|
+
# this file is here to facilitate running it.
|
|
9
|
+
#
|
|
10
|
+
|
|
11
|
+
require "pathname"
|
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
|
13
|
+
Pathname.new(__FILE__).realpath)
|
|
14
|
+
|
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
|
16
|
+
|
|
17
|
+
if File.file?(bundle_binstub)
|
|
18
|
+
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
|
19
|
+
load(bundle_binstub)
|
|
20
|
+
else
|
|
21
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
|
22
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
require "rubygems"
|
|
27
|
+
require "bundler/setup"
|
|
28
|
+
|
|
29
|
+
load Gem.bin_path("rubocop", "rubocop")
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
+
require 'securerandom'
|
|
2
|
+
|
|
1
3
|
module MiriamTech
|
|
2
4
|
module GoCD
|
|
3
5
|
module DSL
|
|
4
|
-
def capture_artifacts(prefix = project_name, workdir:, path
|
|
6
|
+
def capture_artifacts(prefix = project_name, workdir:, path:)
|
|
5
7
|
with_artifacts_volume(prefix) do |volume_name|
|
|
6
|
-
begin
|
|
7
8
|
yield "-v #{volume_name}:#{workdir}/#{path}"
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
end
|
|
9
|
+
ensure
|
|
10
|
+
copy_artifacts_from_volume(volume_name, local_path: path)
|
|
11
11
|
end
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
def with_artifacts_volume(prefix = project_name
|
|
15
|
-
artifacts_volume = sanitized_volume_name("#{prefix}#{
|
|
14
|
+
def with_artifacts_volume(prefix = project_name)
|
|
15
|
+
artifacts_volume = sanitized_volume_name("#{prefix}_#{random_hex}")
|
|
16
16
|
docker "volume create #{artifacts_volume}"
|
|
17
17
|
yield artifacts_volume
|
|
18
18
|
ensure
|
|
@@ -20,7 +20,7 @@ module MiriamTech
|
|
|
20
20
|
end
|
|
21
21
|
|
|
22
22
|
def copy_artifacts_from_volume(volume, local_path:)
|
|
23
|
-
container_id = `docker create -v #{volume}:/
|
|
23
|
+
container_id = `docker create -v #{volume}:/artifacts #{WORKER_IMAGE} cp -a /artifacts /artifacts_tmp`.chomp
|
|
24
24
|
begin
|
|
25
25
|
docker "start -i #{container_id}"
|
|
26
26
|
cd root_path do
|
|
@@ -34,7 +34,11 @@ module MiriamTech
|
|
|
34
34
|
private
|
|
35
35
|
|
|
36
36
|
def sanitized_volume_name(name)
|
|
37
|
-
name.gsub(/[^-_
|
|
37
|
+
name.gsub(/[^-_.A-Za-z0-9]/, '_')
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def random_hex
|
|
41
|
+
SecureRandom.hex
|
|
38
42
|
end
|
|
39
43
|
end
|
|
40
44
|
end
|
|
@@ -1,18 +1,44 @@
|
|
|
1
1
|
module MiriamTech
|
|
2
2
|
module GoCD
|
|
3
|
+
FALSY_ENV_VALUES = (%w[0 f false n no] + ['']).freeze
|
|
3
4
|
module DSL
|
|
4
5
|
def project_name(env = ENV)
|
|
5
|
-
|
|
6
|
+
pipeline_name = env['GO_PIPELINE_NAME']
|
|
7
|
+
stage_name = env['GO_STAGE_NAME']
|
|
8
|
+
job_name = env['GO_JOB_NAME']
|
|
9
|
+
name = root_path.basename.to_s
|
|
10
|
+
|
|
11
|
+
if pipeline_name
|
|
12
|
+
name = pipeline_name
|
|
13
|
+
name += "-#{stage_name}" if stage_name
|
|
14
|
+
name += "-#{job_name}" if job_name
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
name.downcase
|
|
6
18
|
end
|
|
7
19
|
|
|
8
20
|
def build_tag(env = ENV)
|
|
9
21
|
@build_tag ||= generate_build_tag(env)
|
|
10
22
|
end
|
|
11
23
|
|
|
24
|
+
def build_counter(env = ENV)
|
|
25
|
+
@build_counter ||= generate_build_counter(env)
|
|
26
|
+
end
|
|
27
|
+
|
|
12
28
|
def docker(string)
|
|
13
29
|
sh "docker #{string}"
|
|
14
30
|
end
|
|
15
31
|
|
|
32
|
+
def docker_build_arguments(env = ENV, build_args: {})
|
|
33
|
+
args = ['--force-rm']
|
|
34
|
+
no_cache_arg = env['DOCKER_BUILD_NO_CACHE']
|
|
35
|
+
args << '--no-cache' if no_cache_arg && !FALSY_ENV_VALUES.include?(no_cache_arg)
|
|
36
|
+
build_args.each do |key, value|
|
|
37
|
+
args << "--build-arg #{key}=#{value}"
|
|
38
|
+
end
|
|
39
|
+
args
|
|
40
|
+
end
|
|
41
|
+
|
|
16
42
|
def docker_compose(string)
|
|
17
43
|
cd root_path do
|
|
18
44
|
sh "docker-compose -p #{project_name} -f docker-compose.yml #{string}"
|
|
@@ -22,11 +48,13 @@ module MiriamTech
|
|
|
22
48
|
private
|
|
23
49
|
|
|
24
50
|
def generate_build_tag(env)
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
51
|
+
revision = env['GO_REVISION_SOURCE']
|
|
52
|
+
revision ? ":#{revision}" : ''
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def generate_build_counter(env)
|
|
56
|
+
counter = env['GO_PIPELINE_COUNTER']
|
|
57
|
+
counter ? ":#{counter}" : ''
|
|
30
58
|
end
|
|
31
59
|
end
|
|
32
60
|
end
|
data/lib/miriamtech/gocd/dsl.rb
CHANGED
|
@@ -5,4 +5,10 @@ require_relative 'lambda'
|
|
|
5
5
|
require_relative 'paths'
|
|
6
6
|
require_relative 'tasks'
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
# Add our DSL methods to the top level namespace without polluting the Object inheritance tree.
|
|
9
|
+
# This technique comes from `rake`, see e.g.
|
|
10
|
+
# https://github.com/ruby/rake/blob/11973e8d31f29aee2e40d874206c9240956f86ed/lib/rake/dsl_definition.rb#L195
|
|
11
|
+
#
|
|
12
|
+
# rubocop:disable Style/MixinUsage
|
|
13
|
+
extend MiriamTech::GoCD::DSL
|
|
14
|
+
# rubocop:enable Style/MixinUsage
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
module MiriamTech
|
|
2
2
|
module GoCD
|
|
3
3
|
module DSL
|
|
4
|
-
WORKER_IMAGE = 'debian:buster'
|
|
4
|
+
WORKER_IMAGE = 'debian:buster'.freeze
|
|
5
5
|
|
|
6
6
|
def pull(image_name)
|
|
7
7
|
docker "pull #{image_name}#{build_tag}"
|
|
@@ -17,14 +17,10 @@ module MiriamTech
|
|
|
17
17
|
end
|
|
18
18
|
|
|
19
19
|
def cleanup_old_images(image_name, number_to_keep)
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
next unless image.match(/:(\d+)\z/)
|
|
25
|
-
if $1.to_i < revision_number - number_to_keep
|
|
26
|
-
docker "image rm #{image}"
|
|
27
|
-
end
|
|
20
|
+
images = `docker images --format '"{{.CreatedAt}}" id:{{.ID}}' #{image_name} | sort -r`.split("\n")
|
|
21
|
+
images.collect { |each| each.split(':').last }.uniq.each_with_index do |image, index|
|
|
22
|
+
next if index <= number_to_keep
|
|
23
|
+
docker "image rm --force #{image}"
|
|
28
24
|
end
|
|
29
25
|
end
|
|
30
26
|
end
|
|
@@ -6,10 +6,11 @@ module MiriamTech
|
|
|
6
6
|
def root_path
|
|
7
7
|
cwd = Pathname.new(File.expand_path('.'))
|
|
8
8
|
path = Pathname.new(cwd)
|
|
9
|
-
|
|
9
|
+
loop do
|
|
10
|
+
break if path.root?
|
|
10
11
|
return path if path.join('Dockerfile').exist?
|
|
11
12
|
path = path.parent
|
|
12
|
-
end
|
|
13
|
+
end
|
|
13
14
|
cwd
|
|
14
15
|
end
|
|
15
16
|
|
|
@@ -4,28 +4,35 @@ require 'rake/clean'
|
|
|
4
4
|
module MiriamTech
|
|
5
5
|
module GoCD
|
|
6
6
|
module DSL
|
|
7
|
+
# rubocop:disable Style/HashSyntax, Style/SymbolArray, Metrics/MethodLength
|
|
8
|
+
|
|
7
9
|
def define_gocd_tasks(
|
|
8
10
|
image_name,
|
|
9
|
-
revisions_to_keep: 10
|
|
11
|
+
revisions_to_keep: 10,
|
|
12
|
+
build_args: {}
|
|
13
|
+
)
|
|
10
14
|
|
|
11
15
|
task :default => [:test]
|
|
12
|
-
task :full => [:
|
|
16
|
+
task :full => [:destroy_containers, :build]
|
|
13
17
|
|
|
14
18
|
task :environment do
|
|
15
19
|
ENV['BUILD_TAG'] = build_tag
|
|
16
20
|
end
|
|
17
21
|
|
|
18
|
-
CLEAN.add(root_path
|
|
22
|
+
CLEAN.add("#{root_path}/test/reports")
|
|
19
23
|
task :clean => [:environment]
|
|
20
|
-
task :
|
|
24
|
+
task :destroy_containers => [:environment, :clean, :cleanup_old_images]
|
|
25
|
+
|
|
26
|
+
# This is here for compatibility
|
|
27
|
+
task :clobber => :destroy_containers
|
|
21
28
|
|
|
22
29
|
if compose_file.exist?
|
|
23
30
|
task :clean do
|
|
24
|
-
docker_compose
|
|
31
|
+
docker_compose 'stop'
|
|
25
32
|
end
|
|
26
33
|
|
|
27
|
-
task :
|
|
28
|
-
docker_compose
|
|
34
|
+
task :destroy_containers do
|
|
35
|
+
docker_compose 'rm -fv'
|
|
29
36
|
end
|
|
30
37
|
end
|
|
31
38
|
|
|
@@ -34,10 +41,23 @@ module MiriamTech
|
|
|
34
41
|
end
|
|
35
42
|
|
|
36
43
|
task :build => :environment do
|
|
37
|
-
docker "build
|
|
44
|
+
docker "build #{docker_build_arguments(build_args: build_args).join(' ')} -t #{image_name}#{build_tag} -t #{image_name}#{build_counter} #{root_path}"
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
task :test => [:environment, :destroy_containers] do
|
|
48
|
+
at_exit { Rake::Task[:destroy_containers].execute }
|
|
38
49
|
end
|
|
39
50
|
|
|
40
|
-
task :
|
|
51
|
+
task :save, [:path] => :environment do | t, args |
|
|
52
|
+
args.with_defaults(path: File.join(root_path, '.docker', 'image.tar'))
|
|
53
|
+
FileUtils.mkdir_p File.dirname(args[:path])
|
|
54
|
+
docker "save #{image_name}#{build_tag} -o #{args[:path]}"
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
task :load, :path do | t, args |
|
|
58
|
+
args.with_defaults(path: File.join(root_path, '.docker', 'image.tar'))
|
|
59
|
+
docker "load -i #{args[:path]}"
|
|
60
|
+
end
|
|
41
61
|
|
|
42
62
|
task :push do
|
|
43
63
|
push(image_name)
|
|
@@ -53,6 +73,8 @@ module MiriamTech
|
|
|
53
73
|
docker("run -it --rm #{image_name} bash")
|
|
54
74
|
end
|
|
55
75
|
end
|
|
76
|
+
|
|
77
|
+
# rubocop:enable Style/HashSyntax, Style/SymbolArray, Metrics/MethodLength
|
|
56
78
|
end
|
|
57
79
|
end
|
|
58
80
|
end
|
data/lib/miriamtech/gocd.rb
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
require
|
|
2
|
-
require
|
|
1
|
+
require 'miriamtech/gocd/version'
|
|
2
|
+
require 'miriamtech/gocd/dsl'
|
data/miriamtech-gocd.gemspec
CHANGED
|
@@ -1,35 +1,38 @@
|
|
|
1
|
-
lib = File.expand_path(
|
|
1
|
+
lib = File.expand_path('lib', __dir__)
|
|
2
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
3
|
-
require
|
|
3
|
+
require 'miriamtech/gocd/version'
|
|
4
4
|
|
|
5
5
|
Gem::Specification.new do |spec|
|
|
6
|
-
spec.name =
|
|
6
|
+
spec.name = 'miriamtech-gocd'
|
|
7
7
|
spec.version = MiriamTech::GoCD::VERSION
|
|
8
|
-
spec.authors = [
|
|
9
|
-
spec.email = [
|
|
8
|
+
spec.authors = ['Ken Treis']
|
|
9
|
+
spec.email = ['ken@miriamtech.com']
|
|
10
10
|
|
|
11
|
-
spec.summary =
|
|
12
|
-
spec.homepage =
|
|
11
|
+
spec.summary = 'Utilities for building apps in Docker containers with GoCD'
|
|
12
|
+
spec.homepage = 'https://www.miriamtech.com'
|
|
13
13
|
|
|
14
|
-
spec.metadata[
|
|
14
|
+
spec.metadata['allowed_push_host'] = 'https://rubygems.org'
|
|
15
15
|
|
|
16
|
-
spec.metadata[
|
|
17
|
-
spec.metadata[
|
|
18
|
-
spec.metadata[
|
|
16
|
+
spec.metadata['homepage_uri'] = spec.homepage
|
|
17
|
+
spec.metadata['source_code_uri'] = 'https://github.com/miriamtech/gocd'
|
|
18
|
+
spec.metadata['changelog_uri'] = 'https://github.com/miriamtech/gocd/blob/master/CHANGELOG.md'
|
|
19
19
|
|
|
20
20
|
# Specify which files should be added to the gem when it is released.
|
|
21
21
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
|
22
|
-
spec.files
|
|
22
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
|
23
23
|
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
|
24
24
|
end
|
|
25
|
-
spec.bindir =
|
|
25
|
+
spec.bindir = 'exe'
|
|
26
26
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
27
|
-
spec.require_paths = [
|
|
27
|
+
spec.require_paths = ['lib']
|
|
28
28
|
|
|
29
|
-
spec.
|
|
29
|
+
spec.required_ruby_version = '~> 2.5'
|
|
30
|
+
spec.add_dependency 'rake', '>= 10.0'
|
|
30
31
|
|
|
31
|
-
spec.add_development_dependency
|
|
32
|
-
spec.add_development_dependency
|
|
32
|
+
spec.add_development_dependency 'bundler', '~> 2.0'
|
|
33
|
+
spec.add_development_dependency 'minitest', '~> 5.0'
|
|
33
34
|
spec.add_development_dependency 'rspec-expectations'
|
|
34
35
|
spec.add_development_dependency 'rspec-mocks'
|
|
36
|
+
spec.add_development_dependency 'rubocop'
|
|
37
|
+
spec.add_development_dependency 'rubocop-minitest'
|
|
35
38
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: miriamtech-gocd
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ken Treis
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2021-11-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|
|
@@ -80,6 +80,34 @@ dependencies:
|
|
|
80
80
|
- - ">="
|
|
81
81
|
- !ruby/object:Gem::Version
|
|
82
82
|
version: '0'
|
|
83
|
+
- !ruby/object:Gem::Dependency
|
|
84
|
+
name: rubocop
|
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
|
86
|
+
requirements:
|
|
87
|
+
- - ">="
|
|
88
|
+
- !ruby/object:Gem::Version
|
|
89
|
+
version: '0'
|
|
90
|
+
type: :development
|
|
91
|
+
prerelease: false
|
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
93
|
+
requirements:
|
|
94
|
+
- - ">="
|
|
95
|
+
- !ruby/object:Gem::Version
|
|
96
|
+
version: '0'
|
|
97
|
+
- !ruby/object:Gem::Dependency
|
|
98
|
+
name: rubocop-minitest
|
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
|
100
|
+
requirements:
|
|
101
|
+
- - ">="
|
|
102
|
+
- !ruby/object:Gem::Version
|
|
103
|
+
version: '0'
|
|
104
|
+
type: :development
|
|
105
|
+
prerelease: false
|
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
107
|
+
requirements:
|
|
108
|
+
- - ">="
|
|
109
|
+
- !ruby/object:Gem::Version
|
|
110
|
+
version: '0'
|
|
83
111
|
description:
|
|
84
112
|
email:
|
|
85
113
|
- ken@miriamtech.com
|
|
@@ -88,12 +116,15 @@ extensions: []
|
|
|
88
116
|
extra_rdoc_files: []
|
|
89
117
|
files:
|
|
90
118
|
- ".gitignore"
|
|
119
|
+
- ".rubocop.yml"
|
|
91
120
|
- ".travis.yml"
|
|
92
121
|
- CHANGELOG.md
|
|
93
122
|
- Gemfile
|
|
123
|
+
- Gemfile.lock
|
|
94
124
|
- README.md
|
|
95
125
|
- Rakefile
|
|
96
126
|
- bin/console
|
|
127
|
+
- bin/rubocop
|
|
97
128
|
- bin/run_tests.sh
|
|
98
129
|
- bin/setup
|
|
99
130
|
- lib/miriamtech/gocd.rb
|
|
@@ -119,17 +150,16 @@ require_paths:
|
|
|
119
150
|
- lib
|
|
120
151
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
121
152
|
requirements:
|
|
122
|
-
- - "
|
|
153
|
+
- - "~>"
|
|
123
154
|
- !ruby/object:Gem::Version
|
|
124
|
-
version: '
|
|
155
|
+
version: '2.5'
|
|
125
156
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
126
157
|
requirements:
|
|
127
158
|
- - ">="
|
|
128
159
|
- !ruby/object:Gem::Version
|
|
129
160
|
version: '0'
|
|
130
161
|
requirements: []
|
|
131
|
-
|
|
132
|
-
rubygems_version: 2.7.6.2
|
|
162
|
+
rubygems_version: 3.2.5
|
|
133
163
|
signing_key:
|
|
134
164
|
specification_version: 4
|
|
135
165
|
summary: Utilities for building apps in Docker containers with GoCD
|