gettext-setup 0.18 → 0.19

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: 6267255e8fcb739d61eff7d91551eb29da7bde07
4
- data.tar.gz: 41dc3ab49b770c2558ccbe172a1c1f4266401f8c
3
+ metadata.gz: 37b01acc031b90d76e9682592cd03c3b2026b273
4
+ data.tar.gz: a473f0e5260a3546d48fdf11850c6d540a0321fb
5
5
  SHA512:
6
- metadata.gz: 5f49c5048dfd8a630ad0e75925605fcc9e56edfd71271737ca1fc193ad1916c33c74cff91a219947617ec75e93ec7fb91f67e2d44d455eee476a07f3843e9e61
7
- data.tar.gz: 14d08a1b4f0594eabfd5e191761752850d90fe05e543501f24b5cc45c6987b169f8d481d40f8a0f740284b3f2dd4e2f9571b6fc29a086ab1c953a44cbd5b3e7b
6
+ metadata.gz: 4b5496fe67a82255937ef93aa41122a97d8c8fba66dc320d093c4bc8e8cf70ac4f1bea67368bb47d69752eff637476a78c511e22ea980df2b2173a6a9997f65d
7
+ data.tar.gz: bbe45933b1ae4d9be41f174d46bdf4580aa58a8351c86d6b9eba353fb655a1238ea3f5e324ff4ba1c7315f0e5b64676a3244441f87c3759ceb0e57de713840c8
@@ -1,11 +1,12 @@
1
1
  # -*- encoding: utf-8 -*-
2
+
2
3
  require 'fast_gettext'
3
4
  require 'yaml'
4
5
  require 'locale'
5
6
 
6
7
  module GettextSetup
7
- @@config = nil
8
- @@translation_repositories = {}
8
+ @config = nil
9
+ @translation_repositories = {}
9
10
  FastGettext.default_available_locales = []
10
11
 
11
12
  # `locales_path` should include:
@@ -17,8 +18,8 @@ module GettextSetup
17
18
  # :file_format - one of the supported backends for fast_gettext (e.g. :po, :mo, :yaml, etc.)
18
19
  def self.initialize(locales_path, options = {})
19
20
  config_path = File.absolute_path('config.yaml', locales_path)
20
- @@config = YAML.load_file(config_path)['gettext']
21
- @@locales_path = locales_path
21
+ @config = YAML.load_file(config_path)['gettext']
22
+ @locales_path = locales_path
22
23
 
23
24
  # Make the translation methods available everywhere
24
25
  Object.send(:include, FastGettext::Translation)
@@ -30,7 +31,7 @@ module GettextSetup
30
31
 
31
32
  # 'chain' is the only available multi-domain type in fast_gettext 1.1.0 We should consider
32
33
  # investigating 'merge' once we can bump our dependency
33
- FastGettext.add_text_domain('master_domain', type: :chain, chain: @@translation_repositories.values)
34
+ FastGettext.add_text_domain('master_domain', type: :chain, chain: @translation_repositories.values)
34
35
  FastGettext.default_text_domain = 'master_domain'
35
36
 
36
37
  # Likewise, be explicit in our default language choice.
@@ -40,31 +41,31 @@ module GettextSetup
40
41
  Locale.set_default(default_locale)
41
42
  end
42
43
 
43
- def self.add_repository_to_chain(project_name,options)
44
+ def self.add_repository_to_chain(project_name, options)
44
45
  repository = FastGettext::TranslationRepository.build(project_name,
45
- :path => locales_path,
46
- :type => options[:file_format] || :po,
47
- :ignore_fuzzy => false)
48
- @@translation_repositories[project_name] = repository unless @@translation_repositories.key? project_name
46
+ path: locales_path,
47
+ type: options[:file_format] || :po,
48
+ ignore_fuzzy: false)
49
+ @translation_repositories[project_name] = repository unless @translation_repositories.key? project_name
49
50
  end
50
51
 
