globalize 6.1.0 → 6.2.0

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: 70e3196446a295412903e65b76e6a1d834904abb732a7692232936fa782f4a9a
4
- data.tar.gz: 672eddfec21d2d7205d36bbbe176f646f84511c51a5508056cea828d2d8f2751
3
+ metadata.gz: cabd646999269152beb8dc97eafa531bdd0627206b113c8ce7e90a17343a0369
4
+ data.tar.gz: 8fa08f217088f91bcb62e2b1667feefbc0833de0406b353890ba75568f506681
5
5
  SHA512:
6
- metadata.gz: 90f9f98183c545e5f255dd57b48367f6e7b1bba0bde85962c7613e8957086e16757432b56f84acaea36dcbd222ca07d2b0188278bebea7d065ccdb80a052ff22
7
- data.tar.gz: e6a718305ce3fd62835ceed0fefdadf4cb19b2e9499a7955acf19763f655b406b468e951f22e6d15edc147ec22906ec17d3792b66fd5bff8eef3ab17071907a3
6
+ metadata.gz: dbf148ebedffe9847a05e31053400cbe0d3e4292689704143b68ca2884a8464d4703fb6bd4ef142551b8ddd3091c650da0142a75eca871d348d9576861d855ce
7
+ data.tar.gz: a408491fb728aa2692f1ee7b71cb546ad0fc747f1f754bf779221af51b122c2442b530efc067b00fc768d56e1b80a2b09fcc0f124e2eaae7bffcca3a6af3d106
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Globalize Changelog
2
2
 
