egads 5.1.0 → 5.2.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/.github/actions/setup-rubygems/action.yml +18 -0
- data/.github/workflows/test-release.yml +48 -0
- data/.gitignore +2 -0
- data/README.md +20 -5
- data/Rakefile +21 -2
- data/Taskfile.yml +14 -0
- data/egads.gemspec +13 -11
- data/lib/egads/command/extract.rb +4 -2
- data/lib/egads/command/release.rb +4 -1
- data/lib/egads/command/stage.rb +5 -5
- data/lib/egads/config.rb +8 -3
- data/lib/egads/version.rb +1 -1
- data/spec/egads_build_spec.rb +6 -6
- data/spec/egads_check_spec.rb +5 -5
- data/spec/egads_command_spec.rb +1 -1
- data/spec/egads_config_spec.rb +12 -12
- data/spec/egads_extract_spec.rb +1 -1
- data/spec/egads_release_spec.rb +1 -1
- data/spec/egads_s3_tarball_spec.rb +5 -6
- data/spec/egads_stage_spec.rb +1 -1
- data/spec/egads_trim_spec.rb +1 -1
- data/spec/egads_upload_spec.rb +1 -1
- metadata +23 -8
- data/.travis.yml +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '09258b7cad1e80200b4a8b3d6d47efffb9111f4fbe98ad5891d282db31f80e32'
|
4
|
+
data.tar.gz: ecded76960e9067e64730e6f2289635622a658b13d2ec8cd1c6a61b733882a20
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9493f4ce2b5c34b24f3422a8aa076b7a77816b00db3140de4d0aea6c3f1c8b5e8ba71d349037980b309e530502b55e9211b32fc06275a61bf0bd9fea31eb7468
|
7
|
+
data.tar.gz: e9b3ed9c711f7b0f01e45cc2ffa8310e83a6747b20ab6f3edbdd656c9efba420c19722c9bdd4044531fd24ab39387f0dd923b8cddb00a9ab98b4bffcdf2f0462
|
@@ -0,0 +1,18 @@
|
|
1
|
+
name: Setup RubyGems
|
2
|
+
description: Setup RubyGems credentials
|
3
|
+
inputs:
|
4
|
+
api-key:
|
5
|
+
description: RubyGems API key
|
6
|
+
required: true
|
7
|
+
runs:
|
8
|
+
using: composite
|
9
|
+
steps:
|
10
|
+
- name: setup rubygems
|
11
|
+
shell: bash
|
12
|
+
run: |
|
13
|
+
mkdir -p ~/.gem
|
14
|
+
cat <<-YAML > ~/.gem/credentials
|
15
|
+
---
|
16
|
+
:rubygems_api_key: ${{ inputs.api-key }}
|
17
|
+
YAML
|
18
|
+
chmod 0600 ~/.gem/credentials
|
@@ -0,0 +1,48 @@
|
|
1
|
+
name: Test and Release
|
2
|
+
on:
|
3
|
+
pull_request:
|
4
|
+
push:
|
5
|
+
paths:
|
6
|
+
- .github/**
|
7
|
+
- bin/**
|
8
|
+
- lib/**
|
9
|
+
- spec/**
|
10
|
+
- Gemfile
|
11
|
+
- Guardfile
|
12
|
+
- Rakefile
|
13
|
+
- egads.gemspec
|
14
|
+
release:
|
15
|
+
types:
|
16
|
+
- published
|
17
|
+
jobs:
|
18
|
+
test:
|
19
|
+
name: Test [Ruby ${{ matrix.ruby-version }}]
|
20
|
+
runs-on: ubuntu-latest
|
21
|
+
strategy:
|
22
|
+
matrix:
|
23
|
+
ruby-version:
|
24
|
+
- "3.2"
|
25
|
+
- "3.3"
|
26
|
+
steps:
|
27
|
+
- uses: actions/checkout@v4
|
28
|
+
- uses: ruby/setup-ruby@v1
|
29
|
+
with:
|
30
|
+
ruby-version: ${{ matrix.ruby-version }}
|
31
|
+
- run: bundle install
|
32
|
+
- run: bundle exec rake test
|
33
|
+
push:
|
34
|
+
name: Publish Gem
|
35
|
+
if: ${{ github.event.release }}
|
36
|
+
needs:
|
37
|
+
- test
|
38
|
+
runs-on: ubuntu-latest
|
39
|
+
steps:
|
40
|
+
- uses: actions/checkout@v4
|
41
|
+
- uses: ruby/setup-ruby@v1
|
42
|
+
with:
|
43
|
+
ruby-version: "3.3"
|
44
|
+
- uses: ./.github/actions/setup-rubygems
|
45
|
+
with:
|
46
|
+
api-key: ${{ secrets.RUBYGEMS_API_KEY }}
|
47
|
+
- run: bundle install
|
48
|
+
- run: bundle exec rake gem:push
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
# egads!!!
|
2
2
|
# *Extensible Git-Archive Deploy Strategy*
|
3
3
|
|
4
|
+
[](https://github.com/kickstarter/egads/actions/workflows/test-release.yml)
|
5
|
+
|
4
6
|
egads is a set of commands for deploying applications without depending on a git
|
5
7
|
server.
|
6
8
|
|
@@ -13,13 +15,17 @@ Climate](https://d3s6mut3hikguw.cloudfront.net/github/kickstarter/egads.svg)](ht
|
|
13
15
|
|
14
16
|
Put `egads` in your Gemfile:
|
15
17
|
|
16
|
-
|
17
|
-
|
18
|
+
```ruby
|
19
|
+
# ./Gemfile
|
20
|
+
gem 'egads', require: nil
|
21
|
+
```
|
18
22
|
|
19
23
|
On remote machines (to which you deploy), `egads` must be in your PATH.
|
20
24
|
So install `egads` as a system gem:
|
21
25
|
|
22
|
-
|
26
|
+
```bash
|
27
|
+
gem install egads
|
28
|
+
```
|
23
29
|
|
24
30
|
## Commands
|
25
31
|
|
@@ -31,8 +37,8 @@ Commands are either *porcelain* commands that you should call directly as part o
|
|
31
37
|
|
32
38
|
### Local commands
|
33
39
|
|
34
|
-
* `egads check
|
35
|
-
* `egads build
|
40
|
+
* `egads check SHA` - checks if a deployable tarball of the current commit exists on S3.
|
41
|
+
* `egads build SHA` - makes a deployable tarball of the current commit and upload it to S3 (if missing).
|
36
42
|
* `egads upload SHA` - (plumbing, called by `build`) Uploads a pre-built tarball.
|
37
43
|
|
38
44
|
### Remote commands
|
@@ -57,6 +63,15 @@ The deploy process is:
|
|
57
63
|
* Run `egads stage SHA` on all the remote servers to download, extract, and configure the SHA for release.
|
58
64
|
* Run `egads release SHA` on all the remote servers to symlink the staged SHA to 'current', and restart services.
|
59
65
|
|
66
|
+
## Publishing a New Gem Version
|
67
|
+
|
68
|
+
To publish a new version of `egads`:
|
69
|
+
|
70
|
+
1. Update [`Egads::VERSION`](./lib/egads/version.rb)
|
71
|
+
2. Commit and push to GitHub
|
72
|
+
3. Create a new [GitHub release](https://github.com/kickstarter/egads/releases)
|
73
|
+
4. Monitor the [Test and Release](https://github.com/kickstarter/egads/actions/workflows/test-release.yml) action to ensure the gem is published successfully
|
74
|
+
|
60
75
|
## License
|
61
76
|
|
62
77
|
Copyright (c) 2013 Kickstarter, Inc
|
data/Rakefile
CHANGED
@@ -1,10 +1,29 @@
|
|
1
1
|
require "rubygems"
|
2
2
|
require "bundler/setup"
|
3
|
-
require "bundler/gem_tasks"
|
4
3
|
require 'rake/testtask'
|
5
4
|
|
5
|
+
task :default => :test
|
6
|
+
|
6
7
|
Rake::TestTask.new do |t|
|
7
8
|
t.pattern = "spec/*_spec.rb"
|
8
9
|
end
|
9
10
|
|
10
|
-
|
11
|
+
namespace :gem do
|
12
|
+
require 'bundler/gem_tasks'
|
13
|
+
|
14
|
+
@gem = "pkg/egads-#{ Egads::VERSION }.gem"
|
15
|
+
|
16
|
+
desc "Push #{ @gem } to rubygems.org"
|
17
|
+
task :push => %i[test build git:check] do
|
18
|
+
sh %{gem push #{ @gem }}
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
namespace :git do
|
23
|
+
desc 'Check git workspace'
|
24
|
+
task :check do
|
25
|
+
sh %{git diff HEAD --quiet} do |ok|
|
26
|
+
abort "\e[31mRefusing to continue - git workspace is dirty\e[0m" unless ok
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
data/Taskfile.yml
ADDED
data/egads.gemspec
CHANGED
@@ -2,29 +2,31 @@ $:.unshift 'lib'
|
|
2
2
|
require 'egads/version'
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
|
-
s.name
|
6
|
-
s.version
|
7
|
-
s.summary
|
8
|
-
s.homepage
|
9
|
-
s.email
|
10
|
-
s.authors
|
11
|
-
s.license
|
5
|
+
s.name = "egads"
|
6
|
+
s.version = Egads::VERSION
|
7
|
+
s.summary = "Extensible Git Archive Deploy Strategy"
|
8
|
+
s.homepage = "https://github.com/kickstarter/egads"
|
9
|
+
s.email = ["aaron@ktheory.com"]
|
10
|
+
s.authors = ["Aaron Suggs"]
|
11
|
+
s.license = 'MIT'
|
12
12
|
|
13
13
|
s.files = `git ls-files`.split($/)
|
14
14
|
s.executables = s.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
15
15
|
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
16
16
|
s.require_paths = ["lib"]
|
17
17
|
|
18
|
-
s.extra_rdoc_files = [
|
18
|
+
s.extra_rdoc_files = ["README.md"]
|
19
19
|
s.rdoc_options = ["--charset=UTF-8"]
|
20
20
|
|
21
21
|
s.add_dependency "aws-sdk-s3", '~> 1.0'
|
22
|
+
s.add_dependency "rexml", ">= 3.3.4" # required for Ruby 3+
|
22
23
|
s.add_dependency "thor"
|
24
|
+
|
23
25
|
s.add_development_dependency "rake"
|
24
26
|
s.add_development_dependency "minitest"
|
25
|
-
#s.add_development_dependency "simple_mock" # Via http://tatey.com/2012/02/07/mocking-with-minitest-mock-and-simple-delegator/
|
26
27
|
|
27
|
-
s.description =
|
28
|
+
s.description = <<~EOS
|
28
29
|
A collection of scripts for making a deployable tarball of a git commit,
|
29
|
-
uploading it to Amazon S3, and downloading it to your servers.
|
30
|
+
uploading it to Amazon S3, and downloading it to your servers.
|
31
|
+
EOS
|
30
32
|
end
|
@@ -3,6 +3,7 @@ module Egads
|
|
3
3
|
include Thor::Actions
|
4
4
|
|
5
5
|
desc "[remote, plumbing] Downloads tarball for SHA from S3 and extracts it to the filesystem"
|
6
|
+
class_option :deployment_id, type: :string, default: nil, banner: 'Append suffix to release directory'
|
6
7
|
class_option :force, type: :boolean, aliases: '-f', default: false, banner: "Overwrite existing files"
|
7
8
|
argument :sha, type: :string, required: true, desc: 'git SHA to download and extract'
|
8
9
|
|
@@ -89,7 +90,8 @@ module Egads
|
|
89
90
|
|
90
91
|
# Directory created upon successful extraction
|
91
92
|
def release_dir
|
92
|
-
|
93
|
+
suffix = options[:deployment_id] ? "_#{options[:deployment_id]}" : ''
|
94
|
+
RemoteConfig.release_dir(sha) + suffix
|
93
95
|
end
|
94
96
|
|
95
97
|
# Directory where in-progress extraction occurs
|
@@ -104,7 +106,7 @@ module Egads
|
|
104
106
|
end
|
105
107
|
|
106
108
|
def should_download?(path)
|
107
|
-
options[:force] || File.zero?(path) || !File.
|
109
|
+
options[:force] || File.zero?(path) || !File.exist?(path)
|
108
110
|
end
|
109
111
|
|
110
112
|
def should_extract?
|
@@ -3,6 +3,7 @@ module Egads
|
|
3
3
|
include Thor::Actions
|
4
4
|
|
5
5
|
desc "[remote] Symlinks SHA to current and restarts services. If needed, stages SHA"
|
6
|
+
class_option :deployment_id, type: :string, default: nil, banner: 'Append suffix to release directory'
|
6
7
|
class_option :force, type: :boolean, default: false, banner: "Overwrite existing release"
|
7
8
|
argument :sha, type: :string, required: true, desc: 'git SHA to stage'
|
8
9
|
def setup_environment
|
@@ -44,8 +45,10 @@ module Egads
|
|
44
45
|
end
|
45
46
|
|
46
47
|
protected
|
48
|
+
|
47
49
|
def dir
|
48
|
-
|
50
|
+
suffix = options[:deployment_id] ? "_#{options[:deployment_id]}" : ''
|
51
|
+
RemoteConfig.release_dir(sha) + suffix
|
49
52
|
end
|
50
53
|
|
51
54
|
def release_to
|
data/lib/egads/command/stage.rb
CHANGED
@@ -2,8 +2,8 @@ module Egads
|
|
2
2
|
class Stage < Group
|
3
3
|
include Thor::Actions
|
4
4
|
|
5
|
-
|
6
5
|
desc "[remote] Readies SHA for release. If needed, generates URL for SHA and extracts"
|
6
|
+
class_option :deployment_id, type: :string, default: nil, banner: 'Append suffix to release directory'
|
7
7
|
class_option :force, type: :boolean, default: false, banner: "Overwrite existing files"
|
8
8
|
argument :sha, type: :string, required: true, desc: 'git SHA to stage'
|
9
9
|
|
@@ -57,8 +57,10 @@ module Egads
|
|
57
57
|
end
|
58
58
|
|
59
59
|
protected
|
60
|
+
|
60
61
|
def dir
|
61
|
-
|
62
|
+
suffix = options[:deployment_id] ? "_#{options[:deployment_id]}" : ''
|
63
|
+
RemoteConfig.release_dir(sha) + suffix
|
62
64
|
end
|
63
65
|
|
64
66
|
def stage_flag_path
|
@@ -66,7 +68,7 @@ module Egads
|
|
66
68
|
end
|
67
69
|
|
68
70
|
def should_stage?
|
69
|
-
options[:force] || !File.
|
71
|
+
options[:force] || !File.exist?(stage_flag_path)
|
70
72
|
end
|
71
73
|
|
72
74
|
def shared_path
|
@@ -74,5 +76,3 @@ module Egads
|
|
74
76
|
end
|
75
77
|
end
|
76
78
|
end
|
77
|
-
|
78
|
-
|
data/lib/egads/config.rb
CHANGED
@@ -6,9 +6,14 @@ module Egads
|
|
6
6
|
end
|
7
7
|
|
8
8
|
def s3_bucket
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
@bucket ||= begin
|
10
|
+
client = Aws::S3::Client.new(**{
|
11
|
+
access_key_id: config['s3']['access_key'],
|
12
|
+
secret_access_key: config['s3']['secret_key'],
|
13
|
+
region: config['s3']['region'],
|
14
|
+
}.compact)
|
15
|
+
Aws::S3::Bucket.new(config['s3']['bucket'], client: client)
|
16
|
+
end
|
12
17
|
end
|
13
18
|
|
14
19
|
def s3_prefix
|
data/lib/egads/version.rb
CHANGED
data/spec/egads_build_spec.rb
CHANGED
@@ -4,21 +4,21 @@ describe "Egads::Build" do
|
|
4
4
|
subject { Egads::Build }
|
5
5
|
|
6
6
|
it 'should run the correct tasks' do
|
7
|
-
subject.commands.keys.must_equal %w(check_build run_before_build_hooks write_revision_file commit_extra_paths make_tarball run_after_build_hooks upload)
|
7
|
+
_(subject.commands.keys).must_equal %w(check_build run_before_build_hooks write_revision_file commit_extra_paths make_tarball run_after_build_hooks upload)
|
8
8
|
end
|
9
9
|
|
10
10
|
it 'takes one argument' do
|
11
|
-
subject.arguments.size.must_equal 1
|
11
|
+
_(subject.arguments.size).must_equal 1
|
12
12
|
end
|
13
13
|
|
14
14
|
it 'has a rev argument' do
|
15
15
|
rev = subject.arguments.detect{|arg| arg.name == 'rev'}
|
16
|
-
rev.default.must_equal 'HEAD'
|
17
|
-
rev.required.must_equal false
|
16
|
+
_(rev.default).must_equal 'HEAD'
|
17
|
+
_(rev.required).must_equal false
|
18
18
|
end
|
19
19
|
|
20
20
|
it "exits on failure" do
|
21
|
-
subject.exit_on_failure
|
21
|
+
_(subject.exit_on_failure?).must_equal true
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
@@ -26,6 +26,6 @@ describe "Egags::Build instance" do
|
|
26
26
|
subject { Egads::Build.new }
|
27
27
|
|
28
28
|
it "has rev HEAD" do
|
29
|
-
subject.rev.must_equal 'HEAD'
|
29
|
+
_(subject.rev).must_equal 'HEAD'
|
30
30
|
end
|
31
31
|
end
|
data/spec/egads_check_spec.rb
CHANGED
@@ -4,17 +4,17 @@ describe "Egads::Check" do
|
|
4
4
|
subject { Egads::Check }
|
5
5
|
|
6
6
|
it 'should run the correct tasks' do
|
7
|
-
subject.commands.keys.must_equal %w(check)
|
7
|
+
_(subject.commands.keys).must_equal %w(check)
|
8
8
|
end
|
9
9
|
|
10
10
|
it 'takes one argument' do
|
11
|
-
subject.arguments.size.must_equal 1
|
11
|
+
_(subject.arguments.size).must_equal 1
|
12
12
|
end
|
13
13
|
|
14
14
|
it 'has a rev argument' do
|
15
15
|
rev = subject.arguments.detect{|arg| arg.name == 'rev'}
|
16
|
-
rev.default.must_equal 'HEAD'
|
17
|
-
rev.required.must_equal false
|
16
|
+
_(rev.default).must_equal 'HEAD'
|
17
|
+
_(rev.required).must_equal false
|
18
18
|
end
|
19
19
|
|
20
20
|
end
|
@@ -23,6 +23,6 @@ describe "Egags::Build instance" do
|
|
23
23
|
subject { Egads::Check.new }
|
24
24
|
|
25
25
|
it "has rev HEAD" do
|
26
|
-
subject.rev.must_equal 'HEAD'
|
26
|
+
_(subject.rev).must_equal 'HEAD'
|
27
27
|
end
|
28
28
|
end
|
data/spec/egads_command_spec.rb
CHANGED
data/spec/egads_config_spec.rb
CHANGED
@@ -5,7 +5,7 @@ describe Egads::Config do
|
|
5
5
|
subject { Egads::Config }
|
6
6
|
it "raises ArgumentError for missing config" do
|
7
7
|
ENV['EGADS_CONFIG'] = '/no/such/path'
|
8
|
-
|
8
|
+
_{ subject.config_path }.must_raise(ArgumentError)
|
9
9
|
end
|
10
10
|
|
11
11
|
describe "with an config file" do
|
@@ -14,16 +14,16 @@ describe Egads::Config do
|
|
14
14
|
|
15
15
|
describe '#config' do
|
16
16
|
it 'is a hash' do
|
17
|
-
subject.config.must_equal yml
|
17
|
+
_(subject.config).must_equal yml
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
21
|
it "has an S3 bucket" do
|
22
|
-
subject.s3_bucket.name.must_equal yml['s3']['bucket']
|
22
|
+
_(subject.s3_bucket.name).must_equal yml['s3']['bucket']
|
23
23
|
end
|
24
24
|
|
25
25
|
it "has an S3 prefix" do
|
26
|
-
subject.s3_prefix.must_equal yml['s3']['prefix']
|
26
|
+
_(subject.s3_prefix).must_equal yml['s3']['prefix']
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
@@ -34,21 +34,21 @@ describe Egads::RemoteConfig do
|
|
34
34
|
|
35
35
|
it "raises ArgumentError for missing config" do
|
36
36
|
ENV['EGADS_REMOTE_CONFIG'] = '/no/such/path'
|
37
|
-
|
37
|
+
_{ subject.config_path }.must_raise(ArgumentError)
|
38
38
|
end
|
39
39
|
|
40
40
|
describe "with an config file" do
|
41
41
|
let(:yml) { YAML.load_file("example/egads_remote.yml") }
|
42
42
|
|
43
43
|
describe '#config' do
|
44
|
-
it('is a hash') { subject.config.must_equal yml }
|
44
|
+
it('is a hash') { _(subject.config).must_equal yml }
|
45
45
|
end
|
46
46
|
|
47
|
-
it('#release_to') { subject.release_to.must_equal yml['release_to'] }
|
48
|
-
it('#extract_to') { subject.extract_to.must_equal yml['extract_to'] }
|
49
|
-
it('#release_dir') { subject.release_dir('abc').must_equal File.join(yml['extract_to'], 'abc') }
|
50
|
-
it('#restart_command') { subject.restart_command.must_equal yml['restart_command'] }
|
51
|
-
it('#bundler_options') { subject.bundler_options.must_equal yml['bundler']['options'] }
|
47
|
+
it('#release_to') { _(subject.release_to).must_equal yml['release_to'] }
|
48
|
+
it('#extract_to') { _(subject.extract_to).must_equal yml['extract_to'] }
|
49
|
+
it('#release_dir') { _(subject.release_dir('abc')).must_equal File.join(yml['extract_to'], 'abc') }
|
50
|
+
it('#restart_command') { _(subject.restart_command).must_equal yml['restart_command'] }
|
51
|
+
it('#bundler_options') { _(subject.bundler_options).must_equal yml['bundler']['options'] }
|
52
52
|
|
53
53
|
describe '#setup_environment' do
|
54
54
|
before { subject.setup_environment }
|
@@ -59,7 +59,7 @@ describe Egads::RemoteConfig do
|
|
59
59
|
|
60
60
|
it 'should set ENV values' do
|
61
61
|
yml['env'].each do |key, value|
|
62
|
-
ENV[key].must_equal value
|
62
|
+
_(ENV[key]).must_equal value
|
63
63
|
end
|
64
64
|
end
|
65
65
|
end
|
data/spec/egads_extract_spec.rb
CHANGED
data/spec/egads_release_spec.rb
CHANGED
@@ -4,6 +4,6 @@ describe "Egads::Release" do
|
|
4
4
|
subject { Egads::Release }
|
5
5
|
|
6
6
|
it 'should run the correct tasks' do
|
7
|
-
subject.commands.keys.must_equal %w(setup_environment stage run_before_release_hooks symlink_release restart run_after_release_hooks trim)
|
7
|
+
_(subject.commands.keys).must_equal %w(setup_environment stage run_before_release_hooks symlink_release restart run_after_release_hooks trim)
|
8
8
|
end
|
9
9
|
end
|
@@ -5,16 +5,16 @@ describe Egads::S3Tarball do
|
|
5
5
|
|
6
6
|
after { Aws.config.delete(:s3) }
|
7
7
|
|
8
|
-
it('has a sha') { subject.sha.must_equal 'sha' }
|
9
|
-
it('has a key') { subject.key.must_equal 'my_project/sha.tar.gz' }
|
8
|
+
it('has a sha') { _(subject.sha).must_equal 'sha' }
|
9
|
+
it('has a key') { _(subject.key).must_equal 'my_project/sha.tar.gz' }
|
10
10
|
|
11
11
|
it "has an S3 bucket" do
|
12
|
-
subject.bucket.name.must_equal Egads::Config.s3_bucket.name
|
12
|
+
_(subject.bucket.name).must_equal Egads::Config.s3_bucket.name
|
13
13
|
end
|
14
14
|
|
15
15
|
it('should not exist') {
|
16
16
|
Aws.config[:s3] = {stub_responses: { head_object: {status_code: 404, headers: {}, body: '', }}}
|
17
|
-
subject.exists
|
17
|
+
_(subject.exists?).must_equal(false)
|
18
18
|
}
|
19
19
|
|
20
20
|
describe 'when uploaded' do
|
@@ -23,8 +23,7 @@ describe Egads::S3Tarball do
|
|
23
23
|
end
|
24
24
|
|
25
25
|
it('should exist') do
|
26
|
-
subject.exists
|
26
|
+
_(subject.exists?).must_equal true
|
27
27
|
end
|
28
28
|
end
|
29
29
|
end
|
30
|
-
|
data/spec/egads_stage_spec.rb
CHANGED
@@ -4,6 +4,6 @@ describe "Egads::Stage" do
|
|
4
4
|
subject { Egads::Stage }
|
5
5
|
|
6
6
|
it 'should run the correct tasks' do
|
7
|
-
subject.commands.keys.must_equal %w(setup_environment extract run_before_hooks bundle symlink_system_paths symlink_config_files run_after_stage_hooks mark_as_staged)
|
7
|
+
_(subject.commands.keys).must_equal %w(setup_environment extract run_before_hooks bundle symlink_system_paths symlink_config_files run_after_stage_hooks mark_as_staged)
|
8
8
|
end
|
9
9
|
end
|
data/spec/egads_trim_spec.rb
CHANGED
data/spec/egads_upload_spec.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: egads
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaron Suggs
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-09-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-s3
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rexml
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 3.3.4
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 3.3.4
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: thor
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,10 +80,9 @@ dependencies:
|
|
66
80
|
- - ">="
|
67
81
|
- !ruby/object:Gem::Version
|
68
82
|
version: '0'
|
69
|
-
description: |
|
70
|
-
|
71
|
-
|
72
|
-
uploading it to Amazon S3, and downloading it to your servers.
|
83
|
+
description: |
|
84
|
+
A collection of scripts for making a deployable tarball of a git commit,
|
85
|
+
uploading it to Amazon S3, and downloading it to your servers.
|
73
86
|
email:
|
74
87
|
- aaron@ktheory.com
|
75
88
|
executables:
|
@@ -78,12 +91,14 @@ extensions: []
|
|
78
91
|
extra_rdoc_files:
|
79
92
|
- README.md
|
80
93
|
files:
|
94
|
+
- ".github/actions/setup-rubygems/action.yml"
|
95
|
+
- ".github/workflows/test-release.yml"
|
81
96
|
- ".gitignore"
|
82
|
-
- ".travis.yml"
|
83
97
|
- Gemfile
|
84
98
|
- Guardfile
|
85
99
|
- README.md
|
86
100
|
- Rakefile
|
101
|
+
- Taskfile.yml
|
87
102
|
- bin/egads
|
88
103
|
- egads.gemspec
|
89
104
|
- example/egads.yml
|
@@ -134,7 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
134
149
|
- !ruby/object:Gem::Version
|
135
150
|
version: '0'
|
136
151
|
requirements: []
|
137
|
-
rubygems_version: 3.
|
152
|
+
rubygems_version: 3.5.16
|
138
153
|
signing_key:
|
139
154
|
specification_version: 4
|
140
155
|
summary: Extensible Git Archive Deploy Strategy
|