aigu 1.1.1 → 1.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
  SHA1:
3
- metadata.gz: 9167ddb0fcc6a5e76fafa00addfa559bda26fd02
4
- data.tar.gz: 7297bcf7c86268a2b7703209f5432304717dcbcc
3
+ metadata.gz: 65dc0bc15a35c21e20a23c17cab97582df66b2de
4
+ data.tar.gz: aca146029ea5a6e44bc030f59f3e60895ee62869
5
5
  SHA512:
6
- metadata.gz: 9f0aaaa5963cfdd38ca5d85d57b749c19aad9eb86ada60866b72a3bfd706ed70ea258a8852d8a74ecb1ffe6d14492a5bfac767b3e8e2c407c5a70bdd0d64d7e2
7
- data.tar.gz: 359bcfaec8a09cd9ca239b67f4c21a450277b643c157eaa4cdf9721a5fc76794b26d67df39a6262a978a2fc4c92a2394b198ea6514ea8fe6b43bbdfcd468dd11
6
+ metadata.gz: 362400cc9be7b2adc3625e603db025a87063cc66e52265a70078d1cb203258a387542c986f43876f747468cb871fda41cf1af41b6ae4f207e3efd638afaca1c9
7
+ data.tar.gz: 1104cf4c798010978536f5e73516dcdcfacfe51770a32e32fd5da8fda5253ab61ffbb725b42e25ef6460bee4d17a28ceacf6b49d1f464cc3294a3fba097d451a
@@ -45,7 +45,7 @@ module Aigu
45
45
  hash.each_with_object({}) do |(key, value), memo|
46
46
  if value.is_a?(Array)
47
47
  value.each_with_index do |array_value, index|
48
- tainted_key = "#{key}___KEY___#{index}"
48
+ tainted_key = "#{key}.__KEY__#{index}"
49
49
  memo[tainted_key] = sanitize_value_to_string(array_value)
50
50
  end
51
51
  else
@@ -1,6 +1,6 @@
1
1
  module Aigu
2
2
  class RailsImporter < Importer
3
- ARRAY_REGEX = /___KEY___(?<index>\d+)$/
3
+ ARRAY_REGEX = /\.__KEY__(?<index>\d+)$/
4
4
 
5
5
  def process!
6
6
  puts "Generating YAML files in `#{@output_directory}` based on Accent-generated `#{@input_file}` file"
@@ -1,3 +1,3 @@
1
1
  module Aigu
2
- VERSION = '1.1.1'
2
+ VERSION = '1.2'
3
3
  end
@@ -23,9 +23,9 @@ describe Aigu::RailsExporter do
23
23
  let(:expected_content) do
24
24
  {
25
25
  'users.fr|fr.users.index.title' => 'Foo',
26
- 'users.fr|fr.users.index.actions___KEY___0' => 'Bar',
27
- 'users.fr|fr.users.index.actions___KEY___1' => '___TRUE___',
28
- 'users.fr|fr.users.index.actions___KEY___2' => 'LOL',
26
+ 'users.fr|fr.users.index.actions.__KEY__0' => 'Bar',
27
+ 'users.fr|fr.users.index.actions.__KEY__1' => '___TRUE___',
28
+ 'users.fr|fr.users.index.actions.__KEY__2' => 'LOL',
29
29
  'users.fr|fr.users.index.footer' => 'Bla',
30
30
  'users.fr|fr.users.index.shown' => '___FALSE___',
31
31
  'users.fr|fr.users.index.hidden' => '___TRUE___',
@@ -8,9 +8,9 @@ describe Aigu::RailsImporter do
8
8
  let(:content) do
9
9
  {
10
10
  'users.fr|fr.users.index.title' => 'Foo',
11
- 'users.fr|fr.users.index.actions___KEY___0' => 'Bar',
12
- 'users.fr|fr.users.index.actions___KEY___2' => '___TRUE___',
13
- 'users.fr|fr.users.index.actions___KEY___1' => 'Baz',
11
+ 'users.fr|fr.users.index.actions.__KEY__0' => 'Bar',
12
+ 'users.fr|fr.users.index.actions.__KEY__2' => '___TRUE___',
13
+ 'users.fr|fr.users.index.actions.__KEY__1' => 'Baz',
14
14
  'users.fr|fr.users.index.footer' => 'Bla',
15
15
  'users.fr|fr.users.index.shown' => '___FALSE___',
16
16
  'users.fr|fr.users.index.hidden' => '___TRUE___',
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aigu
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: '1.2'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rémi Prévost
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-01-19 00:00:00.000000000 Z
12
+ date: 2018-05-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -186,7 +186,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
186
186
  version: '0'
187
187
  requirements: []
188
188
  rubyforge_project:
189
- rubygems_version: 2.6.8
189
+ rubygems_version: 2.5.1
190
190
  signing_key:
191
191
  specification_version: 4
192
192
  summary: Aigu is a set of utility to process localization files to generate JSON files