lambda_whenever 0.1.0 → 0.2.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ed20460e8d292c55e32a2e25c7aac08a780fbd6fd95d2cf9f12373a1b70104b3
|
4
|
+
data.tar.gz: cf27f30637d128eb9d557e1444d9d33f6660d427c8f0b098383ceca2e925794d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ffffdef9d3446074e7337ed3cad49dabdd8687d42106bf55ceccc6ccafa704aced77d16385b08e9bf04f913ddb87686351d6c255975a8fc9ff2998d8611648e3
|
7
|
+
data.tar.gz: 69a28cc18e85b668d1b25492cabf8a9286cc87c9e1c0ee85bf9974267bf0d6436625b8f3f9e939d9dd02dbb1f5b3ed1ef379ec6302989b91a8f8869e68cf470e
|
@@ -49,7 +49,8 @@ module LambdaWhenever
|
|
49
49
|
end
|
50
50
|
|
51
51
|
def schedule_name(task, option)
|
52
|
-
Digest::SHA1.hexdigest([option.key, task.expression, *task.commands].join("-"))
|
52
|
+
input = "#{task.name}-#{Digest::SHA1.hexdigest([option.key, task.expression, *task.commands].join("-"))}"
|
53
|
+
sanitize_and_trim(input)
|
53
54
|
end
|
54
55
|
|
55
56
|
def schedule_description(task)
|
@@ -67,5 +68,13 @@ module LambdaWhenever
|
|
67
68
|
rescue Aws::Scheduler::Errors::ResourceNotFoundException
|
68
69
|
puts "Schedule group '#{schedule_group}' does not exist."
|
69
70
|
end
|
71
|
+
|
72
|
+
private
|
73
|
+
|
74
|
+
def sanitize_and_trim(input)
|
75
|
+
sanitized = input.gsub(/[^a-zA-Z0-9\-._]/, "_")
|
76
|
+
|
77
|
+
sanitized[0, 64]
|
78
|
+
end
|
70
79
|
end
|
71
80
|
end
|
data/lib/lambda_whenever/task.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
module LambdaWhenever
|
4
4
|
class Task
|
5
|
-
attr_reader :commands, :expression
|
5
|
+
attr_reader :commands, :expression, :name
|
6
6
|
|
7
7
|
def initialize(environment, verbose, bundle_command, expression)
|
8
8
|
@environment = environment
|
@@ -10,6 +10,7 @@ module LambdaWhenever
|
|
10
10
|
@bundle_command = bundle_command.split(" ")
|
11
11
|
@expression = expression
|
12
12
|
@commands = []
|
13
|
+
@name = ""
|
13
14
|
end
|
14
15
|
|
15
16
|
def command(task)
|
@@ -17,14 +18,17 @@ module LambdaWhenever
|
|
17
18
|
end
|
18
19
|
|
19
20
|
def rake(task)
|
21
|
+
@name = task
|
20
22
|
@commands << [@bundle_command, "rake", task, @verbose_mode].flatten.compact
|
21
23
|
end
|
22
24
|
|
23
25
|
def runner(src)
|
26
|
+
@name = src
|
24
27
|
@commands << [@bundle_command, "rails", "runner", "-e", @environment, src].flatten
|
25
28
|
end
|
26
29
|
|
27
30
|
def script(script)
|
31
|
+
@name = script
|
28
32
|
@commands << [@bundle_command, "script/#{script}"].flatten
|
29
33
|
end
|
30
34
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lambda_whenever
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- toshichanapp
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-10-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -182,7 +182,7 @@ description: whenever for Amazon EventBridge Scheduler.
|
|
182
182
|
email:
|
183
183
|
- toshichanapp@gmail.com
|
184
184
|
executables:
|
185
|
-
-
|
185
|
+
- lambda_whenever
|
186
186
|
extensions: []
|
187
187
|
extra_rdoc_files: []
|
188
188
|
files:
|
@@ -191,7 +191,7 @@ files:
|
|
191
191
|
- LICENSE
|
192
192
|
- README.md
|
193
193
|
- Rakefile
|
194
|
-
- exe/
|
194
|
+
- exe/lambda_whenever
|
195
195
|
- lib/lambda_whenever.rb
|
196
196
|
- lib/lambda_whenever/cli.rb
|
197
197
|
- lib/lambda_whenever/event_bridge_scheduler.rb
|
@@ -209,7 +209,7 @@ licenses: []
|
|
209
209
|
metadata:
|
210
210
|
homepage_uri: https://github.com/toshichanapp/lambda_whenever
|
211
211
|
source_code_uri: https://github.com/toshichanapp/lambda_whenever
|
212
|
-
post_install_message:
|
212
|
+
post_install_message:
|
213
213
|
rdoc_options: []
|
214
214
|
require_paths:
|
215
215
|
- lib
|
@@ -224,8 +224,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
224
224
|
- !ruby/object:Gem::Version
|
225
225
|
version: '0'
|
226
226
|
requirements: []
|
227
|
-
rubygems_version: 3.5.
|
228
|
-
signing_key:
|
227
|
+
rubygems_version: 3.5.16
|
228
|
+
signing_key:
|
229
229
|
specification_version: 4
|
230
230
|
summary: whenever for Amazon EventBridge Scheduler.
|
231
231
|
test_files: []
|
File without changes
|