yamlt 0.0.14 → 0.0.15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/yamlt/updater.rb +9 -1
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 238534d508566b03ef6fa40e871c17ef6b790cd9
4
- data.tar.gz: 050e0d7336d1436808e42b1f00a390808cb337b0
3
+ metadata.gz: 4cfb0d4a1969ac59105300556be5c1ccee0f93cc
4
+ data.tar.gz: 3920e55296571c100322bc02ea337ed16249c207
5
5
  SHA512:
6
- metadata.gz: cebc39e27aaa2a6ccfabafa92c4687f0bfbf8b575242614028f4401f9d3233d56e1aa264452fa144a384e8c8c5ad922524105489b1ea08f5fe118cf2d38acf04
7
- data.tar.gz: f7fdffb15994dad932586bdf4a163f068912dd3b88f49f45c5e6a8f3fa0fe116fbd094b76c2924096b6ff0ce89c2cfc4a9417726050227b4c9bd1c391c31eadb
6
+ metadata.gz: b5a24d5e60ba7b7022f48b635d2c05d580808204eee6ffcb405bca531d722ede3a61f3e50728003f1d62407e3a712b97b611e32a4cda7352ed78d4f3858cac6d
7
+ data.tar.gz: c4b7838ab5ee4556c578b83db2a60a70d495b32cdcf46eaf69aa55af02bba4aca714bf5bc471488789bd818fb406958e96e96cb7b8e2193c2d7c924501a0e44c
data/lib/yamlt/updater.rb CHANGED
@@ -9,7 +9,7 @@ require "yamlt/translator"
9
9
 
10
10
  module Yamlt
11
11
  class Updater
12
- def initialize(source, target, translator_class = Yamlt::Translator)
12
+ def initialize(source, target, translator_class = Yamlt::Updater.translator_class)
13
13
  @source = source
14
14
  @target = target
15
15
  @translator = translator_class.new(state.language, loader.language)
@@ -31,6 +31,14 @@ module Yamlt
31
31
  File.rename(target_updated, target)
32
32
  end
33
33
 
34
+ def self.translator_class
35
+ if defined?(Yamlt::CustomTranslator)
36
+ Yamlt::CustomTranslator
37
+ else
38
+ Yamlt::Translator
39
+ end
40
+ end
41
+
34
42
  private
35
43
 
36
44
  def state
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yamlt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.14
4
+ version: 0.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tangerine Cat