streamly_ffi 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- streamly_ffi (0.2.2)
4
+ streamly_ffi (0.2.4)
5
5
  curl_ffi
6
6
 
7
7
  GEM
@@ -1,10 +1,10 @@
1
1
  module StreamlyFFI
2
2
  class Connection
3
3
 
4
- attr_accessor :connection
4
+ attr_accessor :curl_handle
5
5
 
6
6
  def initialize
7
- self.connection ||= StreamlyFFI::PersistentRequest.new
7
+ @curl_handle = StreamlyFFI::PersistentRequest.new
8
8
  end
9
9
 
10
10
  # A helper method to make HEAD requests a dead-simple one-liner
@@ -24,7 +24,7 @@ module StreamlyFFI
24
24
  def head(url, headers=nil, &block)
25
25
  opts = {:method => :head, :url => url, :headers => headers}
26
26
  opts[:response_header_handler] = block if block_given?
27
- self.connection.execute(opts)
27
+ @curl_handle.execute(opts)
28
28
  end
29
29
 
30
30
  # A helper method to make HEAD requests a dead-simple one-liner
@@ -44,7 +44,7 @@ module StreamlyFFI
44
44
  def get(url, headers=nil, &block)
45
45
  opts = {:method => :get, :url => url, :headers => headers}
46
46
  opts[:response_body_handler] = block if block_given?
47
- self.connection.execute(opts)
47
+ @curl_handle.execute(opts)
48
48
  end
49
49
 
50
50
  # A helper method to make HEAD requests a dead-simple one-liner
@@ -65,7 +65,7 @@ module StreamlyFFI
65
65
  def post(url, payload, headers=nil, &block)
66
66
  opts = {:method => :post, :url => url, :payload => payload, :headers => headers}
67
67
  opts[:response_body_handler] = block if block_given?
68
- self.connection.execute(opts)
68
+ @curl_handle.execute(opts)
69
69
  end
70
70
 
71
71
  # A helper method to make HEAD requests a dead-simple one-liner
@@ -86,7 +86,7 @@ module StreamlyFFI
86
86
  def put(url, payload, headers=nil, &block)
87
87
  opts = {:method => :put, :url => url, :payload => payload, :headers => headers}
88
88
  opts[:response_body_handler] = block if block_given?
89
- self.connection.execute(opts)
89
+ @curl_handle.execute(opts)
90
90
  end
91
91
 
92
92
  # A helper method to make HEAD requests a dead-simple one-liner
@@ -106,11 +106,11 @@ module StreamlyFFI
106
106
  def delete(url, headers={}, &block)
107
107
  opts = {:method => :delete, :url => url, :headers => headers}
108
108
  opts[:response_body_handler] = block if block_given?
109
- self.connection.execute(opts)
109
+ @curl_handle.execute(opts)
110
110
  end
111
111
 
112
112
  def escape(_string)
113
- self.connection.escape(_string)
113
+ @curl_handle.escape(_string)
114
114
  end
115
115
  end
116
116
  end
@@ -1,3 +1,3 @@
1
1
  module StreamlyFFI
2
- VERSION = "0.2.3"
2
+ VERSION = "0.2.4"
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 3
9
- version: 0.2.3
8
+ - 4
9
+ version: 0.2.4
10
10
  platform: ruby
11
11
  authors:
12
12
  - Brian Lopez