3
+ ## 6.2.0 (2022-05-24)
4
+
5
+ * Fix asset precompile in docker build workflow [#799](https://github.com/globalize/globalize/pull/799) by [Diefferson Koderer Môro](https://github.com/djpremier)
6
+
7
+ ## 6.1.0 (2022-02-25)
8
+
9
+ * Patch ActiveSupport in Rails 7.0.0+ [#792](https://github.com/globalize/globalize/pull/792) by [Daniel Chan](https://github.com/mynameisdaniel) and [Artis Raugulis](https://github.com/artisr)
10
+
3
11
  ## 6.0.1 (2021-06-23)
4
12
 
5
13
  * Fix errors with Rails 6.1 and Ruby 3.0 [#778](https://github.com/globalize/globalize/pull/778) by [Andrew White](https://github.com/pixeltrix)
data/CONTRIBUTING.md CHANGED
@@ -4,7 +4,7 @@ Globalize is a community project, and would not be here today if it were not for
4
4
 
5
5
  ## Bugs
6
6
 
7
- If you find a bug or something is not working as expected, please search through the [github issues](https://github.com/globalize/globalize/issues) and on [stackoverflow](http://stackoverflow.com/questions/tagged/globalize) first. If you cannot find any answers related to your issue, post a new one and we will try to address it as soon as we can. Note that we prioritize Rails 4 issues (`master` branch) over Rails 3 issues (`3-0-stable` branch).
7
+ If you find a bug or something is not working as expected, please search through the [github issues](https://github.com/globalize/globalize/issues) and on [stackoverflow](http://stackoverflow.com/questions/tagged/globalize) first. If you cannot find any answers related to your issue, post a new one and we will try to address it as soon as we can. Note that we prioritize Rails 4 issues (`main` branch) over Rails 3 issues (`3-0-stable` branch).
8
8
 
9
9
  If you also have some idea how to fix the bug, then by all means post a pull request (see below).
10
10
 
@@ -12,11 +12,11 @@ If you also have some idea how to fix the bug, then by all means post a pull req
12
12
 
13
13
  Have an idea for a new feature? Great! Keep in mind though that we are trying to cut down on non-core functionality in the Globalize core and push it to separate extensions, such as [globalize-accessors](https://github.com/globalize/globalize-accessors). If you are proposing something like this, we would prefer you to create a separate repository and gem for it.
14
14
 
15
- If however your feature would improve the core functionality of Globalize, please do submit a PR, preferably to the `master` branch.
15
+ If however your feature would improve the core functionality of Globalize, please do submit a PR, preferably to the `main` branch.
16
16
 
17
17
  ## Refactoring
18
18
 
19
- Have some free time? Help us improve our [code climate score](https://codeclimate.com/github/globalize/globalize) by refactoring the codebase. If the tests still pass and the changes seem reasonable, we will happily merge them. As elsewhere, priority always goes to the Rails/AR 4 series (`master` branch).
19
+ Have some free time? Help us improve our [code climate score](https://codeclimate.com/github/globalize/globalize) by refactoring the codebase. If the tests still pass and the changes seem reasonable, we will happily merge them. As elsewhere, priority always goes to the Rails/AR 4 series (`main` branch).
20
20
 
21
21
  ## Documentation
22
22
 
@@ -32,7 +32,7 @@ Have a bug fix, code improvement or proposed feature? Do the following:
32
32
  4. Push to the branch: `git push origin my_new_feature`
33
33
  5. Submit a pull request.
34
34
 
35
- For pull requests to Rails/ActiveRecord 4 version of Globalize (v3.x), post to the `master` branch. For pull requests to the Rails/ActiveRecord 3.x version of Globalize (3.x), post to the `3-0-stable` branch.
35
+ For pull requests to Rails/ActiveRecord 4 version of Globalize (v3.x), post to the `main` branch. For pull requests to the Rails/ActiveRecord 3.x version of Globalize (3.x), post to the `3-0-stable` branch.
36
36
 
37
37
  When you submit the pull request, GitHub Actions will run the [test suite](https://github.com/globalize/globalize/actions) against your branch and will highlight any failures. Unless there is a good reason for it, we do not generally accept pull requests that take Globalize from green to red.
38
38
 
data/Gemfile.lock CHANGED
@@ -1,95 +1,71 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- globalize (6.0.1)
5
- activemodel (>= 4.2, < 7.0)
6
- activerecord (>= 4.2, < 7.0)
4
+ globalize (6.2.0)
5
+ activemodel (>= 4.2, < 7.1)
6
+ activerecord (>= 4.2, < 7.1)
7
7
  request_store (~> 1.0)
8
8
 
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- activemodel (6.1.4.1)
13
- activesupport (= 6.1.4.1)
14
- activerecord (6.1.4.1)
15
- activemodel (= 6.1.4.1)
16
- activesupport (= 6.1.4.1)
17
- activesupport (6.1.4.1)
12
+ activemodel (7.0.3)
13
+ activesupport (= 7.0.3)
14
+ activerecord (7.0.3)
15
+ activemodel (= 7.0.3)
16
+ activesupport (= 7.0.3)
17
+ activesupport (7.0.3)
18
18
  concurrent-ruby (~> 1.0, >= 1.0.2)
19
19
  i18n (>= 1.6, < 2)
20
20
  minitest (>= 5.1)
21
21
  tzinfo (~> 2.0)
22
- zeitwerk (~> 2.3)
23
22
  ansi (1.5.0)
24
23
  appraisal (2.4.1)
25
24
  bundler
26
25
  rake
27
26
  thor (>= 0.14.0)
28
- ast (2.4.2)
29
27
  builder (3.2.4)
30
28
  coderay (1.1.3)
31
- concurrent-ruby (1.1.9)
29
+ concurrent-ruby (1.1.10)
32
30
  database_cleaner (2.0.1)
33
31
  database_cleaner-active_record (~> 2.0.0)
34
32
  database_cleaner-active_record (2.0.1)
35
33
  activerecord (>= 5.a)
36
34
  database_cleaner-core (~> 2.0.0)
37
35
  database_cleaner-core (2.0.1)
38
- i18n (1.8.10)
36
+ i18n (1.10.0)
39
37
  concurrent-ruby (~> 1.0)
40
38
  m (1.6.0)
41
39
  method_source (>= 0.6.7)
42
40
  rake (>= 0.9.2.2)
43
41
  method_source (1.0.0)
44
- minitest (5.14.4)
45
- minitest-reporters (1.4.3)
42
+ minitest (5.15.0)
43
+ minitest-reporters (1.5.0)
46
44
  ansi
47
45
  builder
48
46
  minitest (>= 5.0)
49
47
  ruby-progressbar
50
- mysql2 (0.5.3)
51
- parallel (1.20.1)
52
- parser (3.0.2.0)
53
- ast (~> 2.4.1)
54
- pg (1.2.3)
48
+ mysql2 (0.5.4)
49
+ pg (1.3.5)
55
50
  pry (0.14.1)
56
51
  coderay (~> 1.1)
57
52
  method_source (~> 1.0)
53
+ psych (4.0.4)
54
+ stringio
58
55
  rack (2.2.3)
59
- rainbow (3.0.0)
60
56
  rake (13.0.6)
61
- rdoc (6.3.2)
62
- regexp_parser (2.1.1)
63
- request_store (1.5.0)
57
+ rdoc (6.4.0)
58
+ psych (>= 4.0.0)
59
+ request_store (1.5.1)
64
60
  rack (>= 1.4)
65
- rexml (3.2.5)
66
- rubocop (1.20.0)
67
- parallel (~> 1.10)
68
- parser (>= 3.0.0.0)
69
- rainbow (>= 2.2.2, < 4.0)
70
- regexp_parser (>= 1.8, < 3.0)
71
- rexml
72
- rubocop-ast (>= 1.9.1, < 2.0)
73
- ruby-progressbar (~> 1.7)
74
- unicode-display_width (>= 1.4.0, < 3.0)
75
- rubocop-ast (1.11.0)
76
- parser (>= 3.0.1.1)
77
- rubocop-performance (1.11.5)
78
- rubocop (>= 1.7.0, < 2.0)
79
- rubocop-ast (>= 0.4.0)
80
61
  ruby-progressbar (1.11.0)
81
62
  sqlite3 (1.4.2)
82
- standard (1.3.0)
83
- rubocop (= 1.20.0)
84
- rubocop-performance (= 1.11.5)
85
- thor (1.1.0)
63
+ stringio (3.0.2)
64
+ thor (1.2.1)
86
65
  tzinfo (2.0.4)
87
66
  concurrent-ruby (~> 1.0)
88
- unicode-display_width (2.0.0)
89
- zeitwerk (2.4.2)
90
67
 
91
68
  PLATFORMS
92
- arm64-darwin-20
93
69
  arm64-darwin-21
94
70
 
95
71
  DEPENDENCIES
@@ -105,7 +81,6 @@ DEPENDENCIES
105
81
  rake
106
82
  rdoc
107
83
  sqlite3
108
- standard
109
84
 
110
85
  BUNDLED WITH
111
- 2.2.28
86
+ 2.3.13
@@ -41,7 +41,7 @@ module Globalize
41
41
  end
42
42
 
43
43
  begin
44
- if Globalize.rails_5? && table_exists? && translation_class.table_exists?
44
+ if Globalize.rails_5? && database_connection_possible?
45
45
  self.ignored_columns += translated_attribute_names.map(&:to_s)
46
46
  reset_column_information
47
47
  end
@@ -52,7 +52,8 @@ module Globalize
52
52
 
53
53
  def check_columns!(attr_names)
54
54
  # If tables do not exist or Rails version is greater than 5, do not warn about conflicting columns
55
- return unless Globalize.rails_42? && table_exists? && translation_class.table_exists?
55
+ return unless Globalize.rails_42? && database_connection_possible?
56
+
56
57
  if (overlap = attr_names.map(&:to_s) & column_names).present?
57
58
  ActiveSupport::Deprecation.warn(
58
59
  ["You have defined one or more translated attributes with names that conflict with column(s) on the model table. ",
@@ -124,6 +124,20 @@ module Globalize
124
124
  define_translations_reader(name)
125
125
  define_translations_writer(name)
126
126
  end
127
+
128
+ def database_connection_possible?
129
+ begin
130
+ # Without a connection tentative, the `connected?` function can responds with a false negative
131
+ ::ActiveRecord::Base.connection
132
+ rescue
133
+ # Ignore connection fail because in docker build hasn't a database connection
134
+ nil
135
+ end
136
+
137
+ ::ActiveRecord::Base.connected? &&
138
+ table_exists? &&
139
+ translation_class.table_exists?
140
+ end
127
141
  end
128
142
  end
129
143
  end
@@ -21,7 +21,7 @@ module Globalize
21
21
 
22
22
  # In Rails 5.2 we need to override *_assign_attributes* as it's called earlier
23
23
  # in the stack (before *assign_attributes*)
24
- # See https://github.com/rails/rails/blob/master/activerecord/lib/active_record/attribute_assignment.rb#L11
24
+ # See https://github.com/rails/rails/blob/5-2-stable/activerecord/lib/active_record/attribute_assignment.rb#L12
25
25
  def _assign_attributes(new_attributes)
26
26
  attributes = new_attributes.stringify_keys
27
27
  with_given_locale(attributes) { super(attributes.except("locale")) }
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Globalize
4
- Version = '6.1.0'
4
+ Version = '6.2.0'
5
5
  end
data.tar.gz.sig CHANGED
Binary file
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: 6.1.0
4
+ version: 6.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sven Fuchs
@@ -40,7 +40,7 @@ cert_chain:
40
40
  e17ZNASZffbQRP09MH2GZ2AOlkildTX6looWRforZEZi+qamognrozd3MI5QHi1W
41
41
  UAZUzHLrrFu7gnkFvLVpxOUf4ItOkA==
42
42
  -----END CERTIFICATE-----
43
- date: 2022-02-25 00:00:00.000000000 Z
43
+ date: 2022-05-24 00:00:00.000000000 Z
44
44
  dependencies:
45
45
  - !ruby/object:Gem::Dependency
46
46
  name: activerecord
@@ -274,7 +274,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
274
274
  - !ruby/object:Gem::Version
275
275
  version: '0'
276
276
  requirements: []
277
- rubygems_version: 3.2.32
277
+ rubygems_version: 3.3.7
278
278
  signing_key:
279
279
  specification_version: 4
280
280
  summary: Rails I18n de-facto standard library for ActiveRecord model/data translation
metadata.gz.sig CHANGED
Binary file