xfrtuc 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- xfrtuc (0.0.3)
4
+ xfrtuc (0.0.5)
5
5
  rest-client (~> 1.6)
6
6
 
7
7
  GEM
@@ -1,3 +1,3 @@
1
1
  module Xfrtuc
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
data/lib/xfrtuc.rb CHANGED
@@ -99,17 +99,21 @@ module Xfrtuc
99
99
  [ :from_type, :from_url, :to_type, :to_url ].each { |key| opts.delete key }
100
100
  from_name = opts.delete :from_name
101
101
  to_name = opts.delete :to_name
102
+ log_input_url = opts.delete :log_input_url
102
103
  unless opts.empty?
103
104
  raise ArgumentError, "Unsupported option(s): #{opts.keys}"
104
105
  end
105
-
106
- client.post("/transfers",
107
- from_type: from_type,
108
- from_url: from_url,
109
- from_name: from_name,
110
- to_type: to_type,
111
- to_url: to_url,
112
- to_name: to_name)
106
+ payload = {
107
+ from_type: from_type,
108
+ from_url: from_url,
109
+ from_name: from_name,
110
+ to_type: to_type,
111
+ to_url: to_url,
112
+ to_name: to_name
113
+ }
114
+ payload.merge!(log_input_url: log_input_url) unless log_input_url.nil?
115
+
116
+ client.post("/transfers", payload)
113
117
  end
114
118
 
115
119
  def delete(id)
data/spec/xfrtuc_spec.rb CHANGED
@@ -473,6 +473,13 @@ module Xfrtuc
473
473
  expect(xfer[k]).to eq(v)
474
474
  end
475
475
  end
476
+
477
+ it "accepts an optional log_input_url" do
478
+ log_url = "https://example.com/logs"
479
+ expect do
480
+ client.group(g).transfer.create(xfer_data.merge(log_input_url: log_url))
481
+ end.not_to raise_error
482
+ end
476
483
  end
477
484
 
478
485
  describe "#list" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xfrtuc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-12-17 00:00:00.000000000 Z
12
+ date: 2015-01-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rest-client