Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
...
  • 3 commits
  • 4 files changed
  • 0 commit comments
  • 1 contributor
Commits on Sep 09, 2012
@antifuchs Fix test suite for newest clucumber. a3facbb
@antifuchs Use the correct hunchentoot:request-method accessor
Closes #1. Thanks to @Levenson for spotting this.
4678ba3
@antifuchs Fix missing closing tag on lazy-encoders.feature
It didn't break anything, but definitely doesn't look good.
3b5b265
Showing with 21 additions and 21 deletions.
  1. +7 −7 features/lazy_encoders.feature
  2. +2 −0 features/step_definitions/clucumber.wire
  3. +9 −10 features/support/env.rb
  4. +3 −4 server.lisp
View
14 features/lazy_encoders.feature
@@ -1,15 +1,15 @@
Feature: Lazy XML-RPC encoders
- As a client of a shoddy xml-rpc encoder,
- I want to be able to read their requests and responses correctly,
+ As a client of a shoddy xml-rpc encoder,
+ I want to be able to read their requests and responses correctly,
so that I can communicate with them.
Scenario: Implicit <string> types in <values>
Given the following method response:
"""
-<methodResponse><params><param><value>987lkjasd</value></param></params>
+<methodResponse><params><param><value>987lkjasd</value></param></params></methodResponse>
"""
When I decode the method response
Then the first value should be "987lkjasd"
@@ -21,10 +21,10 @@ Scenario: Implicit <string> types in <values> starting with whitespace
"""
<methodResponse><params><param><value>
987lkjasd
-</value></param></params>
+</value></param></params></methodResponse>
"""
When I decode the method response
- Then the first value should be:
+ Then the first value should be:
"""
987lkjasd
@@ -36,7 +36,7 @@ Scenario: Implicit <string> type starting with an XML entity
Given the following method response:
"""
-<methodResponse><params><param><value>&#32;987lkjasd</value></param></params>
+<methodResponse><params><param><value>&#32;987lkjasd</value></param></params></methodResponse>
"""
When I decode the method response
Then the first value should be " 987lkjasd"
@@ -48,7 +48,7 @@ Scenario: Indented, explicit type tags
"""
<methodResponse><params><param><value>
<string>987lkjasd</string>
-</value></param></params>
+</value></param></params></methodResponse>
"""
When I decode the method response
Then the first value should be "987lkjasd"
View
2 features/step_definitions/clucumber.wire
@@ -0,0 +1,2 @@
+host: 127.0.0.1
+port: <%= ENV["CLUCUMBER_PORT"] || 42427 %>
View
19 features/support/env.rb
@@ -1,24 +1,23 @@
require 'cucumber'
-require 'spec'
+#require 'spec'
require 'xmlrpc/client'
require 'xmlrpc/server'
-require 'clucumber'
-
-# Constants:
-PORT = 11317
-BEANSTALK_CONNSPEC = "localhost:#{PORT}"
# Programs we need:
require 'clucumber'
begin
- ClucumberSubprocess.launch(File.expand_path("../", File.dirname(__FILE__)),
- :port => 42428).listen <<-LISP
- (push #p"#{File.expand_path("../../", File.dirname(__FILE__))}/" asdf:*central-registry*)
+ puts "Launching..."
+ (@main_clucumber = ClucumberSubprocess.launch(File.expand_path("../", File.dirname(__FILE__)))).listen <<-LISP
+ (load #p"#{File.expand_path("../../cl-stripe.asd", File.dirname(__FILE__))}")
+ (ql:quickload :cl-stripe)
LISP
-rescue PTY::ChildExited
+ STDERR.puts(@main_clucumber.output)
+rescue PTY::ChildExited => e
+ STDERR.puts "Failure: #{@main_clucumber.inspect}: #{e.inspect}!"
STDERR.puts(@main_clucumber && @main_clucumber.output)
+ exit 1
end
After do
View
7 server.lisp
@@ -11,13 +11,13 @@
(defun cxml-rpc-method-handler (tag)
(labels
((dispatch ()
- (unless (eql (hunchentoot:request-method) :post)
+ (unless (eql (hunchentoot:request-method*) :post)
(error "Method must be POST"))
(let ((stream (hunchentoot:raw-post-data :force-binary t))
(*current-tag* tag))
(multiple-value-bind (method-name param-types params)
(decode-method-call stream)
- (setf (hunchentoot:content-type) "text/xml")
+ (setf (hunchentoot:content-type) "text/xml")
(invoke-method method-name param-types params)))))
#'dispatch))
@@ -195,7 +195,7 @@ xml-rpc implementation supports."
:dwim-array))
(defun system-method-signature (method-name)
- "Returns an array of method signatures (arrays of strings listing first the
+ "Returns an array of method signatures (arrays of strings listing first the
return type, then the argument types)."
;; TODO: user-def methods.
(values
@@ -209,4 +209,3 @@ return type, then the argument types)."
'function)
"undef")
:string))
-

No commit comments for this range

Something went wrong with that request. Please try again.