jarib-celerity 0.0.5.7 → 0.0.5.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -37,14 +37,21 @@ module Celerity
37
37
  #
38
38
  # @param [String, Regexp] value A value.
39
39
  # @raise [Celerity::Exception::NoValueFoundException] if the value does not exist.
40
+ # @return [String, nil] The option selected. If multiple options match, returns the first match
41
+ #
40
42
  #
41
43
 
42
44
  def select(value)
43
45
  assert_exists
44
46
  raise NoValueFoundException, "unknown option with value #{value.inspect} for select_list #{@conditions.inspect}" unless include?(value)
47
+
48
+ selected = nil
45
49
  @object.getOptions.select { |e| matches?(e.asText, value) }.each do |option|
50
+ selected ||= option.asText
46
51
  @container.update_page option.click
47
52
  end
53
+
54
+ selected
48
55
  end
49
56
  alias_method :set, :select
50
57
 
@@ -3,7 +3,7 @@ module Celerity #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 0
5
5
  TINY = 5
6
- PATCH = 7 # Set to nil for official release
6
+ PATCH = 8 # Set to nil for official release
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY, PATCH].compact.join('.')
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jarib-celerity
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5.7
4
+ version: 0.0.5.8
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-02-20 00:00:00 -08:00
14
+ date: 2009-02-24 00:00:00 -08:00
15
15
  default_executable:
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
@@ -80,7 +80,7 @@ files:
80
80
  - lib/celerity/htmlunit/cssparser-0.9.5.jar
81
81
  - lib/celerity/htmlunit/htmlunit-2.5-SNAPSHOT.jar
82
82
  - lib/celerity/htmlunit/htmlunit-core-js-2.4.jar
83
- - lib/celerity/htmlunit/nekohtml-1.9.11.jar
83
+ - lib/celerity/htmlunit/nekohtml-1.9.12-20090216.090710-7.jar
84
84
  - lib/celerity/htmlunit/sac-1.3.jar
85
85
  - lib/celerity/htmlunit/serializer-2.7.1.jar
86
86
  - lib/celerity/htmlunit/xalan-2.7.1.jar