zci 0.0.2 → 0.0.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e64255b9f9cf12d6427bd07d7971eb173698d031
4
- data.tar.gz: 331837a46c7d85598a6a58215da68d4a8243dc46
3
+ metadata.gz: 3bac2e0338648d66c14665b57a42a1bed7a0f14e
4
+ data.tar.gz: 111f98adbc1eaead681810163e70b898da33d626
5
5
  SHA512:
6
- metadata.gz: 26da2d4cb8733f663e5398091d9cc708dc66479e14abf3a144fbfe47c1db8a715e132c5cce74a32d7b48de7f1d512b545ab089e10f9fc6fa7c86fd65420619d3
7
- data.tar.gz: 1d08b2465ff2ba17c1e3683abd04182b66650799776fc193a49aa909d64fa58ba0967349c0821c3c1ed0560392ff9572479a47619fcc3247d08e458b844a4f82
6
+ metadata.gz: ed09e352493f2368c1d441e92b689a6dce98e7d1bd7c5a3e4ff141fe286aa69ccf27f633b9b740d52146124825ebd565987263f84735bbcc0c70ac1998309a6d
7
+ data.tar.gz: 2c60c5647e53a75a8402233f6da718386c3179669d0ec2a372245de8c31ecc53d1ea1b4b67654b97d31213de03a23c624ff612ef0bd1d40b2c5333a0f6e50069
@@ -1 +1 @@
1
- ruby-2.2.1
1
+ ruby
data/README.md CHANGED
@@ -29,7 +29,7 @@ The simplest way to get started is to create a scaffold project:
29
29
  > zci init todo
30
30
  ```
31
31
 
32
- A new ./todo directory is created containing the sample config `zci.yml`. View the basic output of the scaffold with:
32
+ A new ./todo directory is created with the sample config `zci.yml`. View the basic output of the scaffold with:
33
33
 
34
34
  ```
35
35
  > cd todo
@@ -46,19 +46,19 @@ SYNOPSIS
46
46
  zci [global options] command [command options] [arguments...]
47
47
 
48
48
  VERSION
49
- 0.0.1
49
+ 0.0.2
50
50
 
51
51
  GLOBAL OPTIONS
52
- -c, --config=<s> - Project-specific configuration file (default: /home/user/todo/zci.yml)
52
+ -c, --config=<s> - Project-specific configuration file (default: /home/user/project/zci.yml)
53
53
  --version - Display the program version
54
54
  -v, --verbose - Be verbose
55
55
  --help - Show this message
56
56
 
57
57
  COMMANDS
58
58
  help - Shows a list of commands or help for one command
59
- init:project - Create a new ZCI-based project
59
+ init:project - Create new ZCI-based project
60
60
  import:sources - Read categories/section/articles from Zendesk and upload resource files to Crowdin
61
- download:translations - Build and download last exported translation resources from Crowdin
61
+ download:translations - Build and download translation resources from Crowdin
62
62
  export:translations - Add or update localized resource files(sections and articles) in Zendesk
63
63
  ```
64
64
 
@@ -1,4 +1,4 @@
1
- desc 'Create a new ZCI-based project'
1
+ desc 'Create new ZCI-based project'
2
2
  arg 'project_name'
3
3
  arg_name 'project_name'
4
4
  skips_pre
@@ -84,10 +84,10 @@ command :'import:sources' do |c|
84
84
  ]
85
85
 
86
86
  if remote_project_tree[:files].include?("/#{source_category_id}/#{file_name}")
87
- puts "[Crowdin] Update file `#{file_name}`"
87
+ puts "[Crowdin] Update section file `#{file_name}`"
88
88
  @crowdin.update_file(files, type: 'webxml')
89
89
  else
90
- puts "[Crowdin] Add file `#{file_name}`"
90
+ puts "[Crowdin] Add section file `#{file_name}`"
91
91
  @crowdin.add_file(files, type: 'webxml')
92
92
  end
93
93
  end
@@ -110,10 +110,10 @@ command :'import:sources' do |c|
110
110
  ]
111
111
 
112
112
  if remote_project_tree[:files].include?("/#{source_category_id}/#{file_name}")
113
- puts "[Crowdin] Update file `#{file_name}`"
113
+ puts "[Crowdin] Update article file `#{file_name}`"
114
114
  @crowdin.update_file(files, type: 'webxml')
115
115
  else
116
- puts "[Crowdin] Add file `#{file_name}`"
116
+ puts "[Crowdin] Add article file `#{file_name}`"
117
117
  @crowdin.add_file(files, type: 'webxml')
118
118
 
119
119
  end
@@ -1,4 +1,4 @@
1
- desc 'Build and download last exported translation resources from Crowdin'
1
+ desc 'Build and download translation resources from Crowdin'
2
2
  command :'download:translations' do |c|
3
3
  c.desc 'Directory of resource files'
4
4
  c.long_desc <<-EOS.strip_heredoc
@@ -29,6 +29,10 @@ module ZCI
29
29
  end
30
30
 
31
31
  def build_article_xml(article)
32
+ # remove control chars, unicode codepoints from 0001 to 001A
33
+ article.title.gsub!(/[\u0001-\u001A]/ , '')
34
+ article.body.gsub!(/[\u0001-\u001A]/ , '')
35
+
32
36
  article_xml = Nokogiri::XML::Builder.new do |xml|
33
37
  xml.root {
34
38
  # id - id of the original acticle
@@ -1,3 +1,3 @@
1
1
  module ZCI
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
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.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anton Maminov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-30 00:00:00.000000000 Z
11
+ date: 2015-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -203,7 +203,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
203
203
  version: '0'
204
204
  requirements: []
205
205
  rubyforge_project:
206
- rubygems_version: 2.4.7
206
+ rubygems_version: 2.4.8
207
207
  signing_key:
208
208
  specification_version: 4
209
209
  summary: Zendesk and Crowdin integration Command Line Interface (CLI)