elastic_whenever 0.7.0 → 1.0.1

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: faaf28462435852a35046ac97c388f60eaaa3348f9b386251960d83d4351f3a5
4
- data.tar.gz: c35bf7a5281b25667c3a96dda86920a6b304ba35a147d2421105233f5843fb69
3
+ metadata.gz: 2c1fbdaa056fc86c9ee7a79c5aff27cb64e8de9eaac1f5457d646a986fb4e3c7
4
+ data.tar.gz: 370d15415b4a94391ae423dfb66232567e9cbb2a1869d60085a5fbf69c18e42a
5
5
  SHA512:
6
- metadata.gz: f5639992267344f3360d8115ae4ad4beef874bea395d666c0840f80bc04a736c098a781f94b8f29cf4c0f0174ec875caf92c2a3ce0d311657efd91427313b18b
7
- data.tar.gz: 4165f7c3d71f02f991e4d509f3a6493c2ff36ee11d1733bda7def83825da07bf468796fe83e079603ca974cc9981d63c0e53055fac00339ccc327bee17cdba3a
6
+ metadata.gz: be905a6e36ba90b2bb462000833a4eb12fb038b98c54143b899bdaf207b2397deab0d32cd4d022d36f42dd71783742f5abcd0314bdf79791f06c681e89010324
7
+ data.tar.gz: 19120c0c05322fa76bb6e81383bd045d445f473b1ae719146acd7a69b76a417347198a98514f894967c6021dbe65ff4ce018d1b89cd941c8b582b8286b8fce82
@@ -16,7 +16,7 @@ jobs:
16
16
  runs-on: ubuntu-latest
17
17
  strategy:
18
18
  matrix:
19
- ruby_version: ['2.6', '2.7', '3.0']
19
+ ruby_version: ['3.1', '3.2', '3.3']
20
20
  steps:
21
21
  - uses: actions/checkout@v2
22
22
  - uses: ruby/setup-ruby@v1
