delayed_job_web 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of delayed_job_web might be problematic. Click here for more details.

data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.1
1
+ 1.1.2
@@ -4,15 +4,14 @@
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
- s.name = %q{delayed_job_web}
8
- s.version = "1.1.1"
7
+ s.name = "delayed_job_web"
8
+ s.version = "1.1.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Erick Schmitt"]
12
- s.date = %q{2012-03-29}
13
- s.default_executable = %q{delayed_job_web}
14
- s.description = %q{Web interface for delayed_job inspired by resque}
15
- s.email = %q{ejschmitt@gmail.com}
12
+ s.date = "2012-05-18"
13
+ s.description = "Web interface for delayed_job inspired by resque"
14
+ s.email = "ejschmitt@gmail.com"
16
15
  s.executables = ["delayed_job_web"]
17
16
  s.extra_rdoc_files = [
18
17
  "LICENSE.txt",
@@ -48,11 +47,11 @@ Gem::Specification.new do |s|
48
47
  "test/helper.rb",
49
48
  "test/test_delayed_job_web.rb"
50
49
  ]
51
- s.homepage = %q{http://github.com/ejschmitt/delayed_job_web}
50
+ s.homepage = "http://github.com/ejschmitt/delayed_job_web"
52
51
  s.licenses = ["MIT"]
53
52
  s.require_paths = ["lib"]
54
- s.rubygems_version = %q{1.6.2}
55
- s.summary = %q{Web interface for delayed_job}
53
+ s.rubygems_version = "1.8.22"
54
+ s.summary = "Web interface for delayed_job"
56
55
 
57
56
  if s.respond_to? :specification_version then
58
57
  s.specification_version = 3
@@ -28,7 +28,7 @@
28
28
  var day = date.getDay(), month = date.getMonth();
29
29
  var hours = date.getHours(), minutes = date.getMinutes();
30
30
 
31
- var pad = function(num) {
31
+ var pad = function(num) {
32
32
  var string = num.toString(10);
33
33
  return new Array((2 - string.length) + 1).join('0') + string
34
34
  };
@@ -53,11 +53,11 @@
53
53
  }
54
54
  })
55
55
  },
56
-
56
+
57
57
  timeAgoInWords: function(targetDate, includeTime) {
58
58
  return $r.distanceOfTimeInWords(targetDate, new Date(), includeTime);
59
59
  },
60
-
60
+
61
61
  /**
62
62
  * Return the distance of time in words between two Date's
63
63
  * Example: '5 days ago', 'about an hour ago'
@@ -67,7 +67,30 @@
67
67
  */
