celerity 0.7.5 → 0.7.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,5 @@
1
1
  ---
2
- :minor: 7
3
- :patch: 5
2
+ :patch: 6
4
3
  :major: 0
4
+ :build:
5
+ :minor: 7
@@ -1,15 +1,15 @@
1
1
  # Generated by jeweler
2
- # DO NOT EDIT THIS FILE
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{celerity}
8
- s.version = "0.7.5"
8
+ s.version = "0.7.6"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jari Bakken", "T. Alexander Lystad", "Knut Johannes Dahle"]
12
- s.date = %q{2009-10-27}
12
+ s.date = %q{2009-12-05}
13
13
  s.description = %q{Celerity is a JRuby wrapper around HtmlUnit – a headless Java browser with JavaScript support. It provides a simple API for programmatic navigation through web applications. Celerity provides a superset of Watir's API.}
14
14
  s.email = %q{jari.bakken@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -61,7 +61,7 @@ Gem::Specification.new do |s|
61
61
  "lib/celerity/htmlunit/cssparser-0.9.5.jar",
62
62
  "lib/celerity/htmlunit/htmlunit-2.7-SNAPSHOT.jar",
63
63
  "lib/celerity/htmlunit/htmlunit-core-js-2.7-SNAPSHOT.jar",
64
- "lib/celerity/htmlunit/nekohtml-1.9.13.jar",
64
+ "lib/celerity/htmlunit/nekohtml-1.9.14-20091130.152932-3.jar",
65
65
  "lib/celerity/htmlunit/sac-1.3.jar",
66
66
  "lib/celerity/htmlunit/serializer-2.7.1.jar",
67
67
  "lib/celerity/htmlunit/xalan-2.7.1.jar",
@@ -117,3 +117,4 @@ Gem::Specification.new do |s|
117
117
  s.add_dependency(%q<sinatra>, [">= 0.9.4"])
118
118
  end
119
119
  end
120
+
@@ -118,6 +118,7 @@ module Celerity
118
118
  def cell(*args)
119
119
  TableCell.new(self, *args)
120
120
  end
121
+ alias_method :td, :cell
121
122
 
122
123
  #
123
124
  # @return [Celerity::TableCells]
@@ -126,6 +127,7 @@ module Celerity
126
127
  def cells
127
128
  TableCells.new(self)
128
129
  end
130
+ alias_method :tds, :cells
129
131
 
130
132
  #
131
133
  # Since finding checkboxes by value is very common, you can use this shorthand:
@@ -52,6 +52,11 @@ module Celerity
52
52
  @object = nil
53
53
  end
54
54
 
55
+ def ==(other)
56
+ return false unless other.kind_of? Element
57
+ xpath == other.xpath
58
+ end
59
+
55
60
  #
56
61
  # Get the parent element
57
62
  # @return [Celerity::Element, nil] subclass of Celerity::Element, or nil if no parent was found
@@ -100,7 +100,7 @@ module Celerity
100
100
  private
101
101
 
102
102
  def iterator_object(i)
103
- element_class.new(@container, :index, i+1)
103
+ element_class.new(@container, :index, i + Celerity.index_offset)
104
104
  end
105
105
 
106
106
  end # ElementCollection
@@ -142,11 +142,11 @@ module Celerity
142
142
  end
143
143
 
144
144
  def column_values(column_number)
145
- (1..row_count).map { |index| self[index][column_number].text }
145
+ (0..row_count-1).map { |index| self[index + Celerity.index_offset][column_number].text }
146
146
  end
147
147
 
148
148
  def row_values(row_number)
149
- (1..column_count(row_number)).map { |index| self[row_number][index].text }
149
+ (0..column_count(row_number)-1).map { |index| self[row_number][index + Celerity.index_offset].text }
150
150
  end
151
151
 
152
152
  end # Table
@@ -9,6 +9,7 @@ module Celerity
9
9
  def locate
10
10
  super
11
11
  @cells = @object.getCells if @object
12
+ @object
12
13
  end
13
14
 
14
15
  #
@@ -45,4 +46,4 @@ module Celerity
45
46
  end
46
47
 
47
48
  end # TableRow
48
- end # Celerity
49
+ end # Celerity
@@ -1,14 +1,14 @@
1
1
  require 'spec/rake/spectask'
2
2
  Spec::Rake::SpecTask.new(:spec) do |spec|
3
3
  spec.libs << 'lib' << 'spec'
4
- spec.spec_files = FileList['spec/**/*_spec.rb']
4
+ spec.pattern = 'spec/**/*_spec.rb'
5
5
  end
6
6
 
7
7
  Spec::Rake::SpecTask.new(:rcov) do |spec|
8
8
  spec.libs << 'lib' << 'spec'
9
9
  spec.pattern = 'spec/**/*_spec.rb'
10
10
  spec.rcov = true
11
- spec.rcov_opts = %w[--exclude spec,fcntl,path_helper,yaml --no-rcovrt]
11
+ spec.rcov_opts = %w[--exclude spec,fcntl,path_helper,yaml,rack,jruby --include lib/celerity --no-rcovrt]
12
12
  end
13
13
 
14
14
  if File.exist?(path = "spec/watirspec/watirspec.rake")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: celerity
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.5
4
+ version: 0.7.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jari Bakken
@@ -11,7 +11,7 @@ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
13
 
14
- date: 2009-10-27 00:00:00 +01:00
14
+ date: 2009-12-05 00:00:00 +01:00
15
15
  default_executable:
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
@@ -98,7 +98,7 @@ files:
98
98
  - lib/celerity/htmlunit/cssparser-0.9.5.jar
99
99
  - lib/celerity/htmlunit/htmlunit-2.7-SNAPSHOT.jar
100
100
  - lib/celerity/htmlunit/htmlunit-core-js-2.7-SNAPSHOT.jar
101
- - lib/celerity/htmlunit/nekohtml-1.9.13.jar
101
+ - lib/celerity/htmlunit/nekohtml-1.9.14-20091130.152932-3.jar
102
102
  - lib/celerity/htmlunit/sac-1.3.jar
103
103
  - lib/celerity/htmlunit/serializer-2.7.1.jar
104
104
  - lib/celerity/htmlunit/xalan-2.7.1.jar