yamlfish 0.1.0.rc2 → 0.1.0.rc3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -3
- data/Gemfile.lock +1 -1
- data/exe/yamlfish +2 -1
- data/lib/yamlfish/cli/push.rb +6 -2
- data/lib/yamlfish/cli/version.rb +1 -1
- metadata +7 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8a41671e059e352e76f132c0fbcd0106cc9a17cee26872cb8c78fbb44e9720a6
|
4
|
+
data.tar.gz: 343c3d9fde40e58ab909f7ae79c938058875c00d305ecaa08f7ca842c50907c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a55ee62dc45c611e6f5634b64b2ff4209735fcc514bd2a42ffe0fe4964da0e90b2e5fea2a8b2769ccc0a3a6963620e88c0b4390c55386cee6f80ad03b8e558a
|
7
|
+
data.tar.gz: aff8fb4f4ede8bc7ed0a2a08ffb8bd2b1de9bd0ecda29e34fcb84a2561557d0071e6a0ab7d1821cbe370d41ba866cf63ed5c8813fc0ce94cab3ca9cc0ff5ea9a
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/exe/yamlfish
CHANGED
@@ -7,8 +7,9 @@ require_relative "../lib/yamlfish/cli"
|
|
7
7
|
class YamlfishExe < Thor
|
8
8
|
desc "push", "Pushes translations to yamlfish"
|
9
9
|
option :branch, type: :string, default: "main"
|
10
|
+
option :keep_unmentioned_keys, type: :boolean, default: false, aliases: "-k"
|
10
11
|
def push(locale)
|
11
|
-
Yamlfish::Cli::Push.new(locale, branch: options[:branch]).call
|
12
|
+
Yamlfish::Cli::Push.new(locale, branch: options[:branch], keep_unmentioned_keys: options[:keep_unmentioned_keys]).call
|
12
13
|
rescue Errno::ENOENT => e
|
13
14
|
puts Rainbow("Could not push: #{e.message}").red.bright
|
14
15
|
exit 1
|
data/lib/yamlfish/cli/push.rb
CHANGED
@@ -6,9 +6,10 @@ require "faraday"
|
|
6
6
|
module Yamlfish
|
7
7
|
module Cli
|
8
8
|
class Push
|
9
|
-
def initialize(locale_identifier, branch: "main")
|
9
|
+
def initialize(locale_identifier, branch: "main", keep_unmentioned_keys: false)
|
10
10
|
@locale_identifier = locale_identifier
|
11
11
|
@branch = branch
|
12
|
+
@keep_unmentioned_keys = keep_unmentioned_keys
|
12
13
|
end
|
13
14
|
|
14
15
|
def call
|
@@ -22,7 +23,10 @@ module Yamlfish
|
|
22
23
|
|
23
24
|
response = Faraday.post(
|
24
25
|
"#{Yamlfish::Cli.configuration.base_url}/projects/#{Yamlfish::Cli.configuration.project_token}/#{@branch}/locales/#{@locale_identifier}/import",
|
25
|
-
{
|
26
|
+
{
|
27
|
+
keep_unmentioned_keys: @keep_unmentioned_keys,
|
28
|
+
data: JSON.dump(translations)
|
29
|
+
},
|
26
30
|
{
|
27
31
|
"Authorization": "Bearer #{Yamlfish::Cli.configuration.api_key}"
|
28
32
|
}
|
data/lib/yamlfish/cli/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yamlfish
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0.
|
4
|
+
version: 0.1.0.rc3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adrien Siami
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-09-
|
11
|
+
date: 2024-09-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -66,7 +66,8 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '3.1'
|
69
|
-
description:
|
69
|
+
description: YAMLFish helps developers and product managers with i18n and translation
|
70
|
+
management simply and efficiently.
|
70
71
|
email:
|
71
72
|
- adrien@siami.fr
|
72
73
|
executables:
|
@@ -94,8 +95,9 @@ homepage: https://yamlfish.dev
|
|
94
95
|
licenses:
|
95
96
|
- MIT
|
96
97
|
metadata:
|
97
|
-
source_code_uri: https://github.com/yamlfish/yamlfish-cli
|
98
98
|
homepage_uri: https://yamlfish.dev
|
99
|
+
source_code_uri: https://github.com/yamlfish/yamlfish-cli
|
100
|
+
changelog_uri: https://github.com/YAMLFish/yamlfish-cli/blob/master/CHANGELOG.md
|
99
101
|
post_install_message:
|
100
102
|
rdoc_options: []
|
101
103
|
require_paths:
|
@@ -114,5 +116,5 @@ requirements: []
|
|
114
116
|
rubygems_version: 3.5.10
|
115
117
|
signing_key:
|
116
118
|
specification_version: 4
|
117
|
-
summary:
|
119
|
+
summary: CLI for YAMLFish, the simple and powerful translation management platform
|
118
120
|
test_files: []
|