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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 77c145cd34f5ee0c82c6254c5a91036cda124369
4
- data.tar.gz: f9f3d914a9845948f34e0361b86917032b838424
3
+ metadata.gz: 3bbea11818b8c2deaa89e65607eaf632937e979d
4
+ data.tar.gz: e24961c391fc1db925b183895d9b0e81dc8daf33
5
5
  SHA512:
6
- metadata.gz: 5ae2e31938460505cf6aa17d6ee2a67add89f64cf5797c049a3a378ba63c3671a17af8533d73a659c9811d51ee2d6a0c1091804a4be11645d0a12c13aa341b39
7
- data.tar.gz: 4a8ed6f2d4c9cf15b71a4951d3c981882be9e733fcea50fa2126ecb1a786b9e4633f578305460843b5a01ff22a077baf18a868e007d1571855e59872926f9b5e
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
- code2 = a.join.gsub('\"','"').gsub('\#','#')
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.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -12,26 +12,26 @@ cert_chain:
12
12
  -----BEGIN CERTIFICATE-----
13
13
  MIIDljCCAn6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBIMRIwEAYDVQQDDAlnZW1t
14
14
  YXN0ZXIxHjAcBgoJkiaJk/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zLQ
31
+ oHB/5/Tnij2Ikx4Vr9Gf+Dce0Qm+DaxLyhscOkeBnO7UV68Yl4HCyuAXjxghBpPS
32
+ 9Rhj3K+9atOEmw==
33
33
  -----END CERTIFICATE-----
34
- date: 2015-07-11 00:00:00.000000000 Z
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.2'
42
+ version: '0.3'
43
43
  - - ">="
44
44
  - !ruby/object:Gem::Version
45
- version: 0.2.2
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.2'
52
+ version: '0.3'
53
53
  - - ">="
54
54
  - !ruby/object:Gem::Version
55
- version: 0.2.2
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.4'
62
+ version: '1.7'
63
63
  - - ">="
64
64
  - !ruby/object:Gem::Version
65
- version: 1.5.32
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.4'
72
+ version: '1.7'
73
73
  - - ">="
74
74
  - !ruby/object:Gem::Version
75
- version: 1.5.32
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.0.6
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.0.6
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.4.8
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