transifex-interface-ruby 0.0.1 → 0.0.2

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.
Files changed (118) hide show
  1. checksums.yaml +6 -14
  2. data/.gitignore +17 -17
  3. data/.rspec +2 -0
  4. data/Gemfile +4 -4
  5. data/LICENSE.txt +22 -22
  6. data/README.md +517 -513
  7. data/Rakefile +1 -1
  8. data/lib/transifex.rb +84 -87
  9. data/lib/transifex/crud_requests.rb +43 -33
  10. data/lib/transifex/errors.rb +4 -4
  11. data/lib/transifex/project_components/language.rb +1 -1
  12. data/lib/transifex/project_components/language_components/coordinators.rb +4 -6
  13. data/lib/transifex/project_components/language_components/reviewers.rb +5 -8
  14. data/lib/transifex/project_components/language_components/translators.rb +6 -9
  15. data/lib/transifex/project_components/languages.rb +1 -1
  16. data/lib/transifex/resource.rb +1 -1
  17. data/lib/transifex/resource_components/content.rb +1 -1
  18. data/lib/transifex/resource_components/source.rb +1 -1
  19. data/lib/transifex/resource_components/stats.rb +1 -1
  20. data/lib/transifex/resource_components/translation.rb +1 -1
  21. data/lib/transifex/resource_components/translation_components/string.rb +1 -1
  22. data/lib/transifex/resource_components/translation_components/strings.rb +1 -1
  23. data/lib/transifex/resources.rb +1 -1
  24. data/lib/transifex/version.rb +3 -3
  25. data/spec/cassettes/fetch_formats.yml +121 -0
  26. data/spec/cassettes/language/fetch_language_info.yml +58 -0
  27. data/spec/cassettes/language/fetch_languages_info.yml +58 -0
  28. data/spec/cassettes/project/components/create_language.yml +95 -0
  29. data/spec/cassettes/project/components/create_language_non_existing_coordinator.yml +48 -0
  30. data/spec/cassettes/project/components/create_language_without_coordinator.yml +48 -0
  31. data/spec/cassettes/project/components/fetch_languages.yml +53 -0
  32. data/spec/cassettes/project/delete_project.yml +108 -0
  33. data/spec/cassettes/project/fetch_private_project_info.yml +59 -0
  34. data/spec/cassettes/project/fetch_with_details_private_project_info.yml +66 -0
  35. data/spec/cassettes/project/language/delete_language.yml +140 -0
  36. data/spec/cassettes/project/language/fetch_coordinators.yml +56 -0
  37. data/spec/cassettes/project/language/fetch_language_info.yml +52 -0
  38. data/spec/cassettes/project/language/fetch_reviewers.yml +56 -0
  39. data/spec/cassettes/project/language/fetch_translators.yml +54 -0
  40. data/spec/cassettes/project/language/fetch_with_details_language_info.yml +54 -0
  41. data/spec/cassettes/project/language/update_coordinators.yml +104 -0
  42. data/spec/cassettes/project/language/update_language.yml +100 -0
  43. data/spec/cassettes/project/language/update_non_existing_coordinator.yml +48 -0
  44. data/spec/cassettes/project/language/update_non_existing_language.yml +49 -0
  45. data/spec/cassettes/project/language/update_non_existing_reviewer.yml +101 -0
  46. data/spec/cassettes/project/language/update_non_existing_translator.yml +101 -0
  47. data/spec/cassettes/project/language/update_reviewers.yml +157 -0
  48. data/spec/cassettes/project/language/update_translators.yml +157 -0
  49. data/spec/cassettes/project/update_non_existing_attribute_private_project.yml +54 -0
  50. data/spec/cassettes/project/update_private_project.yml +120 -0
  51. data/spec/cassettes/project/update_with_missing_params_private_project.yml +54 -0
  52. data/spec/cassettes/projects/create_private_project.yml +111 -0
  53. data/spec/cassettes/projects/create_public_project.yml +111 -0
  54. data/spec/cassettes/projects/create_used_slug_project.yml +55 -0
  55. data/spec/cassettes/projects/fetch_projects.yml +61 -0
  56. data/spec/cassettes/resource/delete_not_existing_resource.yml +55 -0
  57. data/spec/cassettes/resource/delete_resource.yml +160 -0
  58. data/spec/cassettes/resource/fetch_all_languages_stats.yml +66 -0
  59. data/spec/cassettes/resource/fetch_content_as_file.yml +56 -0
  60. data/spec/cassettes/resource/fetch_content_as_hash.yml +58 -0
  61. data/spec/cassettes/resource/fetch_language_stats.yml +61 -0
  62. data/spec/cassettes/resource/fetch_not_existing_resource.yml +55 -0
  63. data/spec/cassettes/resource/fetch_resource_info.yml +59 -0
  64. data/spec/cassettes/resource/fetch_source_string_metadata.yml +52 -0
  65. data/spec/cassettes/resource/fetch_translations.yml +57 -0
  66. data/spec/cassettes/resource/fetch_updated_resource_info.yml +60 -0
  67. data/spec/cassettes/resource/fetch_updated_source_string_metadata.yml +52 -0
  68. data/spec/cassettes/resource/fetch_with_details_resource_info.yml +65 -0
  69. data/spec/cassettes/resource/fetch_with_file_and_mode_translations.yml +56 -0
  70. data/spec/cassettes/resource/fetch_with_file_translations.yml +56 -0
  71. data/spec/cassettes/resource/update_content_json.yml +115 -0
  72. data/spec/cassettes/resource/update_content_with_wrong_mimetype.yml +59 -0
  73. data/spec/cassettes/resource/update_content_yml.yml +114 -0
  74. data/spec/cassettes/resource/update_not_existing_resource.yml +55 -0
  75. data/spec/cassettes/resource/update_resource_info.yml +114 -0
  76. data/spec/cassettes/resource/update_source_language.yml +54 -0
  77. data/spec/cassettes/resource/update_source_string_metadata.yml +100 -0
  78. data/spec/cassettes/resource/update_translation_for_language.yml +62 -0
  79. data/spec/cassettes/resources/create_from_file.yml +55 -0
  80. data/spec/cassettes/resources/create_from_string.yml +54 -0
  81. data/spec/cassettes/resources/fetch_as_array.yml +62 -0
  82. data/spec/cassettes/resources/non_existing_project.yml +55 -0
  83. data/spec/cassettes/translation/fetch_string.yml +55 -0
  84. data/spec/cassettes/translation/fetch_strings.yml +54 -0
  85. data/spec/cassettes/translation/fetch_with_details_and_context_strings.yml +51 -0
  86. data/spec/cassettes/translation/fetch_with_details_and_key_strings.yml +56 -0
  87. data/spec/cassettes/translation/fetch_with_details_strings.yml +56 -0
  88. data/spec/cassettes/translation/update_multiple_translation_strings.yml +107 -0
  89. data/spec/cassettes/translation/update_single_translation_strings.yml +104 -0
  90. data/spec/cassettes/translation/update_string.yml +104 -0
  91. data/spec/lib/transifex/coordinators_spec.rb +22 -16
  92. data/spec/lib/transifex/formats_spec.rb +8 -8
  93. data/spec/lib/transifex/language_spec.rb +9 -10
  94. data/spec/lib/transifex/languages_spec.rb +8 -8
  95. data/spec/lib/transifex/project_language_spec.rb +41 -28
  96. data/spec/lib/transifex/project_languages_spec.rb +34 -18
  97. data/spec/lib/transifex/project_spec.rb +46 -73
  98. data/spec/lib/transifex/projects_spec.rb +72 -37
  99. data/spec/lib/transifex/resource_content_spec.rb +41 -24
  100. data/spec/lib/transifex/resource_source_spec.rb +21 -19
  101. data/spec/lib/transifex/resource_spec.rb +69 -41
  102. data/spec/lib/transifex/resources_spec.rb +42 -34
  103. data/spec/lib/transifex/reviewers_spec.rb +23 -17
  104. data/spec/lib/transifex/stats_spec.rb +20 -24
  105. data/spec/lib/transifex/translation_spec.rb +60 -38
  106. data/spec/lib/transifex/translation_string_spec.rb +26 -20
  107. data/spec/lib/transifex/translation_strings_spec.rb +65 -43
  108. data/spec/lib/transifex/translators_spec.rb +23 -17
  109. data/spec/lib/transifex_spec.rb +15 -0
  110. data/spec/lib/yaml/eo.yml +3 -0
  111. data/spec/spec_helper.rb +19 -83
  112. data/spec/support/client_helper.rb +8 -0
  113. data/spec/support/content_helper.rb +346 -0
  114. data/transifex-interface-ruby.gemspec +28 -25
  115. metadata +198 -21
  116. data/spec/lib/transifex/configuration_spec.rb +0 -17
  117. data/spec/lib/yaml/resource_translation_default_content_test.yml +0 -4
  118. data/spec/lib/yaml/resource_translation_reviewed_content_test.yml +0 -9
