neeto-translate-cli 0.1.8.beta0 → 0.1.8

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0c73059ad20700c02e1403314dd4d02883a0ecb44eb7844f853703486b3d31d7
4
- data.tar.gz: '017610084ab7ac9d466e1d4a841de80f5101e6bf04308e9e499aab1862570ab6'
3
+ metadata.gz: cb434279a1de983aa87756bcc1417772548a8e8a917cb5fdc78502cb00e3e66e
4
+ data.tar.gz: 5d3d5f98971d257304b1fce67d02187223cd692f97bc0a34cd7ede2babab4518
5
5
  SHA512:
6
- metadata.gz: afb0a7b73fa6f569a84579ea6bb981434adab7545cd25cf21571e691a4e99e3398d7bb72d4cc16b7f11a2a93006919ed1445aa8ee83ba475abe5b675200508e0
7
- data.tar.gz: 5c120b5eaf309f47239b26b48e462626448d6097ceffeebcc3dc206d4254f9df1e986e5ae759ff30487bc8c8e5de323a6066e721283e8f51dea08914ba61718d
6
+ metadata.gz: 0d4f2f9f216bedf499006d886b69ce16d2140238b007054e17fda8aa08487044b8cd2414f5a68c1954bde394d4de1a7618b4a3aaa6cf10bbb2ca87ec97002def
7
+ data.tar.gz: 8485944b91dafaa1e583741304b6fd3508eff19ee5662a8e640e1ff51ed32ec9381e9112732f1db31c442d36f2281c22cb32bad83ca3470afb6eb641ad1d004e
@@ -6,7 +6,7 @@ require "optparse"
6
6
 
7
7
  module NeetoTranslateCli
8
8
  class CLI
9
- DEFAULT_LANGUAGES = "en,ar,bg,ca,zh-cn,zh-tw,hr,cs,da,nl,et,fil,fi,fr,de,hi,id,it,ja,ko,pl,pt,pt-br,ro,ru,sk,sl,es,es-mx,sv,th,tr,uk,vi"
9
+ DEFAULT_LANGUAGES = "en,ar,bg,ca,zh-CN,zh-TW,hr,cs,da,nl,et,fil,fi,fr,de,hi,id,it,ja,ko,pl,pt,pt-BR,ro,ru,sk,sl,es,es-MX,sv,th,tr,uk,vi"
10
10
  NEETO_TRANSLATE_URL = "https://translate.neeto.com"
11
11
  DEFAULT_BACKEND_LOCALE_PATH = "config/locales"
12
12
  DEFAULT_FRONTEND_LOCALE_PATH = "app/javascript/src/translations"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module NeetoTranslateCli
4
- VERSION = "0.1.8.beta0"
4
+ VERSION = "0.1.8"
5
5
  end
@@ -13,17 +13,17 @@ class NeetoTranslateCli::CLITest < Minitest::Test
13
13
  def test_start_with_default_options
14
14
  cli = NeetoTranslateCli::CLI.new([])
15
15
  options = cli.send(:parse_options, [])
16
-
16
+
17
17
  assert_equal "app/javascript/src/translations", options[:frontend]
18
18
  assert_equal "config/locales", options[:backend]
19
- assert_equal %w[en fr de es], options[:default_languages]
19
+ assert_equal ::NeetoTranslateCli::CLI::DEFAULT_LANGUAGES.split(","), options[:default_languages]
20
20
  assert_equal @original_git_repo, options[:repo]
21
21
  end
22
22
 
23
23
  def test_start_with_custom_frontend_path
24
24
  cli = NeetoTranslateCli::CLI.new([])
25
25
  options = cli.send(:parse_options, ["--frontend", "custom/frontend/path"])
26
-
26
+
27
27
  assert_equal "custom/frontend/path", options[:frontend]
28
28
  assert_equal "config/locales", options[:backend]
29
29
  end
@@ -31,7 +31,7 @@ class NeetoTranslateCli::CLITest < Minitest::Test
31
31
  def test_start_with_custom_backend_path
32
32
  cli = NeetoTranslateCli::CLI.new([])
33
33
  options = cli.send(:parse_options, ["--backend", "custom/backend/path"])
34
-
34
+
35
35
  assert_equal "app/javascript/src/translations", options[:frontend]
36
36
  assert_equal "custom/backend/path", options[:backend]
37
37
  end
@@ -39,26 +39,26 @@ class NeetoTranslateCli::CLITest < Minitest::Test
39
39
  def test_start_with_custom_languages
40
40
  cli = NeetoTranslateCli::CLI.new([])
41
41
  options = cli.send(:parse_options, ["--defaults", "ja,ko,zh"])
42
-
42
+
43
43
  assert_equal %w[ja ko zh], options[:default_languages]
44
44
  end
45
45
 
46
46
  def test_start_with_custom_repo
47
47
  cli = NeetoTranslateCli::CLI.new([])
48
48
  options = cli.send(:parse_options, ["--repo", "neetozone/custom-repo"])
49
-
49
+
50
50
  assert_equal "neetozone/custom-repo", options[:repo]
51
51
  end
52
52
 
53
53
  def test_start_with_all_custom_options
54
54
  cli = NeetoTranslateCli::CLI.new([])
55
55
  options = cli.send(:parse_options, [
56
- "--frontend", "custom/frontend",
57
- "--backend", "custom/backend",
58
- "--defaults", "ja,ko",
59
- "--repo", "neetozone/test-repo"
60
- ])
61
-
56
+ "--frontend", "custom/frontend",
57
+ "--backend", "custom/backend",
58
+ "--defaults", "ja,ko",
59
+ "--repo", "neetozone/test-repo"
60
+ ])
61
+
62
62
  assert_equal "custom/frontend", options[:frontend]
63
63
  assert_equal "custom/backend", options[:backend]
64
64
  assert_equal %w[ja ko], options[:default_languages]
@@ -69,26 +69,26 @@ class NeetoTranslateCli::CLITest < Minitest::Test
69
69
  ENV["DEFAULT_LANGUAGES"] = "ja,ko,zh"
70
70
  cli = NeetoTranslateCli::CLI.new([])
71
71
  options = cli.send(:parse_options, [])
72
-
72
+
73
73
  assert_equal %w[ja ko zh], options[:default_languages]
74
74
  end
75
75
 
76
76
  def test_run_calls_translator
77
77
  mock_translator = Minitest::Mock.new
78
78
  mock_translator.expect :process!, nil
79
-
79
+
80
80
  options = {
81
81
  frontend: "test/fixtures/frontend",
82
82
  backend: "test/fixtures/backend",
83
83
  default_languages: %w[es de],
84
84
  repo: "test-repo"
85
85
  }
86
-
86
+
87
87
  NeetoTranslateCli::Translator.stub :new, mock_translator do
88
88
  cli = NeetoTranslateCli::CLI.new([])
89
89
  cli.send(:run_with_options, options)
90
90
  end
91
-
91
+
92
92
  mock_translator.verify
93
93
  end
94
94
 
@@ -98,4 +98,4 @@ class NeetoTranslateCli::CLITest < Minitest::Test
98
98
  cli = NeetoTranslateCli::CLI.new(args)
99
99
  cli.send(:parse_options, args)
100
100
  end
101
- end
101
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: neeto-translate-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8.beta0
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Abhay V Ashokan
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-08-01 00:00:00.000000000 Z
11
+ date: 2025-08-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday