yamlfish 0.1.0.rc1 → 0.1.0.rc3

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: 49157d9d4bd38be7815795f988ec8b7029099a624c461ddd0b10e56f901e1ca5
4
- data.tar.gz: 761f1992eb5676261ca80a84a7b1b5b69690052f16ddb5b3445146738232ffd3
3
+ metadata.gz: 8a41671e059e352e76f132c0fbcd0106cc9a17cee26872cb8c78fbb44e9720a6
4
+ data.tar.gz: 343c3d9fde40e58ab909f7ae79c938058875c00d305ecaa08f7ca842c50907c6
5
5
  SHA512:
6
- metadata.gz: 4cf03873a81a812551491e8bee607b0a0beefb4000a57de94f789b81cd66fbb76e1b221376e65c2380fa19b35eb56850b4f6c8ffa2313a8289d8d0b09204370d
7
- data.tar.gz: 8b5ca3a399a3bed89c3edc87b001c886b6690cd3955ab6b8bd334a0aae155220d085236b858b3ebc892f1d7bc7c0d8203d7ee7d51516b7a0de6e003a96f6b8c7
6
+ metadata.gz: 7a55ee62dc45c611e6f5634b64b2ff4209735fcc514bd2a42ffe0fe4964da0e90b2e5fea2a8b2769ccc0a3a6963620e88c0b4390c55386cee6f80ad03b8e558a
7
+ data.tar.gz: aff8fb4f4ede8bc7ed0a2a08ffb8bd2b1de9bd0ecda29e34fcb84a2561557d0071e6a0ab7d1821cbe370d41ba866cf63ed5c8813fc0ce94cab3ca9cc0ff5ea9a
data/CHANGELOG.md CHANGED
@@ -1,5 +1,5 @@
1
- ## [Unreleased]
1
+ <!-- ## [Unreleased] -->
2
2
 
3
- ## [0.1.0] - 2023-07-16
3
+ ## [0.1.0.rc3] - 2024-09-08
4
+ * Add `-k` / `--keep-unmentioned-keys` option to `push` command
4
5
 
5
- - Initial release
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- yamlfish (0.1.0.rc1)
4
+ yamlfish (0.1.0.rc3)
5
5
  activesupport (>= 6)
6
6
  faraday (~> 2.0)
7
7
  rainbow (~> 3.1)
data/README.md CHANGED
@@ -1 +1,33 @@
1
- # Yamlfish
1
+ # YAMLFish CLI
2
+
3
+ This is the command line interface for [YAMLFish](https:s://yamlfish.dev), the simple and powerful translation management platform.
4
+
5
+ ## Installation
6
+
7
+ The YAMLFish CLI is available as a Ruby gem.
8
+ First, make sure you have Ruby installed on your machine. You can follow the [official Ruby installation guide](https://www.ruby-lang.org/en/documentation/installation/) for your operating system.
9
+
10
+ Then, to install the YAMLFish CLI, run:
11
+
12
+ ```bash
13
+ gem install yamlfish --pre
14
+ ```
15
+
16
+ YAMLFish is still in beta, hence the `--pre` flag to install the latest RC.
17
+
18
+ ## Configuration
19
+
20
+ Before you can use the YAMLFish CLI, you need to configure it with your API key and project token.
21
+
22
+ To do this, create a `.yamlfish.yml` file in your project's root directory with the following content:
23
+
24
+ ```yaml
25
+ api_key: YOUR_API_KEY
26
+ project_token: YOUR_PROJECT_TOKEN
27
+ ```
28
+
29
+ Those secrets can be found in the footer of your project's page on YAMLFish.
30
+
31
+ ## Usage
32
+
33
+ For usage instructions, please refer to the [official documentation](https://yamlfish.dev/docs/).
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
@@ -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
- { data: JSON.dump(translations) },
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
  }
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Yamlfish
4
4
  module Cli
5
- VERSION = "0.1.0.rc1"
5
+ VERSION = "0.1.0.rc3"
6
6
  end
7
7
  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.rc1
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-04 00:00:00.000000000 Z
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:
@@ -95,6 +96,8 @@ licenses:
95
96
  - MIT
96
97
  metadata:
97
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
98
101
  post_install_message:
99
102
  rdoc_options: []
100
103
  require_paths:
@@ -113,5 +116,5 @@ requirements: []
113
116
  rubygems_version: 3.5.10
114
117
  signing_key:
115
118
  specification_version: 4
116
- summary: Easily manage your translations with yamlfish
119
+ summary: CLI for YAMLFish, the simple and powerful translation management platform
117
120
  test_files: []