howitzer 0.0.3 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. data/.gitignore +8 -0
  2. data/.rspec +3 -0
  3. data/.travis.yml +4 -0
  4. data/CHANGELOG.md +32 -0
  5. data/GETTING_STARTED.md +529 -0
  6. data/Gemfile +4 -2
  7. data/LICENSE +2 -2
  8. data/README.md +57 -13
  9. data/Rakefile +9 -2
  10. data/bin/howitzer +79 -31
  11. data/generators/base_generator.rb +87 -0
  12. data/generators/config/config_generator.rb +16 -20
  13. data/generators/config/templates/default.yml +26 -7
  14. data/generators/cucumber/cucumber_generator.rb +20 -26
  15. data/generators/{tasks → cucumber}/templates/cucumber.rake +0 -0
  16. data/generators/{config → cucumber}/templates/cucumber.yml +0 -0
  17. data/generators/emails/emails_generator.rb +11 -18
  18. data/generators/emails/templates/example_email.rb +1 -0
  19. data/generators/pages/pages_generator.rb +16 -18
  20. data/generators/pages/templates/example_menu.rb +1 -0
  21. data/generators/pages/templates/example_page.rb +1 -1
  22. data/generators/root/root_generator.rb +18 -20
  23. data/generators/root/templates/.gitignore +2 -1
  24. data/generators/root/templates/Gemfile +3 -2
  25. data/generators/root/templates/Rakefile +10 -0
  26. data/generators/root/templates/boot.rb +3 -9
  27. data/generators/rspec/rspec_generator.rb +23 -0
  28. data/generators/rspec/templates/example_spec.rb +7 -0
  29. data/generators/rspec/templates/rspec.rake +34 -0
  30. data/generators/rspec/templates/spec_helper.rb +56 -0
  31. data/generators/tasks/tasks_generator.rb +11 -17
  32. data/generators/tasks/templates/common.rake +15 -0
  33. data/howitzer.gemspec +13 -2
  34. data/lib/howitzer.rb +1 -0
  35. data/lib/howitzer/helpers.rb +87 -2
  36. data/lib/howitzer/init.rb +0 -1
  37. data/lib/howitzer/patches/rawler_patched.rb +86 -0
  38. data/lib/howitzer/settings.rb +27 -0
  39. data/lib/howitzer/utils.rb +3 -12
  40. data/lib/howitzer/utils/capybara_patched.rb +3 -2
  41. data/lib/howitzer/utils/capybara_settings.rb +158 -24
  42. data/lib/howitzer/utils/data_generator/data_storage.rb +35 -1
  43. data/lib/howitzer/utils/data_generator/gen.rb +45 -3
  44. data/lib/howitzer/utils/email/email.rb +44 -5
  45. data/lib/howitzer/utils/email/mail_client.rb +28 -22
  46. data/lib/howitzer/utils/email/mailgun_helper.rb +30 -4
  47. data/lib/howitzer/utils/locator_store.rb +111 -19
  48. data/lib/howitzer/utils/log.rb +137 -0
  49. data/lib/howitzer/utils/page_validator.rb +86 -0
  50. data/lib/howitzer/vendor/firebug-1.12.1-fx.xpi +0 -0
  51. data/lib/howitzer/vendor/firepath-0.9.7-fx.xpi +0 -0
  52. data/lib/howitzer/version.rb +2 -2
  53. data/lib/howitzer/web_page.rb +159 -19
  54. data/spec/active_resource.rb +0 -0
  55. data/spec/config/custom.yml +1 -0
  56. data/spec/config/default.yml +28 -0
  57. data/spec/spec_helper.rb +46 -1
  58. data/spec/support/boot_helper.rb +15 -0
  59. data/spec/support/generator_helper.rb +13 -0
  60. data/spec/support/logger_helper.rb +12 -0
  61. data/spec/unit/bin/howitzer_spec.rb +175 -0
  62. data/spec/unit/generators/generators_spec.rb +175 -0
  63. data/spec/unit/lib/capybara_settings_spec.rb +170 -0
  64. data/spec/unit/lib/helpers_spec.rb +619 -0
  65. data/spec/unit/lib/init_spec.rb +14 -0
  66. data/spec/unit/lib/settings_spec.rb +17 -0
  67. data/spec/unit/lib/utils/data_generator/data_storage_spec.rb +62 -0
  68. data/spec/unit/lib/utils/data_generator/gen_spec.rb +151 -0
  69. data/spec/unit/lib/utils/email/email_spec.rb +75 -0
  70. data/spec/unit/lib/utils/email/mail_client_spec.rb +115 -0
  71. data/spec/unit/lib/utils/email/mailgun_helper_spec.rb +95 -0
  72. data/spec/unit/lib/utils/locator_store_spec.rb +122 -0
  73. data/spec/unit/lib/utils/log_spec.rb +107 -0
  74. data/spec/unit/lib/utils/page_validator_spec.rb +142 -0
  75. data/spec/unit/lib/web_page_spec.rb +250 -0
  76. data/spec/unit/version_spec.rb +8 -0
  77. metadata +215 -15
  78. data/Gemfile.lock +0 -103
  79. data/History.md +0 -20
  80. data/lib/howitzer/utils/logger.rb +0 -108
  81. data/spec/howitzer/version_spec.rb +0 -8
