iCuke 0.4.6 → 0.4.7

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.6
1
+ 0.4.7
data/iCuke.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{iCuke}
8
- s.version = "0.4.6"
8
+ s.version = "0.4.7"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Rob Holland"]
12
- s.date = %q{2010-04-21}
12
+ s.date = %q{2010-04-22}
13
13
  s.description = %q{Cucumber support for iPhone applications}
14
14
  s.email = %q{rob@the-it-refinery.co.uk}
15
15
  s.extensions = ["ext/iCuke/Rakefile"]
@@ -82,6 +82,7 @@ Gem::Specification.new do |s|
82
82
  "features/support/env.rb",
83
83
  "iCuke.gemspec",
84
84
  "lib/icuke.rb",
85
+ "lib/icuke/core_ext.rb",
85
86
  "lib/icuke/cucumber.rb",
86
87
  "lib/icuke/simulate.rb",
87
88
  "lib/icuke/simulator.rb"
@@ -0,0 +1,26 @@
1
+ require 'net/http'
2
+
3
+ module RequestWithSocketCheck
4
+ def self.included(base)
5
+ base.instance_eval do
6
+ alias_method :request_without_socket_check, :request
7
+ alias_method :request, :request_with_socket_check
8
+ end
9
+ end
10
+
11
+ def request_with_socket_check(*args)
12
+ begin
13
+ request_without_socket_check(*args)
14
+ rescue NoMethodError => e
15
+ if e.message =~ /undefined method `closed\?' for nil/
16
+ raise Errno::ECONNREFUSED
17
+ else
18
+ raise e
19
+ end
20
+ end
21
+ end
22
+ end
23
+
24
+ if Net::HTTP::Revision.to_i == 25851
25
+ Net::HTTP.send :include, RequestWithSocketCheck
26
+ end
@@ -1,3 +1,5 @@
1
+ require 'icuke/core_ext'
2
+
1
3
  require 'httparty'
2
4
  require 'appscript'
3
5
  require 'timeout'
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 4
8
- - 6
9
- version: 0.4.6
8
+ - 7
9
+ version: 0.4.7
10
10
  platform: ruby
11
11
  authors:
12
12
  - Rob Holland
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-04-21 00:00:00 +01:00
17
+ date: 2010-04-22 00:00:00 +01:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -139,6 +139,7 @@ files:
139
139
  - features/support/env.rb
140
140
  - iCuke.gemspec
141
141
  - lib/icuke.rb
142
+ - lib/icuke/core_ext.rb
142
143
  - lib/icuke/cucumber.rb
143
144
  - lib/icuke/simulate.rb
144
145
  - lib/icuke/simulator.rb