lit 1.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ab6fb4274b54171f64b3e24002ee6f2d23645ffa88cb9fb6d9bfe919b95d27bc
4
- data.tar.gz: 52a3826a8da2dae3c37c08383ebd58e2547a7214e6b2eae4b83f22cfd027c7c8
3
+ metadata.gz: 8fc9495f36feac58c3bd78947fc6ec550387d9c25751474515b117e7fbbeeffc
4
+ data.tar.gz: 75584cbb5204b1204826e65eddb2a1c0553f9fbd4d037c596207959d1b458fa4
5
5
  SHA512:
6
- metadata.gz: becbc8639368bad9748d0815adf579031a6beb4f79610ae9920f896e5a6d9ae6c39bd071363756d1f937578b75745eed80b4c80805caf58e221f1cdee630481d
7
- data.tar.gz: 01a66a00855eba89bbfe2057d8792d978e1435ea3a79e986463d0948d771304a96e9ebaf048000a2f2e748a529d5f56b931a04d6413d942ef327fc09bfe8097c
6
+ metadata.gz: 6811efb9e66943fc19250874f204761857e6ec4ffe012334fb72d10a33ccfd718c818e4b680a559d35d11a21bcf7a40995f6410277d1c905b2b18bcb6326e194
7
+ data.tar.gz: e6fd5b2b8759984db4b7cefe6506a4378143de6d1d6a6c066196485abc45310f2d11b0a382cf62e494149d0e27b4ead807374b1f174267b113e26b6abfacea03
@@ -96,6 +96,8 @@ module Lit::CloudTranslation::Providers
96
96
  text_or_array.gsub(/%{(.+?)}/, '<code>__LIT__\1__LIT__</code>')
97
97
  when Array
98
98
  text_or_array.map { |s| sanitize_text(s) }
99
+ when nil
100
+ ''
99
101
  else
100
102
  raise TypeError
101
103
  end
@@ -63,6 +63,8 @@ module Lit::CloudTranslation::Providers
63
63
  text_or_array.gsub(/%{(.+?)}/, '%{_LIT_\1_LIT_}')
64
64
  when Array
65
65
  text_or_array.map { |s| sanitize_text(s) }
66
+ when nil
67
+ ''
66
68
  else
67
69
  raise TypeError
68
70
  end
@@ -158,7 +158,7 @@ module Lit
158
158
  accu[-1] = [
159
159
  row.first,
160
160
  *accu[-1].drop(1)
161
- .map { |x| Array.wrap(x) }
161
+ .map { |x| Array.wrap(x).presence || [x] }
162
162
  .zip(row.drop(1)).map(&:flatten)
163
163
  ]
164
164
  end
@@ -1,3 +1,3 @@
1
1
  module Lit
2
- VERSION = '1.0'.freeze
2
+ VERSION = '1.0.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lit
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.0'
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maciej Litwiniuk
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2019-01-09 00:00:00.000000000 Z
14
+ date: 2019-01-10 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rails