akephalos2 2.0.7 → 2.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +9 -0
- data/bin/akephalos +1 -1
- data/lib/akephalos.rb +0 -4
- data/lib/akephalos/page.rb +8 -8
- data/lib/akephalos/version.rb +1 -1
- metadata +13 -13
data/README.md
CHANGED
@@ -81,6 +81,8 @@ RSpec, Cucumber, and Test::Unit.
|
|
81
81
|
Here's some sample RSpec code:
|
82
82
|
|
83
83
|
``` ruby
|
84
|
+
# encoding: utf-8
|
85
|
+
|
84
86
|
describe "Home Page" do
|
85
87
|
before { visit "/" }
|
86
88
|
|
@@ -99,6 +101,13 @@ describe "Home Page" do
|
|
99
101
|
end
|
100
102
|
```
|
101
103
|
|
104
|
+
### Encoding
|
105
|
+
|
106
|
+
Akephalos uses UTF-8 encoding by default. You may need to add `# encoding: utf-8` at the first line of your test. This behavior is the default using JRuby in 1.9 mode, but you can use JRuby in 1.8 mode by setting the environment variable `ENV['JRUBY_1_8']=true`. Note that Akephalos works with MRI. I refer here to the JRuby that is used internally by Akephalos.
|
107
|
+
|
108
|
+
|
109
|
+
### Frames
|
110
|
+
|
102
111
|
Capybara allows you to perform your action on a context, for example inside a div or a frame. With Akephalos you can select the frame either by id or by index.
|
103
112
|
|
104
113
|
``` html
|
data/bin/akephalos
CHANGED
@@ -96,7 +96,7 @@ else
|
|
96
96
|
# since the akephalos server doesn't have any gem dependencies and is
|
97
97
|
# always executed with the same context, we clear RUBYOPT before running
|
98
98
|
# exec.
|
99
|
-
ENV["RUBYOPT"] = "--1.9"
|
99
|
+
ENV["RUBYOPT"] = "--1.9" unless ENV['JRUBY_1_8']
|
100
100
|
exec("java", *(java_args + ruby_args))
|
101
101
|
end
|
102
102
|
end
|
data/lib/akephalos.rb
CHANGED
data/lib/akephalos/page.rb
CHANGED
@@ -103,14 +103,14 @@ module Akephalos
|
|
103
103
|
# @return [HtmlUnit::HtmlPage] the specified frame
|
104
104
|
# @return [nil] if no frame is found
|
105
105
|
def find_frame(id_or_index)
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
106
|
+
if id_or_index.is_a? Fixnum
|
107
|
+
frame = @_page.getFrames.get(id_or_index) rescue nil
|
108
|
+
else
|
109
|
+
frame = @_page.getFrames.find do |frame|
|
110
|
+
frame.getFrameElement.getAttribute("id") == id_or_index
|
111
|
+
end
|
112
|
+
end
|
113
|
+
frame.getEnclosedPage if frame
|
114
114
|
end
|
115
115
|
|
116
116
|
end
|
data/lib/akephalos/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: akephalos2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.8
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-10-
|
12
|
+
date: 2011-10-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: capybara
|
16
|
-
requirement: &
|
16
|
+
requirement: &70282849154720 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70282849154720
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rake
|
27
|
-
requirement: &
|
27
|
+
requirement: &70282849153780 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70282849153780
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: jruby-jars
|
38
|
-
requirement: &
|
38
|
+
requirement: &70282849151300 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70282849151300
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: sinatra
|
49
|
-
requirement: &
|
49
|
+
requirement: &70282849165320 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70282849165320
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: rspec
|
60
|
-
requirement: &
|
60
|
+
requirement: &70282849162080 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,7 +65,7 @@ dependencies:
|
|
65
65
|
version: '0'
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70282849162080
|
69
69
|
description: Headless Browser for Integration Testing with Capybara
|
70
70
|
email: bj.schaefer@gmail.com
|
71
71
|
executables:
|
@@ -110,7 +110,7 @@ files:
|
|
110
110
|
- README.md
|
111
111
|
- MIT_LICENSE
|
112
112
|
- bin/akephalos
|
113
|
-
homepage: https://github.com/Nerian/
|
113
|
+
homepage: https://github.com/Nerian/akephalos2
|
114
114
|
licenses: []
|
115
115
|
post_install_message:
|
116
116
|
rdoc_options: []
|