Permalink
Browse files

Fix few bugs introduced with metadata

  • Loading branch information...
1 parent dec2892 commit c3e42ac5fc81e026b379a37ce97dc94e566d2619 @meh committed Feb 12, 2012
Showing with 12 additions and 4 deletions.
  1. +9 −2 bin/fag
  2. +1 −1 lib/fag/flow.rb
  3. +1 −1 lib/fag/metadata.rb
  4. +1 −0 lib/fag/session.rb
View
11 bin/fag
@@ -319,7 +319,14 @@ module Kernel
if error.is_a?(Fag::HTTP::APIException)
fatal error.body.downcase
else
- fatal error.message
+ if ENV['FAG_DEBUG']
+ print "From: #{caller[0, 1].join "\n"}\n"
+ print "#{error.class}: #{error.message}\n"
+ print error.backtrace.to_a.join "\n"
+ print "\n\n"
+ else
+ fatal error.message
+ end
end
end
end
@@ -421,7 +428,7 @@ elsif $options[:metadata]
metadata = if $options[:metadata] == :drop
$session.drop($options[:metadata_id]).metadata
elsif $options[:metadata] == :tag
- $session.drop($options[:metadata_id]).metadata
+ $session.tag($options[:metadata_id]).metadata
else
$session.flow($options[:metadata_id]).metadata
end
View
2 lib/fag/flow.rb
@@ -8,7 +8,7 @@
# 0. You just DO WHAT THE FUCK YOU WANT TO.
#++
-require 'fag/tags'
+require 'fag/tag'
require 'fag/drop'
module Fag
View
2 lib/fag/metadata.rb
@@ -22,7 +22,7 @@ def save
end
def load
- replace @owner.session.get(url)[:data]
+ replace @owner.session.get(url)
end
private
View
1 lib/fag/session.rb
@@ -9,6 +9,7 @@
#++
require 'fag/http'
+require 'fag/metadata'
require 'fag/author'
require 'fag/flow'

0 comments on commit c3e42ac

Please sign in to comment.