51
52
  def self.locales_path
52
- @@locales_path
53
+ @locales_path
53
54
  end
54
55
 
55
56
  def self.config
56
- @@config ||= {}
57
+ @config ||= {}
57
58
  end
58
59
 
59
60
  def self.translation_repositories
60
- @@translation_repositories
61
+ @translation_repositories
61
62
  end
62
63
 
63
64
  def self.default_locale
64
- config['default_locale'] || "en"
65
+ config['default_locale'] || 'en'
65
66
  end
66
67
 
67
- def self.set_default_locale(new_locale)
68
+ def self.default_locale=(new_locale)
68
69
  FastGettext.default_locale = new_locale
69
70
  Locale.set_default(new_locale)
70
71
  config['default_locale'] = new_locale
@@ -81,31 +82,31 @@ module GettextSetup
81
82
  end
82
83
 
83
84
  def self.locales
84
- explicit = Dir.glob(File::absolute_path('*/*.po', locales_path)).map do |x|
85
- File::basename(File::dirname(x))
85
+ explicit = Dir.glob(File.absolute_path('*/*.po', locales_path)).map do |x|
86
+ File.basename(File.dirname(x))
86
87
  end
87
- (explicit + [ default_locale]).uniq
88
+ (explicit + [default_locale]).uniq
88
89
  end
89
90
 
90
91
  # Given an HTTP Accept-Language header return the locale with the highest
91
92
  # priority from it for which we have a locale available. If none exists,
92
93
  # return the default locale
93
94
  def self.negotiate_locale(accept_header)
94
- unless @@config
95
- raise ArgumentError, "No config.yaml found! Use `GettextSetup.initialize(locales_path)` to locate your config.yaml"
95
+ unless @config
96
+ raise ArgumentError, 'No config.yaml found! Use `GettextSetup.initialize(locales_path)` to locate your config.yaml'
96
97
  end
97
98
  return FastGettext.default_locale if accept_header.nil?
98
- available_locales = accept_header.split(",").map do |locale|
99
+ available_locales = accept_header.split(',').map do |locale|
99
100
  pair = locale.strip.split(';q=')
100
101
  pair << '1.0' unless pair.size == 2
101
102
  pair[0] = FastGettext.default_locale if pair[0] == '*'
102
103
  pair
103
- end.sort_by do |(locale,qvalue)|
104
+ end.sort_by do |(_, qvalue)|
104
105
  -1 * qvalue.to_f
105
- end.select do |(locale,_)|
106
+ end.select do |(locale, _)|
106
107
  FastGettext.available_locales.include?(locale)
107
108
  end
108
- if available_locales and available_locales.first
109
+ if available_locales && available_locales.first
109
110
  available_locales.first.first
110
111
  else
111
112
  # We can't satisfy the request preference. Just use the default locale.
@@ -0,0 +1 @@
1
+ require 'gettext-setup/gettext_setup'
@@ -8,7 +8,6 @@ require_relative '../gettext-setup/gettext_setup'
8
8
  # GettextSetup.initialize(File.absolute_path('locales', Dir.pwd))
9
9
 
10
10
  namespace :gettext do
11
-
12
11
  def locale_path
13
12
  GettextSetup.locales_path
14
13
  end
@@ -33,7 +32,7 @@ namespace :gettext do
33
32
  end
34
33
 
35
34
  def pot_file_path
36
- File.join(locale_path, GettextSetup.config['project_name'] + ".pot")
35
+ File.join(locale_path, GettextSetup.config['project_name'] + '.pot')
37
36
  end
38
37
 
39
38
  def generate_new_pot
@@ -43,36 +42,32 @@ namespace :gettext do
43
42
  bugs_address = config['bugs_address']
44
43
  copyright_holder = config['copyright_holder']
45
44
  # Done this way to allow the user to enter an empty string in the config.
