call_center 1.0.1 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,4 @@
1
+ require 'builder'
1
2
  require 'call_center/core_ext/object_instance_exec'
2
3
  require 'state_machine'
3
4
  require 'call_center/state_machine_ext'
@@ -1,8 +1,13 @@
1
1
  require 'action_pack/version'
2
+ require 'cgi'
2
3
  if ActionPack::VERSION::MAJOR == 2
3
4
  require 'action_controller/assertions/selector_assertions'
4
5
  else
5
- require 'action_dispatch/testing/assertions/selector'
6
+ if ActionPack::VERSION::MINOR == 0
7
+ require 'action_dispatch/testing/assertions/selector'
8
+ else
9
+ require 'action_dispatch/testing/assertions'
10
+ end
6
11
  end
7
12
 
8
13
  module CallCenter
@@ -17,8 +22,12 @@ module CallCenter
17
22
 
18
23
  base.extend(ClassMethods)
19
24
  base.class_eval do
25
+ def html_document
26
+ HTML::Document.new(CGI.unescapeHTML(@body))
27
+ end
28
+
20
29
  def response_from_page_or_rjs_with_body
21
- HTML::Document.new(CGI.unescapeHTML(@body)).root
30
+ html_document.root
22
31
  end
23
32
  alias_method_chain :response_from_page_or_rjs, :body
24
33
  end
@@ -1,10 +1,13 @@
1
1
  require 'action_pack/version'
2
- require 'action_controller/vendor/html-scanner'
2
+
3
3
  if ActionPack::VERSION::MAJOR == 2
4
4
  require 'action_controller/assertions/selector_assertions'
5
5
  else
6
6
  require 'action_dispatch/testing/assertions/selector'
7
+ require 'active_support/core_ext/class/attribute_accessors' # do not blow up with undefined method cattr_accessor
8
+ require 'active_support/core_ext/string/encoding' # do not blow up with undefined method encoding_aware?
7
9
  end
10
+ require 'action_controller/vendor/html-scanner'
8
11
  require 'test/unit/assertions'
9
12
 
10
13
  module CallCenter
@@ -253,7 +256,7 @@ module CallCenter
253
256
  end
254
257
 
255
258
  def response_from_page_or_rjs
256
- HTML::Document.new(@_body).root
259
+ html_document.root
257
260
  end
258
261
 
259
262
  def body(text, debug = false)
@@ -261,6 +264,10 @@ module CallCenter
261
264
  @_body = text
262
265
  end
263
266
 
267
+ def html_document
268
+ HTML::Document.new(@_body)
269
+ end
270
+
264
271
  private
265
272
 
266
273
  def build_message(head, template=nil, *arguments)
metadata CHANGED
@@ -1,251 +1,54 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: call_center
3
- version: !ruby/object:Gem::Version
4
- hash: 21
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.3
5
5
  prerelease:
6
- segments:
7
- - 1
8
- - 0
9
- - 1
10
- version: 1.0.1
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Henry Hsu
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2013-02-21 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
12
+ date: 2013-06-13 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
21
15
  name: builder
22
- version_requirements: &id001 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
23
17
  none: false
24
- requirements:
25
- - - ">="
26
- - !ruby/object:Gem::Version
27
- hash: 3
28
- segments:
29
- - 0
30
- version: "0"
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
31
22
  type: :runtime
32
- requirement: *id001
33
23
  prerelease: false
34
- - !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'
30
+ - !ruby/object:Gem::Dependency
35
31
  name: hsume2-state_machine
36
- version_requirements: &id002 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
37
33
  none: false
38
- requirements:
34
+ requirements:
39
35
  - - ~>
40
- - !ruby/object:Gem::Version
41
- hash: 29
42
- segments:
43
- - 1
44
- - 0
45
- - 5
36
+ - !ruby/object:Gem::Version
46
37
  version: 1.0.5
47
38
  type: :runtime
