yamlfish 0.1.0.alpha1 → 0.1.0.alpha2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -0
- data/lib/yamlfish/cli/pull.rb +8 -0
- data/lib/yamlfish/cli/push.rb +5 -1
- data/lib/yamlfish/cli/version.rb +1 -1
- data/lib/yamlfish/cli.rb +1 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d12427d97a7ae3df74fd9eb9506e000bd5d4769c9d3e8c3bf403c03eebae4b40
|
4
|
+
data.tar.gz: 1a5ce410afd9e1944b42d9b8840ad48a4980537aa19be9bbe5cc7f53139e0806
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1441f3a45996505674ca21af113a5b4704da38de26b599f1afa35244d598f57358aecbd6546ddc6fc48e9bf9c12c57541cc2a907f879bd412bf6823a49f26be7
|
7
|
+
data.tar.gz: 445bb5b1a86a9b7c43cd8f64f8987944e50517f7579d3d7b5a499c9ed849ca188b99986fb14fb7e0c5902bf4357b428ff8d637e10da97f629386195bf318a36f
|
data/Gemfile.lock
CHANGED
@@ -4,6 +4,7 @@ PATH
|
|
4
4
|
yamlfish (0.1.0.alpha1)
|
5
5
|
activesupport (>= 6)
|
6
6
|
faraday (~> 2.0)
|
7
|
+
rainbow (~> 3.1)
|
7
8
|
thor (~> 1.2)
|
8
9
|
|
9
10
|
GEM
|
@@ -36,6 +37,7 @@ GEM
|
|
36
37
|
mutex_m (0.2.0)
|
37
38
|
net-http (0.4.1)
|
38
39
|
uri
|
40
|
+
rainbow (3.1.1)
|
39
41
|
rake (13.0.6)
|
40
42
|
rspec (3.12.0)
|
41
43
|
rspec-core (~> 3.12.0)
|
data/lib/yamlfish/cli/pull.rb
CHANGED
@@ -25,12 +25,20 @@ module Yamlfish
|
|
25
25
|
"Authorization": "Bearer #{Yamlfish::Cli.configuration.api_key}"
|
26
26
|
}
|
27
27
|
)
|
28
|
+
|
29
|
+
if response.status != 200
|
30
|
+
puts Rainbow("Failed to pull, unexpected HTTP status #{response.status}").red.bright
|
31
|
+
return
|
32
|
+
end
|
33
|
+
|
28
34
|
translations = JSON.parse(response.body)
|
29
35
|
|
30
36
|
if @inplace
|
31
37
|
replace_inplace(translations)
|
38
|
+
puts "Fetched translations in-place for locale #{Rainbow(@locale_identifier).magenta.bright}"
|
32
39
|
else
|
33
40
|
dump_translations(translations)
|
41
|
+
puts "Downloaded new translations for locale #{Rainbow(@locale_identifier).magenta.bright}"
|
34
42
|
end
|
35
43
|
end
|
36
44
|
|
data/lib/yamlfish/cli/push.rb
CHANGED
@@ -27,7 +27,11 @@ module Yamlfish
|
|
27
27
|
"Authorization": "Bearer #{Yamlfish::Cli.configuration.api_key}"
|
28
28
|
}
|
29
29
|
)
|
30
|
-
|
30
|
+
if response.status == 201
|
31
|
+
puts "Successfully pushed translations for locale #{Rainbow(@locale_identifier).magenta.bright} on branch #{Rainbow(@branch).magenta.bright}"
|
32
|
+
else
|
33
|
+
puts Rainbow("Failed to push, unexpected HTTP status #{response.status}").red.bright
|
34
|
+
end
|
31
35
|
end
|
32
36
|
end
|
33
37
|
end
|
data/lib/yamlfish/cli/version.rb
CHANGED
data/lib/yamlfish/cli.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.alpha2
|
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-
|
11
|
+
date: 2024-03-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '2.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rainbow
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '3.1'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '3.1'
|
55
69
|
description:
|
56
70
|
email:
|
57
71
|
- adrien@siami.fr
|