68
68
  distanceOfTimeInWords: function(fromTime, toTime, includeTime) {
69
69
  var delta = parseInt((toTime.getTime() - fromTime.getTime()) / 1000);
70
- if (delta < 60) {
70
+ if (delta < (-(48*60*60) - 1)) {
71
+ var daysfrom = parseInt(Math.abs(delta / 86400));
72
+ if (daysfrom > 5) {
73
+ var fmt = '%B %d, %Y';
74
+ if (includeTime) fmt += ' %I:%M %p';
75
+ return $r.strftime(fromTime, fmt);
76
+ } else {
77
+ return daysfrom + " days from now";
78
+ }
79
+ } else if (delta < -(48*60*60)) {
80
+ return '1 day from now';
81
+ } else if (delta < -(24*60*60)) {
82
+ return 'about ' + parseInt(Math.abs(delta / 3600)).toString() +
83
+ ' hours from now';
84
+ } else if (delta < -(120*60)) {
85
+ return 'about an hour from now';
86
+ } else if (delta < -(45*60)) {
87
+ return parseInt(Math.abs(delta / 60)).toString()
88
+ + ' minutes from now';
89
+ } else if (delta < -60) {
90
+ return 'about a minute from now';
91
+ } else if (delta < 0) {
92
+ return 'less than a minute from now';
93
+ } else if (delta < 60) {
71
94
  return 'less than a minute ago';
72
95
  } else if (delta < 120) {
73
96
  return 'about a minute ago';
@@ -28,15 +28,15 @@
28
28
  %pre= job.last_error
29
29
  - if job.run_at
30
30
  %dt Run At
31
- %dd.time= job.run_at
31
+ %dd.time= job.run_at.rfc822
32
32
  - if job.locked_at
33
33
  %dt Locked At
34
- %dd.time= job.locked_at
34
+ %dd.time= job.locked_at.rfc822
35
35
  - if job.locked_by
36
36
  %dt Locked By
37
37
  %dd= job.locked_by
38
38
  - if job.failed_at
39
39
  %dt Failed At
40
- %dd.time= job.failed_at
40
+ %dd.time= job.failed_at.rfc822
41
41
  %dt Created At
42
- %dd.time= job.created_at
42
+ %dd.time= job.created_at.rfc822
metadata CHANGED
@@ -1,138 +1,185 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: delayed_job_web
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.1.2
4
5
  prerelease:
5
- version: 1.1.1
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Erick Schmitt
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2012-03-29 00:00:00 -04:00
14
- default_executable: delayed_job_web
15
- dependencies:
16
- - !ruby/object:Gem::Dependency
12
+ date: 2012-05-18 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
17
15
  name: sinatra
18
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
19
17
  none: false
20
- requirements:
21
- - - ">="
22
- - !ruby/object:Gem::Version
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
23
21
  version: 0.9.2
24
22
  type: :runtime
25
23
  prerelease: false
26
- version_requirements: *id001
27
- - !ruby/object:Gem::Dependency
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: 0.9.2
30
+ - !ruby/object:Gem::Dependency
28
31
  name: haml
29
- requirement: &id002 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
30
33
  none: false
31
- requirements:
34
+ requirements:
32
35
  - - ~>
33
- - !ruby/object:Gem::Version
36
+ - !ruby/object:Gem::Version
34
37
  version: 3.1.3
35
38
  type: :runtime
36
39
  prerelease: false
37
- version_requirements: *id002
38
- - !ruby/object:Gem::Dependency
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: 3.1.3
46
+ - !ruby/object:Gem::Dependency
39
47
  name: activerecord
40
- requirement: &id003 !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
41
49
  none: false
42
- requirements:
43
- - - ">"
44
- - !ruby/object:Gem::Version
50
+ requirements:
51
+ - - ! '>'
52
+ - !ruby/object:Gem::Version
45
53
  version: 3.0.0
46
54
  type: :runtime
47
55
  prerelease: false
48
- version_requirements: *id003
49
- - !ruby/object:Gem::Dependency
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>'
60
+ - !ruby/object:Gem::Version
61
+ version: 3.0.0
62
+ - !ruby/object:Gem::Dependency
50
63
  name: delayed_job
51
- requirement: &id004 !ruby/object:Gem::Requirement
64
+ requirement: !ruby/object:Gem::Requirement
52
65
  none: false
53
- requirements:
54
- - - ">"
55
- - !ruby/object:Gem::Version
66
+ requirements:
67
+ - - ! '>'
68
+ - !ruby/object:Gem::Version
56
69
  version: 2.0.3
57
70
  type: :runtime
58
71
  prerelease: false
59
- version_requirements: *id004
60
- - !ruby/object:Gem::Dependency
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>'
76
+ - !ruby/object:Gem::Version
77
+ version: 2.0.3
78
+ - !ruby/object:Gem::Dependency
61
79
  name: rdoc
62
- requirement: &id005 !ruby/object:Gem::Requirement
80
+ requirement: !ruby/object:Gem::Requirement
63
81
  none: false
64
- requirements:
65
- - - ">="
66
- - !ruby/object:Gem::Version
67
- version: "0"
82
+ requirements:
83
+ - - ! '>='
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
68
86
  type: :runtime
69
87
  prerelease: false
70
- version_requirements: *id005
71
- - !ruby/object:Gem::Dependency
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
94
+ - !ruby/object:Gem::Dependency
72
95
  name: shoulda
73
- requirement: &id006 !ruby/object:Gem::Requirement
96
+ requirement: !ruby/object:Gem::Requirement
74
97
  none: false
75
- requirements:
76
- - - ">="
77
- - !ruby/object:Gem::Version
78
- version: "0"
98
+ requirements:
99
+ - - ! '>='
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
79
102
  type: :development
80
103
  prerelease: false
81
- version_requirements: *id006
82
- - !ruby/object:Gem::Dependency
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ - !ruby/object:Gem::Dependency
83
111
  name: bundler
84
- requirement: &id007 !ruby/object:Gem::Requirement
112
+ requirement: !ruby/object:Gem::Requirement
85
113
  none: false
86
- requirements:
114
+ requirements:
87
115
  - - ~>
88
- - !ruby/object:Gem::Version
116
+ - !ruby/object:Gem::Version
89
117
  version: 1.0.0
90
118
  type: :development
91
119
  prerelease: false
92
- version_requirements: *id007
93
- - !ruby/object:Gem::Dependency
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ~>
124
+ - !ruby/object:Gem::Version
125
+ version: 1.0.0
126
+ - !ruby/object:Gem::Dependency
94
127
  name: jeweler
95
- requirement: &id008 !ruby/object:Gem::Requirement
128
+ requirement: !ruby/object:Gem::Requirement
96
129
  none: false
97
- requirements:
130
+ requirements:
98
131
  - - ~>
99
- - !ruby/object:Gem::Version
132
+ - !ruby/object:Gem::Version
100
133
  version: 1.6.4
101
134
  type: :development
102
135
  prerelease: false
103
- version_requirements: *id008
104
- - !ruby/object:Gem::Dependency
136
+ version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
138
+ requirements:
139
+ - - ~>
140
+ - !ruby/object:Gem::Version
141
+ version: 1.6.4
142
+ - !ruby/object:Gem::Dependency
105
143
  name: rcov
106
- requirement: &id009 !ruby/object:Gem::Requirement
144
+ requirement: !ruby/object:Gem::Requirement
107
145
  none: false
108
- requirements:
109
- - - ">="
110
- - !ruby/object:Gem::Version
111
- version: "0"
146
+ requirements:
147
+ - - ! '>='
148
+ - !ruby/object:Gem::Version
149
+ version: '0'
112
150
  type: :development
113
151
  prerelease: false
114
- version_requirements: *id009
115
- - !ruby/object:Gem::Dependency
152
+ version_requirements: !ruby/object:Gem::Requirement
153
+ none: false
154
+ requirements:
155
+ - - ! '>='
156
+ - !ruby/object:Gem::Version
157
+ version: '0'
158
+ - !ruby/object:Gem::Dependency
116
159
  name: rack-test
117
- requirement: &id010 !ruby/object:Gem::Requirement
160
+ requirement: !ruby/object:Gem::Requirement
118
161
  none: false
119
- requirements:
120
- - - ">="
121
- - !ruby/object:Gem::Version
122
- version: "0"
162
+ requirements:
163
+ - - ! '>='
164
+ - !ruby/object:Gem::Version
165
+ version: '0'
123
166
  type: :development
124
167
  prerelease: false
125
- version_requirements: *id010
168
+ version_requirements: !ruby/object:Gem::Requirement
169
+ none: false
170
+ requirements:
171
+ - - ! '>='
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
126
174
  description: Web interface for delayed_job inspired by resque
127
175
  email: ejschmitt@gmail.com
128
- executables:
176
+ executables:
129
177
  - delayed_job_web
130
178
  extensions: []
131
-
132
- extra_rdoc_files:
179
+ extra_rdoc_files:
133
180
  - LICENSE.txt
134
181
  - README.markdown
135
- files:
182
+ files:
136
183
  - .document
137
184
  - Gemfile
138
185
  - LICENSE.txt
@@ -161,36 +208,32 @@ files:
161
208
  - lib/delayed_job_web/application/views/working.haml
162
209
  - test/helper.rb
163
210
  - test/test_delayed_job_web.rb
164
- has_rdoc: true
165
211
  homepage: http://github.com/ejschmitt/delayed_job_web
166
- licenses:
212
+ licenses:
167
213
  - MIT
168
214
  post_install_message:
169
215
  rdoc_options: []
170
-
171
- require_paths:
216
+ require_paths:
172
217
  - lib
173
- required_ruby_version: !ruby/object:Gem::Requirement
218
+ required_ruby_version: !ruby/object:Gem::Requirement
174
219
  none: false
175
- requirements:
176
- - - ">="
177
- - !ruby/object:Gem::Version
178
- hash: 331709547764882470
179
- segments:
220
+ requirements:
221
+ - - ! '>='
222
+ - !ruby/object:Gem::Version
223
+ version: '0'
224
+ segments:
180
225
  - 0
181
- version: "0"
182
- required_rubygems_version: !ruby/object:Gem::Requirement
226
+ hash: 3563830930146640085
227
+ required_rubygems_version: !ruby/object:Gem::Requirement
183
228
  none: false
184
- requirements:
185
- - - ">="
186
- - !ruby/object:Gem::Version
187
- version: "0"
229
+ requirements:
230
+ - - ! '>='
231
+ - !ruby/object:Gem::Version
232
+ version: '0'
188
233
  requirements: []
189
-
190
234
  rubyforge_project:
191
- rubygems_version: 1.6.2
235
+ rubygems_version: 1.8.22
192
236
  signing_key:
193
237
  specification_version: 3
194
238
  summary: Web interface for delayed_job
195
239
  test_files: []
196
-