fluent 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/HISTORY.md +11 -0
  3. data/lib/fluent.rb +4 -0
  4. data/lib/fluent/factory.rb +20 -1
  5. data/lib/fluent/version.rb +1 -1
  6. metadata +62 -129
  7. data/.gitignore +0 -19
  8. data/.travis.yml +0 -14
  9. data/Gemfile +0 -5
  10. data/Rakefile +0 -13
  11. data/fluent.gemspec +0 -33
  12. data/spec/enclosers_spec.rb +0 -38
  13. data/spec/evaluators_spec.rb +0 -88
  14. data/spec/factory_spec.rb +0 -49
  15. data/spec/fluent_spec.rb +0 -40
  16. data/spec/generators/button_generators_spec.rb +0 -77
  17. data/spec/generators/cell_generators_spec.rb +0 -50
  18. data/spec/generators/checkbox_generators_spec.rb +0 -88
  19. data/spec/generators/div_generators_spec.rb +0 -49
  20. data/spec/generators/form_generators_spec.rb +0 -42
  21. data/spec/generators/heading_generators_spec.rb +0 -87
  22. data/spec/generators/hidden_generators_spec.rb +0 -49
  23. data/spec/generators/image_generators_spec.rb +0 -42
  24. data/spec/generators/label_generators_spec.rb +0 -49
  25. data/spec/generators/link_generators_spec.rb +0 -64
  26. data/spec/generators/list_item_generators_spec.rb +0 -53
  27. data/spec/generators/ordered_list_generators_spec.rb +0 -53
  28. data/spec/generators/paragraph_generators_spec.rb +0 -65
  29. data/spec/generators/radio_generators_spec.rb +0 -85
  30. data/spec/generators/select_list_generators_spec.rb +0 -120
  31. data/spec/generators/span_generators_spec.rb +0 -49
  32. data/spec/generators/table_generators_spec.rb +0 -49
  33. data/spec/generators/text_area_generators_spec.rb +0 -55
  34. data/spec/generators/text_field_generators_spec.rb +0 -81
  35. data/spec/generators/unordered_list_generators_spec.rb +0 -53
  36. data/spec/generators_spec.rb +0 -87
  37. data/spec/mock_app.rb +0 -31
  38. data/spec/platform_object_spec.rb +0 -32
  39. data/spec/spec_helper.rb +0 -19
  40. data/spec/web_element_spec.rb +0 -38
  41. data/spec/web_element_watir_spec.rb +0 -156
  42. data/spec/web_elements/button_spec.rb +0 -21
  43. data/spec/web_elements/cell_spec.rb +0 -13
  44. data/spec/web_elements/checkbox_spec.rb +0 -25
  45. data/spec/web_elements/div_spec.rb +0 -9
  46. data/spec/web_elements/form_spec.rb +0 -9
  47. data/spec/web_elements/heading_spec.rb +0 -28
  48. data/spec/web_elements/hidden_spec.rb +0 -9
  49. data/spec/web_elements/image_spec.rb +0 -9
  50. data/spec/web_elements/label_spec.rb +0 -9
  51. data/spec/web_elements/link_spec.rb +0 -9
  52. data/spec/web_elements/list_item_spec.rb +0 -9
  53. data/spec/web_elements/option_spec.rb +0 -9
  54. data/spec/web_elements/ordered_list_spec.rb +0 -42
  55. data/spec/web_elements/paragraph_spec.rb +0 -9
  56. data/spec/web_elements/radio_spec.rb +0 -25
  57. data/spec/web_elements/select_list_spec.rb +0 -45
  58. data/spec/web_elements/span_spec.rb +0 -9
  59. data/spec/web_elements/table_row_spec.rb +0 -47
  60. data/spec/web_elements/table_spec.rb +0 -54
  61. data/spec/web_elements/text_area_spec.rb +0 -27
  62. data/spec/web_elements/text_field_spec.rb +0 -29
  63. data/spec/web_elements/unordered_list_spec.rb +0 -42
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 83879b044030a03d6874a004d81a15013eb36507
4
- data.tar.gz: 8d373bac702368bb6b66af1f762a0e95d527ceb9
3
+ metadata.gz: d399f7efa85d3a7fe499637593d9f5f64fe48ddf
4
+ data.tar.gz: 507dca702929c8f16d19efdb2f4203506736a28b
5
5
  SHA512:
