refinerycms-i18n 3.0.2 → 4.0.0

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: ac37504ad8f7f3a48dd97a244f5a9d064c4eabb7
4
- data.tar.gz: 68f1b485fa2104ed15c8adf58751e9310796130b
3
+ metadata.gz: cc4cabe515e10b49ab000d371942adf2f950f473
4
+ data.tar.gz: dba925f4bc3859768899838c2a20017f1ad1fce7
5
5
  SHA512:
6
- metadata.gz: 709f5b24238d70b604c95a0ba690154aced4a66036d4a67b44ef6f6430eacbd9ab91ca829e4812d8bea34f7df37b6bdcba67085507bb683508cbb5ae4d7ba92e
7
- data.tar.gz: b5baabbb16b7ad7dc288b098f258999cdf0b55873a3cf024f967bfcc8c41f4b849c603fbb1b37a543459c9c59a0d15bc746d218f0d4d8ae17071f8b49ce382cb
6
+ metadata.gz: 128a6d8ee0ebaba2f2f1bc5d6adeff3bb7325399a6e38709041bfd8c8e72d8c097bfacca745d807fd55b3d3c0791c1f96e0241cd0bdd68a92b853610b03663b1
7
+ data.tar.gz: fa3f991e56456fd68030dd186383f6eb5704659f554a53d4b3fe1b9c3b5c44acee4bcb805dcc83c0c58cd0e84b7224858641646aa1af1cab09f418f63ac138d5
data/.travis.yml CHANGED
@@ -1,31 +1,15 @@
1
1
  language: ruby
2
+ cache: bundler
2
3
  bundler_args: --without development
3
- sudo: false
4
- cache:
5
- - bundler: true
6
- before_script:
7
- - "sh -e /etc/init.d/xvfb start"
8
- - "bundle exec rake refinery:testing:dummy_app"
9
- script:
10
- - "DISPLAY=:99.0 bundle exec rspec spec"
11
- notifications:
12
- email: true
13
- irc:
14
- use_notice: true
15
- skip_join: true
16
- channels:
17
- - "irc.freenode.org#refinerycms"
18
- campfire:
19
- on_success: always
20
- on_failure: always
21
- rooms:
22
- - secure: "JaX+Ckvdd2wqL2bD6t8PHvMDBHxWBlCrkBKPcDKxV0t0DOwzzzwxMryVqcRi\nPsmM/zvmWFATDyRmivhNOpu4lRg9RytSroxZ9nkmbLDqjCyEAZ6tv4yZXME/\nPaxPwmfwgS9g8TKjj3lSWS7rEpqqg0D5S0XIfIHrj6KB6LUmFHc="
23
- webhooks:
24
- - https://webhooks.gitter.im/e/b5d48907cdc89864b874
4
+ before_script: "bin/rake refinery:testing:dummy_app"
25
5
  env:
26
6
  - DB=postgresql
27
7
  - DB=mysql
8
+ notifications:
9
+ webhooks:
10
+ - https://webhooks.gitter.im/e/b5d48907cdc89864b874
28
11
  rvm:
29
- - 2.4
30
- - 2.3
31
- - 2.2
12
+ - 2.4.1
13
+ - 2.3.3
14
+ - 2.2.6
15
+ sudo: false
data/Gemfile CHANGED
@@ -2,7 +2,7 @@ source "https://rubygems.org"
2
2
 
3
3
  gemspec
4
4
 
5
- git "https://github.com/refinery/refinerycms", branch: "3-0-stable" do
5
+ git "https://github.com/refinery/refinerycms", branch: "master" do
6
6
  gem "refinerycms"
7
7
 
8
8
  group :test do
data/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # Refinery CMS I18n [![Build Status](https://travis-ci.org/refinery/refinerycms-i18n.svg?branch=master)](https://travis-ci.org/refinery/refinerycms-i18n)
2
+
3
+ I18n logic extracted from Refinery CMS, for Refinery CMS.
data/bin/rake ADDED
@@ -0,0 +1,21 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'rake' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+ begin
9
+ if Dir.exist?(File.expand_path('../../spec/dummy', __FILE__))
10
+ load File.expand_path("../spring", __FILE__)
11
+ end
12
+ rescue LoadError
13
+ end
14
+ require 'pathname'
15
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
16
+ Pathname.new(__FILE__).realpath)
17
+
18
+ require 'rubygems'
19
+ require 'bundler/setup'
20
+
21
+ load Gem.bin_path('rake', 'rake')
data/bin/rspec ADDED
@@ -0,0 +1,22 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'rspec' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ begin
10
+ if Dir.exist?(File.expand_path('../../spec/dummy', __FILE__))
11
+ load File.expand_path("../spring", __FILE__)
12
+ end
13
+ rescue LoadError
14
+ end
15
+ require 'pathname'
16
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
17
+ Pathname.new(__FILE__).realpath)
18
+
19
+ require 'rubygems'
20
+ require 'bundler/setup'
21
+
22
+ load Gem.bin_path('rspec-core', 'rspec')
data/bin/spring ADDED
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # This file loads spring without using Bundler, in order to be fast
4
+ # It gets overwritten when you run the `spring binstub` command
5
+
6
+ unless defined?(Spring)
7
+ require "rubygems"
8
+ require "bundler"
9
+
10
+ if match = Bundler.default_lockfile.read.match(/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m)
11
+ ENV["GEM_PATH"] = ([Bundler.bundle_path.to_s] + Gem.path).join(File::PATH_SEPARATOR)
12
+ ENV["GEM_HOME"] = ""
13
+ Gem.paths = ENV
14
+
15
+ gem "spring", match[1]
16
+ require "spring/binstub"
17
+ end
18
+ end
@@ -17,11 +17,10 @@ module Refinery
17
17
 
