translations_sync 0.4.7 → 0.4.8

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: 42096ed5df2d1d00a7071691ae3f9b61348b565b
4
- data.tar.gz: b84217b76307b0ce2102ac99a906739f96d51e5b
3
+ metadata.gz: ba6982180a2cb156ce7ad31ed13358fe208e6fad
4
+ data.tar.gz: 303d47cab7eec3dbbf153d7b8cc1a55d3a6fc4de
5
5
  SHA512:
6
- metadata.gz: 12153a22337d9e26444b2721904993537ce3451bc52f83b72effd6626a561f5804d1c198d85899a2b39f15568038dc22fcb06582633d6f5207c33ae294137fdd
7
- data.tar.gz: 66f9a4a78afaf838b40498665ef4057483fade91cc2a07d020d5f056faa3fe090f83567280075993fe37529eaca0b5a7c0f2b91fa614dfef04476c468f5e7848
6
+ metadata.gz: 90d7353bcd62190d7895a6deb0c22400100d5c87e0587b020ec3f0fdbf12747c5e8d1cf3cebe7c0bbafe3d5fb7c0877c6d885171fafcaaffbcd88967faff04f4
7
+ data.tar.gz: dc0936234b8ff899c9498e4a89e61ee3bd7867d46284f940da260af52d5369bf319a7c8933e529d24a27528f4bb42f4bfbda74cbf9441d32d04f4a5cce71a015
data/Changelog CHANGED
@@ -1,4 +1,7 @@
1
- 2016-06-17 v.0.4.7
1
+ 2016-06-19 v.0.4.8
2
+ * Diagnostics is improved
3
+
4
+ 2016-06-18 v.0.4.7
2
5
  * Parameter IGNORE is added
3
6
  * Documentation is refised
4
7
 
data/Rakefile CHANGED
@@ -6,7 +6,7 @@ require 'rubygems/specification'
6
6
  require 'date'
7
7
 
8
8
  GEM = "translations_sync"
9
- GEM_VERSION = "0.4.7"
9
+ GEM_VERSION = "0.4.8"
10
10
  AUTHOR = "Dmitri Koulikoff"
11
11
  EMAIL = "koulikoff@gmail.com"
12
12
  HOMEPAGE = "http://github.com/dima4p/translations_sync/"
@@ -189,17 +189,14 @@ class TranslationsSync
189
189
  destination ||= ''
190
190
  destination = destination.split('.').map(&:to_sym)
191
191
  destination << key.last if destination.size == 0
192
- puts "key=#{key.inspect} destination=#{destination.inspect}"
193
192
  result = false
194
193
  flat.each_pair do |array, val|
195
194
  if array[0, key_length] == key
196
195
  array[0, key_length] = destination
197
- puts array.inspect
198
196
  result = true
199
197
  end
200
198
  end
201
199
  @moved = nil
202
- puts result
203
200
  result
204
201
  end
205
202
 
@@ -210,7 +207,6 @@ class TranslationsSync
210
207
  @moved[lang] = {}
211
208
  end
212
209
  flat.each_pair do |key, val|
213
- puts key.inspect
214
210
  val.keys.each do |lang|
215
211
  push_to_hash @moved[lang], lang, key, val, :moved
216
212
  end
@@ -299,8 +295,7 @@ class TranslationsSync
299
295
  begin
300
296
  h[key.to_s] = val[lang].to_s + TAIL
301
297
  rescue
302
- puts %Q(Can not assign to the key "#{keys.inspect}" value "#{val[lang]} for language #{target}")
303
- raise
298
+ raise %Q(Can not assign to the key "#{keys.inspect}" value "#{val[lang]} for language #{target}")
304
299
  end
305
300
  end
306
301
  when :singles
@@ -309,7 +304,7 @@ class TranslationsSync
309
304
  h[key.to_s] = value
310
305
  when :moved
311
306
  value = val[target]
312
- raise "The translations are not synchronized for #{keys.inspect}" if value.nil?
307
+ raise "The translations are not synchronized for \"#{target}\" at \"#{(keys + [key]).map(&:to_s).join '>'}\"" if value.nil?
313
308
  value.stringify_keys! if value.is_a? Hash
314
309
  h[key.to_s] = value
315
310
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: translations_sync
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.7
4
+ version: 0.4.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitri Koulikoff