6
- metadata.gz: 54a3cee3e749c9f5a704bd5d0a1d8a2cb9c5db3173cfe0258bc0807bb52436e1c17e926c4ebeb0d407ffe615515e74df86bf1c356708ef391ca0d33511fb2b52
7
- data.tar.gz: b020387965fde7eb8e7574c1cca3924303796da4a4e5f50da033257a727e15f7a8864ee411743dec4a4d32cf05e2a8efc801dbdbfc024d06cbf20cc3f2aa077b
6
+ metadata.gz: 6f020da878a64fc26dd6851ccc49967387991ea6d232a3a7d4f52ea181785701873d03066fac9874c70a0e7866dcbef4c0e1f044fe4ea5f7661a3794dd77fad6
7
+ data.tar.gz: 1d96a09f70cec3a86d486035377116c254ceb7bbf22afbb2c036583e542edfb0102785598c726622dd82f511653e72793b74c0da725c46dbde4eab7e555544f9
data/HISTORY.md CHANGED
@@ -1,6 +1,17 @@
1
1
  Change Log and History
2
2
  ======================
3
3
 
4
+ Version 0.5.0 / 2013-11-17
5
+ --------------------------
6
+
7
+ This releases introduces two specific elements:
8
+
9
+ * A new factory called on_new() has been added. This factory complements the on() factory. The on() factory will reuse an existing definition instance if an instance of definition being referenced already exists. The on_new() factory will always create a new instance of a definition, even if one is already existing.
10
+
11
+ * It is now possible to provide an initialize_page or initialize_activity methods on page or activity definitions. This effectively allows you to create your own constructors on your definitions. Those constructors will be executed if they exist.
12
+
13
+ Also added into this release is a test application (in the app directory) called Fluency that can be used for learning how Fluent works. Right now this application directory is not distributed as part of the gem but is available via the repository.
14
+
4
15
  Version 0.4.0 / 2013-11-13
5
16
  --------------------------
6
17
 
data/lib/fluent.rb CHANGED
@@ -25,6 +25,7 @@ module Fluent
25
25
  # Platform references will be:
26
26
  # [Fluent::Platforms::WatirWebDriver::PlatformObject]
27
27
  # [Fluent::Platforms::SeleniumWebDriver::PlatformObject]
28
+ # [Fluent::Platforms::MechanizeDriver::PlatformObject]
28
29
  #
29
30
  # @return [Object] platform reference
30
31
  attr_reader :platform
@@ -61,6 +62,9 @@ module Fluent
61
62
  establish_platform_object_for @driver
62
63
 
63
64
  view if visit && respond_to?(:view)
65
+
66
+ initialize_page if respond_to?(:initialize_page)
67
+ initialize_activity if respond_to?(:initialize_activity)
64
68
  end
65
69
 
66
70
  # Returns the default wait value for pages. This value is the default
@@ -1,9 +1,11 @@
1
1
  module Fluent
2
2
  module Factory
3
3
 
4
- # Creates a definition context for actions.
4
+ # Creates a definition context for actions. If an existing context
5
+ # exists, that context will be re-used.
5
6
  #
6
7
  # @param definition [Class] the name of a definition class
8
+ # @param visit [Boolean] true if the context needs to be called into view
7
9
  # @param block [Proc] logic to execute within the context of the definition
8
10
  # @return [Object] instance of the definition
9
11
  def on(definition, visit=false, &block)
@@ -18,7 +20,24 @@ module Fluent
18
20
 
19
21
  alias_method :on_page, :on
20
22
  alias_method :while_on, :on
23
+
24
+ # Creates a definition context for actions. Unlike the on() factory,
25
+ # on_new will always create a new context and will never re-use an
26
+ # existing one.
27
+ #
28
+ # @param definition [Class] the name of a definition class
29
+ # @param visit [Boolean] true if the context needs to be called into view
30
+ # @param block [Proc] logic to execute within the context of the definition
31
+ # @return [Object] instance of the definition
32
+ def on_new(definition, visit=false, &block)
33
+ definition = get_object_for(definition) if definition.is_a? String
21
34
 
35
+ @active = definition.new(@driver, visit)
36
+ block.call @active if block
37
+
38
+ @active
39
+ end
40
+
22
41
  # Creates a definition context for actions and establishes the
23
42
  # context for display.
24
43
  #
@@ -1,3 +1,3 @@
1
1
  module Fluent
2
- VERSION = '0.4.0'
2
+ VERSION = '0.5.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Nyman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-13 00:00:00.000000000 Z
11
+ date: 2013-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -56,16 +56,58 @@ dependencies:
56
56
  name: simplecov
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - '='
60
60
  - !ruby/object:Gem::Version
