ductr 0.1.0 → 0.1.2
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/Gemfile.lock +10 -10
- data/lib/ductr/cli/main.rb +2 -0
- data/lib/ductr/cli/new_project_generator.rb +0 -1
- data/lib/ductr/cli/templates/project/config_environment_development.rb +1 -0
- data/lib/ductr/cli/templates/project/gemfile.rb +2 -2
- data/lib/ductr/rufus_trigger.rb +9 -9
- data/lib/ductr/version.rb +1 -1
- metadata +6 -7
- data/lib/ductr/cli/templates/project/tool-versions +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c0d2e2a83217838bd12d781d75ddf8d2ceee68a276f25250033cfd88ec5fe03c
|
4
|
+
data.tar.gz: 4e694303f68f0603ad5e3053cfcab2d1320687e19b7d2eb3923f15d68c4dd901
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 63f82f601d39aeda829260eafdc390ad0ea506c6a9510876ed5703266cd0496b24942a18337807f52c55a1df3617c5fff84476ed4e5ce35d18a6c396cc5431cd
|
7
|
+
data.tar.gz: 0da4ed8bfc3272d8ee4e0a542a60b6bb0266f44fee2c59f2318f93b1c4a759579707e78ebe637bd70c6b40f6e806159cf3cecd4b423c5efe4e4a8e0ef91b1fc8
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
ductr (0.1.
|
4
|
+
ductr (0.1.2)
|
5
5
|
activejob (~> 7.0)
|
6
6
|
annotable (~> 0.1)
|
7
7
|
colorize (~> 0.8)
|
@@ -13,10 +13,10 @@ PATH
|
|
13
13
|
GEM
|
14
14
|
remote: https://rubygems.org/
|
15
15
|
specs:
|
16
|
-
activejob (7.0.4)
|
17
|
-
activesupport (= 7.0.4)
|
16
|
+
activejob (7.0.4.3)
|
17
|
+
activesupport (= 7.0.4.3)
|
18
18
|
globalid (>= 0.3.6)
|
19
|
-
activesupport (7.0.4)
|
19
|
+
activesupport (7.0.4.3)
|
20
20
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
21
21
|
i18n (>= 1.6, < 2)
|
22
22
|
minitest (>= 5.1)
|
@@ -26,17 +26,17 @@ GEM
|
|
26
26
|
colorize (0.8.1)
|
27
27
|
commander (4.6.0)
|
28
28
|
highline (~> 2.0.0)
|
29
|
-
concurrent-ruby (1.
|
29
|
+
concurrent-ruby (1.2.2)
|
30
30
|
debug (1.6.3)
|
31
31
|
irb (>= 1.3.6)
|
32
32
|
reline (>= 0.3.1)
|
33
33
|
diff-lcs (1.5.0)
|
34
34
|
et-orbi (1.2.7)
|
35
35
|
tzinfo
|
36
|
-
fugit (1.
|
36
|
+
fugit (1.8.1)
|
37
37
|
et-orbi (~> 1, >= 1.2.7)
|
38
38
|
raabro (~> 1.4)
|
39
|
-
globalid (1.
|
39
|
+
globalid (1.1.0)
|
40
40
|
activesupport (>= 5.0)
|
41
41
|
highline (2.0.3)
|
42
42
|
i18n (1.12.0)
|
@@ -46,7 +46,7 @@ GEM
|
|
46
46
|
reline (>= 0.3.0)
|
47
47
|
json (2.6.2)
|
48
48
|
kiba (4.0.0)
|
49
|
-
minitest (5.
|
49
|
+
minitest (5.18.0)
|
50
50
|
parallel (1.22.1)
|
51
51
|
parlour (5.0.0)
|
52
52
|
commander (~> 4.5)
|
@@ -97,13 +97,13 @@ GEM
|
|
97
97
|
sorbet-runtime
|
98
98
|
yard
|
99
99
|
thor (1.2.1)
|
100
|
-
tzinfo (2.0.
|
100
|
+
tzinfo (2.0.6)
|
101
101
|
concurrent-ruby (~> 1.0)
|
102
102
|
unicode-display_width (2.3.0)
|
103
103
|
webrick (1.7.0)
|
104
104
|
yard (0.9.28)
|
105
105
|
webrick (~> 1.7.0)
|
106
|
-
zeitwerk (2.6.
|
106
|
+
zeitwerk (2.6.7)
|
107
107
|
|
108
108
|
PLATFORMS
|
109
109
|
x86_64-linux
|
data/lib/ductr/cli/main.rb
CHANGED
@@ -27,6 +27,8 @@ module Ductr
|
|
27
27
|
|
28
28
|
desc "schedule, s [SCHEDULERS]", "Run the given schedulers"
|
29
29
|
def schedule(*scheduler_names)
|
30
|
+
raise ArgumentError, "You must pass at least one scheduler name" if scheduler_names.empty?
|
31
|
+
|
30
32
|
scheduler_names.each { |name| name.camelize.constantize.new }
|
31
33
|
Scheduler.start
|
32
34
|
|
data/lib/ductr/rufus_trigger.rb
CHANGED
@@ -53,8 +53,9 @@ module Ductr
|
|
53
53
|
def add(method, options)
|
54
54
|
rufus_type = options.keys.first
|
55
55
|
rufus_value = options.values.first
|
56
|
+
handler = callable(method, **options)
|
56
57
|
|
57
|
-
do_schedule(rufus_type, rufus_value,
|
58
|
+
do_schedule(rufus_type, rufus_value, handler)
|
58
59
|
end
|
59
60
|
|
60
61
|
#
|
@@ -78,16 +79,15 @@ module Ductr
|
|
78
79
|
end
|
79
80
|
|
80
81
|
#
|
81
|
-
# Returns a callable object based on given
|
82
|
+
# Returns a callable object based on given method and options.
|
82
83
|
#
|
83
|
-
# @param [
|
84
|
-
# @param [Symbol] method_name The scheduler's method name
|
84
|
+
# @param [Method] method The scheduler's method
|
85
85
|
# @param [Hash] ** The option passed to the trigger annotation
|
86
86
|
#
|
87
87
|
# @return [#call] A callable object
|
88
88
|
#
|
89
|
-
def callable(
|
90
|
-
|
89
|
+
def callable(method, **)
|
90
|
+
method
|
91
91
|
end
|
92
92
|
|
93
93
|
#
|
@@ -95,12 +95,12 @@ module Ductr
|
|
95
95
|
#
|
96
96
|
# @param [Symbol] rufus_type The rufus-scheduler type (`:once`, `:every`, `:interval` or `:cron`)
|
97
97
|
# @param [String] rufus_value The rufus-scheduler value (e.g. `"10min"`)
|
98
|
-
# @param [#call]
|
98
|
+
# @param [#call] handler The callable object (the scheduler's method in this case)
|
99
99
|
#
|
100
100
|
# @return [void]
|
101
101
|
#
|
102
|
-
def do_schedule(rufus_type, rufus_value,
|
103
|
-
rufus.send(:do_schedule, rufus_type, rufus_value, nil, {}, false,
|
102
|
+
def do_schedule(rufus_type, rufus_value, handler)
|
103
|
+
rufus.send(:do_schedule, rufus_type, rufus_value, nil, {}, false, handler)
|
104
104
|
end
|
105
105
|
end
|
106
106
|
end
|
data/lib/ductr/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ductr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mathieu Morel
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-03-
|
11
|
+
date: 2023-03-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: debug
|
@@ -224,7 +224,6 @@ files:
|
|
224
224
|
- lib/ductr/cli/templates/project/config_environment_development.rb
|
225
225
|
- lib/ductr/cli/templates/project/gemfile.rb
|
226
226
|
- lib/ductr/cli/templates/project/rubocop.yml
|
227
|
-
- lib/ductr/cli/templates/project/tool-versions
|
228
227
|
- lib/ductr/configuration.rb
|
229
228
|
- lib/ductr/etl/controls/buffered_destination.rb
|
230
229
|
- lib/ductr/etl/controls/buffered_transform.rb
|
@@ -270,7 +269,7 @@ metadata:
|
|
270
269
|
homepage_uri: https://github.com/ductr-io/ductr
|
271
270
|
source_code_uri: https://github.com/ductr-io/ductr
|
272
271
|
changelog_uri: https://github.com/ductr-io/ductr/releases
|
273
|
-
post_install_message:
|
272
|
+
post_install_message:
|
274
273
|
rdoc_options: []
|
275
274
|
require_paths:
|
276
275
|
- lib
|
@@ -285,8 +284,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
285
284
|
- !ruby/object:Gem::Version
|
286
285
|
version: '0'
|
287
286
|
requirements: []
|
288
|
-
rubygems_version: 3.
|
289
|
-
signing_key:
|
287
|
+
rubygems_version: 3.4.8
|
288
|
+
signing_key:
|
290
289
|
specification_version: 4
|
291
290
|
summary: Data pipeline and ETL framework.
|
292
291
|
test_files: []
|
@@ -1 +0,0 @@
|
|
1
|
-
ruby 3.1.0
|