phrase 4.25.0 → 4.26.0
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +19 -0
- data/README.md +15 -4
- data/docs/AutomationEvent.md +33 -0
- data/docs/AutomationEventProject.md +19 -0
- data/docs/AutomationEventsApi.md +168 -0
- data/docs/AutomationsCreateParameters.md +1 -1
- data/docs/AutomationsCreateParameters1.md +1 -1
- data/docs/DocumentsApi.md +4 -4
- data/docs/ICUApi.md +1 -1
- data/docs/IcuSkeletonError.md +17 -0
- data/docs/IcuSkeletonParameters.md +11 -11
- data/docs/JobsApi.md +2 -2
- data/docs/KeyCreateParameters.md +1 -1
- data/docs/KeyFormatAnnotationsApi.md +74 -0
- data/docs/KeyFormatAnnotationsList200ResponseInner.md +19 -0
- data/docs/KeyLinksBatchDestroyParameters.md +6 -4
- data/docs/KeyLinksCreateParameters.md +2 -2
- data/docs/KeyUpdateParameters.md +1 -1
- data/docs/LinkedKeysApi.md +14 -13
- data/docs/PreTranslation.md +29 -0
- data/docs/PreTranslationCreateParameters.md +19 -0
- data/docs/PreTranslationsApi.md +210 -0
- data/docs/ProjectCreateParameters.md +1 -1
- data/docs/ProjectUpdateParameters.md +1 -1
- data/docs/ScreenshotUpdateParameters.md +1 -1
- data/docs/ScreenshotsApi.md +2 -2
- data/lib/phrase/api/automation_events_api.rb +215 -0
- data/lib/phrase/api/documents_api.rb +6 -6
- data/lib/phrase/api/icu_api.rb +2 -6
- data/lib/phrase/api/key_format_annotations_api.rb +85 -0
- data/lib/phrase/api/linked_keys_api.rb +19 -23
- data/lib/phrase/api/pre_translations_api.rb +240 -0
- data/lib/phrase/api/screenshots_api.rb +4 -4
- data/lib/phrase/models/automation_event.rb +325 -0
- data/lib/phrase/models/automation_event_project.rb +208 -0
- data/lib/phrase/models/automations_create_parameters.rb +1 -1
- data/lib/phrase/models/automations_create_parameters1.rb +1 -1
- data/lib/phrase/models/{key_links_index400_response.rb → icu_skeleton_error.rb} +11 -10
- data/lib/phrase/models/icu_skeleton_parameters.rb +6 -6
- data/lib/phrase/models/key_format_annotations_list200_response_inner.rb +207 -0
- data/lib/phrase/models/key_links_batch_destroy_parameters.rb +52 -6
- data/lib/phrase/models/key_links_create_parameters.rb +1 -1
- data/lib/phrase/models/pre_translation.rb +301 -0
- data/lib/phrase/models/pre_translation_create_parameters.rb +241 -0
- data/lib/phrase/response.rb +2 -2
- data/lib/phrase/version.rb +1 -1
- data/lib/phrase.rb +9 -1
- data/phrase.gemspec +1 -1
- data/spec/api/automation_events_api_spec.rb +67 -0
- data/spec/api/documents_api_spec.rb +3 -3
- data/spec/api/icu_api_spec.rb +1 -1
- data/spec/api/key_format_annotations_api_spec.rb +38 -0
- data/spec/api/linked_keys_api_spec.rb +7 -7
- data/spec/api/pre_translations_api_spec.rb +70 -0
- data/spec/api/screenshots_api_spec.rb +2 -2
- data/spec/models/automation_event_project_spec.rb +35 -0
- data/spec/models/automation_event_spec.rb +85 -0
- data/spec/models/{key_links_index400_response_spec.rb → icu_skeleton_error_spec.rb} +7 -7
- data/spec/models/key_format_annotations_list200_response_inner_spec.rb +35 -0
- data/spec/models/key_links_batch_destroy_parameters_spec.rb +10 -0
- data/spec/models/pre_translation_create_parameters_spec.rb +39 -0
- data/spec/models/pre_translation_spec.rb +73 -0
- data/spec/response_spec.rb +53 -0
- metadata +291 -257
- data/docs/KeyLinksIndex400Response.md +0 -17
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
require 'json'
|
|
3
|
+
require 'date'
|
|
4
|
+
|
|
5
|
+
# Unit tests for Phrase::AutomationEvent
|
|
6
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
7
|
+
# Please update as you see appropriate
|
|
8
|
+
describe 'AutomationEvent' do
|
|
9
|
+
before do
|
|
10
|
+
# run before each test
|
|
11
|
+
@instance = Phrase::AutomationEvent.new
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
after do
|
|
15
|
+
# run after each test
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
describe 'test an instance of AutomationEvent' do
|
|
19
|
+
it 'should create an instance of AutomationEvent' do
|
|
20
|
+
expect(@instance).to be_instance_of(Phrase::AutomationEvent)
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
describe 'test attribute "id"' do
|
|
24
|
+
it 'should work' do
|
|
25
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
describe 'test attribute "automation_id"' do
|
|
30
|
+
it 'should work' do
|
|
31
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
describe 'test attribute "state"' do
|
|
36
|
+
it 'should work' do
|
|
37
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
38
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["success", "failure", "in_progress"])
|
|
39
|
+
# validator.allowable_values.each do |value|
|
|
40
|
+
# expect { @instance.state = value }.not_to raise_error
|
|
41
|
+
# end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
describe 'test attribute "triggered_by"' do
|
|
46
|
+
it 'should work' do
|
|
47
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
48
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["manual", "schedule", "upload", "upload_batch"])
|
|
49
|
+
# validator.allowable_values.each do |value|
|
|
50
|
+
# expect { @instance.triggered_by = value }.not_to raise_error
|
|
51
|
+
# end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
describe 'test attribute "created_at"' do
|
|
56
|
+
it 'should work' do
|
|
57
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
describe 'test attribute "jobs_created"' do
|
|
62
|
+
it 'should work' do
|
|
63
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
describe 'test attribute "job_ids"' do
|
|
68
|
+
it 'should work' do
|
|
69
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
describe 'test attribute "project"' do
|
|
74
|
+
it 'should work' do
|
|
75
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
describe 'test attribute "details"' do
|
|
80
|
+
it 'should work' do
|
|
81
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
end
|
|
@@ -2,25 +2,25 @@ require 'spec_helper'
|
|
|
2
2
|
require 'json'
|
|
3
3
|
require 'date'
|
|
4
4
|
|
|
5
|
-
# Unit tests for Phrase::
|
|
5
|
+
# Unit tests for Phrase::IcuSkeletonError
|
|
6
6
|
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
7
7
|
# Please update as you see appropriate
|
|
8
|
-
describe '
|
|
8
|
+
describe 'IcuSkeletonError' do
|
|
9
9
|
before do
|
|
10
10
|
# run before each test
|
|
11
|
-
@instance = Phrase::
|
|
11
|
+
@instance = Phrase::IcuSkeletonError.new
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
after do
|
|
15
15
|
# run after each test
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
-
describe 'test an instance of
|
|
19
|
-
it 'should create an instance of
|
|
20
|
-
expect(@instance).to be_instance_of(Phrase::
|
|
18
|
+
describe 'test an instance of IcuSkeletonError' do
|
|
19
|
+
it 'should create an instance of IcuSkeletonError' do
|
|
20
|
+
expect(@instance).to be_instance_of(Phrase::IcuSkeletonError)
|
|
21
21
|
end
|
|
22
22
|
end
|
|
23
|
-
describe 'test attribute "
|
|
23
|
+
describe 'test attribute "error"' do
|
|
24
24
|
it 'should work' do
|
|
25
25
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
26
26
|
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
require 'json'
|
|
3
|
+
require 'date'
|
|
4
|
+
|
|
5
|
+
# Unit tests for Phrase::KeyFormatAnnotationsList200ResponseInner
|
|
6
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
7
|
+
# Please update as you see appropriate
|
|
8
|
+
describe 'KeyFormatAnnotationsList200ResponseInner' do
|
|
9
|
+
before do
|
|
10
|
+
# run before each test
|
|
11
|
+
@instance = Phrase::KeyFormatAnnotationsList200ResponseInner.new
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
after do
|
|
15
|
+
# run after each test
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
describe 'test an instance of KeyFormatAnnotationsList200ResponseInner' do
|
|
19
|
+
it 'should create an instance of KeyFormatAnnotationsList200ResponseInner' do
|
|
20
|
+
expect(@instance).to be_instance_of(Phrase::KeyFormatAnnotationsList200ResponseInner)
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
describe 'test attribute "file_format"' do
|
|
24
|
+
it 'should work' do
|
|
25
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
describe 'test attribute "original_representation"' do
|
|
30
|
+
it 'should work' do
|
|
31
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
end
|
|
@@ -32,4 +32,14 @@ describe 'KeyLinksBatchDestroyParameters' do
|
|
|
32
32
|
end
|
|
33
33
|
end
|
|
34
34
|
|
|
35
|
+
describe 'test attribute "strategy"' do
|
|
36
|
+
it 'should work' do
|
|
37
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
38
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["keep_content", "remove_content"])
|
|
39
|
+
# validator.allowable_values.each do |value|
|
|
40
|
+
# expect { @instance.strategy = value }.not_to raise_error
|
|
41
|
+
# end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
35
45
|
end
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
require 'json'
|
|
3
|
+
require 'date'
|
|
4
|
+
|
|
5
|
+
# Unit tests for Phrase::PreTranslationCreateParameters
|
|
6
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
7
|
+
# Please update as you see appropriate
|
|
8
|
+
describe 'PreTranslationCreateParameters' do
|
|
9
|
+
before do
|
|
10
|
+
# run before each test
|
|
11
|
+
@instance = Phrase::PreTranslationCreateParameters.new
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
after do
|
|
15
|
+
# run after each test
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
describe 'test an instance of PreTranslationCreateParameters' do
|
|
19
|
+
it 'should create an instance of PreTranslationCreateParameters' do
|
|
20
|
+
expect(@instance).to be_instance_of(Phrase::PreTranslationCreateParameters)
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
describe 'test attribute "translatable_type"' do
|
|
24
|
+
it 'should work' do
|
|
25
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
26
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["locale", "job", "translation_key", "upload"])
|
|
27
|
+
# validator.allowable_values.each do |value|
|
|
28
|
+
# expect { @instance.translatable_type = value }.not_to raise_error
|
|
29
|
+
# end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
describe 'test attribute "translatable_id"' do
|
|
34
|
+
it 'should work' do
|
|
35
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
end
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
require 'json'
|
|
3
|
+
require 'date'
|
|
4
|
+
|
|
5
|
+
# Unit tests for Phrase::PreTranslation
|
|
6
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
7
|
+
# Please update as you see appropriate
|
|
8
|
+
describe 'PreTranslation' do
|
|
9
|
+
before do
|
|
10
|
+
# run before each test
|
|
11
|
+
@instance = Phrase::PreTranslation.new
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
after do
|
|
15
|
+
# run after each test
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
describe 'test an instance of PreTranslation' do
|
|
19
|
+
it 'should create an instance of PreTranslation' do
|
|
20
|
+
expect(@instance).to be_instance_of(Phrase::PreTranslation)
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
describe 'test attribute "id"' do
|
|
24
|
+
it 'should work' do
|
|
25
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
describe 'test attribute "status"' do
|
|
30
|
+
it 'should work' do
|
|
31
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
32
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["pending", "running", "success", "error"])
|
|
33
|
+
# validator.allowable_values.each do |value|
|
|
34
|
+
# expect { @instance.status = value }.not_to raise_error
|
|
35
|
+
# end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
describe 'test attribute "translatable_type"' do
|
|
40
|
+
it 'should work' do
|
|
41
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
42
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["locale", "job", "translation_key", "upload"])
|
|
43
|
+
# validator.allowable_values.each do |value|
|
|
44
|
+
# expect { @instance.translatable_type = value }.not_to raise_error
|
|
45
|
+
# end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
describe 'test attribute "translatable_id"' do
|
|
50
|
+
it 'should work' do
|
|
51
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
describe 'test attribute "error"' do
|
|
56
|
+
it 'should work' do
|
|
57
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
describe 'test attribute "created_at"' do
|
|
62
|
+
it 'should work' do
|
|
63
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
describe 'test attribute "updated_at"' do
|
|
68
|
+
it 'should work' do
|
|
69
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
end
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
describe Phrase::Response do
|
|
4
|
+
context 'without a link header' do
|
|
5
|
+
it 'is not paginated' do
|
|
6
|
+
response = Phrase::Response.new({ 'foo' => 'bar' }, {})
|
|
7
|
+
|
|
8
|
+
expect(response.paginated?).to eq(false)
|
|
9
|
+
expect(response.next_page?).to eq(false)
|
|
10
|
+
expect(response.next_page).to be_nil
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
context 'with a link header that has a next page' do
|
|
15
|
+
let(:headers) do
|
|
16
|
+
{
|
|
17
|
+
'link' => '<https://api.phrase.com/v2/projects/project_id/keys?page=2>; rel="next", ' \
|
|
18
|
+
'<https://api.phrase.com/v2/projects/project_id/keys?page=5>; rel="last"'
|
|
19
|
+
}
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
it 'parses the next page number without raising' do
|
|
23
|
+
response = Phrase::Response.new({ 'foo' => 'bar' }, headers)
|
|
24
|
+
|
|
25
|
+
expect(response.paginated?).to eq(true)
|
|
26
|
+
expect(response.next_page?).to eq(true)
|
|
27
|
+
expect(response.next_page).to eq(2)
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
context 'with a link header that has no next page' do
|
|
32
|
+
let(:headers) do
|
|
33
|
+
{
|
|
34
|
+
'link' => '<https://api.phrase.com/v2/projects/project_id/keys?page=1>; rel="first", ' \
|
|
35
|
+
'<https://api.phrase.com/v2/projects/project_id/keys?page=1>; rel="last"'
|
|
36
|
+
}
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
it 'is paginated but has no next page' do
|
|
40
|
+
response = Phrase::Response.new({ 'foo' => 'bar' }, headers)
|
|
41
|
+
|
|
42
|
+
expect(response.paginated?).to eq(true)
|
|
43
|
+
expect(response.next_page?).to eq(false)
|
|
44
|
+
expect(response.next_page).to be_nil
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
it 'delegates missing methods to the underlying data' do
|
|
49
|
+
response = Phrase::Response.new({ 'foo' => 'bar' }, {})
|
|
50
|
+
|
|
51
|
+
expect(response['foo']).to eq('bar')
|
|
52
|
+
end
|
|
53
|
+
end
|