46
- if config.has_key?('comments_tag')
47
- comments_tag = config['comments_tag']
48
- else
49
- comments_tag = 'TRANSLATORS'
50
- end
51
- version=`git describe`
52
- system("rxgettext -o locales/#{project_name}.pot --no-wrap --sort-by-file " +
53
- "--no-location --add-comments#{comments_tag.to_s == '' ? '' : '=' + comments_tag} --msgid-bugs-address '#{bugs_address}' " +
54
- "--package-name '#{package_name}' " +
55
- "--package-version '#{version}' " +
45
+ comments_tag = config.key?('comments_tag') ? config['comments_tag'] : 'TRANSLATORS'
46
+ version = `git describe`
47
+ system("rxgettext -o locales/#{project_name}.pot --no-wrap --sort-by-file " \
48
+ "--add-comments#{comments_tag.to_s == '' ? '' : '=' + comments_tag} --msgid-bugs-address '#{bugs_address}' " \
49
+ "--package-name '#{package_name}' " \
50
+ "--package-version '#{version}' " \
56
51
  "--copyright-holder='#{copyright_holder}' --copyright-year=#{Time.now.year} " +
57
- "#{files_to_translate.join(" ")}")
52
+ files_to_translate.join(' '))
58
53
  end
59
54
 
60
- desc "Generate a new POT file and replace old if strings changed"
55
+ desc 'Generate a new POT file and replace old if strings changed'
61
56
  task :update_pot do
62
- if !File.exists? pot_file_path
63
- puts "No existing POT file, generating new"
57
+ if !File.exist? pot_file_path
58
+ puts 'No existing POT file, generating new'
64
59
  generate_new_pot
65
60
  else
66
- old_pot = pot_file_path + ".old"
61
+ old_pot = pot_file_path + '.old'
67
62
  File.rename(pot_file_path, old_pot)
68
63
  generate_new_pot
69
64
  begin
70
65
  _, stderr, status = Open3.capture3("msgcmp --use-untranslated '#{old_pot}' '#{pot_file_path}'")
71
66
  if status == 1 || /this message is not used/.match(stderr)
72
67
  File.delete(old_pot)
73
- puts "String changes detected, replacing with updated POT file"
68
+ puts 'String changes detected, replacing with updated POT file'
74
69
  else
75
- puts "No string changes detected, keeping old POT file"
70
+ puts 'No string changes detected, keeping old POT file'
76
71
  File.rename(old_pot, pot_file_path)
77
72
  end
78
73
  rescue IOError
@@ -82,15 +77,15 @@ namespace :gettext do
82
77
  end
83
78
  end
84
79
 
85
- desc "Generate POT file"
80
+ desc 'Generate POT file'
86
81
  task :pot do
87
82
  generate_new_pot
88
83
  puts "POT file #{pot_file_path} has been generated"
89
84
  end
90
85
 
91
- desc "Update PO file for a specific language"
86
+ desc 'Update PO file for a specific language'
92
87
  task :po, [:language] do |_, args|
93
- language = args.language || ENV["LANGUAGE"]
88
+ language = args.language || ENV['LANGUAGE']
94
89
 
95
90
  # Let's do some pre-verification of the environment.
96
91
  if language.nil?
@@ -102,8 +97,8 @@ namespace :gettext do
102
97
  mkdir_p(language_path)
103
98
 
104
99
  po_file_path = File.join(language_path,
105
- GettextSetup.config['project_name'] + ".po")
106
- if File.exists?(po_file_path)
100
+ GettextSetup.config['project_name'] + '.po')
101
+ if File.exist?(po_file_path)
107
102
  system("msgmerge -U #{po_file_path} #{pot_file_path}")
108
103
  else
109
104
  system("msginit --no-translator -l #{language} -o #{po_file_path} -i #{pot_file_path}")
@@ -1,16 +1,16 @@
1
- require "rspec/expectations"
1
+ require 'rspec/expectations'
2
2
  require_relative '../spec_helper'
3
3
 
4
4
  describe GettextSetup do
