switch-cli 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 +4 -4
- data/lib/switch/cloud_sync.rb +2 -0
- metadata +16 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 715be5d7068e2d9205d9c29400660789f84a4229
|
4
|
+
data.tar.gz: 7836ee0e6dc977c131168b6b454b148fcb4ef52a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d95264dbb01c0c99845df159513b47824a80637ebcd753b187b1f34ab5c9e6195ed72cc5660b2d58a1d177ec10b9462f9dc12696741a20035dac47a1e7fc84a8
|
7
|
+
data.tar.gz: 6badfc94b066ed03e998ed7dd50f4c5c3d677e03fa8b0c10f13ba5d8d4f474671760dab992683025535ab68fd99df9695f61fa18aa4257e4585f059ecd5c7cec
|
data/lib/switch/cloud_sync.rb
CHANGED
@@ -22,6 +22,8 @@ module Switch
|
|
22
22
|
|
23
23
|
def download_from_drive(input, output)
|
24
24
|
file = @session.spreadsheet_by_title(input)
|
25
|
+
return Switch.logger.error "Cannot find file #{input}" unless file
|
26
|
+
|
25
27
|
file.export_as_file(output)
|
26
28
|
|
27
29
|
Switch.logger.info "Downloaded file #{input} from google drive to #{output}"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: switch-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Yagudaev
|
@@ -94,15 +94,18 @@ dependencies:
|
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '3.4'
|
97
|
-
description: "
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
97
|
+
description: "Switch helps you add multiple languages to your site by leveraging the
|
98
|
+
power of google spreadsheets. It is a commandline tool providing you with an easy
|
99
|
+
way to automate the process and avoid common mistakes.\n\n The most common use
|
100
|
+
case of switch is for switching between a locale representation in JSON/YAML to
|
101
|
+
a CSV (spreadsheet) based one and vice-versa.\n\n # Install\n\n ```\n gem install
|
102
|
+
switch-cli\n ```\n\n # Usage\n\n ```\n switch json2csv [input-dir] [output-file]\n
|
103
|
+
\ ```\n\n Converts multiple json files to be a single csv file with columns for
|
104
|
+
each file, with the file name as the column header.\n\n If you do not specify an
|
105
|
+
input-dir it will be taken as ./locales and output-file would be the direcotry name
|
106
|
+
+ .csv.\n\n ```\n switch csv2json [input-file] [output-dir]\n ```\n\n Converts
|
107
|
+
a single csv file into multiple json files, with a file for each column using the
|
108
|
+
key and order columns to construct the files.\n "
|
106
109
|
email: michael@yagudaev.com
|
107
110
|
executables:
|
108
111
|
- switch
|
@@ -115,7 +118,7 @@ files:
|
|
115
118
|
- lib/switch/csv2json.rb
|
116
119
|
- lib/switch/extensions.rb
|
117
120
|
- lib/switch/json2csv.rb
|
118
|
-
homepage:
|
121
|
+
homepage: https://github.com/yagudaev/switch
|
119
122
|
licenses:
|
120
123
|
- MIT
|
121
124
|
metadata: {}
|
@@ -135,8 +138,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
135
138
|
version: '0'
|
136
139
|
requirements: []
|
137
140
|
rubyforge_project:
|
138
|
-
rubygems_version: 2.
|
141
|
+
rubygems_version: 2.5.1
|
139
142
|
signing_key:
|
140
143
|
specification_version: 4
|
141
144
|
summary: Command-line utility to convert translation files to spreadsheet and vice-versa
|
142
145
|
test_files: []
|
146
|
+
has_rdoc:
|