i18n_helper 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.coveralls.yml +1 -1
- data/.travis.yml +4 -1
- data/CHANGELOG.md +26 -0
- data/Gemfile.lock +80 -69
- data/README.md +5 -1
- data/app/controllers/locales_controller.rb +2 -0
- data/i18n_helper-0.0.2.gem +0 -0
- data/i18n_helper.gemspec +4 -4
- data/lib/i18n_helper/version.rb +1 -1
- data/spec/controllers/locales_controller_spec.rb +9 -3
- data/spec/spec_helper.rb +1 -1
- metadata +12 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 707b399d0ee9b26a6e4fa6d34878e86df21a9793
|
4
|
+
data.tar.gz: 1f881ae6d572712eeeafb2364fe2b1b3fe4cf1f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e5c321567c7979da97b7771a148c979263317251875156a45a288ddb693a88fd020acfa62379582f78a418be437348325963f614723b851a3676af5a2bc8173
|
7
|
+
data.tar.gz: 7880cb4812205c45f14e97e0c764508b30344cd34d10e8a614aec32981b07e49387f049a3583e0728c8db0f749450d708b1322aa9098b13deb6198ae8f7e2bf7
|
data/.coveralls.yml
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
service_name: travis-ci
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
### VERSION 0.0.3
|
2
|
+
|
3
|
+
* bug fix
|
4
|
+
* need to skip CSRF verification
|
5
|
+
|
6
|
+
* refactoring
|
7
|
+
*
|
8
|
+
|
9
|
+
* enhancements
|
10
|
+
*
|
11
|
+
|
12
|
+
* backwards incompatible changes
|
13
|
+
*
|
14
|
+
|
15
|
+
* deprecations
|
16
|
+
*
|
17
|
+
|
18
|
+
* todos
|
19
|
+
*
|
20
|
+
|
21
|
+
* extra
|
22
|
+
*
|
23
|
+
|
24
|
+
### VERSION 0.0.2
|
25
|
+
|
26
|
+
### VERSION 0.0.1
|
data/Gemfile.lock
CHANGED
@@ -1,129 +1,140 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
i18n_helper (0.0.
|
4
|
+
i18n_helper (0.0.3)
|
5
5
|
i18n-language-translations (~> 0.0)
|
6
|
-
rails (~> 4.
|
6
|
+
rails (~> 4.1)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
actionmailer (4.
|
12
|
-
actionpack (= 4.
|
11
|
+
actionmailer (4.1.5)
|
12
|
+
actionpack (= 4.1.5)
|
13
|
+
actionview (= 4.1.5)
|
13
14
|
mail (~> 2.5.4)
|
14
|
-
actionpack (4.
|
15
|
-
|
16
|
-
|
17
|
-
erubis (~> 2.7.0)
|
15
|
+
actionpack (4.1.5)
|
16
|
+
actionview (= 4.1.5)
|
17
|
+
activesupport (= 4.1.5)
|
18
18
|
rack (~> 1.5.2)
|
19
19
|
rack-test (~> 0.6.2)
|
20
|
-
|
21
|
-
activesupport (= 4.
|
22
|
-
builder (~> 3.1
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
20
|
+
actionview (4.1.5)
|
21
|
+
activesupport (= 4.1.5)
|
22
|
+
builder (~> 3.1)
|
23
|
+
erubis (~> 2.7.0)
|
24
|
+
activemodel (4.1.5)
|
25
|
+
activesupport (= 4.1.5)
|
26
|
+
builder (~> 3.1)
|
27
|
+
activerecord (4.1.5)
|
28
|
+
activemodel (= 4.1.5)
|
29
|
+
activesupport (= 4.1.5)
|
30
|
+
arel (~> 5.0.0)
|
31
|
+
activesupport (4.1.5)
|
32
|
+
i18n (~> 0.6, >= 0.6.9)
|
33
|
+
json (~> 1.7, >= 1.7.7)
|
34
|
+
minitest (~> 5.1)
|
33
35
|
thread_safe (~> 0.1)
|
34
|
-
tzinfo (~>
|
35
|
-
arel (
|
36
|
-
|
37
|
-
|
38
|
-
coveralls (0.7.0)
|
36
|
+
tzinfo (~> 1.1)
|
37
|
+
arel (5.0.1.20140414130214)
|
38
|
+
builder (3.2.2)
|
39
|
+
coveralls (0.7.1)
|
39
40
|
multi_json (~> 1.3)
|
40
41
|
rest-client
|
41
42
|
simplecov (>= 0.7)
|
42
43
|
term-ansicolor
|
43
44
|
thor
|
44
45
|
diff-lcs (1.2.5)
|
45
|
-
docile (1.1.
|
46
|
+
docile (1.1.5)
|
46
47
|
erubis (2.7.0)
|
47
|
-
factory_girl (4.
|
48
|
+
factory_girl (4.4.0)
|
48
49
|
activesupport (>= 3.0.0)
|
49
|
-
factory_girl_rails (4.
|
50
|
-
factory_girl (~> 4.
|
50
|
+
factory_girl_rails (4.4.1)
|
51
|
+
factory_girl (~> 4.4.0)
|
51
52
|
railties (>= 3.0.0)
|
52
|
-
gemnasium (2.0
|
53
|
+
gemnasium (3.2.0)
|
53
54
|
hike (1.2.3)
|
54
|
-
i18n (0.6.
|
55
|
+
i18n (0.6.11)
|
55
56
|
i18n-language-translations (0.0.2)
|
56
57
|
i18n (~> 0.5)
|
57
58
|
railties (>= 3.0.0)
|
59
|
+
json (1.8.1)
|
58
60
|
mail (2.5.4)
|
59
61
|
mime-types (~> 1.16)
|
60
62
|
treetop (~> 1.4.8)
|
61
63
|
mime-types (1.25.1)
|
62
|
-
minitest (4.
|
63
|
-
multi_json (1.
|
64
|
-
|
64
|
+
minitest (5.4.0)
|
65
|
+
multi_json (1.10.1)
|
66
|
+
netrc (0.7.7)
|
67
|
+
polyglot (0.3.5)
|
65
68
|
rack (1.5.2)
|
66
69
|
rack-test (0.6.2)
|
67
70
|
rack (>= 1.0)
|
68
|
-
rails (4.
|
69
|
-
actionmailer (= 4.
|
70
|
-
actionpack (= 4.
|
71
|
-
|
72
|
-
|
71
|
+
rails (4.1.5)
|
72
|
+
actionmailer (= 4.1.5)
|
73
|
+
actionpack (= 4.1.5)
|
74
|
+
actionview (= 4.1.5)
|
75
|
+
activemodel (= 4.1.5)
|
76
|
+
activerecord (= 4.1.5)
|
77
|
+
activesupport (= 4.1.5)
|
73
78
|
bundler (>= 1.3.0, < 2.0)
|
74
|
-
railties (= 4.
|
75
|
-
sprockets-rails (~> 2.0
|
76
|
-
railties (4.
|
77
|
-
actionpack (= 4.
|
78
|
-
activesupport (= 4.
|
79
|
+
railties (= 4.1.5)
|
80
|
+
sprockets-rails (~> 2.0)
|
81
|
+
railties (4.1.5)
|
82
|
+
actionpack (= 4.1.5)
|
83
|
+
activesupport (= 4.1.5)
|
79
84
|
rake (>= 0.8.7)
|
80
85
|
thor (>= 0.18.1, < 2.0)
|
81
|
-
rake (10.
|
82
|
-
rest-client (1.
|
83
|
-
mime-types (>= 1.16)
|
84
|
-
|
85
|
-
rspec-
|
86
|
-
|
87
|
-
rspec-
|
88
|
-
|
86
|
+
rake (10.3.2)
|
87
|
+
rest-client (1.7.2)
|
88
|
+
mime-types (>= 1.16, < 3.0)
|
89
|
+
netrc (~> 0.7)
|
90
|
+
rspec-core (3.0.4)
|
91
|
+
rspec-support (~> 3.0.0)
|
92
|
+
rspec-expectations (3.0.4)
|
93
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
94
|
+
rspec-support (~> 3.0.0)
|
95
|
+
rspec-mocks (3.0.4)
|
96
|
+
rspec-support (~> 3.0.0)
|
97
|
+
rspec-rails (3.0.2)
|
89
98
|
actionpack (>= 3.0)
|
90
99
|
activesupport (>= 3.0)
|
91
100
|
railties (>= 3.0)
|
92
|
-
rspec-core (~>
|
93
|
-
rspec-expectations (~>
|
94
|
-
rspec-mocks (~>
|
95
|
-
|
101
|
+
rspec-core (~> 3.0.0)
|
102
|
+
rspec-expectations (~> 3.0.0)
|
103
|
+
rspec-mocks (~> 3.0.0)
|
104
|
+
rspec-support (~> 3.0.0)
|
105
|
+
rspec-support (3.0.4)
|
106
|
+
simplecov (0.9.0)
|
96
107
|
docile (~> 1.1.0)
|
97
108
|
multi_json
|
98
109
|
simplecov-html (~> 0.8.0)
|
99
110
|
simplecov-html (0.8.0)
|
100
|
-
sprockets (2.
|
111
|
+
sprockets (2.12.1)
|
101
112
|
hike (~> 1.2)
|
102
113
|
multi_json (~> 1.0)
|
103
114
|
rack (~> 1.0)
|
104
115
|
tilt (~> 1.1, != 1.3.0)
|
105
|
-
sprockets-rails (2.
|
116
|
+
sprockets-rails (2.1.3)
|
106
117
|
actionpack (>= 3.0)
|
107
118
|
activesupport (>= 3.0)
|
108
119
|
sprockets (~> 2.8)
|
109
|
-
term-ansicolor (1.
|
110
|
-
tins (~> 0
|
111
|
-
thor (0.
|
112
|
-
thread_safe (0.
|
113
|
-
atomic
|
120
|
+
term-ansicolor (1.3.0)
|
121
|
+
tins (~> 1.0)
|
122
|
+
thor (0.19.1)
|
123
|
+
thread_safe (0.3.4)
|
114
124
|
tilt (1.4.1)
|
115
|
-
tins (
|
125
|
+
tins (1.3.2)
|
116
126
|
treetop (1.4.15)
|
117
127
|
polyglot
|
118
128
|
polyglot (>= 0.3.1)
|
119
|
-
tzinfo (
|
129
|
+
tzinfo (1.2.2)
|
130
|
+
thread_safe (~> 0.1)
|
120
131
|
|
121
132
|
PLATFORMS
|
122
133
|
ruby
|
123
134
|
|
124
135
|
DEPENDENCIES
|
125
136
|
coveralls (~> 0.7)
|
126
|
-
factory_girl_rails (~> 4.
|
127
|
-
gemnasium (~> 2
|
137
|
+
factory_girl_rails (~> 4.4)
|
138
|
+
gemnasium (~> 3.2)
|
128
139
|
i18n_helper!
|
129
|
-
rspec-rails (~>
|
140
|
+
rspec-rails (~> 3.0)
|
data/README.md
CHANGED
@@ -6,11 +6,15 @@
|
|
6
6
|
|
7
7
|
[![Coverage Status](https://coveralls.io/repos/joel/i18n_helper/badge.png)](https://coveralls.io/r/joel/i18n_helper)
|
8
8
|
|
9
|
+
[![Gem Version](https://badge.fury.io/rb/i18n_helper.png)](http://badge.fury.io/rb/i18n_helper)
|
10
|
+
|
9
11
|
# I18nHelper
|
10
12
|
|
11
13
|
This is a really straightforward I18n locales helper. It can you help to change locale web app on the fly.
|
12
14
|
|
13
|
-
|
15
|
+
![Screenshot](https://f.cloud.github.com/assets/5789/1832468/0ad6491c-73b6-11e3-8f14-3358168ed5ff.png)
|
16
|
+
|
17
|
+
## Features
|
14
18
|
|
15
19
|
The locale of app is recorded on current session.
|
16
20
|
|
Binary file
|
data/i18n_helper.gemspec
CHANGED
@@ -22,12 +22,12 @@ Gem::Specification.new do |s|
|
|
22
22
|
|
23
23
|
# s.files = Dir['{app,config,db,lib}/**/*', 'MIT-LICENSE', 'Rakefile', 'README.rdoc']
|
24
24
|
|
25
|
-
s.add_dependency 'rails', '~> 4.
|
25
|
+
s.add_dependency 'rails', '~> 4.1'
|
26
26
|
s.add_dependency 'i18n-language-translations', '~> 0.0' # 0.0.2 actual
|
27
27
|
|
28
|
-
s.add_development_dependency 'rspec-rails', '~>
|
29
|
-
s.add_development_dependency 'factory_girl_rails', '~> 4.
|
30
|
-
s.add_development_dependency 'gemnasium', '~> 2
|
28
|
+
s.add_development_dependency 'rspec-rails', '~> 3.0'
|
29
|
+
s.add_development_dependency 'factory_girl_rails', '~> 4.4'
|
30
|
+
s.add_development_dependency 'gemnasium', '~> 3.2'
|
31
31
|
s.add_development_dependency 'coveralls', '~> 0.7'
|
32
32
|
|
33
33
|
s.required_ruby_version = '~> 2.0'
|
data/lib/i18n_helper/version.rb
CHANGED
@@ -15,15 +15,21 @@ describe LocalesController do
|
|
15
15
|
before { subject }
|
16
16
|
|
17
17
|
describe 'should redirect back' do
|
18
|
-
|
18
|
+
specify do
|
19
|
+
expect(response).to redirect_to '/'
|
20
|
+
end
|
19
21
|
end
|
20
22
|
|
21
23
|
describe 'should store on session locale' do
|
22
|
-
|
24
|
+
specify do
|
25
|
+
expect(session[:locale]).to eql 'wk'
|
26
|
+
end
|
23
27
|
end
|
24
28
|
|
25
29
|
describe 'should change locale application' do
|
26
|
-
|
30
|
+
specify do
|
31
|
+
expect(I18n.locale).to eql :wk
|
32
|
+
end
|
27
33
|
end
|
28
34
|
|
29
35
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -4,7 +4,6 @@ ENV['RAILS_ENV'] ||= 'test'
|
|
4
4
|
require File.expand_path('../dummy/config/environment.rb', __FILE__)
|
5
5
|
|
6
6
|
require 'rspec/rails'
|
7
|
-
require 'rspec/autorun'
|
8
7
|
require 'factory_girl_rails'
|
9
8
|
require 'i18n_language_translations'
|
10
9
|
|
@@ -27,6 +26,7 @@ Dir[File.join(ENGINE_RAILS_ROOT, 'spec/support/**/*.rb')].each {|f| require f }
|
|
27
26
|
|
28
27
|
RSpec.configure do |config|
|
29
28
|
config.include FactoryGirl::Syntax::Methods
|
29
|
+
config.infer_spec_type_from_file_location!
|
30
30
|
|
31
31
|
config.before(:suite) do
|
32
32
|
I18n.locale = :en
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: i18n_helper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joel AZEMAR
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '4.
|
19
|
+
version: '4.1'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '4.
|
26
|
+
version: '4.1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: i18n-language-translations
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -44,42 +44,42 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '3.0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '3.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: factory_girl_rails
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '4.
|
61
|
+
version: '4.4'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '4.
|
68
|
+
version: '4.4'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: gemnasium
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '2
|
75
|
+
version: '3.2'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '2
|
82
|
+
version: '3.2'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: coveralls
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -107,6 +107,7 @@ files:
|
|
107
107
|
- ".gitignore"
|
108
108
|
- ".rspec"
|
109
109
|
- ".travis.yml"
|
110
|
+
- CHANGELOG.md
|
110
111
|
- Gemfile
|
111
112
|
- Gemfile.lock
|
112
113
|
- MIT-LICENSE
|
@@ -122,6 +123,7 @@ files:
|
|
122
123
|
- config/locales/fr.yml
|
123
124
|
- config/routes.rb
|
124
125
|
- i18n_helper-0.0.1.gem
|
126
|
+
- i18n_helper-0.0.2.gem
|
125
127
|
- i18n_helper.gemspec
|
126
128
|
- lib/i18n_helper.rb
|
127
129
|
- lib/i18n_helper/engine.rb
|
@@ -187,7 +189,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
187
189
|
version: '0'
|
188
190
|
requirements: []
|
189
191
|
rubyforge_project:
|
190
|
-
rubygems_version: 2.2.
|
192
|
+
rubygems_version: 2.2.2
|
191
193
|
signing_key:
|
192
194
|
specification_version: 4
|
193
195
|
summary: Summary of I18nHelper.
|