48
- requirement: *id002
49
- prerelease: false
50
- - !ruby/object:Gem::Dependency
51
- name: shoulda
52
- version_requirements: &id003 !ruby/object:Gem::Requirement
53
- none: false
54
- requirements:
55
- - - ">="
56
- - !ruby/object:Gem::Version
57
- hash: 3
58
- segments:
59
- - 0
60
- version: "0"
61
- type: :development
62
- requirement: *id003
63
- prerelease: false
64
- - !ruby/object:Gem::Dependency
65
- name: jeweler
66
- version_requirements: &id004 !ruby/object:Gem::Requirement
67
- none: false
68
- requirements:
69
- - - ~>
70
- - !ruby/object:Gem::Version
71
- hash: 7
72
- segments:
73
- - 1
74
- - 6
75
- - 4
76
- version: 1.6.4
77
- type: :development
78
- requirement: *id004
79
- prerelease: false
80
- - !ruby/object:Gem::Dependency
81
- name: rcov
82
- version_requirements: &id005 !ruby/object:Gem::Requirement
83
- none: false
84
- requirements:
85
- - - ">="
86
- - !ruby/object:Gem::Version
87
- hash: 3
88
- segments:
89
- - 0
90
- version: "0"
91
- type: :development
92
- requirement: *id005
93
- prerelease: false
94
- - !ruby/object:Gem::Dependency
95
- name: guard
96
- version_requirements: &id006 !ruby/object:Gem::Requirement
97
- none: false
98
- requirements:
99
- - - ">="
100
- - !ruby/object:Gem::Version
101
- hash: 3
102
- segments:
103
- - 0
104
- version: "0"
105
- type: :development
106
- requirement: *id006
107
39
  prerelease: false
108
- - !ruby/object:Gem::Dependency
109
- name: guard-test
110
- version_requirements: &id007 !ruby/object:Gem::Requirement
40
+ version_requirements: !ruby/object:Gem::Requirement
111
41
  none: false
112
- requirements:
113
- - - ">="
114
- - !ruby/object:Gem::Version
115
- hash: 3
116
- segments:
117
- - 0
118
- version: "0"
119
- type: :development
120
- requirement: *id007
121
- prerelease: false
122
- - !ruby/object:Gem::Dependency
123
- name: actionpack
124
- version_requirements: &id008 !ruby/object:Gem::Requirement
125
- none: false
126
- requirements:
42
+ requirements:
127
43
  - - ~>
128
- - !ruby/object:Gem::Version
129
- hash: 29
130
- segments:
131
- - 2
132
- - 3
133
- - 15
134
- version: 2.3.15
135
- type: :development
136
- requirement: *id008
137
- prerelease: false
138
- - !ruby/object:Gem::Dependency
139
- name: mocha
140
- version_requirements: &id009 !ruby/object:Gem::Requirement
141
- none: false
142
- requirements:
143
- - - ">="
144
- - !ruby/object:Gem::Version
145
- hash: 3
146
- segments:
147
- - 0
148
- version: "0"
149
- type: :development
150
- requirement: *id009
151
- prerelease: false
152
- - !ruby/object:Gem::Dependency
153
- name: bourne
154
- version_requirements: &id010 !ruby/object:Gem::Requirement
155
- none: false
156
- requirements:
157
- - - ">="
158
- - !ruby/object:Gem::Version
159
- hash: 31
160
- segments:
161
- - 1
162
- - 2
163
- - 0
164
- version: 1.2.0
165
- type: :development
166
- requirement: *id010
167
- prerelease: false
168
- - !ruby/object:Gem::Dependency
169
- name: pre-commit
170
- version_requirements: &id011 !ruby/object:Gem::Requirement
171
- none: false
172
- requirements:
173
- - - ">="
174
- - !ruby/object:Gem::Version
175
- hash: 3
176
- segments:
177
- - 0
178
- version: "0"
179
- type: :development
180
- requirement: *id011
181
- prerelease: false
182
- - !ruby/object:Gem::Dependency
183
- name: minitest
184
- version_requirements: &id012 !ruby/object:Gem::Requirement
185
- none: false
186
- requirements:
187
- - - ~>
188
- - !ruby/object:Gem::Version
189
- hash: 11
190
- segments:
191
- - 3
192
- - 3
193
- - 0
194
- version: 3.3.0
195
- type: :development
196
- requirement: *id012
197
- prerelease: false
198
- - !ruby/object:Gem::Dependency
199
- name: minitest-reporters
200
- version_requirements: &id013 !ruby/object:Gem::Requirement
201
- none: false
202
- requirements:
203
- - - ">="
204
- - !ruby/object:Gem::Version
205
- hash: 3
206
- segments:
207
- - 0
208
- version: "0"
209
- type: :development
210
- requirement: *id013
211
- prerelease: false
212
- - !ruby/object:Gem::Dependency
213
- name: guard-shell
214
- version_requirements: &id014 !ruby/object:Gem::Requirement
215
- none: false
216
- requirements:
217
- - - ">="
218
- - !ruby/object:Gem::Version
219
- hash: 3
220
- segments:
221
- - 0
222
- version: "0"
223
- type: :development
224
- requirement: *id014
225
- prerelease: false
44
+ - !ruby/object:Gem::Version
45
+ version: 1.0.5
226
46
  description: Support for describing call center workflows
