lib/jsus/source_file.rb in jsus-0.1.2 vs lib/jsus/source_file.rb in jsus-0.1.3

- old
+ new

@@ -36,21 +36,21 @@ # Public API def dependencies(options = {}) header["requires"] = [header["requires"] || []].flatten header["requires"].map! {|r| r.gsub(/^\//, "") } - if options[:full] && package - header["requires"].map {|r| "#{package.name}/#{r}"} + if !options[:short] && package + header["requires"].map {|r| r.index("/") ? r : "#{package.name}/#{r}"} else header["requires"] end end alias_method :requires, :dependencies def provides(options = {}) header["provides"] = [header["provides"] || []].flatten - if options[:full] && package + if !options[:short] && package header["provides"].map {|p| "#{package.name}/#{p}"} else header["provides"] end end @@ -60,11 +60,11 @@ end def to_hash { "desc" => description, - "requires" => dependencies, - "provides" => provides + "requires" => dependencies(:short => true), + "provides" => provides(:short => true) } end def inspect self.to_hash.inspect \ No newline at end of file