grendel-ruby 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.3
1
+ 0.1.4
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{grendel-ruby}
8
- s.version = "0.1.3"
8
+ s.version = "0.1.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Brad Greenlee"]
@@ -2,7 +2,6 @@ $:.unshift File.dirname(__FILE__)
2
2
 
3
3
  require 'rubygems'
4
4
  require 'httparty'
5
- require 'json'
6
5
  require 'mime/types'
7
6
  require 'grendel/mash'
8
7
  require 'grendel/client'
@@ -45,6 +45,7 @@ module Grendel
45
45
  options = options.dup
46
46
 
47
47
  if data
48
+ require 'json' unless data.respond_to?(:to_json)
48
49
  data = data.to_json unless options.delete(:raw_data)
49
50
  options[:body] ||= data
50
51
  options[:headers] = (options[:headers] || {}).dup
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 3
9
- version: 0.1.3
8
+ - 4
9
+ version: 0.1.4
10
10
  platform: ruby
11
11
  authors:
12
12
  - Brad Greenlee