@@ -0,0 +1,8 @@
1
+ require "spec_helper"
2
+
3
+ describe Howitzer do
4
+ it { expect(subject.constants).to include(:VERSION) }
5
+ it 'should contains VERSION constant with correct format' do
6
+ expect(Howitzer::VERSION).to match(/^\d+\.\d+(\.\d+)?$/)
7
+ end
8
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: howitzer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 1.0.1
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: 2012-11-23 00:00:00.000000000 Z
12
+ date: 2013-10-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -28,7 +28,7 @@ dependencies:
28
28
  - !ruby/object:Gem::Version
29
29
  version: '0'
30
30
  - !ruby/object:Gem::Dependency
31
- name: rubigen
31
+ name: i18n
32
32
  requirement: !ruby/object:Gem::Requirement
33
33
  none: false
34
34
  requirements:
@@ -44,7 +44,7 @@ dependencies:
44
44
  - !ruby/object:Gem::Version
45
45
  version: '0'
46
46
  - !ruby/object:Gem::Dependency
47
- name: i18n
47
+ name: syntax
48
48
  requirement: !ruby/object:Gem::Requirement
49
49
  none: false
50
50
  requirements:
@@ -203,6 +203,150 @@ dependencies:
203
203
  - - ! '>='
204
204
  - !ruby/object:Gem::Version
205
205
  version: '0'
206
+ - !ruby/object:Gem::Dependency
207
+ name: rawler
208
+ requirement: !ruby/object:Gem::Requirement
209
+ none: false
210
+ requirements:
211
+ - - ! '>='
212
+ - !ruby/object:Gem::Version
213
+ version: '0'
214
+ type: :runtime
215
+ prerelease: false
216
+ version_requirements: !ruby/object:Gem::Requirement
217
+ none: false
218
+ requirements:
219
+ - - ! '>='
220
+ - !ruby/object:Gem::Version
221
+ version: '0'
222
+ - !ruby/object:Gem::Dependency
223
+ name: capybara
224
+ requirement: !ruby/object:Gem::Requirement
225
+ none: false
226
+ requirements:
227
+ - - ! '>='
228
+ - !ruby/object:Gem::Version
229
+ version: '0'
230
+ type: :runtime
231
+ prerelease: false
232
+ version_requirements: !ruby/object:Gem::Requirement
233
+ none: false
234
+ requirements:
235
+ - - ! '>='
236
+ - !ruby/object:Gem::Version
237
+ version: '0'
238
+ - !ruby/object:Gem::Dependency
239
+ name: selenium-webdriver
240
+ requirement: !ruby/object:Gem::Requirement
241
+ none: false
242
+ requirements:
243
+ - - ! '>='
244
+ - !ruby/object:Gem::Version
245
+ version: '0'
246
+ type: :runtime
247
+ prerelease: false
248
+ version_requirements: !ruby/object:Gem::Requirement
249
+ none: false
250
+ requirements:
251
+ - - ! '>='
252
+ - !ruby/object:Gem::Version
253
+ version: '0'
254
+ - !ruby/object:Gem::Dependency
255
+ name: activeresource
256
+ requirement: !ruby/object:Gem::Requirement
257
+ none: false
258
+ requirements:
259
+ - - ~>
260
+ - !ruby/object:Gem::Version
261
+ version: '4.0'
262
+ type: :runtime
263
+ prerelease: false
264
+ version_requirements: !ruby/object:Gem::Requirement
265
+ none: false
266
+ requirements:
267
+ - - ~>
268
+ - !ruby/object:Gem::Version
269
+ version: '4.0'
270
+ - !ruby/object:Gem::Dependency
271
+ name: testingbot
272
+ requirement: !ruby/object:Gem::Requirement
273
+ none: false
274
+ requirements:
275
+ - - ! '>='
276
+ - !ruby/object:Gem::Version
277
+ version: '0'
278
+ type: :runtime
279
+ prerelease: false
280
+ version_requirements: !ruby/object:Gem::Requirement
281
+ none: false
282
+ requirements:
283
+ - - ! '>='
284
+ - !ruby/object:Gem::Version
285
+ version: '0'
286
+ - !ruby/object:Gem::Dependency
287
+ name: rspec
288
+ requirement: !ruby/object:Gem::Requirement
289
+ none: false
290
+ requirements:
291
+ - - ! '>='
292
+ - !ruby/object:Gem::Version
293
+ version: 2.14.1
294
+ type: :development
295
+ prerelease: false
296
+ version_requirements: !ruby/object:Gem::Requirement
297
+ none: false
298
+ requirements:
299
+ - - ! '>='
300
+ - !ruby/object:Gem::Version
301
+ version: 2.14.1
302
+ - !ruby/object:Gem::Dependency
303
+ name: fuubar
304
+ requirement: !ruby/object:Gem::Requirement
305
+ none: false
306
+ requirements:
307
+ - - ! '>='
308
+ - !ruby/object:Gem::Version
309
+ version: 0.0.1
310
+ type: :development
311
+ prerelease: false
312
+ version_requirements: !ruby/object:Gem::Requirement
313
+ none: false
314
+ requirements:
315
+ - - ! '>='
316
+ - !ruby/object:Gem::Version
317
+ version: 0.0.1
318
+ - !ruby/object:Gem::Dependency
319
+ name: rake
320
+ requirement: !ruby/object:Gem::Requirement
321
+ none: false
322
+ requirements:
323
+ - - ! '>='
324
+ - !ruby/object:Gem::Version
325
+ version: '0'
326
+ type: :development
327
+ prerelease: false
328
+ version_requirements: !ruby/object:Gem::Requirement
329
+ none: false
330
+ requirements:
331
+ - - ! '>='
332
+ - !ruby/object:Gem::Version
333
+ version: '0'
334
+ - !ruby/object:Gem::Dependency
335
+ name: ffaker
336
+ requirement: !ruby/object:Gem::Requirement
337
+ none: false
338
+ requirements:
339
+ - - ! '>='
340
+ - !ruby/object:Gem::Version
341
+ version: '0'
342
+ type: :development
343
+ prerelease: false
344
+ version_requirements: !ruby/object:Gem::Requirement
345
+ none: false
346
+ requirements:
347
+ - - ! '>='
348
+ - !ruby/object:Gem::Version
349
+ version: '0'
206
350
  description: The framework is based on Page Object pattern, Capybara and Rspec/Cucumber
