smartring 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/smartling/jobs.rb +6 -0
- data/test/smartling/jobs_test.rb +9 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 645aad2f02c28fdd93e82b3bc05ca9a605148e1ff863e477c7a58491bf0c5803
|
4
|
+
data.tar.gz: 3d221a65cf62ce78008f170e77de7de0c60fd4aa40a682fd423e228d508b6ac3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c655506db6372da29e716e42c03e432349e2982ff8e34fbf373174e0c91557ab7457002cd3047a3ea1428c5f9ab91acb3d72902391358dd3f6bc64020da484d
|
7
|
+
data.tar.gz: 9e2c3dd5b40645adf4a08a5ec862e78d243b799d70c1424cfe7725786d054468fde3835973b7ed6f7aed06c07afe268837348f0d977b94a34fbb3210325209f4
|
data/lib/smartling/jobs.rb
CHANGED
@@ -38,6 +38,12 @@ module Smartling
|
|
38
38
|
post(path, body: body.to_json, headers: headers)
|
39
39
|
end
|
40
40
|
|
41
|
+
def delete_job(project_id: @project_id, translation_job_uid:)
|
42
|
+
path = "/jobs-api/v3/projects/#{project_id}/jobs/#{translation_job_uid}"
|
43
|
+
:A
|
44
|
+
delete(path)
|
45
|
+
end
|
46
|
+
|
41
47
|
def job(project_id: @project_id, translation_job_uid:)
|
42
48
|
path = "/jobs-api/v3/projects/#{project_id}/jobs/#{translation_job_uid}"
|
43
49
|
get(path)
|
data/test/smartling/jobs_test.rb
CHANGED
@@ -62,6 +62,15 @@ describe Smartling::Jobs do
|
|
62
62
|
end
|
63
63
|
end
|
64
64
|
|
65
|
+
describe 'delete_job' do
|
66
|
+
it 'DELETES the right path' do
|
67
|
+
smartling.expect(:delete, nil) do |path|
|
68
|
+
assert_match %r{jobs-api/v3/projects/1/jobs/4}, path
|
69
|
+
end
|
70
|
+
smartling.delete_job(project_id: 1, translation_job_uid: 4)
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
65
74
|
describe 'job' do
|
66
75
|
it 'GETs the right endpoint' do
|
67
76
|
smartling.expect(:get, nil) do |path|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: smartring
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- JJ Buckley
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-05-
|
11
|
+
date: 2018-05-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dotenv
|