5
5
  before(:each) do
6
- GettextSetup.initialize(File::join(File::dirname(File::dirname(__FILE__)), 'fixtures', 'locales'))
6
+ GettextSetup.initialize(File.join(File.dirname(File.dirname(__FILE__)), 'fixtures', 'locales'))
7
7
  end
8
8
  let(:config) do
9
9
  GettextSetup.config
10
10
  end
11
11
  context 'initialize' do
12
- it "sets up correctly" do
13
- # GettextSetup.initialize(File::join(File::dirname(File::dirname(__FILE__)), 'fixtures'))
12
+ it 'sets up correctly' do
13
+ # GettextSetup.initialize(File.join(File.dirname(File.dirname(__FILE__)), 'fixtures'))
14
14
  expect(GettextSetup.locales_path).to match(/\/spec\/fixtures/)
15
15
  expect(config['project_name']).to eq('sinatra-i18n')
16
16
  expect(config['package_name']).to eq('Sinatra i18n demo')
@@ -19,34 +19,34 @@ describe GettextSetup do
19
19
  end
20
20
  end
21
21
  context 'negotiate_locale' do
22
- it "negotiates correctly" do
22
+ it 'negotiates correctly' do
23
23
  FastGettext.locale = GettextSetup.negotiate_locale('de')
24
24
  expect(FastGettext.locale).to eq('de')
25
25
  expect(_('Hello, world!')).to eq('Hallo, Welt!')
26
26
  end
27
- it "chooses the default locale when no match is found" do
27
+ it 'chooses the default locale when no match is found' do
28
28
  expect(GettextSetup.negotiate_locale('no-match')).to eq(config['default_locale'])
29
29
  end
30
- it "chooses the language with the highest q value" do
30
+ it 'chooses the language with the highest q value' do
31
31
  expect(GettextSetup.negotiate_locale('en;q=1, de;q=2')).to eq('de')
32
32
  expect(GettextSetup.negotiate_locale('en;q=1, de;q=0')).to eq('en')
33
33
  end
34
- it "chooses the first value when q values are equal" do
34
+ it 'chooses the first value when q values are equal' do
35
35
  expect(GettextSetup.negotiate_locale('de;q=1, en;q=1')).to eq('de')
36
36
  end
37
37
  end
38
- context 'set_default_locale' do
38
+ context 'setting default_locale' do
39
39
  before :each do
40
- GettextSetup.set_default_locale('en')
40
+ GettextSetup.default_locale = 'en'
41
41
  end
42
42
  it 'allows setting the default locale' do
43
43
  expect(GettextSetup.default_locale).to eq('en')
44
- GettextSetup.set_default_locale('de')
44
+ GettextSetup.default_locale = 'de'
45
45
  expect(GettextSetup.default_locale).to eq('de')
46
46
  end
47
47
  end
48
48
  context 'clear' do
49
- it "can clear the locale" do
49
+ it 'can clear the locale' do
50
50
  expect(GettextSetup.default_locale).to eq('en')
51
51
  expect(GettextSetup.candidate_locales).to include('en')
52
52
  GettextSetup.clear
@@ -57,10 +57,12 @@ describe GettextSetup do
57
57
  context 'multiple locales' do
58
58
  # locales/ loads the de locale and alt_locales/ loads the jp locale
59
59
  before(:all) do
60
- GettextSetup.initialize(File::join(File::dirname(File::dirname(__FILE__)), 'fixtures', 'alt_locales'))
60
+ GettextSetup.initialize(File.join(File.dirname(File.dirname(__FILE__)), 'fixtures', 'alt_locales'))
61
61
  end
62
62
  it 'can aggregate locales across projects' do
63
- expect(FastGettext.default_available_locales).to include('en','de','jp')
63
+ expect(FastGettext.default_available_locales).to include('en')
64
+ expect(FastGettext.default_available_locales).to include('de')
65
+ expect(FastGettext.default_available_locales).to include('jp')
64
66
  end
