i18n-migrations 1.0.1 → 1.0.2

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: 0435f2ba21c8596bf88ee279017a289029603c30af5be9c33602aceca4eb2777
4
- data.tar.gz: fd5a0c1c8a67005b2eb324e0f5b8c2ddab9f17961bf2226e83aed06c8a33abc0
3
+ metadata.gz: b742b520e0c42a29cbed11f435eaf57293a4c958de7ed2eed8be1ed802bfc7da
4
+ data.tar.gz: b69d6b18f29f0290810322c8e051f5895ffd69982725b3cb8ea9b01630094af1
5
5
  SHA512:
6
- metadata.gz: '09a7c7e52e1ca71e5cc8789ffaf6804a49d44ea9957bb36fc635f525ce734d4e0c9df9e23c99770b06acd1488843f7f969d558768d96897d4eb192130486bfc6'
7
- data.tar.gz: 4b6a2dbff550a597c4afca6d2df8c89512ab0aa120115d2ac8ed54505a2b429f5d4c8ff5f68d96302bd588ae9c22af677571479f718f26385c2df09815e50deb
6
+ metadata.gz: 36e7b155f30d24c24fc84c181860595dbb995c7cf53f9ca6c7b693794b7b7cfa1a1f9a287c996c3ed75e7fe897b8a870946a37ec73c47bf25c2ea7c005fb766a
7
+ data.tar.gz: e5957eb775f2592d38824141e5c67cf42e8889c71c6cf239c98bb1ffeb0250529963ddc8f58d5df4a2a5dde0a51ca6a7c0cb848fae73c5648194a4989b7993bf
@@ -11,6 +11,8 @@ require 'config'
11
11
  require 'locale'
12
12
  require 'migration_factory'
13
13
 
14
+ ASYNC = false
15
+
14
16
  # this class knows how to do all the things the cli needs done.
15
17
  # it mostly delegates to locale to do it, often asking multiple locales to do the same thing
16
18
  module I18n
@@ -115,11 +117,17 @@ end
115
117
  private
116
118
 
117
119
  def each_locale(name = 'all')
118
- threads = (name == 'all' ? all_locale_names : [name]).map do |l|
119
- locale = locale_for(l)
120
- Thread.new {yield locale}
120
+ locale_names = name == 'all' ? all_locale_names : [name]
121
+
122
+ if ASYNC
123
+ threads = locale_names.map do |l|
124
+ locale = locale_for(l)
125
+ Thread.new {yield locale}
126
+ end
127
+ threads.each(&:join)
128
+ else
129
+ locale_names.each {|l| yield locale_for(l)}
121
130
  end
122
- threads.each(&:join)
123
131
  end
124
132
 
125
133
  def all_locale_names
@@ -1,5 +1,5 @@
1
1
  module I18n
2
2
  module Migrations
3
- VERSION = "1.0.1"
3
+ VERSION = "1.0.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: i18n-migrations
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Lightsmith