yamlfish 0.1.0.rc2 → 0.1.0.rc4
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 +6 -3
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/exe/yamlfish +2 -1
- data/lib/yamlfish/cli/push.rb +6 -2
- data/lib/yamlfish/cli/version.rb +1 -1
- data/lib/yamlfish/cli/yaml_dumper.rb +4 -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: c9f9f487b00f7a7c96974506a584a7a437fa015410320d33918f4dc644d97163
|
4
|
+
data.tar.gz: d81e5b8b6ece926871c4a342511f2ed891ce93a99479aa59606a807283f22644
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 07def78b64bf452f2dab86becf67be6c6bfb173f6f7f68484384de0e486441934fad5db0da36bfabad7686ddd974c7a0ab173751c6dbb242e2badc6b07217577
|
7
|
+
data.tar.gz: 1ee17872e6d82a7395027f178edc1f1e2114f8d92f9d20fa1ae17b58fc068d069b6dc7eca5cb682d76a4f544e00c446da5c554248327df8a52bc7ee08423e0f8
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
|
-
## [Unreleased]
|
1
|
+
<!-- ## [Unreleased] -->
|
2
2
|
|
3
|
-
## [0.1.0] -
|
3
|
+
## [0.1.0.rc4] - 2025-03-22
|
4
|
+
* Fix emojis being converted to unicode when doing `yaml pull`
|
5
|
+
|
6
|
+
## [0.1.0.rc3] - 2024-09-08
|
7
|
+
* Add `-k` / `--keep-unmentioned-keys` option to `push` command
|
4
8
|
|
5
|
-
- Initial release
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# YAMLFish CLI
|
2
2
|
|
3
|
-
This is the command line interface for [YAMLFish](https
|
3
|
+
This is the command line interface for [YAMLFish](https://yamlfish.dev), the simple and powerful translation management platform.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
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
@@ -13,7 +13,10 @@ module Yamlfish
|
|
13
13
|
node.style = Psych::Nodes::Scalar::LITERAL if node.value.include?("\n")
|
14
14
|
end
|
15
15
|
|
16
|
-
ast.yaml(nil, {line_width: -1})
|
16
|
+
ast.yaml(nil, {line_width: -1}).then do |yaml|
|
17
|
+
# Restore emojis
|
18
|
+
yaml.gsub(/\\u[\da-f]{8}/i) { |m| [m[-8..].to_i(16)].pack("U") }
|
19
|
+
end
|
17
20
|
end
|
18
21
|
end
|
19
22
|
end
|
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.rc4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adrien Siami
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-03-22 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: []
|