yaccl 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 72522a255444827002f96e13cf166acb902bf6c7
4
- data.tar.gz: 1b5c8b95d1816d80b67a81e7b9d5c5398a667b02
3
+ metadata.gz: 8dbc653c78ed22b6352c89440ffa6de173b9bc11
4
+ data.tar.gz: 4b5b9fd8a01f265a3dd29c2c23313c3ce482df94
5
5
  SHA512:
6
- metadata.gz: 4cf8d2349841adaaa067355e9dac7b31bf8e34377d64d4a48637a80a757959b942aaaa003e9da000ae4f7b054ffccae581a843b1798037da857c197946fd4c96
7
- data.tar.gz: 247db1fca88af0847b19552765fe746d4705ce6305749f6d8a9391f3dfd1c838bdd6194210a1689be2d0652c8d0186e78528705b1e899891f71a1bae6cda8360
6
+ metadata.gz: d70b69768f173d0ee6d9a4dcf8ceadede74a8da3c109a8396116b7c924b0b848415092abfedbcb7bdce3fd5adfec891386af2fcebf71279473e81f555b9b8d0a
7
+ data.tar.gz: 7c2db6e0701c2637e9a78a00fbca76b709d885f179c75eb87196a30cebead8a816c3a70379f0a54ad11d4f294ff299eadceb605f6ca5b06b914f47a625d4a0bf
@@ -127,49 +127,35 @@ module YACCL
127
127
 
128
128
  class Basement
129
129
 
130
- @@get_cache = SimpleCache::MemoryCache.new
131
-
132
130
  def initialize(user, pass)
133
131
  @username = user
134
132
  @password = pass
135
133
  end
136
134
 
137
135
  def get(params)
138
- if @@get_cache[params.to_s].nil?
139
- request = Typhoeus::Request.new(
140
- params[:url],
141
- userpwd: "#{@username}:#{@password}",
142
- method: :get,
143
- body: params[:body],
144
- params: params[:query],
145
- headers: params[:headers],
146
- followlocation: true
147
- )
148
- request.run
149
- @@get_cache[params.to_s] = request.run
150
- end
151
-
152
- @@get_cache[params.to_s]
136
+ Typhoeus::Request.new(
137
+ params[:url],
138
+ userpwd: "#{@username}:#{@password}",
139
+ method: :get,
140
+ body: params[:body],
141
+ params: params[:query],
142
+ headers: params[:headers],
143
+ followlocation: true
144
+ ).run
153
145
  end
154
146
 
155
147
  def post(params)
156
- # reset on any update
157
- @@get_cache.clear
158
-
159
- request = Typhoeus::Request.new(
148
+ Typhoeus::Request.new(
160
149
  params[:url],
161
150
  userpwd: "#{@username}:#{@password}",
162
151
  method: :post,
163
152
  body: params[:body],
164
153
  params: params[:query],
165
154
  headers: params[:headers]
166
- )
167
- request.run
155
+ ).run
168
156
  end
169
157
 
170
158
  def multipart_post(url, options, headers)
171
- @@get_cache.clear
172
-
173
159
  url = URI.parse(url)
174
160
  req = Net::HTTP::Post::Multipart.new(url.path, options)
175
161
  headers.each {|key, value| req[key] = value }
data/lib/yaccl/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module YACCL
2
- VERSION = '0.1.2'
2
+ VERSION = '0.1.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yaccl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kenneth Geerts