torque_rm 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 0a3c575e33e3109de2fad9850237a9655c66da8c
4
- data.tar.gz: 96083ade5954f07f18683df48a0ed09734253a7a
5
- SHA512:
6
- metadata.gz: 1da18e68261fb612d5d7fb60ccf34f61ebe0f2ddaf104902a30964e7de58084fe5a4eadfa971220e1ab8cf6f59fd1aa6d71f4a5f359c0b7336108c171cbe1062
7
- data.tar.gz: a042cf22ed24af4dfdc403fef6216a2aaaaa8cadb7dfb0a75b9c2883773c6100586ac0042c928e31b04959afd401e99f3e0e59618a0b55ea91f850daf53cd7f1
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ ZWQ5ZTUyZDc4ZmZhMzA5NDAwOTRkZjlkNmRkMWI1NGVhNTEzNjI4ZQ==
5
+ data.tar.gz: !binary |-
6
+ MGU5ZGFjYzNhNTI5OTdiZWQ2OTA1ZTEyYTZmZjRlNDY3NDllZGQzNg==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ ODA0Y2IwZTg2ZTZkMTdjYjU0ODA2ODZlZjA0ZDkxMGRmMGQ3OTFlYTZiZDg1
10
+ ODFlMTYyZTk2ODk3ZjYyOTFjZTFlMDVlNzFhNDBkZjUxNjM4NWI4ZGM4YmFh
11
+ NTNkODY3OWJhMmM3NGI2YWQ3ODgxNmNhZDdlOGFiNDhiZjIyMGM=
12
+ data.tar.gz: !binary |-
13
+ ZGQ5MDYyMjBhMDUwYzBlMGVjMjJjZmU3OWYwYWI0OWRlOWViNThiNTQyMGNk
14
+ NTNmMDUwMTU1ZjE1OWY3NjMzZThhY2MwM2NkNDcyZjAwZDg2MDk1ZWRlYjIx
15
+ YTI2YTE1ZmYzMmNlYjY1MTExYTMxZDYyNjBmMTRiZDBjNDUyM2Q=
data/Gemfile CHANGED
@@ -12,6 +12,7 @@ gem 'shotgun'
12
12
  gem 'haml'
13
13
  gem 'sinatra-twitter-bootstrap', :require => 'sinatra/twitter-bootstrap'
14
14
  gem 'activesupport'
15
+ gem 'time_diff'
15
16
  # gem "awesome_print"
16
17
  # gem 'sinatra-twitter-bootstrap', :require => 'sinatra/twitter-bootstrap'
17
18
  # Add dependencies to develop your gem here.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.3
1
+ 0.2.4
@@ -3,6 +3,7 @@ require 'time'
3
3
  require 'json'
4
4
  require 'json/add/core'
5
5
  require 'ostruct'
6
+ require 'time_diff'
6
7
 
7
8
  module TORQUE
8
9
  class Qstat
@@ -33,7 +34,9 @@ module TORQUE
33
34
  def casting
34
35
  @table.each_pair do |k,v| #converting
35
36
  if v =~ (/[0-9][0-9]:[0-9][0-9]:[0-9][0-9]/)
36
- send "#{k}=", Time.parse(v)
37
+ hours,minutes,seconds = v.split(':')
38
+ now = Time.now
39
+ send "#{k}=", Time.diff(now, now-((hours.to_i/24)*(24*3600))-((hours.to_i%24)*3600)-(minutes.to_i*60)-(seconds.to_i)) #time_diff object
37
40
  elsif k.to_s =~ /time/ && v.is_a?(String) && v =~ (/^[0-9]+$/)
38
41
  send "#{k}=", Time.at(v.to_i).to_datetime
39
42
  elsif v =~ (/(true)$/i)
@@ -96,7 +99,7 @@ module TORQUE
96
99
  alias is_in_queue? is_queued?
97
100
 
98
101
  def time
99
- return (resources_used && resources_used.walltime) ? resources_used.walltime : "-"
102
+ return (resources_used && resources_used.walltime) ? resources_used.walltime[:diff] : "-" #using time_diff it prints a nice report in case of more than 1 day
100
103
  end
101
104
 
102
105
  def memory
data/torque_rm.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "torque_rm"
8
- s.version = "0.2.3"
8
+ s.version = "0.2.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Raoul Jean Pierre Bonnal"]
12
- s.date = "2013-09-18"
12
+ s.date = "2013-09-19"
13
13
  s.description = "TORQUE Resource Manager for Ruby. Submit, check and control your job directly from Ruby."
14
14
  s.email = "ilpuccio.febo@gmail.com"
15
15
  s.executables = ["torque_rm_rest"]
@@ -51,7 +51,7 @@ Gem::Specification.new do |s|
51
51
  s.homepage = "http://github.com/helios/torque_rm"
52
52
  s.licenses = ["MIT"]
53
53
  s.require_paths = ["lib"]
54
- s.rubygems_version = "2.0.6"
54
+ s.rubygems_version = "2.0.7"
55
55
  s.summary = "TORQUE Resource Manager wrapper for Ruby"
56
56
 
57
57
  if s.respond_to? :specification_version then
@@ -68,6 +68,7 @@ Gem::Specification.new do |s|
68
68
  s.add_runtime_dependency(%q<haml>, [">= 0"])