data/CHANGELOG.md CHANGED
@@ -1,3 +1,25 @@
1
+ ## v1.0.1 (2024-01-27)
2
+
3
+ ### Bug Fixes
4
+
5
+ - [#70](https://github.com/wata727/elastic_whenever/pull/70): Fix week converion issue in cron syntax
6
+
7
+ ## v1.0.0 (2024-01-07)
8
+
9
+ Although this is a major version release, there are no notable incompatibilities. This means that the current behavior is stable enough that no major future changes are planned at this time.
10
+
11
+ ### Enhancements
12
+
13
+ - [#69](https://github.com/wata727/elastic_whenever/pull/69): Improve profile support ([@mfittko](https://github.com/mfittko))
14
+ - Previously, a profile passed with the `--profile` flag was always used only for shared credentials, and could not be used to switch profiles for credentials issued by IAM Identity Center, etc.
15
+ - With this change, the passed profile will be used correctly to other credentials as well.
16
+
17
+ ### Chores
18
+
19
+ - [#60](https://github.com/wata727/elastic_whenever/pull/60) [#64](https://github.com/wata727/elastic_whenever/pull/64) [#68](https://github.com/wata727/elastic_whenever/pull/68): CI against Ruby 3.1, 3.2, 3.3
20
+ - [#62](https://github.com/wata727/elastic_whenever/pull/62): fix small typo ([@kijimaD](https://github.com/kijimaD))
21
+ - [#65](https://github.com/wata727/elastic_whenever/pull/65): fix/typos-documentation ([@jotolo](https://github.com/jotolo))
22
+
1
23
  ## v0.7.0 (2021-09-25)
2
24
 
3
25
  This release contains a major change to the behavior when updating tasks. In most cases, this change has no effect, but be aware of the change in behavior when omitting a revision of the task definition. In particular, if you are building a deployment workflow where the update timing of task definitions and the update timing of scheduled tasks are different, the revisions that are executed may be different.
data/README.md CHANGED
@@ -34,9 +34,9 @@ Usage: elastic_whenever [options]
34
34
  -s, --set variables Example: --set 'environment=staging'
35
35
  --cluster cluster ECS cluster to run tasks
36
36
  --task-definition task_definition
37
- Task definition name, If omit a revision, use the latest revision of the family automatically. Example: --task-deifinition oneoff-application:2
37
+ Task definition name, If omit a revision, use the latest revision of the family automatically. Example: --task-definition oneoff-application:2
38
38
  --container container Container name defined in the task definition
39
- --launch-type launch_type Launch type. EC2 or FARGATE. Defualt: EC2
39
+ --launch-type launch_type Launch type. EC2 or FARGATE. Default: EC2
40
40
  --assign-public-ip Assign a public IP. Default: DISABLED (FARGATE only)
41
41
  --security-groups groups Example: --security-groups 'sg-2c503655,sg-72f0cb0a' (FARGATE only)
42
42
  --subnets subnets Example: --subnets 'subnet-4973d63f,subnet-45827d1d' (FARGATE only)
@@ -78,13 +78,13 @@ module ElasticWhenever
78
78
  opts.on('--cluster cluster', 'ECS cluster to run tasks') do |cluster|
79
79
  @cluster = cluster
80
80
  end
81
- opts.on('--task-definition task_definition', 'Task definition name, If omit a revision, use the latest revision of the family automatically. Example: --task-deifinition oneoff-application:2') do |definition|
81
+ opts.on('--task-definition task_definition', 'Task definition name, If omit a revision, use the latest revision of the family automatically. Example: --task-definition oneoff-application:2') do |definition|
82
82
  @task_definition = definition
83
83
  end
84
84
  opts.on('--container container', 'Container name defined in the task definition') do |container|
85
85
  @container = container
86
86
  end
87
- opts.on('--launch-type launch_type', 'Launch type. EC2 or FARGATE. Defualt: EC2') do |launch_type|
87
+ opts.on('--launch-type launch_type', 'Launch type. EC2 or FARGATE. Default: EC2') do |launch_type|
88
88
  @launch_type = launch_type
89
89
  end
90
90
  opts.on('--assign-public-ip', 'Assign a public IP. Default: DISABLED (FARGATE only)') do
@@ -128,15 +128,13 @@ module ElasticWhenever
128
128
  end
129
129
  end.parse(args)
130
130
 
131
- @credentials = if profile
132
- Aws::SharedCredentials.new(profile_name: profile)
133
- elsif access_key && secret_key
131
+ @credentials = if access_key && secret_key
134
132
  Aws::Credentials.new(access_key, secret_key)
135
133
  end
136
134
  end
137
135
 
138
136
  def aws_config
139
- @aws_config ||= { credentials: credentials, region: region }.delete_if { |_k, v| v.nil? }
137
+ @aws_config ||= { credentials: credentials, region: region, profile: profile }.delete_if { |_k, v| v.nil? }
140
138
  end
141
139
 
142
140
  def ecs_client
@@ -136,7 +136,7 @@ module ElasticWhenever
136
136
  day.gsub!("*", "?") if week != "?"
137
137
  # cron syntax: sunday -> 0
138
138
  # scheduled expression: sunday -> 1
139
- week.gsub!(/(\d)/) { (Integer($1) + 1) % 7 }
139
+ week.gsub!(/(\d)/) { Integer($1) + 1 }
140
140
  year = year || "*"
141
141
  "cron(#{min} #{hour} #{day} #{mon} #{week} #{year})"
142
142
  # schedule expression syntax
@@ -1,3 +1,3 @@
1
1
  module ElasticWhenever
2
- VERSION = "0.7.0"
2
+ VERSION = "1.0.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elastic_whenever
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kazuma Watanabe
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-09-25 00:00:00.000000000 Z
11
+ date: 2024-01-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -186,7 +186,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
186
186
  - !ruby/object:Gem::Version
187
187
  version: '0'
188
188
  requirements: []
189
- rubygems_version: 3.1.2
189
+ rubygems_version: 3.3.26
190
190
  signing_key:
191
191
  specification_version: 4
192
192
  summary: Manage ECS Scheduled Tasks like Whenever