@@ -0,0 +1,52 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://www.transifex.com/api/2/project/ruby-client/resource/json/source/e5152a2c9591f8ee13ba2c4e00655ae2
6
+ body:
7
+ encoding: UTF-8
8
+ string: "{}"
9
+ headers:
10
+ Content-Type:
11
+ - application/json
12
+ Accept:
13
+ - application/json
14
+ User-Agent:
15
+ - Transifex-interface-ruby/0.0.1
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ Authorization:
19
+ - Basic bS5naWFtYml0dG9AZnJlZWdvd2ViLml0Om1vbGxpXzAx
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Server:
26
+ - nginx
27
+ Vary:
28
+ - Accept-Encoding
29
+ - Authorization, Host, Accept-Language, Cookie
30
+ Content-Type:
31
+ - application/json; charset=utf-8
32
+ Date:
33
+ - Fri, 28 Apr 2017 09:02:08 GMT
34
+ Transfer-Encoding:
35
+ - chunked
36
+ Content-Language:
37
+ - en
38
+ X-Content-Type-Options:
39
+ - nosniff
40
+ Connection:
41
+ - keep-alive
42
+ Set-Cookie:
43
+ - X-Mapping-fjhppofk=978A30C321AEE9D0F95E25198189AC99; path=/
44
+ X-Frame-Options:
45
+ - SAMEORIGIN
46
+ body:
47
+ encoding: ASCII-8BIT
48
+ string: "{\n \"comment\": \"my comment\", \n \"character_limit\": 140,
49
+ \n \"tags\": [\n \"tag1\", \n \"tag2\"\n ]\n}"
50
+ http_version:
51
+ recorded_at: Fri, 28 Apr 2017 09:02:08 GMT
52
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,65 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://www.transifex.com/api/2/project/ruby-client/resource/json?details=true
6
+ body:
7
+ encoding: UTF-8
8
+ string: "{}"
9
+ headers:
10
+ Content-Type:
11
+ - application/json
12
+ Accept:
13
+ - application/json
14
+ User-Agent:
15
+ - Transifex-interface-ruby/0.0.1
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ Authorization:
19
+ - Basic bS5naWFtYml0dG9AZnJlZWdvd2ViLml0Om1vbGxpXzAx
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Server:
26
+ - nginx
27
+ Vary:
28
+ - Accept-Encoding
29
+ - Authorization, Host, Accept-Language, Cookie
30
+ Cache-Control:
31
+ - max-age=0
32
+ Content-Type:
33
+ - application/json; charset=utf-8
34
+ Date:
35
+ - Fri, 28 Apr 2017 09:23:39 GMT
36
+ Expires:
37
+ - Fri, 28 Apr 2017 09:23:39 GMT
38
+ Transfer-Encoding:
39
+ - chunked
40
+ Content-Language:
41
+ - en
42
+ X-Content-Type-Options:
43
+ - nosniff
44
+ Connection:
45
+ - keep-alive
46
+ Set-Cookie:
47
+ - X-Mapping-fjhppofk=100E7CB61F7D5C274279F09EADF920A3; path=/
48
+ Last-Modified:
49
+ - Fri, 28 Apr 2017 09:23:39 GMT
50
+ X-Frame-Options:
51
+ - SAMEORIGIN
52
+ body:
53
+ encoding: ASCII-8BIT
54
+ string: "{\n \"source_language_code\": \"eo\", \n \"name\": \"JSON file
55
+ example\", \n \"created\": \"2017-04-27T13:36:43.747\", \n \"wordcount\":
56
+ 2, \n \"i18n_type\": \"KEYVALUEJSON\", \n \"project_slug\": \"ruby-client\",
57
+ \n \"accept_translations\": true, \n \"last_update\": \"2017-04-27T13:43:29.019\",
58
+ \n \"priority\": \"0\", \n \"available_languages\": [\n {\n \"code_aliases\":
59
+ \" \", \n \"code\": \"en\", \n \"name\": \"English\"\n
60
+ \ }, \n {\n \"code_aliases\": \" \", \n \"code\":
61
+ \"eo\", \n \"name\": \"Esperanto\"\n }\n ], \n \"total_entities\":
62
+ 1, \n \"slug\": \"json\", \n \"categories\": null\n}"
63
+ http_version:
64
+ recorded_at: Fri, 28 Apr 2017 09:23:39 GMT
65
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,56 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://www.transifex.com/api/2/project/ruby-client/resource/test/translation/en?file=true&mode=translator
6
+ body:
7
+ encoding: UTF-8
8
+ string: "{}"
9
+ headers:
10
+ Content-Type:
11
+ - application/json
12
+ Accept:
13
+ - application/json
14
+ User-Agent:
15
+ - Transifex-interface-ruby/0.0.1
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ Authorization:
19
+ - Basic bS5naWFtYml0dG9AZnJlZWdvd2ViLml0Om1vbGxpXzAx
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Server:
26
+ - nginx
27
+ Cache-Control:
28
+ - max-age=0
29
+ Content-Type:
30
+ - text/plain
31
+ Date:
32
+ - Thu, 04 May 2017 08:59:32 GMT
33
+ Expires:
34
+ - Thu, 04 May 2017 08:59:32 GMT
35
+ Accept-Ranges:
36
+ - bytes
37
+ X-Content-Type-Options:
38
+ - nosniff
39
+ Content-Disposition:
40
+ - attachment; filename=UTF-8''updated%20name_en.yml
41
+ Connection:
42
+ - keep-alive
43
+ Set-Cookie:
44
+ - X-Mapping-fjhppofk=A44BEC4CD0B51682CDC2AA3E9CCFDDF4; path=/
45
+ Last-Modified:
46
+ - Thu, 04 May 2017 08:59:32 GMT
47
+ Content-Length:
48
+ - '22'
49
+ body:
50
+ encoding: UTF-8
51
+ string: |
52
+ en:
53
+ test_string: ""
54
+ http_version:
55
+ recorded_at: Thu, 04 May 2017 08:59:32 GMT
56
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,56 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://www.transifex.com/api/2/project/ruby-client/resource/test/translation/en?file=true
6
+ body:
7
+ encoding: UTF-8
8
+ string: "{}"
9
+ headers:
10
+ Content-Type:
11
+ - application/json
12
+ Accept:
13
+ - application/json
14
+ User-Agent:
15
+ - Transifex-interface-ruby/0.0.1
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ Authorization:
19
+ - Basic bS5naWFtYml0dG9AZnJlZWdvd2ViLml0Om1vbGxpXzAx
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Server:
26
+ - nginx
27
+ Cache-Control:
28
+ - max-age=0
29
+ Content-Type:
30
+ - text/plain
31
+ Date:
32
+ - Thu, 04 May 2017 08:29:10 GMT
33
+ Expires:
34
+ - Thu, 04 May 2017 08:29:10 GMT
35
+ Accept-Ranges:
36
+ - bytes
37
+ X-Content-Type-Options:
38
+ - nosniff
39
+ Content-Disposition:
40
+ - attachment; filename=UTF-8''updated%20name_en.yml
41
+ Connection:
42
+ - keep-alive
43
+ Set-Cookie:
44
+ - X-Mapping-fjhppofk=A44BEC4CD0B51682CDC2AA3E9CCFDDF4; path=/
45
+ Last-Modified:
46
+ - Thu, 04 May 2017 08:29:10 GMT
47
+ Content-Length:
48
+ - '7'
49
+ body:
50
+ encoding: UTF-8
51
+ string: 'en: {}
52
+
53
+ '
54
+ http_version:
55
+ recorded_at: Thu, 04 May 2017 08:29:10 GMT
56
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,115 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://www.transifex.com/api/2/project/ruby-client/resource/json
6
+ body:
7
+ encoding: UTF-8
8
+ string: "{}"
9
+ headers:
10
+ Content-Type:
11
+ - application/json
12
+ Accept:
13
+ - application/json
14
+ User-Agent:
15
+ - Transifex-interface-ruby/0.0.1
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ Authorization:
19
+ - Basic bS5naWFtYml0dG9AZnJlZWdvd2ViLml0Om1vbGxpXzAx
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Server:
26
+ - nginx
27
+ Vary:
28
+ - Accept-Encoding
29
+ - Authorization, Host, Accept-Language, Cookie
30
+ Cache-Control:
31
+ - max-age=0
32
+ Content-Type:
33
+ - application/json; charset=utf-8
34
+ Date:
35
+ - Fri, 05 May 2017 08:11:20 GMT
36
+ Expires:
37
+ - Fri, 05 May 2017 08:11:20 GMT
38
+ Transfer-Encoding:
39
+ - chunked
40
+ Content-Language:
41
+ - en
42
+ X-Content-Type-Options:
43
+ - nosniff
44
+ Connection:
45
+ - keep-alive
46
+ Set-Cookie:
47
+ - X-Mapping-fjhppofk=A44BEC4CD0B51682CDC2AA3E9CCFDDF4; path=/
48
+ Last-Modified:
49
+ - Fri, 05 May 2017 08:11:20 GMT
50
+ X-Frame-Options:
51
+ - SAMEORIGIN
52
+ body:
53
+ encoding: ASCII-8BIT
54
+ string: "{\n \"source_language_code\": \"eo\", \n \"name\": \"JSON file
55
+ example\", \n \"i18n_type\": \"KEYVALUEJSON\", \n \"priority\": \"0\",
56
+ \n \"slug\": \"json\", \n \"categories\": null\n}"
57
+ http_version:
58
+ recorded_at: Fri, 05 May 2017 08:11:20 GMT
59
+ - request:
60
+ method: put
61
+ uri: http://www.transifex.com/api/2/project/ruby-client/resource/json/content
62
+ body:
63
+ encoding: UTF-8
64
+ string: '{"i18n_type":"KEYVALUEJSON","content":"{\"test_string\":\"test string
65
+ as json\"}"}'
66
+ headers:
67
+ Content-Type:
68
+ - application/json
69
+ Accept:
70
+ - application/json
71
+ User-Agent:
72
+ - Transifex-interface-ruby/0.0.1
73
+ Accept-Encoding:
74
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
75
+ Authorization:
76
+ - Basic bS5naWFtYml0dG9AZnJlZWdvd2ViLml0Om1vbGxpXzAx
77
+ response:
78
+ status:
79
+ code: 200
80
+ message: OK
81
+ headers:
82
+ Server:
83
+ - nginx
84
+ Vary:
85
+ - Accept-Encoding
86
+ - Authorization, Host, Accept-Language, Cookie
87
+ Cache-Control:
88
+ - max-age=0
89
+ Content-Type:
90
+ - application/json; charset=utf-8
91
+ Date:
92
+ - Fri, 05 May 2017 08:11:22 GMT
93
+ Expires:
94
+ - Fri, 05 May 2017 08:11:22 GMT
95
+ Transfer-Encoding:
96
+ - chunked
97
+ Content-Language:
98
+ - en
99
+ X-Content-Type-Options:
100
+ - nosniff
101
+ Connection:
102
+ - keep-alive
103
+ Set-Cookie:
104
+ - X-Mapping-fjhppofk=A44BEC4CD0B51682CDC2AA3E9CCFDDF4; path=/
105
+ Last-Modified:
106
+ - Fri, 05 May 2017 08:11:22 GMT
107
+ X-Frame-Options:
108
+ - SAMEORIGIN
109
+ body:
110
+ encoding: ASCII-8BIT
111
+ string: "{\n \"strings_added\": 0, \n \"strings_updated\": 1, \n \"strings_delete\":
112
+ 0, \n \"redirect\": \"/ruby-client/json/\"\n}"
113
+ http_version:
114
+ recorded_at: Fri, 05 May 2017 08:11:22 GMT
115
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,59 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://www.transifex.com/api/2/project/ruby-client/resource/test
6
+ body:
7
+ encoding: UTF-8
8
+ string: "{}"
9
+ headers:
10
+ Content-Type:
11
+ - application/json
12
+ Accept:
13
+ - application/json
14
+ User-Agent:
15
+ - Transifex-interface-ruby/0.0.1
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ Authorization:
19
+ - Basic bS5naWFtYml0dG9AZnJlZWdvd2ViLml0Om1vbGxpXzAx
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Server:
26
+ - nginx
27
+ Vary:
28
+ - Accept-Encoding
29
+ - Authorization, Host, Accept-Language, Cookie
30
+ Cache-Control:
31
+ - max-age=0
32
+ Content-Type:
33
+ - application/json; charset=utf-8
34
+ Date:
35
+ - Thu, 27 Apr 2017 14:12:46 GMT
36
+ Expires:
37
+ - Thu, 27 Apr 2017 14:12:46 GMT
38
+ Transfer-Encoding:
39
+ - chunked
40
+ Content-Language:
41
+ - en
42
+ X-Content-Type-Options:
43
+ - nosniff
44
+ Connection:
45
+ - keep-alive
46
+ Set-Cookie:
47
+ - X-Mapping-fjhppofk=A44BEC4CD0B51682CDC2AA3E9CCFDDF4; path=/
48
+ Last-Modified:
49
+ - Thu, 27 Apr 2017 14:12:46 GMT
50
+ X-Frame-Options:
51
+ - SAMEORIGIN
52
+ body:
53
+ encoding: ASCII-8BIT
54
+ string: "{\n \"source_language_code\": \"eo\", \n \"name\": \"test\",
55
+ \n \"i18n_type\": \"YML\", \n \"priority\": \"0\", \n \"slug\": \"test\",
56
+ \n \"categories\": null\n}"
57
+ http_version:
58
+ recorded_at: Thu, 27 Apr 2017 14:12:46 GMT
59
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,114 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://www.transifex.com/api/2/project/ruby-client/resource/test
6
+ body:
7
+ encoding: UTF-8
8
+ string: "{}"
9
+ headers:
10
+ Content-Type:
11
+ - application/json
12
+ Accept:
13
+ - application/json
14
+ User-Agent:
15
+ - Transifex-interface-ruby/0.0.1
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ Authorization:
19
+ - Basic bS5naWFtYml0dG9AZnJlZWdvd2ViLml0Om1vbGxpXzAx
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Server:
26
+ - nginx
27
+ Vary:
28
+ - Accept-Encoding
29
+ - Authorization, Host, Accept-Language, Cookie
30
+ Cache-Control:
31
+ - max-age=0
32
+ Content-Type:
33
+ - application/json; charset=utf-8
34
+ Date:
35
+ - Thu, 27 Apr 2017 14:08:57 GMT
36
+ Expires:
37
+ - Thu, 27 Apr 2017 14:08:57 GMT
38
+ Transfer-Encoding:
39
+ - chunked
40
+ Content-Language:
41
+ - en
42
+ X-Content-Type-Options:
43
+ - nosniff
44
+ Connection:
45
+ - keep-alive
46
+ Set-Cookie:
47
+ - X-Mapping-fjhppofk=978A30C321AEE9D0F95E25198189AC99; path=/
48
+ Last-Modified:
49
+ - Thu, 27 Apr 2017 14:08:57 GMT
50
+ X-Frame-Options:
51
+ - SAMEORIGIN
52
+ body:
53
+ encoding: ASCII-8BIT
54
+ string: "{\n \"source_language_code\": \"eo\", \n \"name\": \"test\",
55
+ \n \"i18n_type\": \"YML\", \n \"priority\": \"0\", \n \"slug\": \"test\",
56
+ \n \"categories\": null\n}"
57
+ http_version:
58
+ recorded_at: Thu, 27 Apr 2017 14:08:57 GMT
59
+ - request:
60
+ method: put
61
+ uri: http://www.transifex.com/api/2/project/ruby-client/resource/test/content
62
+ body:
63
+ encoding: UTF-8
64
+ string: '{"i18n_type":"YAML","content":"eo:\n test_string: \"test string\"\n"}'
65
+ headers:
66
+ Content-Type:
67
+ - application/json
68
+ Accept:
69
+ - application/json
70
+ User-Agent:
71
+ - Transifex-interface-ruby/0.0.1
72
+ Accept-Encoding:
73
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
74
+ Authorization:
75
+ - Basic bS5naWFtYml0dG9AZnJlZWdvd2ViLml0Om1vbGxpXzAx
76
+ response:
77
+ status:
78
+ code: 200
79
+ message: OK
80
+ headers:
81
+ Server:
82
+ - nginx
83
+ Vary:
84
+ - Accept-Encoding
85
+ - Authorization, Host, Accept-Language, Cookie
86
+ Cache-Control:
87
+ - max-age=0
88
+ Content-Type:
89
+ - application/json; charset=utf-8
90
+ Date:
91
+ - Thu, 27 Apr 2017 14:08:57 GMT
92
+ Expires:
93
+ - Thu, 27 Apr 2017 14:08:57 GMT
94
+ Transfer-Encoding:
95
+ - chunked
96
+ Content-Language:
97
+ - en
98
+ X-Content-Type-Options:
99
+ - nosniff
100
+ Connection:
101
+ - keep-alive
102
+ Set-Cookie:
103
+ - X-Mapping-fjhppofk=2F71BA404CBE394603A72279804CAC7D; path=/
104
+ Last-Modified:
105
+ - Thu, 27 Apr 2017 14:08:57 GMT
106
+ X-Frame-Options:
107
+ - SAMEORIGIN
108
+ body:
109
+ encoding: ASCII-8BIT
110
+ string: "{\n \"strings_added\": 1, \n \"strings_updated\": 0, \n \"strings_delete\":
111
+ 1, \n \"redirect\": \"/ruby-client/test/\"\n}"
112
+ http_version:
113
+ recorded_at: Thu, 27 Apr 2017 14:08:58 GMT
114
+ recorded_with: VCR 3.0.3