http2 0.0.18 → 0.0.19

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/http2.gemspec +1 -1
  3. data/lib/http2.rb +3 -2
  4. metadata +2 -2
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.18
1
+ 0.0.19
data/http2.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "http2"
8
- s.version = "0.0.18"
8
+ s.version = "0.0.19"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Kasper Johansen"]
data/lib/http2.rb CHANGED
@@ -240,6 +240,7 @@ class Http2
240
240
  end
241
241
  end
242
242
 
243
+ # Proxies the request to another method but forces the method to be "DELETE".
243
244
  def delete(args)
244
245
  if args[:json]
245
246
  return self.post(args.merge(:method => :delete))
@@ -349,13 +350,13 @@ class Http2
349
350
  return praw
350
351
  end
351
352
 
352
- VALID_ARGUMENTS_POST = [:post, :url, :headers, :json, :method]
353
+ VALID_ARGUMENTS_POST = [:post, :url, :default_headers, :headers, :json, :method]
353
354
  #Posts to a certain page.
354
355
  #===Examples
355
356
  # res = http.post("login.php", {"username" => "John Doe", "password" => 123)
356
357
  def post(args)
357
358
  args.each do |key, val|
358
- raise "Invalid key: '#{key}'." if !VALID_ARGUMENTS_POST.include?(key)
359
+ raise "Invalid key: '#{key}'." unless VALID_ARGUMENTS_POST.include?(key)
359
360
  end
360
361
 
361
362
  args = self.parse_args(args)
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: http2
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.18
5
+ version: 0.0.19
6
6
  platform: ruby
7
7
  authors:
8
8
  - Kasper Johansen
@@ -113,7 +113,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
113
113
  - !ruby/object:Gem::Version
114
114
  segments:
115
115
  - 0
116
- hash: 3868289279396036379
116
+ hash: -240435905939573989
117
117
  version: '0'
118
118
  required_rubygems_version: !ruby/object:Gem::Requirement
119
119
  none: false