207
351
  libraries
208
352
  email:
@@ -212,19 +356,24 @@ executables:
212
356
  extensions: []
213
357
  extra_rdoc_files: []
214
358
  files:
359
+ - .gitignore
360
+ - .rspec
361
+ - .travis.yml
362
+ - CHANGELOG.md
363
+ - GETTING_STARTED.md
215
364
  - Gemfile
216
- - Gemfile.lock
217
- - History.md
218
365
  - LICENSE
219
366
  - README.md
220
367
  - Rakefile
221
368
  - bin/howitzer
369
+ - generators/base_generator.rb
222
370
  - generators/config/config_generator.rb
223
- - generators/config/templates/cucumber.yml
224
371
  - generators/config/templates/custom.yml
225
372
  - generators/config/templates/default.yml
226
373
  - generators/cucumber/cucumber_generator.rb
227
374
  - generators/cucumber/templates/common_steps.rb
375
+ - generators/cucumber/templates/cucumber.rake
376
+ - generators/cucumber/templates/cucumber.yml
228
377
  - generators/cucumber/templates/env.rb
229
378
  - generators/cucumber/templates/example.feature
230
379
  - generators/cucumber/templates/transformers.rb
@@ -238,12 +387,18 @@ files:
238
387
  - generators/root/templates/Gemfile
239
388
  - generators/root/templates/Rakefile
240
389
  - generators/root/templates/boot.rb
390
+ - generators/rspec/rspec_generator.rb
391
+ - generators/rspec/templates/example_spec.rb
392
+ - generators/rspec/templates/rspec.rake
393
+ - generators/rspec/templates/spec_helper.rb
241
394
  - generators/tasks/tasks_generator.rb
242
- - generators/tasks/templates/cucumber.rake
395
+ - generators/tasks/templates/common.rake
243
396
  - howitzer.gemspec
244
397
  - lib/howitzer.rb
245
398
  - lib/howitzer/helpers.rb
246
399
  - lib/howitzer/init.rb
400
+ - lib/howitzer/patches/rawler_patched.rb
401
+ - lib/howitzer/settings.rb
247
402
  - lib/howitzer/utils.rb
