globalize 5.3.0 → 5.3.1

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
  SHA256:
3
- metadata.gz: 1a9c4607049c3148c7776b5042d30484e64a37a5ae8db707063a12feaaad58cb
4
- data.tar.gz: beb3e48916b787e972626b9372dd72124ef332481db3ad2d62d156091546bb21
3
+ metadata.gz: 93f476f456eba6a50a3bda3d639ae4e4cc7d190d4b846a6534b26b1571dff968
4
+ data.tar.gz: 10d20462ade18061edc4facf99f4e23c58b7855e4121e5f0f2d29ab5eb36eb24
5
5
  SHA512:
6
- metadata.gz: 66ba0dce842a6fb7b12ff23faaa2fcd834b586e94bc4c2f7e7bcddc5be97f48c697a08fc861b961dbc97172aa79939a08aa5ea567ea0a37fc04e4c5cfee330b0
7
- data.tar.gz: 738d84f3776f6529bb13b67012d8bc780a4ce7eff465c193738f715c92e60095f0c90d70be3a9c1f9311467533009214d41f628c4b9b243f2fa514457c240d5a
6
+ metadata.gz: 40ca71b7fefb3b4de28f8b6ae08c10fa6c8172cf69e86e18d3ab9166625f41a1ed15c4e4dd53977ff90a7dab4297577ab26a80de130fe58628fb67b0003be54b
7
+ data.tar.gz: 7e5c4637c7f29d92d69ff704fec7d3c71d409c9f27c321df3807055471135877470b37dce6b0daceb68fad96c160e3dd031bf75e1df743acc76156d35f46ccfb
@@ -1,5 +1,26 @@
1
1
  # Globalize Changelog
2
2
 