61
- version: '0.7'
61
+ version: 0.7.1
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ~>
66
+ - - '='
67
+ - !ruby/object:Gem::Version
68
+ version: 0.7.1
69
+ - !ruby/object:Gem::Dependency
70
+ name: sinatra
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '='
74
+ - !ruby/object:Gem::Version
75
+ version: 1.4.4
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '='
67
81
  - !ruby/object:Gem::Version
68
- version: '0.7'
82
+ version: 1.4.4
83
+ - !ruby/object:Gem::Dependency
84
+ name: sinatra-reloader
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - '='
88
+ - !ruby/object:Gem::Version
89
+ version: '1.0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - '='
95
+ - !ruby/object:Gem::Version
96
+ version: '1.0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: thin
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - '='
102
+ - !ruby/object:Gem::Version
103
+ version: 1.6.1
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - '='
109
+ - !ruby/object:Gem::Version
110
+ version: 1.6.1
69
111
  - !ruby/object:Gem::Dependency
70
112
  name: watir-webdriver
71
113
  requirement: !ruby/object:Gem::Requirement
@@ -98,16 +140,16 @@ dependencies:
98
140
  name: mechanize
99
141
  requirement: !ruby/object:Gem::Requirement
100
142
  requirements:
101
- - - '='
143
+ - - '>='
102
144
  - !ruby/object:Gem::Version
103
- version: 2.7.2
145
+ version: 2.7.3
104
146
  type: :runtime
105
147
  prerelease: false
106
148
  version_requirements: !ruby/object:Gem::Requirement
107
149
  requirements:
108
- - - '='
150
+ - - '>='
109
151
  - !ruby/object:Gem::Version
110
- version: 2.7.2
152
+ version: 2.7.3
111
153
  description: Provides a semantic DSL to construct a fluent interface for test execution
112
154
  libraries.
113
155
  email: jeffnyman@gmail.com
@@ -115,26 +157,17 @@ executables: []
115
157
  extensions: []
116
158
  extra_rdoc_files: []
117
159
  files:
118
- - .gitignore
119
- - .travis.yml
120
- - Gemfile
121
- - HISTORY.md
122
- - LICENSE.txt
123
- - README.md
124
- - Rakefile
125
- - fluent.gemspec
126
- - lib/fluent.rb
127
160
  - lib/fluent/enclosers.rb
128
161
  - lib/fluent/errors.rb
129
162
  - lib/fluent/evaluators.rb
130
163
  - lib/fluent/factory.rb
131
164
  - lib/fluent/generators.rb
132
165
  - lib/fluent/logger.rb
133
- - lib/fluent/platform_mechanize.rb
166
+ - lib/fluent/platforms.rb
134
167
  - lib/fluent/platform_mechanize/platform_object.rb
135
- - lib/fluent/platform_selenium.rb
168
+ - lib/fluent/platform_mechanize.rb
136
169
  - lib/fluent/platform_selenium/platform_object.rb
137
- - lib/fluent/platform_watir.rb
170
+ - lib/fluent/platform_selenium.rb
138
171
  - lib/fluent/platform_watir/platform_object.rb
139
172
  - lib/fluent/platform_watir/platform_web_elements/checkbox.rb
140
173
  - lib/fluent/platform_watir/platform_web_elements/ordered_list.rb
@@ -146,9 +179,8 @@ files:
146
179
  - lib/fluent/platform_watir/platform_web_elements/text_field.rb
147
180
  - lib/fluent/platform_watir/platform_web_elements/unordered_list.rb
148
181
  - lib/fluent/platform_watir/platform_web_elements/web_element.rb
149
- - lib/fluent/platforms.rb
182
+ - lib/fluent/platform_watir.rb
150
183
  - lib/fluent/version.rb
151
- - lib/fluent/web_elements.rb
152
184
  - lib/fluent/web_elements/button.rb
153
185
  - lib/fluent/web_elements/cell.rb
154
186
  - lib/fluent/web_elements/checkbox.rb
@@ -172,58 +204,11 @@ files:
172
204
  - lib/fluent/web_elements/text_field.rb
173
205
  - lib/fluent/web_elements/unordered_list.rb
174
206
  - lib/fluent/web_elements/web_element.rb
