akephalos2 2.0.7-java → 2.0.8-java

Sign up to get free protection for your applications and to get access to all the features.
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
@@ -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
@@ -13,7 +13,3 @@ end
13
13
  require 'akephalos/client'
14
14
  require 'capybara'
15
15
  require 'akephalos/capybara'
16
-
17
- Capybara.register_driver :akephalos do |app|
18
- Capybara::Driver::Akephalos.new(app)
19
- end
@@ -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
- 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
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
@@ -1,3 +1,3 @@
1
1
  module Akephalos #:nodoc
2
- VERSION = "2.0.7"
2
+ VERSION = "2.0.8"
3
3
  end
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.7
4
+ version: 2.0.8
5
5
  prerelease:
6
6
  platform: java
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-10-17 00:00:00.000000000 Z
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: &70230659428980 !ruby/object:Gem::Requirement
16
+ requirement: &70188565394360 !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: *70230659428980
24
+ version_requirements: *70188565394360
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rake
27
- requirement: &70230659426900 !ruby/object:Gem::Requirement
27
+ requirement: &70188565392040 !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: *70230659426900
35
+ version_requirements: *70188565392040
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: sinatra
38
- requirement: &70230659440860 !ruby/object:Gem::Requirement
38
+ requirement: &70188565390720 !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: :development
45
45
  prerelease: false
46
- version_requirements: *70230659440860
46
+ version_requirements: *70188565390720
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rspec
49
- requirement: &70230659437760 !ruby/object:Gem::Requirement
49
+ requirement: &70188565402660 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,7 +54,7 @@ dependencies:
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70230659437760
57
+ version_requirements: *70188565402660
58
58
  description: Headless Browser for Integration Testing with Capybara
59
59
  email: bj.schaefer@gmail.com
60
60
  executables:
@@ -99,7 +99,7 @@ files:
99
99
  - README.md
100
100
  - MIT_LICENSE
101
101
  - bin/akephalos
102
- homepage: https://github.com/Nerian/akephalos
102
+ homepage: https://github.com/Nerian/akephalos2
103
103
  licenses: []
104
104
  post_install_message:
105
105
  rdoc_options: []