spud_reports 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 57f19805a7238b617d631aa4db1ab4f735bbcb51
4
+ data.tar.gz: 5b72dcdd53bc40b8fa34978061486b5dcc9e7f7b
5
+ SHA512:
6
+ metadata.gz: 46cfa15e8fa896b267e2134eae29366c1abd915456ed6036c40a216d17b70681c504c3eab57a34561417bc242453a62745873af73e6d8616ad59810931b5956c
7
+ data.tar.gz: f635a036d664722ef9f01c6e2203b3417e7e4f41de55cef7c63324ddb7784902a247dec5c097fa3f8b776dbcc1445f2e3c17403fb74c29a15963d9e574dad1d5
@@ -1,15 +1,22 @@
1
1
  class JobsController < Spud::ApplicationController
2
2
  def index
3
-
3
+
4
4
  trys = 0
5
5
  while(trys < 30)
6
- SpudPrinter.uncached do
7
- @printers = SpudPrinter.where(:access_token => params[:keys]).includes(:active_jobs).all
6
+ SpudPrinter.uncached do
7
+ @printers = SpudPrinter.where(:access_token => params[:keys]).includes(:active_jobs).all
8
8
  job_count = 0
9
9
  puts "printer query each method"
10
10
  @printers.each do |printer|
11
11
  puts("Checking job count on printer")
12
- job_count += printer.active_jobs.all.count
12
+ job_count = 0
13
+ printer.active_jobs.all.each do |job|
14
+ if File.exist?(File.join(Rails.root,'public','report_jobs',@job.attachment_file_name))
15
+ job_count += 1
16
+ else
17
+ job.update_attributes(:status => 1)
18
+ end
19
+ end
13
20
  puts(job_count)
14
21
  end
15
22
  if job_count > 0
@@ -10,7 +10,7 @@ class Spud::Admin::Printers::JobsController < Spud::Admin::ApplicationController
10
10
  def index
11
11
  add_breadcrumb "#{@printer.name}", :spud_admin_printer_jobs_path
12
12
  @page_name = "Print Jobs For - #{@printer.name}"
13
- @jobs = @printer.spud_print_jobs.paginate(:page => params[:page])
13
+ @jobs = @printer.active_jobs.paginate(:page => params[:page])
14
14
  respond_with @jobs
15
15
  end
16
16
 
@@ -19,7 +19,7 @@
19
19
 
20
20
  <td><%=link_to printer.name,edit_spud_admin_printer_path(:id => printer.id)%></td>
21
21
  <td><%=printer.status%></td>
22
- <td><%=link_to printer.spud_print_jobs.count, spud_admin_printer_jobs_path(:printer_id => printer.id)%></td>
22
+ <td><%=link_to printer.active_jobs.count, spud_admin_printer_jobs_path(:printer_id => printer.id)%></td>
23
23
 
24
24
  <td><%=printer.access_token%></td>
25
25
 
@@ -15,7 +15,7 @@
15
15
  </thead>
16
16
  <tbody>
17
17
  <%@jobs.each do |job|%>
18
- <tr id="row_printer_<%=printer.id%>">
18
+ <tr id="row_printer_<%=job.id%>">
19
19
 
20
20
  <td><%=job.name%></td>
21
21
  <td><%=job.status%></td>
@@ -1,5 +1,5 @@
1
1
  module Spud
2
2
  module Reports
3
- VERSION = "0.0.3"
3
+ VERSION = "0.0.4"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,33 +1,34 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spud_reports
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
5
- prerelease:
4
+ version: 0.0.4
6
5
  platform: ruby
7
6
  authors:
8
7
  - David Estes
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-05-06 00:00:00.000000000 Z
11
+ date: 2014-01-28 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rails
16
- requirement: &70177636707900 !ruby/object:Gem::Requirement
17
- none: false
15
+ requirement: !ruby/object:Gem::Requirement
18
16
  requirements:
19
17
  - - ~>
20
18
  - !ruby/object:Gem::Version
21
19
  version: 3.2.2
22
20
  type: :runtime
23
21
  prerelease: false
24
- version_requirements: *70177636707900
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: 3.2.2
25
27
  - !ruby/object:Gem::Dependency
26
28
  name: spud_core
27
- requirement: &70177636722720 !ruby/object:Gem::Requirement
28
- none: false
29
+ requirement: !ruby/object:Gem::Requirement
29
30
  requirements:
30
- - - ! '>='
31
+ - - '>='
31
32
  - !ruby/object:Gem::Version
32
33
  version: 0.8.0
33
34
  - - <
@@ -35,73 +36,98 @@ dependencies:
35
36
  version: 0.9.0
36
37
  type: :runtime
37
38
  prerelease: false
38
- version_requirements: *70177636722720
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - '>='
42
+ - !ruby/object:Gem::Version
43
+ version: 0.8.0
44
+ - - <
45
+ - !ruby/object:Gem::Version
46
+ version: 0.9.0
39
47
  - !ruby/object:Gem::Dependency
40
48
  name: paperclip