175
- - spec/enclosers_spec.rb
176
- - spec/evaluators_spec.rb
177
- - spec/factory_spec.rb
178
- - spec/fluent_spec.rb
179
- - spec/generators/button_generators_spec.rb
180
- - spec/generators/cell_generators_spec.rb
181
- - spec/generators/checkbox_generators_spec.rb
182
- - spec/generators/div_generators_spec.rb
183
- - spec/generators/form_generators_spec.rb
184
- - spec/generators/heading_generators_spec.rb
185
- - spec/generators/hidden_generators_spec.rb
186
- - spec/generators/image_generators_spec.rb
187
- - spec/generators/label_generators_spec.rb
188
- - spec/generators/link_generators_spec.rb
189
- - spec/generators/list_item_generators_spec.rb
190
- - spec/generators/ordered_list_generators_spec.rb
191
- - spec/generators/paragraph_generators_spec.rb
192
- - spec/generators/radio_generators_spec.rb
193
- - spec/generators/select_list_generators_spec.rb
194
- - spec/generators/span_generators_spec.rb
195
- - spec/generators/table_generators_spec.rb
196
- - spec/generators/text_area_generators_spec.rb
197
- - spec/generators/text_field_generators_spec.rb
198
- - spec/generators/unordered_list_generators_spec.rb
199
- - spec/generators_spec.rb
200
- - spec/mock_app.rb
201
- - spec/platform_object_spec.rb
202
- - spec/spec_helper.rb
203
- - spec/web_element_spec.rb
204
- - spec/web_element_watir_spec.rb
205
- - spec/web_elements/button_spec.rb
206
- - spec/web_elements/cell_spec.rb
207
- - spec/web_elements/checkbox_spec.rb
208
- - spec/web_elements/div_spec.rb
209
- - spec/web_elements/form_spec.rb
210
- - spec/web_elements/heading_spec.rb
211
- - spec/web_elements/hidden_spec.rb
212
- - spec/web_elements/image_spec.rb
213
- - spec/web_elements/label_spec.rb
214
- - spec/web_elements/link_spec.rb
215
- - spec/web_elements/list_item_spec.rb
216
- - spec/web_elements/option_spec.rb
217
- - spec/web_elements/ordered_list_spec.rb
218
- - spec/web_elements/paragraph_spec.rb
219
- - spec/web_elements/radio_spec.rb
220
- - spec/web_elements/select_list_spec.rb
221
- - spec/web_elements/span_spec.rb
222
- - spec/web_elements/table_row_spec.rb
223
- - spec/web_elements/table_spec.rb
224
- - spec/web_elements/text_area_spec.rb
225
- - spec/web_elements/text_field_spec.rb
226
- - spec/web_elements/unordered_list_spec.rb
207
+ - lib/fluent/web_elements.rb
208
+ - lib/fluent.rb
209
+ - LICENSE.txt
210
+ - README.md
211
+ - HISTORY.md
227
212
  homepage: https://github.com/jnyman/fluent
228
213
  licenses:
229
214
  - MIT
@@ -248,57 +233,5 @@ rubygems_version: 2.0.3
248
233
  signing_key:
249
234
  specification_version: 4
250
235
  summary: A Semantically Clean Fluent Interface Test Framework
