whirlwind 0.1.6 → 0.1.7

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: 3cb9afa883d76c51362a05b78322c3968652993f
4
+ data.tar.gz: 75e9d448869b7c432cd1d135fde445175a1abba1
5
+ SHA512:
6
+ metadata.gz: 4bf6388f2fe82b6a8534f5ad495f2f80cd0c38953a973cf31d2216a25dec350def99b915bd6e9418ae0155b7516c0e73f2e6135d48cc7a8f13fefd3114df5685
7
+ data.tar.gz: d00b332f9d048ee9f9d8719863c3abf472134849c785f6b7f397d82610163559e22218f9f7308af24be4b89b3a0f7ac1da4a8354c5ca61ab9a8c44839060ebc3
data/bin/whirlwind CHANGED
@@ -28,7 +28,6 @@ def usage
28
28
  exit 1
29
29
  end
30
30
 
31
- raise StandardError unless RUBY_VERSION =~ /^1\.9\.\d$/
32
31
  usage unless ARGV.length > 0
33
32
  args = ARGV.dup
34
33
  begin
data/lib/rspec.rb CHANGED
@@ -1,17 +1,24 @@
1
1
  module RSpec
2
2
  module Core
3
3
  module DSL
4
+
5
+ def self.set_browser(browser)
6
+ @browser = browser
7
+ class <<
8
+ def self.browser
9
+ @browser
10
+ end
11
+ end
12
+ end
13
+
4
14
  module_eval do
5
15
  BASE = File.expand_path(File.dirname(__FILE__) + '/..')
6
16
  define_method('screen_shot') { |i='No Description Provided'|
7
- file = "#{BASE}/images/#{Token.provide}.jpg"
17
+ file = "#{BASE}/images/#{Token.provide}.png"
8
18
  FileUtils.mkdir File.dirname(file) unless File.directory?(File.dirname(file))
9
19
  @__cucumber_step_mother.add_image(:src => file, :label => i)
10
-
11
- if RUBY_PLATFORM =~ /win/i or RUBY_PLATFORM =~ /mingw/i
12
- Watir::Screen.shot.write(file)
13
- else
14
- Watir::Screen.shot.resize(800, 600).write(file)
20
+ File.open(file, 'w+') do |fd|
21
+ fd.write RSpec::Core::DSL.browser.driver.screenshot_as(:png)
15
22
  end
16
23
  }
