ftw 0.0.20 → 0.0.21

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.
Files changed (3) hide show
  1. data/lib/ftw/agent.rb +9 -2
  2. data/lib/ftw/version.rb +1 -1
  3. metadata +24 -25
@@ -71,6 +71,12 @@ class FTW::Agent
71
71
  else
72
72
  # Use some better defaults from http://curl.haxx.se/docs/caextract.html
73
73
  @logger.info("Using upstream ssl certs, possibly untrusty.")
74
+ default_ca = File.join(File.dirname(__FILE__), "cacert.pem")
75
+
76
+ # JRUBY-6870 - strip 'jar:' prefix if it is present.
77
+ if default_ca =~ /^jar:file.*!/
78
+ default_ca.gsub!(/^jar:/, "")
79
+ end
74
80
  @certificate_store.add_file(File.join(File.dirname(__FILE__), "cacert.pem"))
75
81
  end
76
82
 
@@ -185,15 +191,16 @@ class FTW::Agent
185
191
  # The second does the execute for you and returns a FTW::Response.
186
192
  #
187
193
  # For a full list of these available methods, see STANDARD_METHODS.
194
+ #
188
195
  STANDARD_METHODS.each do |name|
189
196
  m = name.upcase
190
197
 
191
- # define 'get' etc method.
198
+ # 'def get' (put, post, etc)
192
199
  define_method(name.to_sym) do |uri, options={}|
193
200
  return request(m, uri, options)
194
201
  end
195
202
 
196
- # define 'get!' etc method.
203
+ # 'def get!' (put!, post!, etc)
197
204
  define_method("#{name}!".to_sym) do |uri, options={}|
198
205
  return execute(request(m, uri, options))
199
206
  end
@@ -3,5 +3,5 @@ require "ftw/namespace"
3
3
  # :nodoc:
4
4
  module FTW
5
5
  # The version of this library
6
- VERSION = "0.0.20"
6
+ VERSION = "0.0.21"
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ftw
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.20
4
+ version: 0.0.21
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-11 00:00:00.000000000 Z
12
+ date: 2012-10-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json
@@ -115,41 +115,41 @@ executables: []
115
115
  extensions: []
116
116
  extra_rdoc_files: []
117
117
  files:
118
- - lib/ftw.rb
119
118
  - lib/rack/handler/ftw.rb
119
+ - lib/ftw.rb
120
+ - lib/ftw/dns.rb
120
121
  - lib/ftw/cacert.pem
121
- - lib/ftw/crlf.rb
122
- - lib/ftw/singleton.rb
123
- - lib/ftw/dns/hash.rb
124
- - lib/ftw/dns/dns.rb
125
- - lib/ftw/poolable.rb
126
- - lib/ftw/protocol.rb
127
- - lib/ftw/namespace.rb
128
- - lib/ftw/cookies.rb
129
- - lib/ftw/agent.rb
130
- - lib/ftw/websocket/parser.rb
131
122
  - lib/ftw/websocket/rack.rb
132
- - lib/ftw/websocket/constants.rb
133
123
  - lib/ftw/websocket/writer.rb
124
+ - lib/ftw/websocket/parser.rb
125
+ - lib/ftw/websocket/constants.rb
126
+ - lib/ftw/poolable.rb
127
+ - lib/ftw/connection.rb
128
+ - lib/ftw/version.rb
129
+ - lib/ftw/agent.rb
130
+ - lib/ftw/pool.rb
131
+ - lib/ftw/server.rb
134
132
  - lib/ftw/websocket.rb
135
- - lib/ftw/http/headers.rb
136
133
  - lib/ftw/http/message.rb
137
- - lib/ftw/dns.rb
138
- - lib/ftw/server.rb
139
- - lib/ftw/version.rb
134
+ - lib/ftw/http/headers.rb
140
135
  - lib/ftw/agent/configuration.rb
141
136
  - lib/ftw/request.rb
137
+ - lib/ftw/protocol.rb
142
138
  - lib/ftw/response.rb
143
- - lib/ftw/pool.rb
139
+ - lib/ftw/namespace.rb
140
+ - lib/ftw/dns/dns.rb
141
+ - lib/ftw/dns/hash.rb
142
+ - lib/ftw/cookies.rb
143
+ - lib/ftw/singleton.rb
144
+ - lib/ftw/crlf.rb
144
145
  - lib/ftw/webserver.rb
145
- - lib/ftw/connection.rb
146
+ - test/testing.rb
146
147
  - test/docs.rb
147
- - test/all.rb
148
- - test/ftw/crlf.rb
149
- - test/ftw/singleton.rb
150
148
  - test/ftw/http/dns.rb
151
149
  - test/ftw/http/headers.rb
152
- - test/testing.rb
150
+ - test/ftw/singleton.rb
151
+ - test/ftw/crlf.rb
152
+ - test/all.rb
153
153
  - README.md
154
154
  homepage: http://github.com/jordansissel/ruby-ftw
155
155
  licenses:
@@ -179,4 +179,3 @@ specification_version: 3
179
179
  summary: For The Web. Trying to build a solid and sane API for client and server web
180
180
  stuff. Client and Server operations for HTTP, WebSockets, SPDY, etc.
181
181
  test_files: []
182
- has_rdoc: