lib/you_track/client/real.rb in you_track-0.2.2 vs lib/you_track/client/real.rb in you_track-0.3.0

- old
+ new

@@ -67,11 +67,11 @@ end method = options[:method] || :get query = options[:query] url = URI.parse(options[:url] || File.join(self.url.to_s, "/rest", options.fetch(:path))) - url.query = query.map { |k,v| "#{k}=#{URI.escape(v)}" }.join('&') if query + url.query = query.map { |k,v| "#{URI.escape(k)}=#{URI.escape(v.to_s)}" }.join('&') if query params = options[:params] || {} body = options[:body] headers = options[:headers] || {} parser = options[:parser] @@ -91,7 +91,11 @@ end response.env.body = parser.new(response.body).parse if parser response + end + + def current_user + @current_user ||= users.current end end