xfrtuc 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/lib/xfrtuc.rb +5 -1
- data/lib/xfrtuc/version.rb +1 -1
- data/spec/xfrtuc_spec.rb +1 -1
- metadata +2 -2
data/Gemfile.lock
CHANGED
data/lib/xfrtuc.rb
CHANGED
@@ -41,6 +41,10 @@ module Xfrtuc
|
|
41
41
|
JSON.parse(@resource[path].post(JSON.generate(data)))
|
42
42
|
end
|
43
43
|
|
44
|
+
def put(path, data={})
|
45
|
+
JSON.parse(@resource[path].post(JSON.generate(data)))
|
46
|
+
end
|
47
|
+
|
44
48
|
def delete(path)
|
45
49
|
JSON.parse(@resource[path].delete)
|
46
50
|
end
|
@@ -165,7 +169,7 @@ module Xfrtuc
|
|
165
169
|
sched_opts[:retain_weeks] = retain_weeks unless retain_weeks.nil?
|
166
170
|
sched_opts[:retain_months] = retain_months unless retain_months.nil?
|
167
171
|
|
168
|
-
client.
|
172
|
+
client.put("/schedules", sched_opts)
|
169
173
|
end
|
170
174
|
|
171
175
|
def delete(id)
|
data/lib/xfrtuc/version.rb
CHANGED
data/spec/xfrtuc_spec.rb
CHANGED
@@ -304,7 +304,7 @@ module Xfrtuc
|
|
304
304
|
path = path(env)
|
305
305
|
group_name, sched_id = path.match(%r{\A/groups/(.*)/schedules(?:/(.*))?\z}) && [$1, $2]
|
306
306
|
verb = verb(env)
|
307
|
-
if
|
307
|
+
if %w(POST PUT).include? verb
|
308
308
|
body = body(env)
|
309
309
|
sched = JSON.parse(body)
|
310
310
|
unless sched_id.nil?
|
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
|
+
version: 0.0.7
|
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: 2015-
|
12
|
+
date: 2015-02-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rest-client
|