65
67
  it 'can switch to loaded locale' do
66
68
  FastGettext.locale = GettextSetup.negotiate_locale('de,en')
@@ -71,28 +73,28 @@ describe GettextSetup do
71
73
  end
72
74
  context 'translation repository chain' do
73
75
  before(:all) do
74
- GettextSetup.initialize(File::join(File::dirname(File::dirname(__FILE__)), 'fixtures', 'alt_locales'))
76
+ GettextSetup.initialize(File.join(File.dirname(File.dirname(__FILE__)), 'fixtures', 'alt_locales'))
75
77
  end
76
78
  it 'chain is not nil' do
77
79
  expect(GettextSetup.translation_repositories).not_to be_nil
78
80
  end
79
81
  it 'can translate without switching text domains' do
80
- FastGettext.locale = "de"
82
+ FastGettext.locale = 'de'
81
83
  expect(_('Hello, world!')).to eq('Hallo, Welt!')
82
- FastGettext.locale = "jp"
84
+ FastGettext.locale = 'jp'
83
85
  expect(_('Hello, world!')).to eq('こんにちは世界')
84
86
  end
85
87
  it 'does not allow duplicate repositories' do
86
- GettextSetup.initialize(File::join(File::dirname(File::dirname(__FILE__)), 'fixtures', 'alt_locales'))
88
+ GettextSetup.initialize(File.join(File.dirname(File.dirname(__FILE__)), 'fixtures', 'alt_locales'))
87
89
  repos = GettextSetup.translation_repositories
88
- expect(repos.select { |k,v| k == 'alt_locales' }.size).to eq(1)
90
+ expect(repos.select { |k, _| k == 'alt_locales' }.size).to eq(1)
89
91
  end
90
92
  it 'does allow multiple unique domains' do
91
- GettextSetup.initialize(File::join(File::dirname(File::dirname(__FILE__)), 'fixtures', 'locales'))
93
+ GettextSetup.initialize(File.join(File.dirname(File.dirname(__FILE__)), 'fixtures', 'locales'))
92
94
  repos = GettextSetup.translation_repositories
93
- expect(repos.size) == 2
94
- expect(repos.select { |k,v| k == 'alt_locales' }.size).to eq(1)
95
- expect(repos.select { |k,v| k == 'sinatra-i18n' }.size).to eq(1)
95
+ expect(repos.size == 2)
96
+ expect(repos.select { |k, _| k == 'alt_locales' }.size).to eq(1)
97
+ expect(repos.select { |k, _| k == 'sinatra-i18n' }.size).to eq(1)
96
98
  end
97
99
  end
98
100
  end
data/spec/spec_helper.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  require 'simplecov'
2
2
  SimpleCov.start do
3
- add_filter "/spec/"
3
+ add_filter '/spec/'
4
4
  end
5
5
 
6
- require_relative '../lib/gettext-setup'
6
+ require_relative '../lib/gettext_setup'
metadata CHANGED
@@ -1,195 +1,195 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gettext-setup
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.18'
4
+ version: '0.19'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppet
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-21 00:00:00.000000000 Z
11
+ date: 2017-03-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: fast_gettext
15
14
  requirement: !ruby/object:Gem::Requirement
16
15
  requirements:
17
- - - "~>"
16
+ - - ~>
18
17
  - !ruby/object:Gem::Version
19
18
  version: 1.1.0
20
- type: :runtime
19
+ name: fast_gettext
21
20
  prerelease: false
21
+ type: :runtime
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ~>
25
25
  - !ruby/object:Gem::Version
26
26
  version: 1.1.0
27
27
  - !ruby/object:Gem::Dependency
28
- name: gettext
29
28
  requirement: !ruby/object:Gem::Requirement
30
29
  requirements:
31
- - - ">="
30
+ - - '>='
32
31
  - !ruby/object:Gem::Version
33
32
  version: 3.0.2
