zci 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -1
- data/lib/zci.rb +6 -5
- data/lib/zci/clean.rb +20 -0
- data/lib/zci/commands/05_clean.rb +13 -0
- data/lib/zci/commands/{05_info.rb → 06_info.rb} +0 -0
- data/lib/zci/download.rb +0 -1
- data/lib/zci/version.rb +1 -1
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e20f9739b7e523668685961dad179855cb9d0ef0bc7c32cbf36a86c1c7d97a92
|
4
|
+
data.tar.gz: bdd23d6acd0b700cbb5aa85871b516d1e126497c0f7c809468b630b5e8ca30ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e5af199d8cc39be27f79767f83439984294857cd69301dfe0a6ce3e4911bbfb898b72bfdc8eb466436da4358006d8fe5ae71e50ac9d3dbe129b27709ba2059b
|
7
|
+
data.tar.gz: '008a756e21bb2e9d00c4fcfedadb636e32f2eeecc5cd8c94b946f11d458caac6b0838b121aed85bf7c1ee9c21778caf8e7707c5ff980a2fd6c3ad48dad3ac0ee'
|
data/README.md
CHANGED
@@ -47,7 +47,7 @@ SYNOPSIS
|
|
47
47
|
zci [global options] command [command options] [arguments...]
|
48
48
|
|
49
49
|
VERSION
|
50
|
-
0.
|
50
|
+
0.6.0
|
51
51
|
|
52
52
|
GLOBAL OPTIONS
|
53
53
|
-c, --config=<s> - Project-specific configuration file (default: /home/crowdin/zci.yml)
|
@@ -61,6 +61,7 @@ COMMANDS
|
|
61
61
|
import:sources - Read categories/section/articles from Zendesk and upload resource files to Crowdin
|
62
62
|
download:translations - Build and download translation resources from Crowdin
|
63
63
|
export:translations - Add or update localized resource files(categories, sections and articles) in Zendesk
|
64
|
+
clean - Clears out the local repository of retrieved files
|
64
65
|
project:info - Zendesk and Crowdin info
|
65
66
|
```
|
66
67
|
|
data/lib/zci.rb
CHANGED
@@ -10,8 +10,9 @@ require 'zip'
|
|
10
10
|
|
11
11
|
# Add requires for other files you add to your project here, so
|
12
12
|
# you just need to require this one file in your bin file
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
13
|
+
require_relative 'zci/helpers'
|
14
|
+
require_relative 'zci/init'
|
15
|
+
require_relative 'zci/import'
|
16
|
+
require_relative 'zci/download'
|
17
|
+
require_relative 'zci/export'
|
18
|
+
require_relative 'zci/clean'
|
data/lib/zci/clean.rb
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
module ZCI
|
2
|
+
def remove_dir(path)
|
3
|
+
if File.exists?(path)
|
4
|
+
if File.directory?(path)
|
5
|
+
Dir.foreach(path) do |file|
|
6
|
+
if (file.to_s != ".") && (file.to_s != "..")
|
7
|
+
remove_dir("#{path}/#{file}")
|
8
|
+
end
|
9
|
+
end
|
10
|
+
puts "Del `#{path}`"
|
11
|
+
Dir.delete(path)
|
12
|
+
else
|
13
|
+
puts "Del `#{path}`"
|
14
|
+
File.delete(path)
|
15
|
+
end
|
16
|
+
else
|
17
|
+
puts "No such directory - `#{path}`"
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
desc 'Clears out the local repository of retrieved files'
|
2
|
+
command :'clean' do |c|
|
3
|
+
c.default_value 'resources'
|
4
|
+
c.arg_name 'dir'
|
5
|
+
c.flag [:resources_dir]
|
6
|
+
|
7
|
+
c.action do |global_options, options, args|
|
8
|
+
puts "Reading state information... Done"
|
9
|
+
resources_dir = File.join(File.dirname(global_options[:config]), options[:resources_dir])
|
10
|
+
|
11
|
+
remove_dir(resources_dir)
|
12
|
+
end
|
13
|
+
end
|
File without changes
|
data/lib/zci/download.rb
CHANGED
data/lib/zci/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zci
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anton Maminov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-02-
|
11
|
+
date: 2019-02-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -140,11 +140,13 @@ files:
|
|
140
140
|
- features/support/env.rb
|
141
141
|
- features/zci.feature
|
142
142
|
- lib/zci.rb
|
143
|
+
- lib/zci/clean.rb
|
143
144
|
- lib/zci/commands/01_init.rb
|
144
145
|
- lib/zci/commands/02_import.rb
|
145
146
|
- lib/zci/commands/03_download.rb
|
146
147
|
- lib/zci/commands/04_export.rb
|
147
|
-
- lib/zci/commands/
|
148
|
+
- lib/zci/commands/05_clean.rb
|
149
|
+
- lib/zci/commands/06_info.rb
|
148
150
|
- lib/zci/download.rb
|
149
151
|
- lib/zci/export.rb
|
150
152
|
- lib/zci/helpers.rb
|