gogreen 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/gogreen.rb +16 -7
- metadata +28 -28
- 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: 3bbea11818b8c2deaa89e65607eaf632937e979d
|
4
|
+
data.tar.gz: e24961c391fc1db925b183895d9b0e81dc8daf33
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e777db66865cbecd561438532010d7fda21028685c55a12792beb110751ddb5bbde5efec07142c577770a58eda907b2c475639ae985dd80898a6f4808ab16475
|
7
|
+
data.tar.gz: 67be58a984e9c76afba3f8a3051e18e13e11e611efceb358b83a73b28813f29ffd82912d83b1bad57a8c7880d585edc037cf7967dac8605159959d363da36a57
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/gogreen.rb
CHANGED
@@ -15,8 +15,10 @@ end
|
|
15
15
|
class GoGreen
|
16
16
|
|
17
17
|
def initialize(alias_file, site=nil, subdomain=nil, shell_execute: true)
|
18
|
+
super()
|
18
19
|
|
19
20
|
@shell_execute = shell_execute
|
21
|
+
|
20
22
|
buffer = RXFHelper.read(alias_file).first
|
21
23
|
|
22
24
|
name = case buffer
|
@@ -28,6 +30,7 @@ class GoGreen
|
|
28
30
|
raise GoGreenException, 'alias file ' + alias_file + ' not recognised'
|
29
31
|
end
|
30
32
|
|
33
|
+
|
31
34
|
end
|
32
35
|
|
33
36
|
def execute(alias_name, job_args=[])
|
@@ -37,15 +40,15 @@ class GoGreen
|
|
37
40
|
|
38
41
|
cmd = alias_found[:body][:command]
|
39
42
|
cmd += ' ' + @conf if @conf
|
40
|
-
|
43
|
+
|
41
44
|
if cmd[/^rcscript/] then
|
42
45
|
|
43
46
|
a = cmd.sub(/^rcscript /,'').split + job_args.map do |x|
|
44
47
|
x.sub(/^["'](.*)["']$/,'\1')
|
45
48
|
end
|
46
|
-
|
47
|
-
raw_code, args = RScript.new.read a
|
48
49
|
|
50
|
+
raw_code, args = RScript.new.read a
|
51
|
+
|
49
52
|
begin
|
50
53
|
|
51
54
|
if @shell_execute then
|
@@ -54,7 +57,8 @@ class GoGreen
|
|
54
57
|
a.unshift 'args = ' + args.inspect + "\n\n"
|
55
58
|
lastline = a.pop
|
56
59
|
a.push('puts ' + lastline)
|
57
|
-
|
60
|
+
|
61
|
+
code2 = "$0 = 'gogreen'\n" + a.join.gsub('\"','"').gsub('\#','#')
|
58
62
|
|
59
63
|
file = Tempfile.new('gogreen')
|
60
64
|
file.write(code2)
|
@@ -67,8 +71,9 @@ class GoGreen
|
|
67
71
|
#pipe.close
|
68
72
|
|
69
73
|
else
|
70
|
-
|
71
|
-
eval(raw_code)
|
74
|
+
|
75
|
+
result = eval(raw_code)
|
76
|
+
|
72
77
|
end
|
73
78
|
|
74
79
|
rescue
|
@@ -102,14 +107,18 @@ class GoGreen
|
|
102
107
|
def pxread(buffer, site, subdomain)
|
103
108
|
|
104
109
|
px = Polyrex.new
|
110
|
+
|
105
111
|
px.parse buffer
|
106
112
|
|
107
113
|
a = px.rxpath "site[label='#{site}']/subdomain[label='#{subdomain}']"
|
114
|
+
|
108
115
|
raise GoGreenException, "site not found " if a.empty?
|
109
116
|
|
110
117
|
rec = a.first
|
111
118
|
|
112
|
-
[rec.to_dynarex.records, rec.conf]
|
119
|
+
r = [rec.to_dynarex.records, rec.conf]
|
120
|
+
|
121
|
+
r
|
113
122
|
end
|
114
123
|
|
115
124
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gogreen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
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|
25
25
|
HYEbZ2VtbWFzdGVyQGphbWVzcm9iZXJ0c29uLmV1MCYGA1UdEgQfMB2BG2dlbW1h
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
26
|
+
c3RlckBqYW1lc3JvYmVydHNvbi5ldTANBgkqhkiG9w0BAQUFAAOCAQEAtpAnj8kS
|
27
|
+
kcq77Two34Oz8Tp31ezl11mqAiyvyiwLxAAoLTBYGnp+/0ltL1F1JgrPYHtEJwD9
|
28
|
+
S4yHMzpv/m2YoniBRCID++x6+yVefKy8ySswkoSJD2OLa3tV53gW8DYpPGvQxVsZ
|
29
|
+
0klwbF+HpxJyB7wH3FGowPBs/GvzcvKwzT4hsfUViJTnpMH0dYP3T0wekyV6OIj6
|
30
|
+
irRuSC4ik18C8mI5WNZKwPEGW/NJguuv5zKLVOS47z2Fv597DtLneF5mEpZ0KzLQ
|
31
|
+
oHB/5/Tnij2Ikx4Vr9Gf+Dce0Qm+DaxLyhscOkeBnO7UV68Yl4HCyuAXjxghBpPS
|
32
|
+
9Rhj3K+9atOEmw==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date:
|
34
|
+
date: 2016-12-05 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rscript
|
@@ -39,40 +39,40 @@ dependencies:
|
|
39
39
|
requirements:
|
40
40
|
- - "~>"
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: '0.
|
42
|
+
version: '0.3'
|
43
43
|
- - ">="
|
44
44
|
- !ruby/object:Gem::Version
|
45
|
-
version: 0.
|
45
|
+
version: 0.3.2
|
46
46
|
type: :runtime
|
47
47
|
prerelease: false
|
48
48
|
version_requirements: !ruby/object:Gem::Requirement
|
49
49
|
requirements:
|
50
50
|
- - "~>"
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version: '0.
|
52
|
+
version: '0.3'
|
53
53
|
- - ">="
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version: 0.
|
55
|
+
version: 0.3.2
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: dynarex
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
60
|
- - "~>"
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: '1.
|
62
|
+
version: '1.7'
|
63
63
|
- - ">="
|
64
64
|
- !ruby/object:Gem::Version
|
65
|
-
version: 1.
|
65
|
+
version: 1.7.16
|
66
66
|
type: :runtime
|
67
67
|
prerelease: false
|
68
68
|
version_requirements: !ruby/object:Gem::Requirement
|
69
69
|
requirements:
|
70
70
|
- - "~>"
|
71
71
|
- !ruby/object:Gem::Version
|
72
|
-
version: '1.
|
72
|
+
version: '1.7'
|
73
73
|
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 1.
|
75
|
+
version: 1.7.16
|
76
76
|
- !ruby/object:Gem::Dependency
|
77
77
|
name: acronym
|
78
78
|
requirement: !ruby/object:Gem::Requirement
|
@@ -102,7 +102,7 @@ dependencies:
|
|
102
102
|
version: '1.0'
|
103
103
|
- - ">="
|
104
104
|
- !ruby/object:Gem::Version
|
105
|
-
version: 1.
|
105
|
+
version: 1.1.8
|
106
106
|
type: :runtime
|
107
107
|
prerelease: false
|
108
108
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -112,7 +112,7 @@ dependencies:
|
|
112
112
|
version: '1.0'
|
113
113
|
- - ">="
|
114
114
|
- !ruby/object:Gem::Version
|
115
|
-
version: 1.
|
115
|
+
version: 1.1.8
|
116
116
|
- !ruby/object:Gem::Dependency
|
117
117
|
name: optparse-simple
|
118
118
|
requirement: !ruby/object:Gem::Requirement
|
@@ -160,7 +160,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
160
160
|
version: '0'
|
161
161
|
requirements: []
|
162
162
|
rubyforge_project:
|
163
|
-
rubygems_version: 2.
|
163
|
+
rubygems_version: 2.5.1
|
164
164
|
signing_key:
|
165
165
|
specification_version: 4
|
166
166
|
summary: Run RSF jobs from the command line using a Dynarex flavoured aliases file.
|
metadata.gz.sig
CHANGED
Binary file
|