gettext-setup 0.3 → 0.4

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: 975d57dd5789c927c93b764b9c073fa1c04acc76
4
- data.tar.gz: c93ae9e686fdd706c2f4ee6765ba253d04344fd6
3
+ metadata.gz: e9f8891366b1c969292c1e2cd263c4781b186176
4
+ data.tar.gz: d45d299f1a2a21a1bf2d9333239a37ebd4c29f67
5
5
  SHA512:
6
- metadata.gz: d1940fd699640b3ff376ab64231b748590b783c1bd57318cc68bb4b6e64a62c0eabd9c3851b2a13f12247a9a73bc482cc0856a34c75ed826a2bd1dc77d363b5a
7
- data.tar.gz: 393598349f49bbd0e5c5c5c4cfb6f12bbf88d0f3c4cf6dbd0111f420078ad62377edf1fa0da20c561d8a07c1c31a56162475706797c4a4f44a7784181d4e41f6
6
+ metadata.gz: 05b006720a1ab0104d3daadcd1a325e871c8e79593e6d149940df5a7afecc9abe5f69420e0a155cc0b7f00035f05a1c2f76f998a164c356b89db78eadb64a211
7
+ data.tar.gz: e1d1b097ceec761dd79529b0d91b3999c7bd7178704ffc21d3c7f3a694bab98f5a1018e0c3a592799bb94c63dfd4971c8b35aae74a9cd0b95aed8542c5382d04
data/Gemfile.lock CHANGED
@@ -18,20 +18,24 @@ GEM
18
18
  locale (>= 2.0.5)
19
19
  text (>= 1.3.0)
20
20
  json (1.8.3)
21
- json (1.8.3-java)
22
21
  locale (2.1.2)
23
22
  rack (1.6.4)
24
23
  rack-test (0.6.3)
25
24
  rack (>= 1.0)
26
25
  rake (10.4.2)
27
- rspec (2.13.0)
28
- rspec-core (~> 2.13.0)
29
- rspec-expectations (~> 2.13.0)
30
- rspec-mocks (~> 2.13.0)
31
- rspec-core (2.13.1)
32
- rspec-expectations (2.13.0)
33
- diff-lcs (>= 1.1.3, < 2.0)
34
- rspec-mocks (2.13.1)
26
+ rspec (3.5.0)
27
+ rspec-core (~> 3.5.0)
28
+ rspec-expectations (~> 3.5.0)
29
+ rspec-mocks (~> 3.5.0)
30
+ rspec-core (3.5.1)
31
+ rspec-support (~> 3.5.0)
32
+ rspec-expectations (3.5.0)
33
+ diff-lcs (>= 1.2.0, < 2.0)
34
+ rspec-support (~> 3.5.0)
35
+ rspec-mocks (3.5.0)
36
+ diff-lcs (>= 1.2.0, < 2.0)
37
+ rspec-support (~> 3.5.0)
38
+ rspec-support (3.5.0)
35
39
  safe_yaml (1.0.4)
36
40
  simplecov (0.10.0)
37
41
  docile (~> 1.1.0)
@@ -51,10 +55,10 @@ DEPENDENCIES
51
55
  gettext-setup!
52
56
  rack-test
53
57
  rake
54
- rspec (~> 2.13.0)
55
- rspec-core (~> 2.13.1)
56
- rspec-expectations (~> 2.13.0)
57
- rspec-mocks (~> 2.13.1)
58
+ rspec (~> 3.1)
59
+ rspec-core (~> 3.1)
60
+ rspec-expectations (~> 3.1)
61
+ rspec-mocks (~> 3.1)
58
62
  simplecov
59
63
  webmock
60
64
 
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "gettext-setup"
7
- spec.version = "0.3"
7
+ spec.version = "0.4"
8
8
  spec.authors = ["Puppet"]
9
9
  spec.email = ["info@puppet.com"]
10
10
  spec.description = "A gem to ease i18n"
@@ -23,10 +23,10 @@ Gem::Specification.new do |spec|
23
23
  spec.add_development_dependency "rake"
24
24
 
25
25
  spec.add_development_dependency "rack-test"
26
- spec.add_development_dependency "rspec", "~> 2.13.0"
27
- spec.add_development_dependency "rspec-core", "~> 2.13.1"
28
- spec.add_development_dependency "rspec-expectations", "~> 2.13.0"
29
- spec.add_development_dependency "rspec-mocks", "~> 2.13.1"
26
+ spec.add_development_dependency "rspec", "~> 3.1"
27
+ spec.add_development_dependency "rspec-core", "~> 3.1"
28
+ spec.add_development_dependency "rspec-expectations", "~> 3.1"
29
+ spec.add_development_dependency "rspec-mocks", "~> 3.1"
30
30
  spec.add_development_dependency "simplecov"
31
31
  spec.add_development_dependency "webmock"
32
32
 
@@ -34,7 +34,7 @@ namespace :gettext do
34
34
  copyright_holder = GettextSetup.config['copyright_holder']
35
35
  version=`git describe`