41
- requirement: &70177636719880 !ruby/object:Gem::Requirement
42
- none: false
49
+ requirement: !ruby/object:Gem::Requirement
43
50
  requirements:
44
- - - ! '>='
51
+ - - '>='
45
52
  - !ruby/object:Gem::Version
46
53
  version: '0'
47
54
  type: :runtime
48
55
  prerelease: false
49
- version_requirements: *70177636719880
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - '>='
59
+ - !ruby/object:Gem::Version
60
+ version: '0'
50
61
  - !ruby/object:Gem::Dependency
51
62
  name: rabl
52
- requirement: &70177636718100 !ruby/object:Gem::Requirement
53
- none: false
63
+ requirement: !ruby/object:Gem::Requirement
54
64
  requirements:
55
- - - ! '>='
65
+ - - '>='
56
66
  - !ruby/object:Gem::Version
57
67
  version: '0'
58
68
  type: :runtime
59
69
  prerelease: false
60
- version_requirements: *70177636718100
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - '>='
73
+ - !ruby/object:Gem::Version
74
+ version: '0'
61
75
  - !ruby/object:Gem::Dependency
62
76
  name: rghost
63
- requirement: &70177636730940 !ruby/object:Gem::Requirement
64
- none: false
77
+ requirement: !ruby/object:Gem::Requirement
65
78
  requirements:
66
- - - ! '>='
79
+ - - '>='
67
80
  - !ruby/object:Gem::Version
68
81
  version: '0'
69
82
  type: :runtime
70
83
  prerelease: false
71
- version_requirements: *70177636730940
84
+ version_requirements: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - '>='
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
72
89
  - !ruby/object:Gem::Dependency
73
90
  name: rghost_barcode
74
- requirement: &70177636728500 !ruby/object:Gem::Requirement
75
- none: false
91
+ requirement: !ruby/object:Gem::Requirement
76
92
  requirements:
77
- - - ! '>='
93
+ - - '>='
78
94
  - !ruby/object:Gem::Version
79
95
  version: '0'
80
96
  type: :runtime
81
97
  prerelease: false
82
- version_requirements: *70177636728500
98
+ version_requirements: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - '>='
101
+ - !ruby/object:Gem::Version
102
+ version: '0'
83
103
  - !ruby/object:Gem::Dependency
84
104
  name: rghost_rails
85
- requirement: &70177636727080 !ruby/object:Gem::Requirement
86
- none: false
105
+ requirement: !ruby/object:Gem::Requirement
87
106
  requirements:
88
- - - ! '>='
107
+ - - '>='
89
108
  - !ruby/object:Gem::Version
90
109
  version: '0'
91
110
  type: :runtime
92
111
  prerelease: false
93
- version_requirements: *70177636727080
112
+ version_requirements: !ruby/object:Gem::Requirement
113
+ requirements:
114
+ - - '>='
115
+ - !ruby/object:Gem::Version
116
+ version: '0'
94
117
  - !ruby/object:Gem::Dependency
95
118
  name: mysql2
96
- requirement: &70177636724280 !ruby/object:Gem::Requirement
97
- none: false
119
+ requirement: !ruby/object:Gem::Requirement
98
120
  requirements:
99
- - - ! '>='
121
+ - - '>='
100
122
  - !ruby/object:Gem::Version
101
123
  version: '0'
102
124
  type: :development
103
125
  prerelease: false
104
- version_requirements: *70177636724280
126
+ version_requirements: !ruby/object:Gem::Requirement
127
+ requirements:
128
+ - - '>='
129
+ - !ruby/object:Gem::Version
130
+ version: '0'
105
131
  description: Allows management of RGhost reports as well as remote print jobs.
106
132
  email:
107
133
  - destes@redwindsw.com
@@ -188,33 +214,26 @@ files:
188
214
  - test/unit/spud_printer_test.rb
189
215
  homepage: http://www.redwindsw.com
190
216
  licenses: []
217
+ metadata: {}
191
218
  post_install_message:
192
219
  rdoc_options: []
193
220
  require_paths:
194
221
  - lib
195
222
  required_ruby_version: !ruby/object:Gem::Requirement
196
- none: false
197
223
  requirements:
198
- - - ! '>='
224
+ - - '>='
199
225
  - !ruby/object:Gem::Version
200
226
  version: '0'
201
- segments:
202
- - 0
203
- hash: 2638290146940394425
204
227
  required_rubygems_version: !ruby/object:Gem::Requirement
205
- none: false
206
228
  requirements:
207
- - - ! '>='
229
+ - - '>='
208
230
  - !ruby/object:Gem::Version
209
231
  version: '0'
210
- segments:
211
- - 0
212
- hash: 2638290146940394425
213
232
  requirements: []
214
233
  rubyforge_project:
215
- rubygems_version: 1.8.15
234
+ rubygems_version: 2.0.5
216
235
  signing_key:
217
- specification_version: 3
236
+ specification_version: 4
218
237
  summary: Reporting engine for RGhost with Spud
219
238
  test_files:
220
239
  - test/dummy/app/assets/javascripts/application.js