onering-client 0.0.56 → 0.0.57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/onering/api.rb CHANGED
@@ -109,7 +109,7 @@ module Onering
109
109
  end
110
110
  end
111
111
 
112
- def put(endpoint, options={})
112
+ def put(endpoint, options={}, &block)
113
113
  if block_given?
114
114
  request(:put, endpoint, options.merge({
115
115
  :body => yield
@@ -28,7 +28,12 @@ EOS
28
28
  end
29
29
 
30
30
  def self.run(args)
31
- rv = @api.request(@opts[:method], args.first)
31
+ data = STDIN.read() unless STDIN.tty?
32
+
33
+ rv = @api.request(@opts[:method], args.first, {
34
+ :body => data
35
+ }.compact)
36
+
32
37
  return (rv.parsed_response || rv.response.body)
33
38
  end
34
39
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: onering-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.56
4
+ version: 0.0.57
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: