toptranslation_cli 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: defb641490501211a681e34f71c9f977d19829c3d9cb806d5a862ac34ea2a51f
4
- data.tar.gz: 9f09c3b6f69b06edc69e2bb9a68f5e8033d996395e52998769ebe817ad5db2fb
3
+ metadata.gz: 233119c9bbbc8ac2c69a81f16620229176b9add7bfa5e6159c5d0624945a5126
4
+ data.tar.gz: e1e08b4bd6a3d059dc1ac8c91a80c72587cdad47d54e92f446858c5093edcec3
5
5
  SHA512:
6
- metadata.gz: 45521958d418d25fd2c6b4064835c58c8a7d21ee48fd9adc752c8157066a83d9d2dc538cf4014730c0c1b8b987081aac05d7a247e66917c0e2f48f5b5161cb24
7
- data.tar.gz: a9db0159effc82e260e9abe6ce288e332cc93a980ccbb320b5a1c1bf250ae771ef94945c1298b8503b422f3d07ec40ba39c3ace5aab7b3a73d6b17b4f5db3acb
6
+ metadata.gz: 5629f83491b9937ab92ec64490d9866e29aae2909daca935e68e018760b56a1c1f0f67033d8ab4cac3294732a89598cd9e8c51b801b0be48228709bbabddd30f
7
+ data.tar.gz: 99bdfd882cc6a32fd9fec01d5cdc3757b323a066aa5310bfc0418efae8e11129e63b49f4654e4c57043ea2332ca76cd67399cd1c80d5f041847b2245b437f1e1
data/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ <a name="1.0.1"></a>
2
+ ### 1.0.1 (2019-10-08)
3
+
4
+ #### Bug Fixes
5
+
6
+ * rename a private method which was called by a a different name ([dc1e265](/../commit/dc1e265))
7
+ * make regex for placeholder paths case insensitive ([fe1d0dd](/../commit/fe1d0dd))
8
+
9
+ #### maintain
10
+
11
+ * make tt init use the same configuration as the other commands ([6b7370c](/../commit/6b7370c))
12
+
1
13
  <a name="1.0.0"></a>
2
14
  ### 1.0.0 (2019-10-08)
3
15
 
@@ -6,13 +6,18 @@ module ToptranslationCli
6
6
 
7
7
  FILENAME = '.toptranslation.yml'
8
8
 
9
+ def initialize
10
+ @files_base_url = 'https://files.toptranslation.com'
11
+ @api_base_url = 'https://api.toptranslation.com'
12
+ @verbose = !ENV['VERBOSE'].nil?
13
+ end
14
+
9
15
  def load
10
16
  @project_identifier = configuration['project_identifier']
11
17
  @access_token = configuration['access_token']
18
+ @files_base_url = configuration['files_base_url'] || @files_base_url
19
+ @api_base_url = configuration['api_base_url'] || @api_base_url
12
20
  @files = configuration['files'] || []
13
- @files_base_url = configuration['files_base_url'] || 'https://files.toptranslation.com'
14
- @api_base_url = configuration['api_base_url'] || 'https://api.toptranslation.com'
15
- @verbose = !ENV['VERBOSE'].nil?
16
21
  end
17
22
 
18
23
  def save
@@ -34,7 +34,7 @@ module ToptranslationCli
34
34
 
35
35
  private
36
36
 
37
- def add_remote_file(document, locale, translation)
37
+ def remote_file(document, locale, translation)
38
38
  {
39
39
  sha1: translation.sha1,
40
40
  identifier: document.identifier,
@@ -14,7 +14,7 @@ module ToptranslationCli
14
14
 
15
15
  def initialize
16
16
  @prompt = TTY::Prompt.new
17
- @client = Toptranslation.new({})
17
+ @client = ToptranslationCli.connection
18
18
  @pastel = Pastel.new
19
19
  format = "[#{@pastel.yellow(':spinner')}] :title"
20
20
  @spinner = TTY::Spinner.new(format, success_mark: @pastel.green('+'), error_mark: @pastel.red('-'))
@@ -35,6 +35,6 @@ class PlaceholderPath
35
35
  splits = string.split('{locale_code}') # (3)
36
36
  path = splits.map { |segment| "(#{segment})" }.join(locale_code) # (4)
37
37
 
38
- Regexp.new(path)
38
+ Regexp.new(path, Regexp::IGNORECASE)
39
39
  end
40
40
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ToptranslationCli
4
- VERSION = '1.0.0'
4
+ VERSION = '1.0.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: toptranslation_cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Toptranslation GmbH