lucid_http 0.8.0 → 0.9.0

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: a12306e36ff6f0d6715029085aefa92557f8a077
4
- data.tar.gz: 7b74feca760fea6193ce68c11f791d34aaf565a0
3
+ metadata.gz: d50a39cf7a043cecb6161f1bbedf343697cf31b5
4
+ data.tar.gz: 6bc3521ad69b60348601a85622b5c6b8b3e14825
5
5
  SHA512:
6
- metadata.gz: b5b08cb668bcde7e0e2d6550b931cc4b10e63f3a5aa0fee1917f56118a0b80447d964bc51a9d2ded51c829eaf307713586536cb138f3c3fd9c7e35aae4e7c571
7
- data.tar.gz: 801809179a5203f1357d3165482cd418335cf6e25794afadb99cf4abc965cc7cb90c0b15e5cd1d1dbe23f397cbe0f86327001aec5c114cdbbece248203e6a882
6
+ metadata.gz: 17723a2514b88919984296e86bce7c7040f014a4c05dbc95352e49c09c67d3c79065991f80d6f2435e244e19f942689616af5aa85e7fba2b338f990a1abe1466
7
+ data.tar.gz: 367e0238a8b8da4a419874ff1ee6b78bd1776cff8fcc1ce77337bb89435a22ade517d2ce3578a5203a61959152d1089ac9d6db40114709e35fbe461e9655537a
@@ -1,3 +1,3 @@
1
1
  module LucidHttp
2
- VERSION = "0.8.0"
2
+ VERSION = "0.9.0"
3
3
  end
data/lib/lucid_http.rb CHANGED
@@ -73,26 +73,28 @@ def error
73
73
  end
74
74
  end
75
75
 
76
- def GET(url, **opts)
77
- __lucid_http__setup(url, **opts)
78
- new_body = case status.to_i
79
- when 200
80
- body
81
- else
82
- "STATUS: #{status}"
83
- end
84
-
85
- new_body
76
+ %i[get post put patch delete].each do |verb|
77
+ define_method(verb.upcase) do |url, **opts|
78
+ __lucid_http__setup(url, action: verb, **opts)
79
+ new_body = case status.to_i
80
+ when 200
81
+ body
82
+ else
83
+ "STATUS: #{status}"
84
+ end
85
+
86
+ new_body
87
+ end
86
88
  end
87
89
 
88
- def POST(url, **opts)
89
- __lucid_http__setup(url, action: :post, **opts)
90
- new_body = case status.to_i
91
- when 200
92
- body
93
- else
94
- "STATUS: #{status}"
95
- end
96
-
97
- new_body
98
- end
90
+ # def POST(url, **opts)
91
+ # __lucid_http__setup(url, action: :post, **opts)
92
+ # new_body = case status.to_i
93
+ # when 200
94
+ # body
95
+ # else
96
+ # "STATUS: #{status}"
97
+ # end
98
+
99
+ # new_body
100
+ # end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lucid_http
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Federico Iachetti