zci 0.2.0 → 0.3.0

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: fb3514ff0c7e4682a29fcd5fa4107df072a6edb2
4
- data.tar.gz: bb2ef730a7ed533bebae63a4e34cbdcaee6e9aea
3
+ metadata.gz: 4eea0540a33e0202fa9e101513f810c6a0b86876
4
+ data.tar.gz: 85b2d12ebf21a67e8d4072d3f3fdd5e4112a6b05
5
5
  SHA512:
6
- metadata.gz: ec3aeb7a032023390d045631d38c597ad7b474f7a93ee7fdd40776f217d168c407c2347ea587f0cdca99afe10d6f1f7e25c5cdba6b7ce7dc04ec46b4220c44b5
7
- data.tar.gz: af5852ff9bb7a22037a87d1a8e0817e75b026af629ac661f98251d65b465ea57c484c7211c2c3a1215747f06537323e336bfccefa1b5be0077210407d215ee16
6
+ metadata.gz: 5ef8a9c8e013592a0940bf4e8989fc309faf84601d2bfbb958a58198c96ed4f3d7f034da93a8c039291f6f3a1d5e522866e1058abfe696a37b3559c23e4acd50
7
+ data.tar.gz: dcc5a836e6a8147a83fec7f1a9350164ab91ba1b71be7311e6e7aba9e7049da47aed819713a81398c380e1b7108b1df99d47d23a2d7a971612c2c0316a3c3a60
data/Gemfile CHANGED
@@ -1,4 +1,5 @@
1
1
  source 'https://rubygems.org'
2
2
  gemspec
3
3
 
4
+ gem 'byebug'
4
5
  # gem 'zendesk_help_center_api', path: '../zendesk_help_center_api_client_rb'
data/README.md CHANGED
@@ -46,10 +46,10 @@ SYNOPSIS
46
46
  zci [global options] command [command options] [arguments...]
47
47
 
48
48
  VERSION
49
- 0.0.2
49
+ 0.2.0
50
50
 
51
51
  GLOBAL OPTIONS
52
- -c, --config=<s> - Project-specific configuration file (default: /home/user/project/zci.yml)
52
+ -c, --config=<s> - Project-specific configuration file (default: /home/crowdin/zci.yml)
53
53
  --version - Display the program version
54
54
  -v, --verbose - Be verbose
55
55
  --help - Show this message
@@ -59,7 +59,7 @@ COMMANDS
59
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
61
  download:translations - Build and download translation resources from Crowdin
62
- export:translations - Add or update localized resource files(sections and articles) in Zendesk
62
+ export:translations - Add or update localized resource files(categories, sections and articles) in Zendesk
63
63
  ```
64
64
 
65
65
  ## Configuration
@@ -0,0 +1,38 @@
1
+ desc 'Zendesk and Crowdin info'
2
+ command :'project:info' do |c|
3
+ c.action do |global_options, options, args|
4
+ # Crowdin
5
+ begin
6
+ crowdin_info = @crowdin.project_info
7
+ puts "Crowdin: success!"
8
+ puts "Crowdin: available locales:"
9
+ crowdin_info["languages"].each do |lang|
10
+ puts "#{lang['code']}"
11
+ end
12
+ rescue => e
13
+ puts "Crowdin: API key is incorect"
14
+ end
15
+ puts
16
+
17
+ # Zendesk
18
+ if @zendesk.current_user.id
19
+ puts "Zendesk: success!"
20
+ categories = @zendesk.hc_categories
21
+
22
+ puts "Zendesk: available categories"
23
+ categories.each do |category|
24
+ puts "#{category.id}: #{category.name}"
25
+ end
26
+ puts
27
+
28
+ locales = @zendesk.locales
29
+
30
+ puts "Zendesk: available locales:"
31
+ locales.each do |locale|
32
+ puts "#{locale.locale}"
33
+ end
34
+ else
35
+ puts "Zendesk: login and/or password is incorect"
36
+ end
37
+ end
38
+ end
data/lib/zci/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module ZCI
2
- VERSION = '0.2.0'
2
+ VERSION = '0.3.0'
3
3
  end
data/zci.gemspec CHANGED
@@ -18,7 +18,7 @@ spec = Gem::Specification.new do |s|
18
18
  s.executables << 'zci'
19
19
  s.add_runtime_dependency 'nokogiri', '~> 1.7', '>= 1.7.0'
20
20
  s.add_runtime_dependency 'rubyzip', '~> 1.2', '>= 1.2.0'
21
- s.add_runtime_dependency 'crowdin-api', '~> 0.4', '>= 0.4.0'
21
+ s.add_runtime_dependency 'crowdin-api', '~> 0.5', '>= 0.5.0'
22
22
  s.add_runtime_dependency 'zendesk_help_center_api', '~> 0.2', '>= 0.2.0'
23
23
  s.add_runtime_dependency 'gli', '~> 2.16', '>= 2.16.0'
24
24
  s.add_development_dependency 'rake', '~> 12.0', '>= 12.0.0'
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.2.0
4
+ version: 0.3.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: 2017-03-23 00:00:00.000000000 Z
11
+ date: 2017-04-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -56,20 +56,20 @@ dependencies:
56
56
  requirements:
57
57
  - - "~>"
58
58
  - !ruby/object:Gem::Version
59
- version: '0.4'
59
+ version: '0.5'
60
60
  - - ">="
61
61
  - !ruby/object:Gem::Version
62
- version: 0.4.0
62
+ version: 0.5.0
63
63
  type: :runtime
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
67
  - - "~>"
68
68
  - !ruby/object:Gem::Version
69
- version: '0.4'
69
+ version: '0.5'
70
70
  - - ">="
71
71
  - !ruby/object:Gem::Version
72
- version: 0.4.0
72
+ version: 0.5.0
73
73
  - !ruby/object:Gem::Dependency
74
74
  name: zendesk_help_center_api
75
75
  requirement: !ruby/object:Gem::Requirement
@@ -192,6 +192,7 @@ files:
192
192
  - lib/zci/commands/02_import.rb
193
193
  - lib/zci/commands/03_download.rb
194
194
  - lib/zci/commands/04_export.rb
195
+ - lib/zci/commands/05_info.rb
195
196
  - lib/zci/download.rb
196
197
  - lib/zci/export.rb
197
198
  - lib/zci/helpers.rb