34
- type: :runtime
33
+ name: gettext
35
34
  prerelease: false
35
+ type: :runtime
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: 3.0.2
41
41
  - !ruby/object:Gem::Dependency
42
- name: locale
43
42
  requirement: !ruby/object:Gem::Requirement
44
43
  requirements:
45
- - - ">="
44
+ - - '>='
46
45
  - !ruby/object:Gem::Version
47
46
  version: '0'
48
- type: :runtime
47
+ name: locale
49
48
  prerelease: false
49
+ type: :runtime
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - '>='
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: bundler
57
56
  requirement: !ruby/object:Gem::Requirement
58
57
  requirements:
59
- - - "~>"
58
+ - - ~>
60
59
  - !ruby/object:Gem::Version
61
60
  version: '1.3'
62
- type: :development
61
+ name: bundler
63
62
  prerelease: false
63
+ type: :development
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ~>
67
67
  - !ruby/object:Gem::Version
68
68
  version: '1.3'
69
69
  - !ruby/object:Gem::Dependency
70
- name: rake
71
70
  requirement: !ruby/object:Gem::Requirement
72
71
  requirements:
73
- - - ">="
72
+ - - '>='
74
73
  - !ruby/object:Gem::Version
75
74
  version: '0'
76
- type: :development
75
+ name: rake
77
76
  prerelease: false
77
+ type: :development
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ">="
80
+ - - '>='
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
- name: rack-test
85
84
  requirement: !ruby/object:Gem::Requirement
86
85
  requirements:
87
- - - ">="
86
+ - - '>='
88
87
  - !ruby/object:Gem::Version
89
88
  version: '0'
90
- type: :development
89
+ name: rack-test
91
90
  prerelease: false
91
+ type: :development
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ">="
94
+ - - '>='
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
- name: rspec
99
98
  requirement: !ruby/object:Gem::Requirement
100
99
  requirements:
101
- - - "~>"
100
+ - - ~>
102
101
  - !ruby/object:Gem::Version
103
102
  version: '3.1'
104
- type: :development
103
+ name: rspec
105
104
  prerelease: false
105
+ type: :development
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - "~>"
108
+ - - ~>
109
109
  - !ruby/object:Gem::Version
110
110
  version: '3.1'
111
111
  - !ruby/object:Gem::Dependency
112
- name: rspec-core
113
112
  requirement: !ruby/object:Gem::Requirement
114
113
  requirements:
115
- - - "~>"
114
+ - - ~>
116
115
  - !ruby/object:Gem::Version
117
116
  version: '3.1'
118
- type: :development
117
+ name: rspec-core
119
118
  prerelease: false
119
+ type: :development
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - "~>"
122
+ - - ~>
123
123
  - !ruby/object:Gem::Version
124
124
  version: '3.1'
125
125
  - !ruby/object:Gem::Dependency
126
- name: rspec-expectations
127
126
  requirement: !ruby/object:Gem::Requirement
128
127
  requirements:
129
- - - "~>"
128
+ - - ~>
130
129
  - !ruby/object:Gem::Version
131
130
  version: '3.1'
132
- type: :development
131
+ name: rspec-expectations
133
132
  prerelease: false
133
+ type: :development
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - "~>"
136
+ - - ~>
137
137
  - !ruby/object:Gem::Version
138
138
  version: '3.1'
139
139
  - !ruby/object:Gem::Dependency
140
- name: rspec-mocks
141
140
  requirement: !ruby/object:Gem::Requirement
142
141
  requirements:
143
- - - "~>"
142
+ - - ~>
144
143
  - !ruby/object:Gem::Version
145
144
  version: '3.1'
146
- type: :development
145
+ name: rspec-mocks
147
146
  prerelease: false
147
+ type: :development
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - "~>"
150
+ - - ~>
151
151
  - !ruby/object:Gem::Version
152
152
  version: '3.1'
153
153
  - !ruby/object:Gem::Dependency
