Permalink
Browse files

Switch from Crack to JSON. Do not mutate yamler.

  • Loading branch information...
1 parent 6fe6c4f commit a17fb935157b4b4d9b9351fe72f02b184895f898 @kenn kenn committed Apr 26, 2012
Showing with 6 additions and 14 deletions.
  1. +1 −1 Gemfile
  2. +2 −7 lib/linode.rb
  3. +3 −6 linode.gemspec
View
@@ -7,4 +7,4 @@ group :test do
end
gem "httparty"
-gem "crack"
+gem "json"
View
@@ -1,12 +1,7 @@
require 'rubygems'
require 'ostruct'
require 'httparty'
-require 'crack'
-
-begin
- YAML::ENGINE.yamler = 'syck'
-rescue # see: https://github.com/rick/linode/issues/12
-end
+require 'json'
class Linode
attr_reader :username, :password
@@ -95,7 +90,7 @@ def fetch_api_key
end
def post(data)
- Crack::JSON.parse(HTTParty.post(api_url, :body => data))
+ JSON.parse(HTTParty.post(api_url, :body => data))
end
def error?(response)
View
@@ -69,20 +69,17 @@ Gem::Specification.new do |s|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
s.add_runtime_dependency(%q<httparty>, [">= 0"])
- s.add_runtime_dependency(%q<crack>, [">= 0"])
+ s.add_runtime_dependency(%q<json>, [">= 0"])
s.add_runtime_dependency(%q<httparty>, [">= 0.4.4"])
- s.add_runtime_dependency(%q<crack>, [">= 0.3.1"])
else
s.add_dependency(%q<httparty>, [">= 0"])
- s.add_dependency(%q<crack>, [">= 0"])
+ s.add_dependency(%q<json>, [">= 0"])
s.add_dependency(%q<httparty>, [">= 0.4.4"])
- s.add_dependency(%q<crack>, [">= 0.3.1"])
end
else
s.add_dependency(%q<httparty>, [">= 0"])
- s.add_dependency(%q<crack>, [">= 0"])
+ s.add_dependency(%q<json>, [">= 0"])
s.add_dependency(%q<httparty>, [">= 0.4.4"])
- s.add_dependency(%q<crack>, [">= 0.3.1"])
end
end

0 comments on commit a17fb93

Please sign in to comment.