227
47
  email: hhsu@zendesk.com
228
48
  executables: []
229
-
230
49
  extensions: []
231
-
232
- extra_rdoc_files:
233
- - LICENSE
234
- - README.md
235
- files:
236
- - .document
237
- - .rvmrc
238
- - .travis.yml
239
- - Gemfile
240
- - Gemfile.lock
241
- - Guardfile
242
- - Guardfile.minitest
243
- - LICENSE
244
- - README.md
245
- - Rakefile
246
- - VERSION
247
- - call_center.gemspec
248
- - init.rb
50
+ extra_rdoc_files: []
51
+ files:
249
52
  - lib/call_center.rb
250
53
  - lib/call_center/conditional_stack.rb
251
54
  - lib/call_center/core_ext/object_instance_exec.rb
@@ -254,49 +57,35 @@ files:
254
57
  - lib/call_center/state_machine_ext.rb
255
58
  - lib/call_center/test/dsl.rb
256
59
  - lib/call_center/test/minitest/dsl.rb
257
- - minitest/call_center/test/minitest_test.rb
258
- - minitest/helper.rb
259
- - minitest/run.rb
260
- - test/call_center_test.rb
261
- - test/core_ext_test.rb
262
- - test/examples/call.rb
263
- - test/examples/dynamic_transition_call.rb
264
- - test/examples/legacy_call.rb
265
- - test/examples/multiple_flow_call.rb
266
- - test/examples/non_standard_call.rb
267
- - test/helper.rb
268
60
  homepage: http://github.com/zendesk/call_center
269
- licenses:
61
+ licenses:
270
62
  - Apache License Version 2.0
271
63
  post_install_message:
272
64
  rdoc_options: []
273
-
274
- require_paths:
65
+ require_paths:
275
66
  - lib
276
- required_ruby_version: !ruby/object:Gem::Requirement
67
+ required_ruby_version: !ruby/object:Gem::Requirement
277
68
  none: false
278
- requirements:
279
- - - ">="
280
- - !ruby/object:Gem::Version
281
- hash: 3
282
- segments:
69
+ requirements:
70
+ - - ! '>='
71
+ - !ruby/object:Gem::Version
72
+ version: '0'
73
+ segments:
283
74
  - 0
284
- version: "0"
285
- required_rubygems_version: !ruby/object:Gem::Requirement
75
+ hash: -631066211889326188
76
+ required_rubygems_version: !ruby/object:Gem::Requirement
286
77
  none: false
287
- requirements:
288
- - - ">="
289
- - !ruby/object:Gem::Version
290
- hash: 3
291
- segments:
78
+ requirements:
79
+ - - ! '>='
80
+ - !ruby/object:Gem::Version
81
+ version: '0'
82
+ segments:
292
83
  - 0
293
- version: "0"
84
+ hash: -631066211889326188
294
85
  requirements: []
295
-
296
86
  rubyforge_project:
297
- rubygems_version: 1.8.24
87
+ rubygems_version: 1.8.25
298
88
  signing_key:
299
89
  specification_version: 3
300
90
  summary: Support for describing call center workflows
301
91
  test_files: []
302
-
data/.document DELETED
@@ -1,5 +0,0 @@
1
- lib/**/*.rb
2
- bin/*
3
- -
4
- features/**/*.feature
5
- LICENSE.txt
data/.rvmrc DELETED
@@ -1 +0,0 @@
1
- rvm use ree-1.8.7-2011.03@twilio_flow
@@ -1,5 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - ree
4
- - 1.9.2
5
- - 1.9.3
data/Gemfile DELETED
@@ -1,19 +0,0 @@
1
- source :rubygems
2
-
3
- group :development do
4
- gem 'shoulda'
5
- gem 'jeweler', '~> 1.6.4'
6
- gem 'rcov'
7
- gem 'guard'
8
- gem 'guard-test'
9
- gem 'actionpack', '~> 2.3.15'
10
- gem 'mocha'
11
- gem 'bourne', '>= 1.2.0'
12
- gem 'pre-commit'
13
- gem 'minitest', '~> 3.3.0' # dots disappear at >= 3.4
14
- gem 'minitest-reporters', :platform => :ruby_19 # https://github.com/busyloop/powerbar/pull/10
15
- gem 'guard-shell'
16
- end
17
-
18
- gem 'builder'
19
- gem 'hsume2-state_machine', '~> 1.0.5', :require => 'state_machine'