36
36
  system("rxgettext -o locales/#{project_name}.pot --no-wrap --sort-by-file " +
37
- "--add-comments --msgid-bugs-address '#{bugs_address}' " +
37
+ "--no-location --add-comments --msgid-bugs-address '#{bugs_address}' " +
38
38
  "--package-name '#{package_name}' " +
39
39
  "--package-version '#{version}' " +
40
40
  "--copyright-holder='#{copyright_holder}' --copyright-year=#{Time.now.year} " +
@@ -11,25 +11,25 @@ describe GettextSetup do
11
11
  context 'initialize' do
12
12
  it "sets up correctly" do
13
13
  # GettextSetup.initialize(File::join(File::dirname(File::dirname(__FILE__)), 'fixtures'))
14
- GettextSetup.locales_path.should =~ /\/spec\/fixtures/
15
- config['project_name'].should == 'sinatra-i18n'
16
- config['package_name'].should == 'Sinatra i18n demo'
17
- config['default_locale'].should == 'en'
18
- respond_to?(:_).should == true
14
+ expect(GettextSetup.locales_path).to match(/\/spec\/fixtures/)
15
+ expect(config['project_name']).to eq('sinatra-i18n')
16
+ expect(config['package_name']).to eq('Sinatra i18n demo')
17
+ expect(config['default_locale']).to eq('en')
18
+ expect(respond_to?(:_)).to eq(true)
19
19
  end
20
20
  end
21
21
  context 'negotiate_locale' do
22
22
  it "negotiates correctly" do
23
23
  FastGettext.locale = GettextSetup.negotiate_locale('de')
24
- FastGettext.locale.should == 'de'
25
- _('Hello, world!').should == 'Hallo, Welt!'
24
+ expect(FastGettext.locale).to eq('de')
25
+ expect(_('Hello, world!')).to eq('Hallo, Welt!')
26
26
  end
27
27
  it "chooses the default locale when no match is found" do
28
- GettextSetup.negotiate_locale('no-match').should == config['default_locale']
28
+ expect(GettextSetup.negotiate_locale('no-match')).to eq(config['default_locale'])
29
29
  end
30
30
  it "chooses the language with the highest q value" do
31
- GettextSetup.negotiate_locale('en;q=1, de;q=2').should == 'de'
32
- GettextSetup.negotiate_locale('en;q=1, de;q=0').should == 'en'
31
+ expect(GettextSetup.negotiate_locale('en;q=1, de;q=2')).to eq('de')
32
+ expect(GettextSetup.negotiate_locale('en;q=1, de;q=0')).to eq('en')
33
33
  end
34
34
  end
35
35
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gettext-setup
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.3'
4
+ version: '0.4'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppet
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-22 00:00:00.000000000 Z
11
+ date: 2016-07-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -85,7 +85,7 @@ dependencies:
85
85
  requirements:
86
86
  - - ~>
87
87
  - !ruby/object:Gem::Version
88
- version: 2.13.0
88
+ version: '3.1'
89
89
  name: rspec
90
90
  prerelease: false
91
91
  type: :development
@@ -93,13 +93,13 @@ dependencies:
93
93
  requirements:
94
94
  - - ~>
95
95
  - !ruby/object:Gem::Version
96
- version: 2.13.0
96
+ version: '3.1'
97
97
  - !ruby/object:Gem::Dependency
98
98
  requirement: !ruby/object:Gem::Requirement
99
99
  requirements:
100
100
  - - ~>
101
101
  - !ruby/object:Gem::Version
102
- version: 2.13.1
102
+ version: '3.1'
103
103
  name: rspec-core
104
104
  prerelease: false
105
105
  type: :development
@@ -107,13 +107,13 @@ dependencies:
107
107
  requirements:
108
108
  - - ~>
109
109
  - !ruby/object:Gem::Version
110
- version: 2.13.1
110
+ version: '3.1'
111
111
  - !ruby/object:Gem::Dependency
112
112
  requirement: !ruby/object:Gem::Requirement
113
113
  requirements:
114
114
  - - ~>
115
115
  - !ruby/object:Gem::Version
116
- version: 2.13.0
116
+ version: '3.1'
117
117
  name: rspec-expectations
118
118
  prerelease: false
119
119
  type: :development
@@ -121,13 +121,13 @@ dependencies:
121
121
  requirements:
122
122
  - - ~>
123
123
  - !ruby/object:Gem::Version
124
- version: 2.13.0
124
+ version: '3.1'
125
125
  - !ruby/object:Gem::Dependency
126
126
  requirement: !ruby/object:Gem::Requirement
127
127
  requirements:
128
128
  - - ~>
129
129
  - !ruby/object:Gem::Version
130
- version: 2.13.1
130
+ version: '3.1'
131
131
  name: rspec-mocks
132
132
  prerelease: false
133
133
  type: :development
@@ -135,7 +135,7 @@ dependencies:
135
135
  requirements:
136
136
  - - ~>
137
137
  - !ruby/object:Gem::Version
138
- version: 2.13.1
138
+ version: '3.1'
139
139
  - !ruby/object:Gem::Dependency
140
140
  requirement: !ruby/object:Gem::Requirement
141
141
  requirements: