csv2strings 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ MTNjYjNhYTQwM2I1MDcxNmQ2MTE3YmFmODMzNjM5ODY1ZWI1ZDZiZQ==
5
+ data.tar.gz: !binary |-
6
+ ODRkNGU1Y2Q3MDliZTRjMWViZDdmZjc5MWZmNzlmNTE0NjBiMDgxMQ==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ ZjE1YmIxMmRmMWQ5ZTc3YWM0ZWQyZmMwOTk0YzAzMTg2OGU1OTE3NTAwMDg2
10
+ MjE1YzI4ZTlhYzRlNzA3Njk0N2M2NWFhY2QxYzdiZmE3NGEyYWI5YjUxYjIz
11
+ NDA4YmE4YzI1MjZhY2VjZDlmNGY1YTAyMDIzZmFlZGRiYzMzZTA=
12
+ data.tar.gz: !binary |-
13
+ OTg2ZGE0YzNiZDAzN2FmODM3NmZkN2IxMzIxNDk0YzNjOWEzNmIwZmI3NDgx
14
+ ODI5NmVkZjc1NjgwYzUxZTU3MDk3MTgwM2ZkYTAyZTg0N2IxMTdmYzY2NjA4
15
+ NWRhZjI2OTU3MDA1MTQyMDBiYjZiZTE4YWFlY2VjNzkxMmMyZDU=
data/.csvconverter.sample CHANGED
@@ -2,4 +2,8 @@
2
2
  filenames: ["test/data/test_en.strings", "test/data/test_fr.strings"]
3
3
  headers: ["Constants", "English", "French"]
4
4
  csv_filename: "testconfig.csv"
5
- dryrun: true
5
+ dryrun: true
6
+
7
+ filename: test/data/test_data.csv
8
+ langs:
9
+ English: "en"
data/README.md CHANGED
@@ -37,3 +37,7 @@ Run `bundle install` to install all the dependencies. Tests are done with `Test:
37
37
  # Todo & Known issues
38
38
 
39
39
  See GitHub issues
40
+
41
+
42
+ [![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/netbe/csv-to-ios-localizable.strings-converter/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
43
+
data/bin/csv2strings CHANGED
@@ -1,5 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
- $: << File.expand_path("../lib/", __FILE__)
2
+ $: << File.expand_path("../../lib", __FILE__)
3
+
4
+ require 'csvconverter'
3
5
  require 'csvconverter/commands/csv2strings_command'
4
6
 
5
7
  CSV2StringsCommand.start
data/bin/strings2csv CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
- $: << File.expand_path("../lib/", __FILE__)
2
+ $: << File.expand_path("../../lib", __FILE__)
3
+ require 'csvconverter'
3
4
  require 'csvconverter/commands/strings2csv_command'
4
5
 
5
6
  Strings2CSVCommand.start
data/csv2strings.gemspec CHANGED
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'csv2strings'
3
- s.version = '0.2.2'
4
- s.date = '2013-10-30'
3
+ s.version = '0.2.3'
4
+ s.date = '2013-12-11'
5
5
  s.summary = "CSV to iOS Localizable.strings converter"
6
6
  s.description = "ruby script converts a CSV file of translations to Localizable.strings files and vice-versa"
7
7
  s.authors = ["François Benaiteau"]
@@ -15,10 +15,15 @@ Gem::Specification.new do |s|
15
15
  if RUBY_VERSION < '1.9'
16
16
  s.add_dependency "fastercsv"
17
17
  s.add_dependency "nokogiri", "= 1.5.10"
18
+ s.add_dependency "google_drive", '0.3.6'
18
19
  s.add_dependency "orderedhash"
20
+ else
21
+ s.add_dependency "google_drive"
19
22
  end
20
23
 
21
- s.add_dependency "google_drive", '0.3.6'
24
+ # google_drive dependency to ask for mail and password
25
+ s.add_dependency "highline"
26
+
22
27
  s.add_development_dependency "rake"
23
28
 
24
29
  s.add_development_dependency "test-unit"
@@ -27,5 +32,5 @@ Gem::Specification.new do |s|
27
32
  s.files = `git ls-files`.split("\n")
28
33
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
29
34
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
30
- s.require_path = ['lib']
35
+ s.require_path = 'lib'
31
36
  end
@@ -1,6 +1,4 @@
1
- require 'yaml'
2
1
  require 'thor'
3
-
4
2
  class Command < Thor
5
3
  include Thor::Actions
6
4
  class_option :verbose, :type => :boolean
@@ -32,5 +32,30 @@ class TestCommand < Test::Unit::TestCase
32
32
  system("rm -rf ./mynewlocation")
33
33
  end
34
34
 
35
+ def test_csv2strings_with_fetch_google_doc
36
+ omit if ENV['TRAVIS']
37
+ options = {
38
+ :filename => "my_trads",
39
+ :langs => {"English" => "en", "French" => "fr"},
40
+ :fetch => true
41
+ }
42
+ assert_nothing_raised do
43
+ CSV2StringsCommand.new([], options).csv2strings
44
+ end
45
+ end
46
+
47
+ def test_csv2strings_with_config_file
48
+ system("cp .csvconverter.sample .csvconverter")
49
+
50
+ assert_nothing_raised do
51
+ CSV2StringsCommand.new.csv2strings
52
+ end
53
+
54
+ end
55
+
56
+ def teardown
57
+
58
+ system("rm -f .csvconverter")
59
+ end
35
60
  end
36
61
 
@@ -0,0 +1,24 @@
1
+ require 'test_helper'
2
+ class TestBins < Test::Unit::TestCase
3
+
4
+ def test_csv2strings_with_google_doc
5
+ omit if ENV['TRAVIS']
6
+ assert_nothing_raised do
7
+ system("./bin/csv2strings --fetch --filename test.csv")
8
+ end
9
+ assert_equal $?.exitstatus, 0
10
+ end
11
+
12
+ def test_csv2strings_with_config_file
13
+ system("cp .csvconverter.sample .csvconverter")
14
+
15
+ assert_nothing_raised NameError do
16
+ system("./bin/csv2strings")
17
+ end
18
+ assert_equal $?.exitstatus, 0
19
+ end
20
+
21
+ def teardown
22
+ system("rm -f .csvconverter")
23
+ end
24
+ end
metadata CHANGED
@@ -1,149 +1,108 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: csv2strings
3
- version: !ruby/object:Gem::Version
4
- hash: 19
5
- prerelease:
6
- segments:
7
- - 0
8
- - 2
9
- - 2
10
- version: 0.2.2
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.3
11
5
  platform: ruby
12
- authors:
13
- - "Fran\xC3\xA7ois Benaiteau"
6
+ authors:
7
+ - François Benaiteau
14
8
  autorequire:
15
9
  bindir: bin
16
10
  cert_chain: []
17
-
18
- date: 2013-10-30 00:00:00 +01:00
19
- default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
11
+ date: 2013-12-11 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
22
14
  name: thor
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- hash: 3
30
- segments:
31
- - 0
32
- version: "0"
33
- type: :runtime
34
- version_requirements: *id001
35
- - !ruby/object:Gem::Dependency
36
- name: fastercsv
37
- prerelease: false
38
- requirement: &id002 !ruby/object:Gem::Requirement
39
- none: false
40
- requirements:
41
- - - ">="
42
- - !ruby/object:Gem::Version
43
- hash: 3
44
- segments:
45
- - 0
46
- version: "0"
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ! '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
47
20
  type: :runtime
48
- version_requirements: *id002
49
- - !ruby/object:Gem::Dependency
50
- name: nokogiri
51
21
  prerelease: false
52
- requirement: &id003 !ruby/object:Gem::Requirement
53
- none: false
54
- requirements:
55
- - - "="
56
- - !ruby/object:Gem::Version
57
- hash: 23
58
- segments:
59
- - 1
60
- - 5
61
- - 10
62
- version: 1.5.10
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ! '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: google_drive
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ! '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
63
34
  type: :runtime
64
- version_requirements: *id003
65
- - !ruby/object:Gem::Dependency
66
- name: orderedhash
67
35
  prerelease: false
68
- requirement: &id004 !ruby/object:Gem::Requirement
69
- none: false
70
- requirements:
71
- - - ">="
72
- - !ruby/object:Gem::Version
73
- hash: 3
74
- segments:
75
- - 0
76
- version: "0"
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ! '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: highline
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ! '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
77
48
  type: :runtime
78
- version_requirements: *id004
79
- - !ruby/object:Gem::Dependency
80
- name: google_drive
81
49
  prerelease: false
82
- requirement: &id005 !ruby/object:Gem::Requirement
83
- none: false
84
- requirements:
85
- - - "="
86
- - !ruby/object:Gem::Version
87
- hash: 31
88
- segments:
89
- - 0
90
- - 3
91
- - 6
92
- version: 0.3.6
93
- type: :runtime
94
- version_requirements: *id005
95
- - !ruby/object:Gem::Dependency
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
96
56
  name: rake
97
- prerelease: false
98
- requirement: &id006 !ruby/object:Gem::Requirement
99
- none: false
100
- requirements:
101
- - - ">="
102
- - !ruby/object:Gem::Version
103
- hash: 3
104
- segments:
105
- - 0
106
- version: "0"
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
107
62
  type: :development
108
- version_requirements: *id006
109
- - !ruby/object:Gem::Dependency
110
- name: test-unit
111
63
  prerelease: false
112
- requirement: &id007 !ruby/object:Gem::Requirement
113
- none: false
114
- requirements:
115
- - - ">="
116
- - !ruby/object:Gem::Version
117
- hash: 3
118
- segments:
119
- - 0
120
- version: "0"
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ! '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: test-unit
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ! '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
121
76
  type: :development
122
- version_requirements: *id007
123
- - !ruby/object:Gem::Dependency
124
- name: simplecov
125
77
  prerelease: false
126
- requirement: &id008 !ruby/object:Gem::Requirement
127
- none: false
128
- requirements:
129
- - - ">="
130
- - !ruby/object:Gem::Version
131
- hash: 3
132
- segments:
133
- - 0
134
- version: "0"
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ! '>='
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: simplecov
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ! '>='
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
135
90
  type: :development
136
- version_requirements: *id008
137
- description: ruby script converts a CSV file of translations to Localizable.strings files and vice-versa
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ! '>='
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ description: ruby script converts a CSV file of translations to Localizable.strings
98
+ files and vice-versa
138
99
  email: francois.benaiteau@gmail.com
139
- executables:
100
+ executables:
140
101
  - csv2strings
141
102
  - strings2csv
142
103
  extensions: []
143
-
144
104
  extra_rdoc_files: []
145
-
146
- files:
105
+ files:
147
106
  - .csvconverter.sample
148
107
  - .gitignore
149
108
  - .travis.yml
@@ -163,6 +122,7 @@ files:
163
122
  - lib/csvconverter/strings2csv.rb
164
123
  - test/csvconverter/commands/test_command_csv2strings.rb
165
124
  - test/csvconverter/commands/test_command_strings2csv.rb
125
+ - test/csvconverter/test_bins.rb
166
126
  - test/csvconverter/test_csv2strings.rb
167
127
  - test/csvconverter/test_strings2csv.rb
168
128
  - test/data/test_data.csv
@@ -173,50 +133,28 @@ files:
173
133
  - test/data/test_with_nil.csv
174
134
  - test/data/test_with_nil.strings
175
135
  - test/test_helper.rb
176
- has_rdoc: true
177
136
  homepage: https://github.com/netbe/CSV-to-iOS-Localizable.strings-converter
178
- licenses:
137
+ licenses:
179
138
  - MIT
139
+ metadata: {}
180
140
  post_install_message:
181
141
  rdoc_options: []
182
-
183
- require_paths:
184
- - - lib
185
- required_ruby_version: !ruby/object:Gem::Requirement
186
- none: false
187
- requirements:
188
- - - ">="
189
- - !ruby/object:Gem::Version
190
- hash: 3
191
- segments:
192
- - 0
193
- version: "0"
194
- required_rubygems_version: !ruby/object:Gem::Requirement
195
- none: false
196
- requirements:
197
- - - ">="
198
- - !ruby/object:Gem::Version
199
- hash: 3
200
- segments:
201
- - 0
202
- version: "0"
142
+ require_paths:
143
+ - lib
144
+ required_ruby_version: !ruby/object:Gem::Requirement
145
+ requirements:
146
+ - - ! '>='
147
+ - !ruby/object:Gem::Version
148
+ version: '0'
149
+ required_rubygems_version: !ruby/object:Gem::Requirement
150
+ requirements:
151
+ - - ! '>='
152
+ - !ruby/object:Gem::Version
153
+ version: '0'
203
154
  requirements: []
204
-
205
155
  rubyforge_project:
206
- rubygems_version: 1.6.2
156
+ rubygems_version: 2.1.11
207
157
  signing_key:
208
- specification_version: 3
158
+ specification_version: 4
209
159
  summary: CSV to iOS Localizable.strings converter
210
- test_files:
211
- - test/csvconverter/commands/test_command_csv2strings.rb
212
- - test/csvconverter/commands/test_command_strings2csv.rb
213
- - test/csvconverter/test_csv2strings.rb
214
- - test/csvconverter/test_strings2csv.rb
215
- - test/data/test_data.csv
216
- - test/data/test_data.strings
217
- - test/data/test_data_multiple_langs.csv
218
- - test/data/test_en.strings
219
- - test/data/test_fr.strings
220
- - test/data/test_with_nil.csv
221
- - test/data/test_with_nil.strings
222
- - test/test_helper.rb
160
+ test_files: []