patches 2.4.0 → 3.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/.buildkite/pipeline.yml +24 -0
- data/.rspec +1 -1
- data/CHANGELOG.md +42 -0
- data/Dockerfile +9 -0
- data/LICENSE.md +3 -1
- data/README.md +8 -4
- data/bin/console +0 -0
- data/docker-compose.yml +11 -0
- data/docs/usage.md +22 -13
- data/lib/patches.rb +1 -0
- data/lib/patches/application_version_validation.rb +9 -0
- data/lib/patches/config.rb +11 -16
- data/lib/patches/notifier.rb +1 -11
- data/lib/patches/tenant_run_concern.rb +3 -2
- data/lib/patches/tenant_worker.rb +7 -2
- data/lib/patches/version.rb +4 -1
- data/lib/patches/worker.rb +7 -2
- data/lib/tasks/patches.rake +4 -1
- data/patches.gemspec +3 -5
- metadata +12 -38
- data/.travis.yml +0 -3
- data/script/buildkite.sh +0 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2efd0dc04504ab68ece9ffb46f6e1c2a6adcae93b39dac5824d4cfed34093a99
|
4
|
+
data.tar.gz: 167f4f394fea327cbdf85f9c3e1ac067639abdfd606b2077ec70e5b1bb0a4bbb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 90edf98dc27bdeb176f8075711a2703cad55853ef010ce99b908a63001739d58dfab1ccc002e5ce61e4bbfe0724b4ca08321037b673c20fe529e76bc5a58f535
|
7
|
+
data.tar.gz: 666b762d233f27259f8c33afe2cf2ddb4cff060d313de6795840fac767e14e46401e1c5e8ff321379b4d9f9dbeea4bd00704656e03942ac312bdb3fea13f64a4
|
@@ -0,0 +1,24 @@
|
|
1
|
+
steps:
|
2
|
+
- label: ':hammer: Tests'
|
3
|
+
plugins:
|
4
|
+
docker-compose:
|
5
|
+
run: app
|
6
|
+
command: 'bundle exec rspec'
|
7
|
+
agents:
|
8
|
+
queue: docker-heavy
|
9
|
+
artifact_paths: 'coverage/.resultset.json'
|
10
|
+
|
11
|
+
- wait
|
12
|
+
|
13
|
+
- command: "Report CodeClimate Coverage"
|
14
|
+
label: ":codeclimate: Report coverage"
|
15
|
+
plugins:
|
16
|
+
jobready/codeclimate-test-reporter#v2.0:
|
17
|
+
prefix: /app
|
18
|
+
artifact: "coverage/.resultset*.json"
|
19
|
+
input_type: simplecov
|
20
|
+
parts: 1
|
21
|
+
env:
|
22
|
+
CC_TEST_REPORTER_ID:
|
23
|
+
agents:
|
24
|
+
queue: docker-heavy
|
data/.rspec
CHANGED
data/CHANGELOG.md
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
# Changelog
|
2
|
+
All notable changes to this project will be documented in this file.
|
3
|
+
|
4
|
+
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
5
|
+
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
6
|
+
|
7
|
+
## [Unreleased]
|
8
|
+
|
9
|
+
## [3.4.0] - 2020-07-21
|
10
|
+
### Added
|
11
|
+
- `Patches::TenantWorker` application version constraint forward compatibility
|
12
|
+
|
13
|
+
## [3.3.0] - 2020-07-20
|
14
|
+
### Added
|
15
|
+
- Application version constraints
|
16
|
+
|
17
|
+
## [3.2.0] - 2020-07-16
|
18
|
+
### Added
|
19
|
+
- Added `Patches::Worker` extra parameters to support forward compatibility with the upcoming releases
|
20
|
+
|
21
|
+
## [3.1.0] - 2019-11-25
|
22
|
+
### Fixed
|
23
|
+
- Gem compatibility with Apartment 2
|
24
|
+
|
25
|
+
## [3.0.1] - 2018-11-19
|
26
|
+
### Added
|
27
|
+
- Set icon_emoji of posted slack message to :dog:
|
28
|
+
|
29
|
+
## [3.0.0] - 2018-11-19
|
30
|
+
### Removed
|
31
|
+
- Hipchat is no longer supported
|
32
|
+
|
33
|
+
## [2.4.1] - 2018-09-19
|
34
|
+
### Changed
|
35
|
+
- Corrected gem ownership and authors.
|
36
|
+
### Added
|
37
|
+
- Changelog
|
38
|
+
- Dockerfile and BuildKite pipeline config
|
39
|
+
|
40
|
+
## [2.4.0] - 2018-09-17
|
41
|
+
### Added
|
42
|
+
- Added slack notification configurability
|
data/Dockerfile
ADDED
data/LICENSE.md
CHANGED
@@ -16,4 +16,6 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
16
16
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
17
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
18
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
|
-
THE SOFTWARE.
|
19
|
+
THE SOFTWARE.
|
20
|
+
|
21
|
+
https://opensource.org/licenses/MIT
|
data/README.md
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
# Patches
|
2
2
|
[](https://buildkite.com/jobready/patches)
|
3
|
-
[](https://codeclimate.com/repos/557f93b76956807f81000001/maintainability)
|
4
|
+
[](https://codeclimate.com/repos/557f93b76956807f81000001/test_coverage)
|
5
|
+
[](https://badge.fury.io/rb/patches)
|
5
6
|
|
6
7
|

|
7
8
|
|
@@ -35,9 +36,12 @@ see `docs/usage.md`
|
|
35
36
|
|
36
37
|
## Development
|
37
38
|
|
38
|
-
|
39
|
+
```
|
40
|
+
docker-compose build
|
41
|
+
docker-compose run app bundle exec rspec
|
42
|
+
```
|
39
43
|
|
40
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
44
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org/gems/patches).
|
41
45
|
|
42
46
|
## Contributing
|
43
47
|
|
data/bin/console
CHANGED
File without changes
|
data/docker-compose.yml
ADDED
data/docs/usage.md
CHANGED
@@ -23,21 +23,13 @@ bundle exec rake db:migrate
|
|
23
23
|
## Configuration
|
24
24
|
|
25
25
|
If you would like to run the patches asynchronously, or would like them to notify
|
26
|
-
your
|
26
|
+
your Slack channel when they fail or succeed, you need to set up
|
27
27
|
an initializer to set those options.
|
28
28
|
|
29
|
-
```
|
29
|
+
```ruby
|
30
30
|
Patches::Config.configure do |config|
|
31
31
|
config.use_sidekiq = true
|
32
32
|
|
33
|
-
config.use_hipchat = true
|
34
|
-
config.hipchat_options = {
|
35
|
-
api_token: ENV['HIPCHAT_TOKEN'],
|
36
|
-
room: ENV['HIPCHAT_ROOM'],
|
37
|
-
user: ENV['HIPCHAT_USERNAME'], # maximum of 15 characters
|
38
|
-
api_version: 'v1', # optional
|
39
|
-
}
|
40
|
-
|
41
33
|
config.use_slack = true
|
42
34
|
config.slack_options = {
|
43
35
|
webhook_url: ENV['SLACK_WEBHOOK_URL'],
|
@@ -52,7 +44,7 @@ end
|
|
52
44
|
If you are using the Apartment gem, you can run the patches for each tenant in parallel.
|
53
45
|
Just set the config ```sidekiq_parallel``` to ```true``` and you're good to go.
|
54
46
|
|
55
|
-
```
|
47
|
+
```ruby
|
56
48
|
Patches::Config.configure do |config|
|
57
49
|
config.use_sidekiq = true
|
58
50
|
config.sidekiq_parallel = true
|
@@ -62,6 +54,23 @@ end
|
|
62
54
|
*Note:* Make sure your sidekiq queue is able to process concurrent jobs.
|
63
55
|
You can use ```config.sidekiq_options``` to customise it.
|
64
56
|
|
57
|
+
### Application version verification
|
58
|
+
|
59
|
+
In environments where a rolling update of sidekiq workers is performed during the deployment, multiple versions of the application run at the same time. If a Patches job is scheduled by the new application version during the rolling update, there is a possibility that it can be executed by the old application version, which will not have all the required patch files.
|
60
|
+
|
61
|
+
To prevent this case, set the application version in the config:
|
62
|
+
|
63
|
+
```ruby
|
64
|
+
Patches::Config.configure do |config|
|
65
|
+
revision_file_path = Rails.root.join('REVISION')
|
66
|
+
|
67
|
+
if File.exist?(revision_file_path)
|
68
|
+
config.application_version = File.read(revision_file_path)
|
69
|
+
config.retry_after_version_mismatch_in = 1.minute
|
70
|
+
end
|
71
|
+
end
|
72
|
+
```
|
73
|
+
|
65
74
|
## Creating Patches
|
66
75
|
|
67
76
|
Generate a patch
|
@@ -84,7 +93,7 @@ update the run method and then execute
|
|
84
93
|
|
85
94
|
Generate patch with specs
|
86
95
|
|
87
|
-
```
|
96
|
+
```bash
|
88
97
|
bundle exec rails g patches:patch PreferenceUpdate --specs=true
|
89
98
|
```
|
90
99
|
|
@@ -116,7 +125,7 @@ after sidekiq restarts, otherwise there is no guarentee the tasks will run.
|
|
116
125
|
If a patch requires data assets, you could use S3 to store the file.
|
117
126
|
If credentials are defined in env vars, as per https://docs.aws.amazon.com/cli/latest/topic/config-vars.html#id1
|
118
127
|
|
119
|
-
```
|
128
|
+
```ruby
|
120
129
|
require 'aws-sdk-s3'
|
121
130
|
Aws::S3::Client.new.get_object(bucket: @bucket_name, key: filename, response_target: destination)
|
122
131
|
```
|
data/lib/patches.rb
CHANGED
@@ -22,6 +22,7 @@ end
|
|
22
22
|
require "patches/base"
|
23
23
|
require "patches/config"
|
24
24
|
require "patches/tenant_run_concern"
|
25
|
+
require "patches/application_version_validation"
|
25
26
|
require "patches/tenant_worker" if defined?(Sidekiq)
|
26
27
|
require "patches/engine" if defined?(Rails)
|
27
28
|
require "patches/patch"
|
@@ -0,0 +1,9 @@
|
|
1
|
+
module Patches
|
2
|
+
module ApplicationVersionValidation
|
3
|
+
def valid_application_version?(application_version)
|
4
|
+
return true unless application_version
|
5
|
+
return true unless Patches::Config.configuration.application_version
|
6
|
+
Patches::Config.configuration.application_version == application_version
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
data/lib/patches/config.rb
CHANGED
@@ -14,8 +14,15 @@ module Patches
|
|
14
14
|
end
|
15
15
|
|
16
16
|
class Configuration
|
17
|
-
attr_accessor
|
18
|
-
:
|
17
|
+
attr_accessor \
|
18
|
+
:application_version,
|
19
|
+
:retry_after_version_mismatch_in,
|
20
|
+
:sidekiq_options,
|
21
|
+
:sidekiq_parallel,
|
22
|
+
:sidekiq_queue,
|
23
|
+
:slack_options,
|
24
|
+
:use_sidekiq,
|
25
|
+
:use_slack
|
19
26
|
|
20
27
|
def initialize
|
21
28
|
@sidekiq_queue = 'default'
|
@@ -25,20 +32,8 @@ module Patches
|
|
25
32
|
@sidekiq_options ||= { retry: false, queue: sidekiq_queue }
|
26
33
|
end
|
27
34
|
|
28
|
-
def
|
29
|
-
|
30
|
-
end
|
31
|
-
|
32
|
-
def hipchat_init_options
|
33
|
-
hipchat_options.except(:api_token, :room, :user)
|
34
|
-
end
|
35
|
-
|
36
|
-
def hipchat_room
|
37
|
-
hipchat_options[:room]
|
38
|
-
end
|
39
|
-
|
40
|
-
def hipchat_user
|
41
|
-
hipchat_options[:user]
|
35
|
+
def retry_after_version_mismatch_in
|
36
|
+
@retry_after_version_mismatch_in ||= 1.minute
|
42
37
|
end
|
43
38
|
|
44
39
|
def slack_channel
|
data/lib/patches/notifier.rb
CHANGED
@@ -3,12 +3,10 @@ require 'slack-notifier'
|
|
3
3
|
class Patches::Notifier
|
4
4
|
class << self
|
5
5
|
def notify_success(patches)
|
6
|
-
send_hipchat_message(success_message(patches), color: 'green')
|
7
6
|
send_slack_message(success_message(patches), 'good')
|
8
7
|
end
|
9
8
|
|
10
9
|
def notify_failure(patch_path, error)
|
11
|
-
send_hipchat_message(failure_message(patch_path, error), color: 'red')
|
12
10
|
send_slack_message(failure_message(patch_path, error), 'danger')
|
13
11
|
end
|
14
12
|
|
@@ -32,14 +30,6 @@ class Patches::Notifier
|
|
32
30
|
message
|
33
31
|
end
|
34
32
|
|
35
|
-
def send_hipchat_message(message, options)
|
36
|
-
return unless defined?(HipChat) && config.use_hipchat
|
37
|
-
|
38
|
-
client = HipChat::Client.new(config.hipchat_api_token, config.hipchat_init_options)
|
39
|
-
room = client[config.hipchat_room]
|
40
|
-
room.send(config.hipchat_user, message, options)
|
41
|
-
end
|
42
|
-
|
43
33
|
def send_slack_message(message, color)
|
44
34
|
return unless defined?(Slack) && config.use_slack
|
45
35
|
|
@@ -48,7 +38,7 @@ class Patches::Notifier
|
|
48
38
|
channel: config.slack_channel,
|
49
39
|
username: config.slack_username)
|
50
40
|
|
51
|
-
payload = { attachments: [{ color: color, text: message }] }
|
41
|
+
payload = { icon_emoji: ":dog:", attachments: [{ color: color, text: message }] }
|
52
42
|
|
53
43
|
notifier.post payload
|
54
44
|
end
|
@@ -3,10 +3,15 @@ require 'sidekiq'
|
|
3
3
|
class Patches::TenantWorker
|
4
4
|
include Sidekiq::Worker
|
5
5
|
include Patches::TenantRunConcern
|
6
|
+
include Patches::ApplicationVersionValidation
|
6
7
|
|
7
8
|
sidekiq_options Patches::Config.configuration.sidekiq_options
|
8
9
|
|
9
|
-
def perform(tenant_name, path)
|
10
|
-
|
10
|
+
def perform(tenant_name, path, params = {})
|
11
|
+
if valid_application_version?(params['application_version'])
|
12
|
+
run(tenant_name, path)
|
13
|
+
else
|
14
|
+
self.class.perform_in(Patches::Config.configuration.retry_after_version_mismatch_in, tenant_name, path, params)
|
15
|
+
end
|
11
16
|
end
|
12
17
|
end
|
data/lib/patches/version.rb
CHANGED
data/lib/patches/worker.rb
CHANGED
@@ -2,10 +2,15 @@ require 'sidekiq'
|
|
2
2
|
|
3
3
|
class Patches::Worker
|
4
4
|
include Sidekiq::Worker
|
5
|
+
include Patches::ApplicationVersionValidation
|
5
6
|
|
6
7
|
sidekiq_options Patches::Config.configuration.sidekiq_options
|
7
8
|
|
8
|
-
def perform(runner)
|
9
|
-
|
9
|
+
def perform(runner, params = {})
|
10
|
+
if valid_application_version?(params['application_version'])
|
11
|
+
runner.constantize.new.perform
|
12
|
+
else
|
13
|
+
self.class.perform_in(Patches::Config.configuration.retry_after_version_mismatch_in, runner, params)
|
14
|
+
end
|
10
15
|
end
|
11
16
|
end
|
data/lib/tasks/patches.rake
CHANGED
@@ -8,7 +8,10 @@ namespace :patches do
|
|
8
8
|
end
|
9
9
|
|
10
10
|
if defined?(Sidekiq) && Patches::Config.configuration.use_sidekiq
|
11
|
-
Patches::Worker.perform_async(
|
11
|
+
Patches::Worker.perform_async(
|
12
|
+
runner,
|
13
|
+
application_version: Patches::Config.configuration.application_version
|
14
|
+
)
|
12
15
|
else
|
13
16
|
runner.new.perform
|
14
17
|
end
|
data/patches.gemspec
CHANGED
@@ -6,8 +6,8 @@ require 'patches/version'
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "patches"
|
8
8
|
spec.version = Patches::VERSION
|
9
|
-
spec.authors = ["
|
10
|
-
spec.email = ["
|
9
|
+
spec.authors = ["JobReady"]
|
10
|
+
spec.email = ["ruby_gems@jobready.com.au"]
|
11
11
|
|
12
12
|
spec.licenses = ['MIT']
|
13
13
|
spec.summary = %q{A simple gem for one off tasks}
|
@@ -25,17 +25,15 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.add_development_dependency "bundler", "~> 1.8"
|
26
26
|
spec.add_development_dependency "rake", "~> 10.0"
|
27
27
|
spec.add_development_dependency "sqlite3", "~> 1.3.5"
|
28
|
-
spec.add_development_dependency "rspec-rails", "~>
|
28
|
+
spec.add_development_dependency "rspec-rails", "~> 4.0.0"
|
29
29
|
spec.add_development_dependency "capybara", "~> 2.3.0"
|
30
30
|
spec.add_development_dependency "generator_spec", "~> 0.9.0"
|
31
31
|
spec.add_development_dependency "simplecov", "~> 0.10"
|
32
32
|
spec.add_development_dependency "factory_girl", "~> 4.5.0"
|
33
33
|
spec.add_development_dependency "timecop", "~> 0.7.0"
|
34
34
|
spec.add_development_dependency "database_cleaner", "~> 1.3.0"
|
35
|
-
spec.add_development_dependency "codeclimate-test-reporter", "~> 0.4"
|
36
35
|
spec.add_development_dependency "pry"
|
37
36
|
spec.add_development_dependency "sidekiq", "~> 3.4.1"
|
38
|
-
spec.add_development_dependency "hipchat"
|
39
37
|
spec.add_development_dependency "webmock"
|
40
38
|
spec.add_development_dependency "byebug"
|
41
39
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: patches
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- JobReady
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-07-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -86,14 +86,14 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
89
|
+
version: 4.0.0
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
96
|
+
version: 4.0.0
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: capybara
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -178,20 +178,6 @@ dependencies:
|
|
178
178
|
- - "~>"
|
179
179
|
- !ruby/object:Gem::Version
|
180
180
|
version: 1.3.0
|
181
|
-
- !ruby/object:Gem::Dependency
|
182
|
-
name: codeclimate-test-reporter
|
183
|
-
requirement: !ruby/object:Gem::Requirement
|
184
|
-
requirements:
|
185
|
-
- - "~>"
|
186
|
-
- !ruby/object:Gem::Version
|
187
|
-
version: '0.4'
|
188
|
-
type: :development
|
189
|
-
prerelease: false
|
190
|
-
version_requirements: !ruby/object:Gem::Requirement
|
191
|
-
requirements:
|
192
|
-
- - "~>"
|
193
|
-
- !ruby/object:Gem::Version
|
194
|
-
version: '0.4'
|
195
181
|
- !ruby/object:Gem::Dependency
|
196
182
|
name: pry
|
197
183
|
requirement: !ruby/object:Gem::Requirement
|
@@ -220,20 +206,6 @@ dependencies:
|
|
220
206
|
- - "~>"
|
221
207
|
- !ruby/object:Gem::Version
|
222
208
|
version: 3.4.1
|
223
|
-
- !ruby/object:Gem::Dependency
|
224
|
-
name: hipchat
|
225
|
-
requirement: !ruby/object:Gem::Requirement
|
226
|
-
requirements:
|
227
|
-
- - ">="
|
228
|
-
- !ruby/object:Gem::Version
|
229
|
-
version: '0'
|
230
|
-
type: :development
|
231
|
-
prerelease: false
|
232
|
-
version_requirements: !ruby/object:Gem::Requirement
|
233
|
-
requirements:
|
234
|
-
- - ">="
|
235
|
-
- !ruby/object:Gem::Version
|
236
|
-
version: '0'
|
237
209
|
- !ruby/object:Gem::Dependency
|
238
210
|
name: webmock
|
239
211
|
requirement: !ruby/object:Gem::Requirement
|
@@ -264,14 +236,16 @@ dependencies:
|
|
264
236
|
version: '0'
|
265
237
|
description: A simple gem for one off tasks for example database patches
|
266
238
|
email:
|
267
|
-
-
|
239
|
+
- ruby_gems@jobready.com.au
|
268
240
|
executables: []
|
269
241
|
extensions: []
|
270
242
|
extra_rdoc_files: []
|
271
243
|
files:
|
244
|
+
- ".buildkite/pipeline.yml"
|
272
245
|
- ".gitignore"
|
273
246
|
- ".rspec"
|
274
|
-
-
|
247
|
+
- CHANGELOG.md
|
248
|
+
- Dockerfile
|
275
249
|
- Gemfile
|
276
250
|
- LICENSE.md
|
277
251
|
- README.md
|
@@ -279,6 +253,7 @@ files:
|
|
279
253
|
- bin/console
|
280
254
|
- bin/setup
|
281
255
|
- db/migrate/201506011700_create_patch.rb
|
256
|
+
- docker-compose.yml
|
282
257
|
- docs/patches.jpg
|
283
258
|
- docs/usage.md
|
284
259
|
- lib/generators/patches.rb
|
@@ -286,6 +261,7 @@ files:
|
|
286
261
|
- lib/generators/patches/templates/patch.rb.erb
|
287
262
|
- lib/generators/patches/templates/patch_spec.rb.erb
|
288
263
|
- lib/patches.rb
|
264
|
+
- lib/patches/application_version_validation.rb
|
289
265
|
- lib/patches/base.rb
|
290
266
|
- lib/patches/capistrano.rb
|
291
267
|
- lib/patches/capistrano/tasks.rake
|
@@ -302,7 +278,6 @@ files:
|
|
302
278
|
- lib/patches/worker.rb
|
303
279
|
- lib/tasks/patches.rake
|
304
280
|
- patches.gemspec
|
305
|
-
- script/buildkite.sh
|
306
281
|
homepage: http://github.com/jobready/patches
|
307
282
|
licenses:
|
308
283
|
- MIT
|
@@ -322,8 +297,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
322
297
|
- !ruby/object:Gem::Version
|
323
298
|
version: '0'
|
324
299
|
requirements: []
|
325
|
-
|
326
|
-
rubygems_version: 2.7.6
|
300
|
+
rubygems_version: 3.0.3
|
327
301
|
signing_key:
|
328
302
|
specification_version: 4
|
329
303
|
summary: A simple gem for one off tasks
|
data/.travis.yml
DELETED
data/script/buildkite.sh
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
#!/bin/bash
|
2
|
-
set -e
|
3
|
-
|
4
|
-
echo '--- setting ruby version'
|
5
|
-
cd /var/lib/buildkite-agent/.rbenv/plugins/ruby-build && git pull && cd -
|
6
|
-
rbenv install 2.3.7 -s
|
7
|
-
rbenv local 2.3.7
|
8
|
-
|
9
|
-
echo '--- setting up env'
|
10
|
-
REVISION=https://github.com/$BUILDBOX_PROJECT_SLUG/commit/$BUILDBOX_COMMIT
|
11
|
-
|
12
|
-
echo '--- bundling'
|
13
|
-
bundle install -j $(nproc) --without production --quiet
|
14
|
-
|
15
|
-
echo '--- running specs'
|
16
|
-
if bundle exec rspec; then
|
17
|
-
echo "[Successful] $BUILDBOX_PROJECT_SLUG - Build - $BUILDBOX_BUILD_URL - Commit - $REVISION" | hipchat_room_message -t $HIPCHAT_TOKEN -r $HIPCHAT_ROOM -f "Buildbox" -c "green"
|
18
|
-
else
|
19
|
-
echo "[Failed] Build $BUILDBOX_PROJECT_SLUG - Build - $BUILDBOX_BUILD_URL - Commit - $REVISION" | hipchat_room_message -t $HIPCHAT_TOKEN -r $HIPCHAT_ROOM -f "Buildbox" -c "red"
|
20
|
-
exit 1;
|
21
|
-
fi
|