agilibox 1.6.0 → 1.6.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 +4 -4
- data/CHANGELOG.md +3 -0
- data/app/jobs/concerns/agilibox/setup_job_concern.rb +35 -0
- data/lib/agilibox/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 071f0d4d2b5797121ee7f9cd444302a2fbb0e66de5c252815753b35a019c06ac
|
4
|
+
data.tar.gz: 7590349f4df19e38946d2a69308cadd067873f495e777c7205ed2fbbc58af342
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea78a849edb4043510de9d4e60897991cf9c7dbfdf29a9447e2baca60e92c6e52e870208dc6cf8256543debf1fb55f07fe11fd68f2406c93f925274836df63b7
|
7
|
+
data.tar.gz: ce6d6fe0bdd409d1003b9a6cc676ac09a9795a69579d30f7de83adbc6287869db7fe489ee764e3004ef31d42686a06fd10b0c2ef22363d1f64c0f4052913459c
|
data/CHANGELOG.md
CHANGED
@@ -0,0 +1,35 @@
|
|
1
|
+
module Agilibox::SetupJobConcern
|
2
|
+
extend ActiveSupport::Concern
|
3
|
+
|
4
|
+
def perform(*args)
|
5
|
+
setup(*args)
|
6
|
+
call
|
7
|
+
end
|
8
|
+
|
9
|
+
def call
|
10
|
+
raise NotImplementedError
|
11
|
+
end
|
12
|
+
|
13
|
+
class_methods do
|
14
|
+
def setup_with(*attrs)
|
15
|
+
attr_reader(*attrs)
|
16
|
+
|
17
|
+
define_method(:setup) do |*args|
|
18
|
+
if attrs.length != args.length
|
19
|
+
message = "wrong number of arguments (given #{args.length}, expected #{attrs.length})"
|
20
|
+
raise ArgumentError, message
|
21
|
+
end
|
22
|
+
|
23
|
+
attrs.length.times do |i|
|
24
|
+
instance_variable_set("@#{attrs[i]}", args[i])
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
private :setup_with
|
30
|
+
|
31
|
+
def setup(*args)
|
32
|
+
new.tap { |instance| instance.setup(*args) }
|
33
|
+
end
|
34
|
+
end # class_methods
|
35
|
+
end
|
data/lib/agilibox/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: agilibox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- agilidée
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-09-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails-i18n
|
@@ -112,6 +112,7 @@ files:
|
|
112
112
|
- app/helpers/agilibox/sorting_helper.rb
|
113
113
|
- app/helpers/agilibox/text_helper.rb
|
114
114
|
- app/helpers/h.rb
|
115
|
+
- app/jobs/concerns/agilibox/setup_job_concern.rb
|
115
116
|
- app/libs/agilibox/collection_update.rb
|
116
117
|
- app/libs/agilibox/fcm/notifier.rb
|
117
118
|
- app/libs/agilibox/fcm/request.rb
|