streamworker 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module Streamworker
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
@@ -12,6 +12,7 @@ module Streamworker
12
12
  attr_accessor :line_num # subclasses responsible for setting this as appropriate
13
13
  attr_accessor :title
14
14
  attr_accessor :num_records, :num_success, :num_errors
15
+ attr_accessor :footer_messages
15
16
 
16
17
  def initialize(view_context, opts={})
17
18
  @opts = opts.with_indifferent_access
@@ -33,6 +34,8 @@ module Streamworker
33
34
  @num_records = opts[:num_records].to_i || 1
34
35
  @num_success = 0
35
36
  @num_errors = 0
37
+
38
+ @footer_messages = []
36
39
  end
37
40
 
38
41
 
@@ -147,10 +150,18 @@ module Streamworker
147
150
  }
148
151
  end
149
152
 
150
- def footer(msg)
153
+ def push_footer_message(msg)
154
+ @footer_messages << msg
155
+ end
156
+
157
+ def footer(msg=nil)
158
+ @footer_messages << msg unless msg.blank?
159
+ message = @footer_messages.empty? ? "" : "<h3>"
160
+ message << @footer_messages.join('</h3><h3>')
161
+ message += "</h3>" unless message.blank?
151
162
  <<-EOHTML
152
163
  </div>
153
- <h3>#{msg}</h3>
164
+ #{message}
154
165
  #{scroll}
155
166
 
156
167
  </div>#{self.foot}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: streamworker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-07-19 00:00:00.000000000 Z
12
+ date: 2013-07-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -128,7 +128,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
128
128
  version: '0'
129
129
  segments:
130
130
  - 0
131
- hash: -1134840548251930159
131
+ hash: 3503497769754630683
132
132
  required_rubygems_version: !ruby/object:Gem::Requirement
133
133
  none: false
134
134
  requirements:
@@ -137,7 +137,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
137
137
  version: '0'
138
138
  segments:
139
139
  - 0
140
- hash: -1134840548251930159
140
+ hash: 3503497769754630683
141
141
  requirements: []
142
142
  rubyforge_project:
143
143
  rubygems_version: 1.8.25