spstrigger_execute 0.1.0 → 0.2.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
- checksums.yaml.gz.sig +0 -0
- data/lib/spstrigger_execute.rb +5 -5
- data.tar.gz.sig +0 -0
- metadata +22 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6943b05c63667ced42bad03dfa9ea29d782eb70e
|
|
4
|
+
data.tar.gz: ee00714002b85195d5d8f4d728e2c66fa4697182
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 472acff9018acb091225708103e9d87fa1582fd3e184300bf0f028ae859ce15cd38dba5d6c67b5f58829776db7ee872c7084facd3fa705ed66cd7eb95802e497
|
|
7
|
+
data.tar.gz: ad05fc78892de5a4aa851ca0cd2af037f68fe9ae07134877d33efdf6e7f937c264eaffdcbce71afbcbb0db4f116bcadc7c6c87f291c3cfb9629fcd7cb1a6fc56
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/lib/spstrigger_execute.rb
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
require 'dynarex'
|
|
6
6
|
require 'chronic_between'
|
|
7
|
+
require 'xmlregistry_objects'
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
class SPSTriggerExecute
|
|
@@ -16,7 +17,7 @@ class SPSTriggerExecute
|
|
|
16
17
|
|
|
17
18
|
def match_and_execute(topicx, message)
|
|
18
19
|
results = find_match topicx, message
|
|
19
|
-
prepare_jobs(results
|
|
20
|
+
prepare_jobs(results)
|
|
20
21
|
end
|
|
21
22
|
|
|
22
23
|
alias mae match_and_execute
|
|
@@ -66,7 +67,7 @@ class SPSTriggerExecute
|
|
|
66
67
|
end
|
|
67
68
|
end
|
|
68
69
|
|
|
69
|
-
def prepare_jobs(results
|
|
70
|
+
def prepare_jobs(results)
|
|
70
71
|
|
|
71
72
|
results.inject([]) do |r,h|
|
|
72
73
|
|
|
@@ -86,13 +87,12 @@ class SPSTriggerExecute
|
|
|
86
87
|
topic_message = job.gsub(/\$\d/) do |x|
|
|
87
88
|
|
|
88
89
|
i = x[/\d$/].to_i - 1
|
|
89
|
-
x.sub(/\$\d/,
|
|
90
|
+
x.sub(/\$\d/, a[i])
|
|
90
91
|
end
|
|
91
92
|
|
|
92
93
|
topic_message = topic_message\
|
|
93
94
|
.gsub(/![Tt]ime/,Time.now.strftime("%a %H:%M%P"))\
|
|
94
95
|
.gsub(/![Dd]ate/,Time.now.strftime("%d %b"))
|
|
95
|
-
puts 'publishing :' + topic_message.inspect
|
|
96
96
|
|
|
97
97
|
topic_message.split(/\s*;\s*/).each do |m|
|
|
98
98
|
|
|
@@ -115,4 +115,4 @@ class SPSTriggerExecute
|
|
|
115
115
|
|
|
116
116
|
t
|
|
117
117
|
end
|
|
118
|
-
end
|
|
118
|
+
end
|
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: spstrigger_execute
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- James Robertson
|
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
|
31
31
|
rlSMrvljzPJPts27UIPIfU02mkTZzELneWPUEQlIK/ADjdiGu2uxlWT5g77gwM+g
|
|
32
32
|
fYtWdC+NEqa0rg==
|
|
33
33
|
-----END CERTIFICATE-----
|
|
34
|
-
date: 2015-03-
|
|
34
|
+
date: 2015-03-07 00:00:00.000000000 Z
|
|
35
35
|
dependencies:
|
|
36
36
|
- !ruby/object:Gem::Dependency
|
|
37
37
|
name: dynarex
|
|
@@ -73,6 +73,26 @@ dependencies:
|
|
|
73
73
|
- - ">="
|
|
74
74
|
- !ruby/object:Gem::Version
|
|
75
75
|
version: 0.2.22
|
|
76
|
+
- !ruby/object:Gem::Dependency
|
|
77
|
+
name: xmlregistry_objects
|
|
78
|
+
requirement: !ruby/object:Gem::Requirement
|
|
79
|
+
requirements:
|
|
80
|
+
- - "~>"
|
|
81
|
+
- !ruby/object:Gem::Version
|
|
82
|
+
version: '0.3'
|
|
83
|
+
- - ">="
|
|
84
|
+
- !ruby/object:Gem::Version
|
|
85
|
+
version: 0.3.0
|
|
86
|
+
type: :runtime
|
|
87
|
+
prerelease: false
|
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
89
|
+
requirements:
|
|
90
|
+
- - "~>"
|
|
91
|
+
- !ruby/object:Gem::Version
|
|
92
|
+
version: '0.3'
|
|
93
|
+
- - ">="
|
|
94
|
+
- !ruby/object:Gem::Version
|
|
95
|
+
version: 0.3.0
|
|
76
96
|
description:
|
|
77
97
|
email: james@r0bertson.co.uk
|
|
78
98
|
executables: []
|
metadata.gz.sig
CHANGED
|
Binary file
|