3
+ ## 5.3.1 (2021-01-11)
4
+
5
+ * Fix foreign keys translation. [#773](https://github.com/globalize/globalize/pull/773) by [Sergey Tokarenko](https://github.com/stokarenko)
6
+
7
+ ## 5.3.0 (2019-05-14)
8
+
9
+ * Prevent 'SystemStackError: stack level too deep' error on attribute reset. [#722](https://github.com/globalize/globalize/pull/722) by [Reinier de Lange](https://github.com/moiristo)
10
+ * Pass the `:limit` option for the FK column. [#721](https://github.com/globalize/globalize/pull/721) by [Denis Demchenko](https://github.com/lancedikson)
11
+ * Add support for Rails 6.0. [#718](https://github.com/globalize/globalize/pull/718) by [Chrıs Seelus](https://github.com/cseelus)
12
+ * FIX: stop registering the attr for Rails 4.2. [#711](https://github.com/globalize/globalize/pull/711) by [Adam Fernung](https://github.com/akfernun)
13
+
14
+ ## 5.2.0 (2018-11-02)
15
+
16
+ * Add support for translated attributes to other QueryMethods and Calculations [#707](https://github.com/globalize/globalize/pull/707) by [kreintjes](https://github.com/kreintjes)
17
+ * Fix `read_attribute` for Rails changes. [#709](https://github.com/globalize/globalize/pull/709) by [ota42y](https://github.com/ota42y) and [nabuchi](https://github.com/nabuchi)
18
+ * Support array as an argument of order. [#675](https://github.com/globalize/globalize/pull/675) by [Maicol Bentancor](https://github.com/MaicolBen)
19
+ * `_reset_attribute` bugfix. [#674](https://github.com/globalize/globalize/pull/674) by [ota42y](https://github.com/ota42y)
20
+ * Add support for Rails 5.2 [#678](https://github.com/globalize/globalize/pull/678) by [kevin-jj](https://github.com/kevin-jj)
21
+ * Fix: wrong number of arguments for ActiveRecord 'attribute' method [#671](https://github.com/globalize/globalize/pull/671) by [Evgeny Danilov](https://github.com/jmelkor)
22
+ * Resolve deprecation warning: attribute is not an attribute known to Active Record. [#629](https://github.com/globalize/globalize/pull/629) by [Michael Rüffer](https://github.com/itschn)
23
+
3
24
  ## 5.1.0 (2018-01-15)
4
25
 
5
26
  * Replaced `after_` callbacks with `before_` callbacks and set `autosave: true` by default. [#341](https://github.com/globalize/globalize/pull/341) by [Andrew Volozhanin](https://github.com/scarfacedeb)
@@ -0,0 +1,22 @@
1
+ version: '3.7'
2
+ services:
3
+ postgres:
4
+ image: postgres:11
5
+ volumes:
6
+ - ./tmp/postgres:/var/lib/postgresql/data
7
+ ports:
8
+ - "5432:5432"
9
+ environment:
10
+ POSTGRES_USER: "postgres"
11
+ POSTGRES_PASSWORD: ""
12
+ mysql:
13
+ image: mysql:8.0
14
+ volumes:
15
+ - ./tmp/mysql:/var/lib/mysql
16
+ ports:
17
+ - "3306:3306"
18
+ environment:
19
+ MYSQL_USER: "root"
20
+ MYSQL_PASSWORD: ""
21
+ MYSQL_ROOT_PASSWORD: ""
22
+ MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
@@ -0,0 +1,32 @@
1
+ require File.expand_path('../lib/globalize/version', __FILE__)
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = 'globalize'
5
+ s.version = Globalize::Version
6
+ s.authors = ['Sven Fuchs', 'Joshua Harvey', 'Clemens Kofler', 'John-Paul Bader', 'Tomasz Stachewicz', 'Philip Arndt', 'Chris Salzberg']
7
+ s.email = 'nobody@globalize-rails.org'
8
+ s.homepage = 'http://github.com/globalize/globalize'
9
+ s.summary = 'Rails I18n de-facto standard library for ActiveRecord model/data translation'
10
+ s.description = "#{s.summary}."
11
+ s.license = "MIT"
12
+
13
+ s.files = Dir['{lib/**/*,[A-Z]*}']
14
+ s.platform = Gem::Platform::RUBY
15
+ s.require_path = 'lib'
16
+ s.rubyforge_project = '[none]'
17
+ s.required_ruby_version = '>= 2.4.6'
18
+
19
+ s.add_dependency 'activerecord', '>= 4.2', '< 6.1'
20
+ s.add_dependency 'activemodel', '>= 4.2', '< 6.1'
21
+ s.add_dependency 'request_store', '~> 1.0'
22
+
23
+ s.add_development_dependency 'appraisal'
24
+ s.add_development_dependency 'database_cleaner'
25
+ s.add_development_dependency 'm'
26
+ s.add_development_dependency 'minitest'
27
+ s.add_development_dependency 'minitest-reporters'
28
+ s.add_development_dependency 'pry'
29
+ s.add_development_dependency 'rake'
30
+ s.add_development_dependency 'rdoc'
31
+ s.add_development_dependency 'sqlite3'
32
+ end
@@ -0,0 +1,38 @@
1
+ # Activate the gem you are reporting the issue against.
2
+ gem 'activerecord', '4.2.0'
3
+ gem 'globalize', '5.0.1'
4
+ require 'active_record'
5
+ require 'globalize'
6
+ require 'minitest/autorun'
7
+ require 'logger'
8
+
9
+ # Ensure backward compatibility with Minitest 4
10
+ Minitest::Test = MiniTest::Unit::TestCase unless defined?(Minitest::Test)
11
+
12
+ # This connection will do for database-independent bug reports.
13
+ ActiveRecord::Base.establish_connection(adapter: 'sqlite3', database: ':memory:')
14
+ ActiveRecord::Base.logger = Logger.new(STDOUT)
15
+
16
+ ActiveRecord::Schema.define do
17
+ create_table :posts, force: true do |t|
18
+ end
19
+
20
+ create_table :post_translations, force: true do |t|
21
+ t.references :post
22
+ t.string :title
23
+ t.text :content
24
+ t.string :locale
25
+ end
26
+ end
27
+
28
+ class Post < ActiveRecord::Base
29
+ translates :content, :title
30
+ end
31
+
32
+ class BugTest < Minitest::Test
33
+ def test_association_stuff
34
+ post = Post.create!(title: 'HI')
35
+
36
+ assert_equal 'HI', post.title
37
+ end
38
+ end
@@ -66,7 +66,7 @@ module Globalize
66
66
  end
67
67
 
68
68
  def _read_attribute(attr_name, options = {}, &block)
69
- translated_value = read_translated_attribute(attr_name, options, &block)
69
+ translated_value = read_translated_attribute(attr_name, options)
70
70
  translated_value.nil? ? super(attr_name, &block) : translated_value
71
71
  end
72
72
 
@@ -236,10 +236,7 @@ module Globalize
236
236
  return nil unless options[:translated]
237
237
  return nil unless translated?(name)
238
238
 
239
- value = globalize.fetch(options[:locale] || Globalize.locale, name)
240
- return nil if value.nil?
241
-
242
- block_given? ? yield(value) : value
239
+ globalize.fetch(options[:locale] || Globalize.locale, name)
243
240
  end
244
241
  end
245
242
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Globalize
4
- Version = '5.3.0'
4
+ Version = '5.3.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: globalize
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.3.0
4
+ version: 5.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sven Fuchs
@@ -11,10 +11,10 @@ authors:
11
11
  - Tomasz Stachewicz
12
12
  - Philip Arndt
13
13
  - Chris Salzberg
14
- autorequire:
14
+ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
- date: 2019-05-14 00:00:00.000000000 Z
17
+ date: 2021-01-11 00:00:00.000000000 Z
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
20
20
  name: activerecord
@@ -206,10 +206,12 @@ files:
206
206
  - CHANGELOG.md
207
207
  - CONTRIBUTING.md
208
208
  - Gemfile
209
- - Gemfile.lock
210
209
  - LICENSE
211
210
  - README.md
212
211
  - Rakefile
212
+ - docker-compose.yml
213
+ - globalize.gemspec
214
+ - issue_template.rb
213
215
  - lib/globalize.rb
214
216
  - lib/globalize/active_record.rb
215
217
  - lib/globalize/active_record/act_macro.rb
@@ -242,7 +244,7 @@ homepage: http://github.com/globalize/globalize
242
244
  licenses:
243
245
  - MIT
244
246
  metadata: {}
245
- post_install_message:
247
+ post_install_message:
246
248
  rdoc_options: []
247
249
  require_paths:
248
250
  - lib
@@ -257,8 +259,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
257
259
  - !ruby/object:Gem::Version
258
260
  version: '0'
259
261
  requirements: []
260
- rubygems_version: 3.0.3
261
- signing_key:
262
+ rubygems_version: 3.2.3
263
+ signing_key:
262
264
  specification_version: 4
263
265
  summary: Rails I18n de-facto standard library for ActiveRecord model/data translation
264
266
  test_files: []
@@ -1,76 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- globalize (5.3.0)
5
- activemodel (>= 4.2, < 6.1)
6
- activerecord (>= 4.2, < 6.1)
7
- request_store (~> 1.0)
8
-
9
- GEM
10
- remote: https://rubygems.org/
11
- specs:
12
- activemodel (5.2.3)
13
- activesupport (= 5.2.3)
14
- activerecord (5.2.3)
15
- activemodel (= 5.2.3)
16
- activesupport (= 5.2.3)
17
- arel (>= 9.0)
18
- activesupport (5.2.3)
19
- concurrent-ruby (~> 1.0, >= 1.0.2)
20
- i18n (>= 0.7, < 2)
21
- minitest (~> 5.1)
22
- tzinfo (~> 1.1)
23
- ansi (1.5.0)
24
- appraisal (2.2.0)
25
- bundler
26
- rake
27
- thor (>= 0.14.0)
28
- arel (9.0.0)
29
- builder (3.2.3)
30
- coderay (1.1.2)
31
- concurrent-ruby (1.1.5)
32
- database_cleaner (1.7.0)
33
- i18n (1.6.0)
34
- concurrent-ruby (~> 1.0)
35
- m (1.5.1)
36
- method_source (>= 0.6.7)
37
- rake (>= 0.9.2.2)
38
- method_source (0.9.2)
39
- minitest (5.11.3)
40
- minitest-reporters (1.3.6)
41
- ansi
42
- builder
43
- minitest (>= 5.0)
44
- ruby-progressbar
45
- pry (0.12.2)
46
- coderay (~> 1.1.0)
47
- method_source (~> 0.9.0)
48
- rack (2.0.7)
49
- rake (12.3.2)
50
- rdoc (6.1.1)
51
- request_store (1.4.1)
52
- rack (>= 1.4)
53
- ruby-progressbar (1.10.0)
54
- sqlite3 (1.4.1)
55
- thor (0.20.3)
56
- thread_safe (0.3.6)
57
- tzinfo (1.2.5)
58
- thread_safe (~> 0.1)
59
-
60
- PLATFORMS
61
- ruby
62
-
63
- DEPENDENCIES
64
- appraisal
65
- database_cleaner
66
- globalize!
67
- m
68
- minitest
69
- minitest-reporters
70
- pry
71
- rake
72
- rdoc
73
- sqlite3
74
-
75
- BUNDLED WITH
76
- 2.0.1