lib/apiary/command/publish.rb in apiaryio-0.10.1 vs lib/apiary/command/publish.rb in apiaryio-0.10.2
- old
+ new
@@ -1,9 +1,8 @@
# encoding: utf-8
+
require 'rest-client'
-require 'rack'
-require 'ostruct'
require 'json'
require 'apiary/agent'
require 'apiary/helpers'
@@ -61,10 +60,9 @@
begin
JSON.parse(source)
abort('Did you forget the --json flag?') unless @options.json
rescue; end
-
source = convert_from_json(source) if @options.json
data = {
code: source,
messageToSave: @options.message,
shouldCommit: @options.push ? 'yes' : 'no'