18
18
  config.to_prepare do
19
19
  ::ApplicationController.module_eval do
20
- def default_url_options_with_locale
20
+ def default_url_options
21
21
  locale_param=(::Refinery::I18n.config.enabled? && ::I18n.locale != ::Refinery::I18n.default_frontend_locale) ? { :locale => ::I18n.locale } : {}
22
- default_url_options_without_locale.reverse_merge locale_param
22
+ super.reverse_merge locale_param
23
23
  end
24
- alias_method_chain :default_url_options, :locale
25
24
 
26
25
  def find_or_set_locale
27
26
  ::I18n.locale = ::Refinery::I18n.current_frontend_locale
@@ -37,7 +36,7 @@ module Refinery
37
36
  Globalize.locale = ::I18n.locale
38
37
  end
39
38
 
40
- prepend_before_filter :find_or_set_locale
39
+ prepend_before_action :find_or_set_locale
41
40
  protected :default_url_options, :find_or_set_locale
42
41
  end
43
42
 
@@ -63,7 +62,7 @@ module Refinery
63
62
  end
64
63
  end
65
64
  # globalize! should be prepended first so that it runs after find_or_set_locale
66
- prepend_before_filter :globalize!, :find_or_set_locale
65
+ prepend_before_action :globalize!, :find_or_set_locale
67
66
  protected :globalize!, :find_or_set_locale
68
67
  end
69
68
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{refinerycms-i18n}
5
- s.version = %q{3.0.2}
5
+ s.version = %q{4.0.0}
6
6
  s.description = %q{i18n logic extracted from Refinery CMS, for Refinery CMS.}
7
7
  s.summary = %q{i18n logic for Refinery CMS.}
8
8
  s.email = %q{info@refinerycms.com}
@@ -14,8 +14,8 @@ Gem::Specification.new do |s|
14
14
  s.files = `git ls-files`.split("\n")
15
15
  s.test_files = `git ls-files -- spec/*`.split("\n")
16
16
 
17
- s.required_ruby_version = '>= 2.0.0'
17
+ s.required_ruby_version = '>= 2.2.6'
18
18
 
19
19
  s.add_dependency 'routing-filter', '>= 0.4.0'
20
- s.add_dependency 'rails-i18n', '~> 4.0.1'
20
+ s.add_dependency 'rails-i18n', '~> 5.0.0'
21
21
  end
@@ -20,7 +20,7 @@ module Refinery
20
20
  expect(assigns(:resources).first.resource_title).to eql('My resource in English')
21
21
 
22
22
  # Switch globalized content to ES
23
- get :index, switch_locale: :es
23
+ get :index, params: { switch_locale: :es }
24
24
  expect(Globalize.locale).to eql(:es)
25
25
  expect(::I18n.locale).to eql(:en)
26
26
  expect(assigns(:resources).first.resource_title).to eql('Mi recurso en español')
@@ -2,7 +2,7 @@
2
2
  require "spec_helper"
3
3
 
4
4
  describe "set_locale parameter", :type => :feature do
5
- refinery_login_with :refinery_user
5
+ refinery_login
6
6
 
7
7
  it "changes language used in backend" do
8
8
  visit refinery.admin_pages_path
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: refinerycms-i18n
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.2
4
+ version: 4.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Philip Arndt
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-08-31 00:00:00.000000000 Z
12
+ date: 2017-08-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: routing-filter
@@ -31,14 +31,14 @@ dependencies:
31
31
  requirements:
32
32
  - - "~>"
33
33
  - !ruby/object:Gem::Version
34
- version: 4.0.1
34
+ version: 5.0.0
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
39
  - - "~>"
40
40
  - !ruby/object:Gem::Version
41
- version: 4.0.1
41
+ version: 5.0.0
42
42
  description: i18n logic extracted from Refinery CMS, for Refinery CMS.
43
43
  email: info@refinerycms.com
44
44
  executables: []
@@ -48,6 +48,7 @@ files:
48
48
  - ".gitignore"
49
49
  - ".travis.yml"
50
50
  - Gemfile
51
+ - README.md
51
52
  - Rakefile
52
53
  - app/assets/images/refinery/icons/flags/ad.png
53
54
  - app/assets/images/refinery/icons/flags/ae.png
@@ -298,6 +299,9 @@ files:
298
299
  - app/assets/images/refinery/icons/flags/zm.png
299
300
  - app/assets/images/refinery/icons/flags/zw.png
300
301
  - bin/rails
302
+ - bin/rake
303
+ - bin/rspec
304
+ - bin/spring
301
305
  - lib/generators/refinery/i18n_generator.rb
302
306
  - lib/generators/refinery/templates/config/initializers/refinery/i18n.rb.erb
303
307
  - lib/refinery/i18n-filter.rb
@@ -331,7 +335,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
331
335
  requirements:
332
336
  - - ">="
333
337
  - !ruby/object:Gem::Version
334
- version: 2.0.0
338
+ version: 2.2.6
335
339
  required_rubygems_version: !ruby/object:Gem::Requirement
336
340
  requirements:
337
341
  - - ">="