154
- name: simplecov
155
154
  requirement: !ruby/object:Gem::Requirement
156
155
  requirements:
157
- - - ">="
156
+ - - '>='
158
157
  - !ruby/object:Gem::Version
159
158
  version: '0'
160
- type: :development
159
+ name: simplecov
161
160
  prerelease: false
161
+ type: :development
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
- - - ">="
164
+ - - '>='
165
165
  - !ruby/object:Gem::Version
166
166
  version: '0'
167
167
  - !ruby/object:Gem::Dependency
168
- name: webmock
169
168
  requirement: !ruby/object:Gem::Requirement
170
169
  requirements:
171
- - - ">="
170
+ - - '>='
172
171
  - !ruby/object:Gem::Version
173
172
  version: '0'
174
- type: :development
173
+ name: webmock
175
174
  prerelease: false
175
+ type: :development
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
- - - ">="
178
+ - - '>='
179
179
  - !ruby/object:Gem::Version
180
180
  version: '0'
181
181
  - !ruby/object:Gem::Dependency
182
- name: rubocop
183
182
  requirement: !ruby/object:Gem::Requirement
184
183
  requirements:
185
- - - ">="
184
+ - - '>='
186
185
  - !ruby/object:Gem::Version
187
186
  version: '0'
188
- type: :development
187
+ name: rubocop
189
188
  prerelease: false
189
+ type: :development
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
- - - ">="
192
+ - - '>='
193
193
  - !ruby/object:Gem::Version
194
194
  version: '0'
195
195
  description: A gem to ease i18n
@@ -201,8 +201,8 @@ extra_rdoc_files: []
201
201
  files:
202
202
  - LICENSE
203
203
  - README.md
204
- - lib/gettext-setup.rb
205
204
  - lib/gettext-setup/gettext_setup.rb
205
+ - lib/gettext_setup.rb
206
206
  - lib/tasks/gettext.rake
207
207
  - locales/config-sample.yaml
208
208
  - spec/fixtures/alt_locales/alt_locales.pot
@@ -217,33 +217,32 @@ homepage: https://github.com/puppetlabs/gettext-setup-gem
217
217
  licenses:
218
218
  - Apache-2.0
219
219
  metadata: {}
220
- post_install_message:
220
+ post_install_message:
221
221
  rdoc_options: []
222
222
  require_paths:
223
223
  - lib
224
224
  required_ruby_version: !ruby/object:Gem::Requirement
225
225
  requirements:
226
- - - ">="
226
+ - - '>='
227
227
  - !ruby/object:Gem::Version
228
228
  version: 1.9.2
229
229
  required_rubygems_version: !ruby/object:Gem::Requirement
230
230
  requirements:
231
- - - ">="
231
+ - - '>='
232
232
  - !ruby/object:Gem::Version
233
233
  version: '0'
234
234
  requirements: []
235
- rubyforge_project:
236
- rubygems_version: 2.5.1
237
- signing_key:
235
+ rubyforge_project:
236
+ rubygems_version: 2.4.5
237
+ signing_key:
238
238
  specification_version: 4
239
239
  summary: A gem to ease internationalization with fast_gettext
240
240
  test_files:
241
+ - spec/spec_helper.rb
241
242
  - spec/fixtures/alt_locales/alt_locales.pot
242
243
  - spec/fixtures/alt_locales/config.yaml
243
244
  - spec/fixtures/alt_locales/jp/alt_locales.po
244
245
  - spec/fixtures/locales/config.yaml
245
- - spec/fixtures/locales/de/sinatra-i18n.po
246
246
  - spec/fixtures/locales/sinatra-i18n.pot
247
+ - spec/fixtures/locales/de/sinatra-i18n.po
247
248
  - spec/lib/gettext_setup_spec.rb
248
- - spec/spec_helper.rb
249
- has_rdoc:
data/lib/gettext-setup.rb DELETED
@@ -1 +0,0 @@
1
- require 'gettext-setup/gettext_setup'