17
24
  define_method('site_requires') {
data/lib/watir.rb CHANGED
@@ -84,18 +84,6 @@ module WatirElementExtention
84
84
  end
85
85
 
86
86
  module Watir
87
- module Screen
88
- def self.shot
89
- if RUBY_PLATFORM =~ /win/i or RUBY_PLATFORM =~ /mingw/i
90
- Win32::Screenshot::Take.of(:foreground)
91
- #width, height, bitmap = Win32::Screenshot.desktop
92
- #Magick::ImageList.new.from_blob(bitmap)
93
- else
94
- Magick::Image.capture(silent=true, frame=false, descent=false,
95
- screen=true, borders=false) { self.filename = 'root' }
96
- end
97
- end
98
- end
99
87
  class Element
100
88
  include WatirElementExtention
101
89
  end
data/lib/whirlwind.rb CHANGED
@@ -1,23 +1,16 @@
1
1
  require 'rubygems'
2
2
 
3
- #require 'ffi'
4
-
5
- if RUBY_PLATFORM =~ /win/i or RUBY_PLATFORM =~ /mingw/i
6
- require 'win32/screenshot'
7
- gem 'ffi', '1.0.9'
8
- else
9
- require 'RMagick'
10
- end
11
-
12
-
13
-
14
3
  gem 'cucumber', '1.1.2'
15
4
  require 'bundler/setup'
16
5
 
17
- require 'platform_helpers'
6
+ #require 'platform_helpers'
18
7
  require_relative 'cucumber'
19
8
  require 'watir-webdriver'
20
9
  require_relative 'watir'
10
+ require_relative 'token'
11
+ require_relative 'simple_def'
12
+ require_relative 'ruby_ext/string'
13
+ require_relative 'ruby_ext/array'
21
14
  require_relative 'rspec'
22
15
  require 'wait_for'
23
16
  require_relative 'cucumber/formatter/html_image'
@@ -27,7 +20,6 @@ require 'find'
27
20
 
28
21
  Before do |i|
29
22
  load_fixtures
30
-
31
23
  if $browser_type
32
24
  @browser = Watir::Browser.new $browser_type
33
25
  else
@@ -37,6 +29,7 @@ Before do |i|
37
29
  raise ArgumentError
38
30
  end
39
31
  end
32
+ RSpec::Core::DSL.set_browser @browser if @browser
40
33
  site_requires
41
34
  site_objects
42
35
  end
@@ -48,5 +41,5 @@ end
48
41
 
49
42
  class Whirlwind
50
43
  include RSpec::Core::DSL
51
- VERSION = '0.1.6'
44
+ VERSION = '0.1.7'
52
45
  end
@@ -1 +1 @@
1
- :browser: chrome
1
+ :browser: firefox
metadata CHANGED
@@ -1,115 +1,155 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: whirlwind
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
5
- prerelease:
4
+ version: 0.1.7
6
5
  platform: ruby
7
6
  authors:
8
7
  - Cliff Cyphers
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2011-11-16 00:00:00.000000000 Z
11
+ date: 2013-10-25 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: bundler
16
- requirement: &87292010 !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: '0'
22
20
  type: :runtime
23
21
  prerelease: false
24
- version_requirements: *87292010
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
25
27
  - !ruby/object:Gem::Dependency
26
28
  name: ffi
27
- requirement: &87291780 !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: 1.0.9
33
34
  type: :runtime
34
35
  prerelease: false
35
- version_requirements: *87291780
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '='
39
+ - !ruby/object:Gem::Version
40
+ version: 1.0.9
36
41
  - !ruby/object:Gem::Dependency
37
42
  name: sinatra
38
- requirement: &87291600 !ruby/object:Gem::Requirement
39
- none: false
43
+ requirement: !ruby/object:Gem::Requirement
40
44
  requirements:
41
- - - ! '>='
45
+ - - '>='
42
46
  - !ruby/object:Gem::Version
43
47
  version: '0'
44
48
  type: :runtime
45
49
  prerelease: false
46
- version_requirements: *87291600
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
47
55
  - !ruby/object:Gem::Dependency
48
56
  name: platform_helpers
49
- requirement: &87291370 !ruby/object:Gem::Requirement
50
- none: false
57
+ requirement: !ruby/object:Gem::Requirement
51
58
  requirements:
52
- - - =
59
+ - - '='
53
60
  - !ruby/object:Gem::Version
54
61
  version: 0.1.3
55
62
  type: :runtime
56
63
  prerelease: false
57
- version_requirements: *87291370
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '='
67
+ - !ruby/object:Gem::Version
68
+ version: 0.1.3
58
69
  - !ruby/object:Gem::Dependency
59
70
  name: cucumber
60
- requirement: &87291160 !ruby/object:Gem::Requirement
61
- none: false
71
+ requirement: !ruby/object:Gem::Requirement
62
72
  requirements:
63
- - - =
73
+ - - '='
64
74
  - !ruby/object:Gem::Version
65
75
  version: 1.1.2
66
76
  type: :runtime
67
77
  prerelease: false
68
- version_requirements: *87291160
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '='
81
+ - !ruby/object:Gem::Version
82
+ version: 1.1.2
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: rspec
71
- requirement: &87290950 !ruby/object:Gem::Requirement
72
- none: false
85
+ requirement: !ruby/object:Gem::Requirement
73
86
  requirements:
74
- - - =
87
+ - - '='
75
88
  - !ruby/object:Gem::Version
76
89
  version: 2.7.0
77
90
  type: :runtime
78
91
  prerelease: false
79
- version_requirements: *87290950
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - '='
95
+ - !ruby/object:Gem::Version
96
+ version: 2.7.0
80
97
  - !ruby/object:Gem::Dependency
81
98
  name: watir-webdriver
82
- requirement: &87290740 !ruby/object:Gem::Requirement
83
- none: false
99
+ requirement: !ruby/object:Gem::Requirement
84
100
  requirements:
85
- - - =
101
+ - - '='
86
102
  - !ruby/object:Gem::Version
87
103
  version: 0.3.5
88
104
  type: :runtime
89
105
  prerelease: false
90
- version_requirements: *87290740
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - '='
109
+ - !ruby/object:Gem::Version
110
+ version: 0.3.5
91
111
  - !ruby/object:Gem::Dependency
92
112
  name: wait_for
93
- requirement: &87290530 !ruby/object:Gem::Requirement
94
- none: false
113
+ requirement: !ruby/object:Gem::Requirement
95
114
  requirements:
96
- - - =
115
+ - - '='
97
116
  - !ruby/object:Gem::Version
98
117
  version: 0.1.1
99
118
  type: :runtime
100
119
  prerelease: false
101
- version_requirements: *87290530
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - '='
123
+ - !ruby/object:Gem::Version
124
+ version: 0.1.1
125
+ - !ruby/object:Gem::Dependency
126
+ name: rdoc
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ~>
130
+ - !ruby/object:Gem::Version
131
+ version: '4.0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ~>
137
+ - !ruby/object:Gem::Version
138
+ version: '4.0'
102
139
  - !ruby/object:Gem::Dependency
103
140
  name: hoe
104
- requirement: &87290320 !ruby/object:Gem::Requirement
105
- none: false
141
+ requirement: !ruby/object:Gem::Requirement
106
142
  requirements:
107
143
  - - ~>
108
144
  - !ruby/object:Gem::Version
109
- version: '2.12'
145
+ version: '3.7'
110
146
  type: :development
111
147
  prerelease: false
112
- version_requirements: *87290320
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ~>
151
+ - !ruby/object:Gem::Version
152
+ version: '3.7'
113
153
  description: ''
114
154
  email:
115
155
  - cliff.cyphers@gmail.com
@@ -206,7 +246,9 @@ files:
206
246
  - sites/google/flows/search_results_flows.rb
207
247
  - .gemtest
208
248
  homepage: http://github.com/ccyphers/whirlwind
209
- licenses: []
249
+ licenses:
250
+ - MIT
251
+ metadata: {}
210
252
  post_install_message:
211
253
  rdoc_options:
212
254
  - --main
@@ -214,22 +256,20 @@ rdoc_options:
214
256
  require_paths:
215
257
  - lib
216
258
  required_ruby_version: !ruby/object:Gem::Requirement
217
- none: false
218
259
  requirements:
219
- - - ! '>='
260
+ - - '>='
220
261
  - !ruby/object:Gem::Version
221
262
  version: '0'
222
263
  required_rubygems_version: !ruby/object:Gem::Requirement
223
- none: false
224
264
  requirements:
225
- - - ! '>='
265
+ - - '>='
226
266
  - !ruby/object:Gem::Version
227
267
  version: '0'
228
268
  requirements: []
229
269
  rubyforge_project: whirlwind
230
- rubygems_version: 1.8.11
270
+ rubygems_version: 2.1.10
231
271
  signing_key:
232
- specification_version: 3
272
+ specification_version: 4
233
273
  summary: ''
234
274
  test_files:
235
275
  - test/test_whirlwind.rb