69
69
  s.add_runtime_dependency(%q<sinatra-twitter-bootstrap>, [">= 0"])
70
70
  s.add_runtime_dependency(%q<activesupport>, [">= 0"])
71
+ s.add_runtime_dependency(%q<time_diff>, [">= 0"])
71
72
  s.add_development_dependency(%q<rspec>, ["~> 2.8.0"])
72
73
  s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
73
74
  s.add_development_dependency(%q<cucumber>, [">= 0"])
@@ -84,6 +85,7 @@ Gem::Specification.new do |s|
84
85
  s.add_dependency(%q<haml>, [">= 0"])
85
86
  s.add_dependency(%q<sinatra-twitter-bootstrap>, [">= 0"])
86
87
  s.add_dependency(%q<activesupport>, [">= 0"])
88
+ s.add_dependency(%q<time_diff>, [">= 0"])
87
89
  s.add_dependency(%q<rspec>, ["~> 2.8.0"])
88
90
  s.add_dependency(%q<rdoc>, ["~> 3.12"])
89
91
  s.add_dependency(%q<cucumber>, [">= 0"])
@@ -101,6 +103,7 @@ Gem::Specification.new do |s|
101
103
  s.add_dependency(%q<haml>, [">= 0"])
102
104
  s.add_dependency(%q<sinatra-twitter-bootstrap>, [">= 0"])
103
105
  s.add_dependency(%q<activesupport>, [">= 0"])
106
+ s.add_dependency(%q<time_diff>, [">= 0"])
104
107
  s.add_dependency(%q<rspec>, ["~> 2.8.0"])
105
108
  s.add_dependency(%q<rdoc>, ["~> 3.12"])
106
109
  s.add_dependency(%q<cucumber>, [">= 0"])
metadata CHANGED
@@ -1,153 +1,167 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: torque_rm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Raoul Jean Pierre Bonnal
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-18 00:00:00.000000000 Z
11
+ date: 2013-09-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rye
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ! '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ! '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: parslet
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ! '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ! '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: colorize
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ! '>='
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ! '>='
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: terminal-table
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ! '>='
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ! '>='
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: sinatra
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '>='
73
+ - - ! '>='
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '>='
80
+ - - ! '>='
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: sinatra-contrib
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - '>='
87
+ - - ! '>='
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - '>='
94
+ - - ! '>='
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: shotgun
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - '>='
101
+ - - ! '>='
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - '>='
108
+ - - ! '>='
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: haml
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - '>='
115
+ - - ! '>='
116
116
  - !ruby/object:Gem::Version
117
117
  version: '0'
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - '>='
122
+ - - ! '>='
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: sinatra-twitter-bootstrap
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - '>='
129
+ - - ! '>='
130
130
  - !ruby/object:Gem::Version
131
131
  version: '0'
132
132
  type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - '>='
136
+ - - ! '>='
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: activesupport
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - '>='
143
+ - - ! '>='
144
144
  - !ruby/object:Gem::Version
145
145
  version: '0'
146
146
  type: :runtime
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - '>='
150
+ - - ! '>='
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ - !ruby/object:Gem::Dependency
154
+ name: time_diff
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - ! '>='
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ type: :runtime
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ! '>='
151
165
  - !ruby/object:Gem::Version
152
166
  version: '0'
153
167
  - !ruby/object:Gem::Dependency
@@ -182,28 +196,28 @@ dependencies:
182
196
  name: cucumber
183
197
  requirement: !ruby/object:Gem::Requirement
184
198
  requirements:
185
- - - '>='
199
+ - - ! '>='
186
200
  - !ruby/object:Gem::Version
187
201
  version: '0'
188
202
  type: :development
189
203
  prerelease: false
190
204
  version_requirements: !ruby/object:Gem::Requirement
191
205
  requirements:
192
- - - '>='
206
+ - - ! '>='
193
207
  - !ruby/object:Gem::Version
194
208
  version: '0'
195
209
  - !ruby/object:Gem::Dependency
196
210
  name: bundler
197
211
  requirement: !ruby/object:Gem::Requirement
198
212
  requirements:
199
- - - '>'
213
+ - - ! '>'
200
214
  - !ruby/object:Gem::Version
201
215
  version: 1.0.0
202
216
  type: :development
203
217
  prerelease: false
204
218
  version_requirements: !ruby/object:Gem::Requirement
205
219
  requirements:
206
- - - '>'
220
+ - - ! '>'
207
221
  - !ruby/object:Gem::Version
208
222
  version: 1.0.0
209
223
  - !ruby/object:Gem::Dependency
@@ -270,17 +284,17 @@ require_paths:
270
284
  - lib
271
285
  required_ruby_version: !ruby/object:Gem::Requirement
272
286
  requirements:
273
- - - '>='
287
+ - - ! '>='
274
288
  - !ruby/object:Gem::Version
275
289
  version: '0'
276
290
  required_rubygems_version: !ruby/object:Gem::Requirement
277
291
  requirements:
278
- - - '>='
292
+ - - ! '>='
279
293
  - !ruby/object:Gem::Version
280
294
  version: '0'
281
295
  requirements: []
282
296
  rubyforge_project:
283
- rubygems_version: 2.0.6
297
+ rubygems_version: 2.0.7
284
298
  signing_key:
285
299
  specification_version: 4
286
300
  summary: TORQUE Resource Manager wrapper for Ruby