251
- test_files:
252
- - spec/enclosers_spec.rb
253
- - spec/evaluators_spec.rb
254
- - spec/factory_spec.rb
255
- - spec/fluent_spec.rb
256
- - spec/generators/button_generators_spec.rb
257
- - spec/generators/cell_generators_spec.rb
258
- - spec/generators/checkbox_generators_spec.rb
259
- - spec/generators/div_generators_spec.rb
260
- - spec/generators/form_generators_spec.rb
261
- - spec/generators/heading_generators_spec.rb
262
- - spec/generators/hidden_generators_spec.rb
263
- - spec/generators/image_generators_spec.rb
264
- - spec/generators/label_generators_spec.rb
265
- - spec/generators/link_generators_spec.rb
266
- - spec/generators/list_item_generators_spec.rb
267
- - spec/generators/ordered_list_generators_spec.rb
268
- - spec/generators/paragraph_generators_spec.rb
269
- - spec/generators/radio_generators_spec.rb
270
- - spec/generators/select_list_generators_spec.rb
271
- - spec/generators/span_generators_spec.rb
272
- - spec/generators/table_generators_spec.rb
273
- - spec/generators/text_area_generators_spec.rb
274
- - spec/generators/text_field_generators_spec.rb
275
- - spec/generators/unordered_list_generators_spec.rb
276
- - spec/generators_spec.rb
277
- - spec/mock_app.rb
278
- - spec/platform_object_spec.rb
279
- - spec/spec_helper.rb
280
- - spec/web_element_spec.rb
281
- - spec/web_element_watir_spec.rb
282
- - spec/web_elements/button_spec.rb
283
- - spec/web_elements/cell_spec.rb
284
- - spec/web_elements/checkbox_spec.rb
285
- - spec/web_elements/div_spec.rb
286
- - spec/web_elements/form_spec.rb
287
- - spec/web_elements/heading_spec.rb
288
- - spec/web_elements/hidden_spec.rb
289
- - spec/web_elements/image_spec.rb
290
- - spec/web_elements/label_spec.rb
291
- - spec/web_elements/link_spec.rb
292
- - spec/web_elements/list_item_spec.rb
293
- - spec/web_elements/option_spec.rb
294
- - spec/web_elements/ordered_list_spec.rb
295
- - spec/web_elements/paragraph_spec.rb
296
- - spec/web_elements/radio_spec.rb
297
- - spec/web_elements/select_list_spec.rb
298
- - spec/web_elements/span_spec.rb
299
- - spec/web_elements/table_row_spec.rb
300
- - spec/web_elements/table_spec.rb
301
- - spec/web_elements/text_area_spec.rb
302
- - spec/web_elements/text_field_spec.rb
303
- - spec/web_elements/unordered_list_spec.rb
236
+ test_files: []
304
237
  has_rdoc:
data/.gitignore DELETED
@@ -1,19 +0,0 @@
1
- *.gem
2
- *.rbc
3
- .idea
4
- .bundle
5
- .config
6
- .yardoc
7
- Gemfile.lock
8
- InstalledFiles
9
- _yardoc
10
- coverage
11
- output/
12
- doc/
13
- lib/bundler/man
14
- pkg
15
- rdoc
16
- spec/reports
17
- test/tmp
18
- test/version_tmp
19
- tmp
data/.travis.yml DELETED
@@ -1,14 +0,0 @@
1
- script: "rake"
2
-
3
- rvm:
4
- - 1.9.3
5
- - 2.0.0
6
-
7
- branches:
8
- only:
9
- - master
10
- - develop
11
-
12
- notifications:
13
- recipients:
14
- - jeffnyman@gmail.com
data/Gemfile DELETED
@@ -1,5 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gem 'coveralls', require: false
4
-
5
- gemspec
data/Rakefile DELETED
@@ -1,13 +0,0 @@
1
- #!/usr/bin/env rake
2
- require 'bundler/gem_tasks'
3
- require 'rspec/core/rake_task'
4
-
5
- RSpec::Core::RakeTask.new do |config|
6
- options = %w(--color)
7
- options += %w(--format documentation)
8
- options += %w(--format nested --out output/fluent-test-report.txt)
9
- options += %w(--format html --out output/fluent-test-report.html)
10
- config.rspec_opts = options
11
- end
12
-
13
- task :default => :spec
data/fluent.gemspec DELETED
@@ -1,33 +0,0 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'fluent/version'
5
-
6
- Gem::Specification.new do |spec|
7
- spec.name = 'fluent'
8
- spec.version = Fluent::VERSION
9
- spec.author = 'Jeff Nyman'
10
- spec.email = 'jeffnyman@gmail.com'
11
- spec.description = %q{Provides a semantic DSL to construct a fluent interface for test execution libraries.}
12
- spec.summary = %q{A Semantically Clean Fluent Interface Test Framework}
13
- spec.homepage = 'https://github.com/jnyman/fluent'
14
- spec.license = 'MIT'
15
- spec.platform = Gem::Platform::RUBY
16
-
17
- spec.files = `git ls-files`.split($/)
18
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
19
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
20
- spec.require_paths = %w(lib)
21
-
22
- spec.required_ruby_version = '>= 1.9.3'
23
-
24
- spec.add_development_dependency 'bundler', '~> 1.3'
25
- spec.add_development_dependency 'rake'
26
-
27
- spec.add_development_dependency 'rspec', '~> 2.0'
28
- spec.add_development_dependency 'simplecov', '~> 0.7'
29
-
30
- spec.add_runtime_dependency 'watir-webdriver', '0.6.4'
31
- spec.add_runtime_dependency 'selenium-webdriver', '2.37.0'
32
- spec.add_runtime_dependency 'mechanize', '2.7.2'
33
- end