que-web 0.7.0 → 0.7.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: f5a47f1b59dd8d5fa25e4518fefc06e52a168cd6
4
- data.tar.gz: 688a7ece0571223c6555980c6c2f8d5915e0ff32
3
+ metadata.gz: 672166ccf3fefe35330d64b781e67e4e1068076e
4
+ data.tar.gz: 7f7ef4053bc098ef284f86784945924bae920372
5
5
  SHA512:
6
- metadata.gz: 70385e07ff8aef1cddbb0174bed6011e12451a501820196e65fb3f86a977adf35cd564239c48fb0a716fc56909153e9a4c93acfcf9b49069120f548066d7beac
7
- data.tar.gz: 9ee7f320ac3ab905389bb7d377106de5c04f84c8c7d1f15baf5c7ec7261efa61cbfbae5d3a0de9f4d37c5da37c961677fd5631e6f8a2624ae0ff5857cef09cee
6
+ metadata.gz: 5bdf1e394129ed1091206499b50e976894786e59a7cc064b6e2d54e84143ff2c9dd520942809dc823fd4d39a60420c8b1340a3c9288e5a705b68bde6797c601f
7
+ data.tar.gz: 42784229848c993f5c38ca09e2dc9a057c35a4a348aaccab84202edcff43a89ebde97448bb67901616a8753b80951a41e29916fb5d1dc1c3b8aa3a085997236a
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ### Unreleased
2
+
3
+ ### 0.7.1 - 2018-03-02
4
+
5
+ #### Fixed:
6
+ - Fix to handle empty last_error strings [#40](https://github.com/statianzo/que-web/pull/40)
7
+
1
8
  ### 0.7.0 - 2018-02-02
2
9
  #### Added:
3
10
  - Delete All and Reschedule All ([#39](https://github.com/statianzo/que-web/pull/39))
data/docker/Gemfile.lock CHANGED
@@ -1,22 +1,25 @@
1
1
  GEM
2
2
  remote: https://rubygems.org/
3
3
  specs:
4
- pg (0.17.1)
5
- puma (2.9.2)
6
- rack (>= 1.1, < 2.0)
7
- que (0.8.2)
8
- que-web (0.2.2)
4
+ erubis (2.7.0)
5
+ mustermann (1.0.1)
6
+ pg (1.0.0)
7
+ puma (3.11.2)
8
+ que (0.14.2)
9
+ que-web (0.7.0)
10
+ erubis
9
11
  que (~> 0.8)
10
12
  sinatra
11
- rack (1.5.2)
12
- rack-protection (1.5.3)
13
+ rack (2.0.4)
14
+ rack-protection (2.0.0)
13
15
  rack
14
- sequel (4.16.0)
15
- sinatra (1.4.5)
16
- rack (~> 1.4)
17
- rack-protection (~> 1.4)
18
- tilt (~> 1.3, >= 1.3.4)
19
- tilt (1.4.1)
16
+ sequel (5.5.0)
17
+ sinatra (2.0.0)
18
+ mustermann (~> 1.0)
19
+ rack (~> 2.0)
20
+ rack-protection (= 2.0.0)
21
+ tilt (~> 2.0)
22
+ tilt (2.0.8)
20
23
 
21
24
  PLATFORMS
22
25
  ruby
@@ -26,3 +29,6 @@ DEPENDENCIES
26
29
  puma
27
30
  que-web
28
31
  sequel
32
+
33
+ BUNDLED WITH
34
+ 1.15.3
data/lib/que/web.rb CHANGED
@@ -157,7 +157,7 @@ module Que
157
157
 
158
158
  after { session[FLASH_KEY] = {} if @sweep_flash }
159
159
 
160
- helpers do
160
+ module Helpers
161
161
  def root_path
162
162
  "#{env['SCRIPT_NAME']}/"
163
163
  end
@@ -183,7 +183,7 @@ module Que
183
183
 
184
184
  def format_error(job)
185
185
  return unless job.last_error
186
- line = job.last_error.lines.first
186
+ line = job.last_error.lines.first || ''
187
187
  truncate line, 30
188
188
  end
189
189
 
@@ -209,6 +209,7 @@ module Que
209
209
  hash[level] = val
210
210
  end
211
211
  end
212
+ helpers Helpers
212
213
  end
213
214
  end
214
215
 
data/que-web.gemspec CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "que-web"
7
- spec.version = "0.7.0"
7
+ spec.version = "0.7.1"
8
8
  spec.authors = ["Jason Staten"]
9
9
  spec.email = ["jstaten07@gmail.com"]
10
10
  spec.summary = %q{A web interface for the que queue}
data/spec/web_spec.rb ADDED
@@ -0,0 +1,25 @@
1
+ require 'spec_helper'
2
+
3
+ describe Que::Web::Helpers do
4
+ subject do
5
+ Class.new { include Que::Web::Helpers }.new
6
+ end
7
+
8
+ def error_job(last_error)
9
+ Que::Web::Viewmodels::Job.new('last_error' => last_error)
10
+ end
11
+
12
+ describe '#format_error' do
13
+ it 'returns the truncated first line of the last error' do
14
+ message = 'This is a really long exception message that should get truncated'
15
+ last_error = ([message] + caller).join("\n")
16
+ subject.format_error(
17
+ error_job(last_error)
18
+ ).must_equal 'This is a really long exception...'
19
+ end
20
+
21
+ it 'handles empty strings as the last error' do
22
+ subject.format_error(error_job('')).must_equal ''
23
+ end
24
+ end
25
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: que-web
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Staten
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-02 00:00:00.000000000 Z
11
+ date: 2018-03-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: que
@@ -130,6 +130,7 @@ files:
130
130
  - spec/viewmodels/dashboard_spec.rb
131
131
  - spec/viewmodels/job_list_spec.rb
132
132
  - spec/viewmodels/job_spec.rb
133
+ - spec/web_spec.rb
133
134
  - web/public/fonts/FontAwesome.otf
134
135
  - web/public/fonts/fontawesome-webfont.eot
135
136
  - web/public/fonts/fontawesome-webfont.svg
@@ -187,3 +188,4 @@ test_files:
187
188
  - spec/viewmodels/dashboard_spec.rb
188
189
  - spec/viewmodels/job_list_spec.rb
189
190
  - spec/viewmodels/job_spec.rb
191
+ - spec/web_spec.rb