248
403
  - lib/howitzer/utils/capybara_patched.rb
249
404
  - lib/howitzer/utils/capybara_settings.rb
@@ -254,11 +409,35 @@ files:
254
409
  - lib/howitzer/utils/email/mailgun.rb
255
410
  - lib/howitzer/utils/email/mailgun_helper.rb
256
411
  - lib/howitzer/utils/locator_store.rb
257
- - lib/howitzer/utils/logger.rb
412
+ - lib/howitzer/utils/log.rb
413
+ - lib/howitzer/utils/page_validator.rb
414
+ - lib/howitzer/vendor/firebug-1.12.1-fx.xpi
415
+ - lib/howitzer/vendor/firepath-0.9.7-fx.xpi
258
416
  - lib/howitzer/version.rb
259
417
  - lib/howitzer/web_page.rb
260
- - spec/howitzer/version_spec.rb
418
+ - spec/active_resource.rb
419
+ - spec/config/custom.yml
420
+ - spec/config/default.yml
261
421
  - spec/spec_helper.rb
422
+ - spec/support/boot_helper.rb
423
+ - spec/support/generator_helper.rb
424
+ - spec/support/logger_helper.rb
425
+ - spec/unit/bin/howitzer_spec.rb
426
+ - spec/unit/generators/generators_spec.rb
427
+ - spec/unit/lib/capybara_settings_spec.rb
428
+ - spec/unit/lib/helpers_spec.rb
429
+ - spec/unit/lib/init_spec.rb
430
+ - spec/unit/lib/settings_spec.rb
431
+ - spec/unit/lib/utils/data_generator/data_storage_spec.rb
432
+ - spec/unit/lib/utils/data_generator/gen_spec.rb
433
+ - spec/unit/lib/utils/email/email_spec.rb
434
+ - spec/unit/lib/utils/email/mail_client_spec.rb
435
+ - spec/unit/lib/utils/email/mailgun_helper_spec.rb
436
+ - spec/unit/lib/utils/locator_store_spec.rb
437
+ - spec/unit/lib/utils/log_spec.rb
438
+ - spec/unit/lib/utils/page_validator_spec.rb
439
+ - spec/unit/lib/web_page_spec.rb
440
+ - spec/unit/version_spec.rb
262
441
  homepage: https://github.com/romikoops/howitzer
263
442
  licenses: []
264
443
  post_install_message:
@@ -268,9 +447,9 @@ require_paths:
268
447
  required_ruby_version: !ruby/object:Gem::Requirement
269
448
  none: false
270
449
  requirements:
271
- - - ~>
450
+ - - ! '>='
272
451
  - !ruby/object:Gem::Version
273
- version: 1.9.2
452
+ version: 1.9.3
274
453
  required_rubygems_version: !ruby/object:Gem::Requirement
275
454
  none: false
276
455
  requirements:
@@ -279,13 +458,34 @@ required_rubygems_version: !ruby/object:Gem::Requirement
279
458
  version: '0'
280
459
  segments:
281
460
  - 0
282
- hash: 3255020963715686887
461
+ hash: -3063400484312304844
283
462
  requirements: []
284
463
  rubyforge_project:
285
- rubygems_version: 1.8.24
464
+ rubygems_version: 1.8.25
286
465
  signing_key:
287
466
  specification_version: 3
288
467
  summary: Universal Ruby Test Framework for black box testing
289
468
  test_files:
290
- - spec/howitzer/version_spec.rb
469
+ - spec/active_resource.rb
470
+ - spec/config/custom.yml
471
+ - spec/config/default.yml
291
472
  - spec/spec_helper.rb
