lackie 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -24,4 +24,11 @@ Feature: Remote Control
24
24
  Scenario: Remote Log
25
25
  Given I have surrendered my web page as a lackie
26
26
  When I tell the lackie to log "yipee"
27
- Then I should see a result with the value "yipee"
27
+ Then I should see a result with the value "yipee"
28
+
29
+ Scenario: Send Command Without Expecting A Result
30
+ Given I have surrendered my web page as a lackie
31
+ When I tell the lackie to send the command "window.foo = '123'"
32
+ Then I should see a result with the value "OK"
33
+ When I tell the lackie to execute "window.foo = 99"
34
+ Then I should see a result with the value "99"
@@ -14,10 +14,14 @@ When /^I tell the lackie to execute "([^\"]*)"$/ do |script|
14
14
  end
15
15
  end
16
16
 
17
+ When /^I tell the lackie to send the command "([^"]*)"$/ do |script|
18
+ @response = remote_control.send_command(script)
19
+ end
20
+
17
21
  Then /^I should see a result with the value "([^\"]*)"$/ do |value|
18
22
  @response.to_s.should == value
19
23
  end
20
24
 
21
25
  Then /^I should see an error with the message "([^\"]*)"$/ do |message|
22
26
  @error.message.should == message
23
- end
27
+ end
data/lib/lackie.rb CHANGED
@@ -2,7 +2,7 @@ lib = File.dirname(__FILE__)
2
2
  $:.unshift(lib) unless $:.include?(lib) || $:.include?(File.expand_path(lib))
3
3
 
4
4
  module Lackie
5
- VERSION = '0.1.3'
5
+ VERSION = '0.1.4'
6
6
  end
7
7
 
8
8
  require 'lackie/remote_control'
@@ -17,8 +17,6 @@ module Lackie
17
17
  poll_for_result(command, options)
18
18
  end
19
19
 
20
- private
21
-
22
20
  def send_command(command)
23
21
  url = "http://#{@host}:#{@port}/lackie/eval"
24
22
  begin
@@ -28,6 +26,8 @@ module Lackie
28
26
  end
29
27
  end
30
28
 
29
+ private
30
+
31
31
  def poll_for_result(command, options={})
32
32
  body = nil
33
33
  @poller.await("result of command:\n#{command}", options) do
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lackie
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
5
- prerelease:
4
+ hash: 19
5
+ prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 3
10
- version: 0.1.3
9
+ - 4
10
+ version: 0.1.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Josh Chisholm
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-01-12 00:00:00 +00:00
18
+ date: 2011-01-17 00:00:00 +00:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -194,10 +194,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
194
194
  requirements: []
195
195
 
196
196
  rubyforge_project:
197
- rubygems_version: 1.4.1
197
+ rubygems_version: 1.3.7
198
198
  signing_key:
199
199
  specification_version: 3
200
- summary: lackie-0.1.3
200
+ summary: lackie-0.1.4
201
201
  test_files:
202
202
  - features/remote_control.feature
203
203
  - features/step_definitions/lackie_steps.rb