i18n_helper 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 439dcd14746ba15c84930e458fa253771657f728
4
- data.tar.gz: c71f17112b3eff095c6d46c12c44cd8e93e0edfc
3
+ metadata.gz: 707b399d0ee9b26a6e4fa6d34878e86df21a9793
4
+ data.tar.gz: 1f881ae6d572712eeeafb2364fe2b1b3fe4cf1f9
5
5
  SHA512:
6
- metadata.gz: 6774e71e8bb457be24d6ce9a1e84b9a11b31b63c3ca35789745b0f8e9d1cd4af02eed6bf19c57b690a7338734de892c00d04ef2153863a513f4db64e49f1d659
7
- data.tar.gz: e51a5115069c106d0eac1ff1b0b65f166b2dd4be551ee0ae6c852445a182b047ae99803769b97e5eaf069382834d1d59ba7743eacea3bbd98b54ac5fe92266a1
6
+ metadata.gz: 3e5c321567c7979da97b7771a148c979263317251875156a45a288ddb693a88fd020acfa62379582f78a418be437348325963f614723b851a3676af5a2bc8173
7
+ data.tar.gz: 7880cb4812205c45f14e97e0c764508b30344cd34d10e8a614aec32981b07e49387f049a3583e0728c8db0f749450d708b1322aa9098b13deb6198ae8f7e2bf7
@@ -1 +1 @@
1
- repo_token: MfZJeU688bvHwtmzyJhYPWUANWGatauyq
1
+ service_name: travis-ci
@@ -1,3 +1,6 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.1.0
3
+ - 2.1.2
4
+ env:
5
+ - RAILS_ENV=test
6
+ script: bundle exec rspec spec
@@ -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
@@ -1,129 +1,140 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- i18n_helper (0.0.2)
4
+ i18n_helper (0.0.3)
5
5
  i18n-language-translations (~> 0.0)
6
- rails (~> 4.0)
6
+ rails (~> 4.1)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- actionmailer (4.0.2)
12
- actionpack (= 4.0.2)
11
+ actionmailer (4.1.5)
12
+ actionpack (= 4.1.5)
13
+ actionview (= 4.1.5)
13
14
  mail (~> 2.5.4)
14
- actionpack (4.0.2)
15
- activesupport (= 4.0.2)
16
- builder (~> 3.1.0)
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
- activemodel (4.0.2)
21
- activesupport (= 4.0.2)
22
- builder (~> 3.1.0)
23
- activerecord (4.0.2)
24
- activemodel (= 4.0.2)
25
- activerecord-deprecated_finders (~> 1.0.2)
26
- activesupport (= 4.0.2)
27
- arel (~> 4.0.0)
28
- activerecord-deprecated_finders (1.0.3)
29
- activesupport (4.0.2)
30
- i18n (~> 0.6, >= 0.6.4)
31
- minitest (~> 4.2)
32
- multi_json (~> 1.3)
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 (~> 0.3.37)
35
- arel (4.0.1)
36
- atomic (1.1.14)
37
- builder (3.1.4)
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.1)
46
+ docile (1.1.5)
46
47
  erubis (2.7.0)
47
- factory_girl (4.3.0)
48
+ factory_girl (4.4.0)
48
49
  activesupport (>= 3.0.0)
49
- factory_girl_rails (4.3.0)
50
- factory_girl (~> 4.3.0)
50
+ factory_girl_rails (4.4.1)
51
+ factory_girl (~> 4.4.0)
51
52
  railties (>= 3.0.0)
52
- gemnasium (2.0.1)
53
+ gemnasium (3.2.0)
53
54
  hike (1.2.3)
54
- i18n (0.6.9)
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.7.5)
63
- multi_json (1.8.2)
64
- polyglot (0.3.3)
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.0.2)
69
- actionmailer (= 4.0.2)
70
- actionpack (= 4.0.2)
71
- activerecord (= 4.0.2)
72
- activesupport (= 4.0.2)
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.0.2)
75
- sprockets-rails (~> 2.0.0)
76
- railties (4.0.2)
77
- actionpack (= 4.0.2)
78
- activesupport (= 4.0.2)
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.1.1)
82
- rest-client (1.6.7)
83
- mime-types (>= 1.16)
84
- rspec-core (2.14.7)
85
- rspec-expectations (2.14.4)
86
- diff-lcs (>= 1.1.3, < 2.0)
87
- rspec-mocks (2.14.4)
88
- rspec-rails (2.14.0)
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 (~> 2.14.0)
93
- rspec-expectations (~> 2.14.0)
94
- rspec-mocks (~> 2.14.0)
95
- simplecov (0.8.2)
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.10.1)
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.0.1)
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.2.2)
110
- tins (~> 0.8)
111
- thor (0.18.1)
112
- thread_safe (0.1.3)
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 (0.13.1)
125
+ tins (1.3.2)
116
126
  treetop (1.4.15)
117
127
  polyglot
118
128
  polyglot (>= 0.3.1)
119
- tzinfo (0.3.38)
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.3)
127
- gemnasium (~> 2.0)
137
+ factory_girl_rails (~> 4.4)
138
+ gemnasium (~> 3.2)
128
139
  i18n_helper!
129
- rspec-rails (~> 2.14)
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
- # Features
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
 
@@ -1,5 +1,7 @@
1
1
  class LocalesController < ApplicationController
2
2
 
3
+ skip_before_action :verify_authenticity_token
4
+
3
5
  def setting
4
6
  if params[:locale] and I18n.available_locales.include?(params[:locale].to_sym)
5
7
  session[:locale] = params[:locale]
Binary file
@@ -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.0'
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', '~> 2.14'
29
- s.add_development_dependency 'factory_girl_rails', '~> 4.3'
30
- s.add_development_dependency 'gemnasium', '~> 2.0'
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'
@@ -1,3 +1,3 @@
1
1
  module I18nHelper
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
@@ -15,15 +15,21 @@ describe LocalesController do
15
15
  before { subject }
16
16
 
17
17
  describe 'should redirect back' do
18
- it { response.should redirect_to '/' }
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
- it { session[:locale].should eql 'wk' }
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
- it { I18n.locale.should eql :wk }
30
+ specify do
31
+ expect(I18n.locale).to eql :wk
32
+ end
27
33
  end
28
34
 
29
35
  end
@@ -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.2
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.0'
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.0'
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: '2.14'
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: '2.14'
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.3'
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.3'
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.0'
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.0'
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.0.rc.1
192
+ rubygems_version: 2.2.2
191
193
  signing_key:
192
194
  specification_version: 4
193
195
  summary: Summary of I18nHelper.