473
+ - spec/support/boot_helper.rb
474
+ - spec/support/generator_helper.rb
475
+ - spec/support/logger_helper.rb
476
+ - spec/unit/bin/howitzer_spec.rb
477
+ - spec/unit/generators/generators_spec.rb
478
+ - spec/unit/lib/capybara_settings_spec.rb
479
+ - spec/unit/lib/helpers_spec.rb
480
+ - spec/unit/lib/init_spec.rb
481
+ - spec/unit/lib/settings_spec.rb
482
+ - spec/unit/lib/utils/data_generator/data_storage_spec.rb
483
+ - spec/unit/lib/utils/data_generator/gen_spec.rb
484
+ - spec/unit/lib/utils/email/email_spec.rb
485
+ - spec/unit/lib/utils/email/mail_client_spec.rb
486
+ - spec/unit/lib/utils/email/mailgun_helper_spec.rb
487
+ - spec/unit/lib/utils/locator_store_spec.rb
488
+ - spec/unit/lib/utils/log_spec.rb
489
+ - spec/unit/lib/utils/page_validator_spec.rb
490
+ - spec/unit/lib/web_page_spec.rb
491
+ - spec/unit/version_spec.rb
data/Gemfile.lock DELETED
@@ -1,103 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- howitzer (0.0.3)
5
- cucumber
6
- i18n
7
- launchy
8
- log4r
9
- mail
10
- poltergeist
11
- rake
12
- repeater
13
- rest-client
14
- rspec (~> 2.0)
15
- rubigen
16
- sexy_settings
17
-
18
- GEM
19
- remote: https://rubygems.org/
20
- specs:
21
- activesupport (3.1.8)
22
- multi_json (>= 1.0, < 1.3)
23
- addressable (2.3.2)
24
- builder (3.1.3)
25
- capybara (1.1.3)
26
- mime-types (>= 1.16)
27
- nokogiri (>= 1.3.3)
28
- rack (>= 1.0.0)
29
- rack-test (>= 0.5.4)
30
- selenium-webdriver (~> 2.0)
31
- xpath (~> 0.1.4)
32
- childprocess (0.3.6)
33
- ffi (~> 1.0, >= 1.0.6)
34
- cucumber (1.2.1)
35
- builder (>= 2.1.2)
36
- diff-lcs (>= 1.1.3)
37
- gherkin (~> 2.11.0)
38
- json (>= 1.4.6)
39
- diff-lcs (1.1.3)
40
- eventmachine (1.0.0)
41
- faye-websocket (0.4.6)
42
- eventmachine (>= 0.12.0)
43
- ffi (1.2.0)
44
- gherkin (2.11.5)
45
- json (>= 1.4.6)
46
- http_parser.rb (0.5.3)
47
- i18n (0.6.1)
48
- json (1.7.5)
49
- launchy (2.1.2)
50
- addressable (~> 2.3)
51
- libwebsocket (0.1.6.1)
52
- websocket
53
- log4r (1.1.10)
54
- mail (2.5.2)
55
- i18n (>= 0.4.0)
56
- mime-types (~> 1.16)
57
- treetop (~> 1.4.8)
58
- mime-types (1.19)
59
- multi_json (1.2.0)
60
- nokogiri (1.5.5)
61
- poltergeist (1.0.2)
62
- capybara (~> 1.1)
63
- childprocess (~> 0.3)
64
- faye-websocket (~> 0.4, >= 0.4.4)
65
- http_parser.rb (~> 0.5.3)
66
- multi_json (~> 1.0)
67
- polyglot (0.3.3)
68
- rack (1.4.1)
69
- rack-test (0.6.2)
70
- rack (>= 1.0)
71
- rake (10.0.2)
72
- repeater (0.0.1)
73
- rest-client (1.6.7)
74
- mime-types (>= 1.16)
75
- rspec (2.12.0)
76
- rspec-core (~> 2.12.0)
77
- rspec-expectations (~> 2.12.0)
78
- rspec-mocks (~> 2.12.0)
79
- rspec-core (2.12.0)
80
- rspec-expectations (2.12.0)
81
- diff-lcs (~> 1.1.3)
82
- rspec-mocks (2.12.0)
83
- rubigen (1.5.8)
84
- activesupport (>= 2.3.5, < 3.2.0)
85
- rubyzip (0.9.9)
86
- selenium-webdriver (2.26.0)
87
- childprocess (>= 0.2.5)
88
- libwebsocket (~> 0.1.3)
89
- multi_json (~> 1.0)
90
- rubyzip
91
- sexy_settings (0.0.1)
92
- treetop (1.4.12)
93
- polyglot
94
- polyglot (>= 0.3.1)
95
- websocket (1.0.4)
96
- xpath (0.1.4)
97
- nokogiri (~> 1.3)
98
-
99
- PLATFORMS
100
- ruby
101
-
102
- DEPENDENCIES
103
- howitzer!
data/History.md DELETED
@@ -1,20 +0,0 @@
1
- ## In git
2
-
3
- ### New Features
4
-
5
- ### Bugfixes
6
-
7
-
8
- ## [v0.0.3](https://github.com/romikoops/howitzer/compare/v0.0.1...v0.0.3)
9
-
10
- ### New Features
11
-
12
- * Added supporting poltergeist driver
13
-
14
- ### Bugfixes
15
-
16
- * Fixed problem with dependencies
17
-
18
- ## [v0.0.1](https://github.com/romikoops/howitzer/tree/v0.0.1)
19
-
20
- Initial version