fletcherm-culerity 0.2.8 → 0.2.9

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.2.9
2
+ * fixed memory leaks within the java process by clearing proxies (dewind)
3
+ * fixed syntax error when sending multiline lambdas (endor, langalex)
4
+
1
5
  ## 0.2.8
2
6
 
3
7
  * removed separate development and continuous integration environments and replaced them with a single one (thilo)
data/VERSION.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  ---
2
- :build:
3
- :patch: 8
4
2
  :major: 0
3
+ :build:
5
4
  :minor: 2
5
+ :patch: 9
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{fletcherm-culerity}
8
- s.version = "0.2.8"
8
+ s.version = "0.2.9"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Alexander Lang", "Matt Fletcher"]
12
- s.date = %q{2010-02-17}
12
+ s.date = %q{2010-02-19}
13
13
  s.description = %q{Culerity integrates Cucumber and Celerity in order to test your application's full stack.}
14
14
  s.email = %q{fletcher@atomicobject.com}
15
15
  s.extra_rdoc_files = [
@@ -64,7 +64,7 @@ module Culerity
64
64
  def proxify(result)
65
65
  if result.is_a?(Array)
66
66
  "[" + result.map {|x| proxify(x) }.join(", ") + "]"
67
- elsif [String, TrueClass, FalseClass, Fixnum, Float, NilClass].include?(result.class)
67
+ elsif [Symbol, String, TrueClass, FalseClass, Fixnum, Float, NilClass].include?(result.class)
68
68
  result.inspect
69
69
  else
70
70
  @proxies[result.object_id] = result
@@ -63,10 +63,10 @@ module Culerity
63
63
  #
64
64
  def block_to_string &block
65
65
  result = block.call.to_s
66
- unless result.is_a?(String) && result[/^lambda \s* \{ .*? \}/x]
66
+ unless result.is_a?(String) && result[/^lambda \s* \{ .*? \}/xm]
67
67
  result = "lambda { #{result} }"
68
68
  end
69
- result
69
+ result.gsub("\n", ";")
70
70
  end
71
71
 
72
72
  def arg_to_string(arg)
@@ -79,7 +79,16 @@ describe Culerity::CelerityServer do
79
79
  Culerity::CelerityServer.new(_in, _out)
80
80
  end
81
81
 
82
- it "should send back a proxy if the return value is not a string, number, nil or boolean" do
82
+ it "should send back a symbol" do
83
+ @browser.stub!(:goto).and_return(:ok)
84
+ _in = stub 'in'
85
+ _in.stub!(:gets).and_return("[[\"browser0\", \"goto\"]]\n", "[\"_exit_\"]\n")
86
+ _out = stub 'out'
87
+ _out.should_receive(:<<).with("[:return, :ok]\n")
88
+ Culerity::CelerityServer.new(_in, _out)
89
+ end
90
+
91
+ it "should send back a proxy if the return value is not a string, number, nil, symbol or boolean" do
83
92
  @browser.stub!(:goto).and_return(stub('123', :object_id => 456))
84
93
  _in = stub 'in'
85
94
  _in.stub!(:gets).and_return("[[\"browser0\", \"goto\", \"/homepage\"]]\n", "[\"_exit_\"]\n")
@@ -8,6 +8,12 @@ describe Culerity::RemoteObjectProxy do
8
8
  proxy.send(:block_to_string, &block).should == "lambda { true}"
9
9
  end
10
10
 
11
+ it "should replace newlines in lambda string with semicolons so that the server can parse it as one command" do
12
+ proxy = Culerity::RemoteObjectProxy.new nil, nil
13
+ block = lambda { "lambda { \ntrue\n}" }
14
+ proxy.send(:block_to_string, &block).should == "lambda { ;true;}"
15
+ end
16
+
11
17
  it "should return lambda string when block result isn't a lambda string" do
12
18
  proxy = Culerity::RemoteObjectProxy.new nil, nil
13
19
  [true, false, "blah", 5].each do |var|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fletcherm-culerity
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.8
4
+ version: 0.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Lang
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2010-02-17 00:00:00 -05:00
13
+ date: 2010-02-19 00:00:00 -05:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency