brick 1.0.177 → 1.0.178

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: 236474c3b0979bffb66ab3561a8fe008ee912ce358dc13556afc2e6e7564fe9a
4
- data.tar.gz: d288645dce34156548bd393352591ae1d8eb83a4d1797fa9a2d4150d6e40506d
3
+ metadata.gz: 888b7144102e5155a28f931b7b986a68a3eb781dee890990fae9f81ed8bf2e21
4
+ data.tar.gz: c5fcc9dd02f6b45025d600e9a02a16011e93559568c63c24b4acde0f603a2540
5
5
  SHA512:
6
- metadata.gz: a8c336750619205c99a76a97414a1315261b0f1498981f3ec7573e73aa759be935357ce7844eb51de4fb905744b3ebe47890fc63005e38fa5f11ce3b009f02c1
7
- data.tar.gz: b05c551dc2b483cabdd4b7788c1dc2c8e211803f4d9d1632c69cbe44b2bcf2933f1f39ac4217507fbefe42e0fa680315b3fdcf17b6129108d7811108e7f6f893
6
+ metadata.gz: f8f32f40106be993ee33bac87ef4dad4558e7bcbae61f6f61658671b825eba6312586f75fdc329c22a3a2898a2d38e568c70e05ca173e9824637226ce28aaee3
7
+ data.tar.gz: e3e0fa0646201059751ecf8fdd30860d582aa3e746ceeb3c6cac276aa831dcefe6a9fc8de34f6e4a720fcd5503842192e8cd8f33ceed37cb6087000d342223ee
@@ -1489,7 +1489,8 @@ end
1489
1489
  decipher = OpenSSL::Cipher::AES256.new(:CBC).decrypt
1490
1490
  decipher.iv = "\xB4,\r2\x19\xF5\xFE/\aR\x1A\x8A\xCFV\v\x8C"
1491
1491
  decipher.key = Digest::SHA256.hexdigest(::Brick.config.license).scan(/../).map { |x| x.hex }.pack('c*')
1492
- decipher.update(File.binread("/Users/aga/brick/lib/brick/frameworks/rails/crosstab.brk"))[16..-1]
1492
+ brick_path = Gem::Specification.find_by_name('brick').gem_dir
1493
+ decipher.update(File.binread("#{brick_path}/lib/brick/frameworks/rails/crosstab.brk"))[16..-1]
1493
1494
  else
1494
1495
  'Crosstab Charting not yet activated -- enter a valid license key in brick.rb'
1495
1496
  end
@@ -5,7 +5,7 @@ module Brick
5
5
  module VERSION
6
6
  MAJOR = 1
7
7
  MINOR = 0
8
- TINY = 177
8
+ TINY = 178
9
9
 
10
10
  # PRE is nil unless it's a pre-release (beta, RC, etc.)
11
11
  PRE = nil
data/lib/brick.rb CHANGED
@@ -89,7 +89,7 @@ end
89
89
  # is first established), and then automatically creates models, controllers, views,
90
90
  # and routes based on those available relations.
91
91
  require 'brick/config'
92
- if Gem::Specification.all_names.any? { |g| g.start_with?('rails-') && g[6..-1] =~ /^([0-9]|\.)+(?:|rc1|beta1)$/ }
92
+ if Gem::Specification.all_names.any? { |g| g.start_with?('rails-') && g[6..-1] =~ /^([0-9]|\.)+(?:|rc1|rc2|beta1)$/ }
93
93
  require 'rails'
94
94
  require 'brick/frameworks/rails'
95
95
  end
@@ -2026,6 +2026,28 @@ if ActiveRecord.version < ::Gem::Version.new('6.0') && ruby_version >= ::Gem::Ve
2026
2026
  end
2027
2027
  end
2028
2028
 
2029
+ # AR >= 5.0 on Ruby >= 3.0
2030
+ ::ActiveRecord::Type::AdapterSpecificRegistry.class_exec do
2031
+ alias :_brick_add_modifier :add_modifier
2032
+ def add_modifier(*args, **kwargs)
2033
+ kwargs.merge!(args.pop) if args.length > 2 && args.last.is_a?(Hash)
2034
+ _brick_add_modifier(*args, **kwargs)
2035
+ end
2036
+ end
2037
+
2038
+ # AR >= 5.0 on Ruby >= 3.0
2039
+ arca = ::ActiveRecord::ConnectionAdapters
2040
+ require 'active_record/connection_adapters/postgresql/column'
2041
+ if arca.const_defined?('PostgreSQLColumn')
2042
+ arca::PostgreSQLColumn.class_exec do
2043
+ alias :_brick_initialize :initialize
2044
+ def initialize(*args, **kwargs)
2045
+ kwargs.merge!(args.pop) if args.last.is_a?(Hash)
2046
+ _brick_initialize(*args, **kwargs)
2047
+ end
2048
+ end
2049
+ end
2050
+
2029
2051
  require 'active_model'
2030
2052
  begin
2031
2053
  require 'active_model/type'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brick
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.177
4
+ version: 1.0.178
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lorin Thwaits
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-27 00:00:00.000000000 Z
11
+ date: 2023-10-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -178,6 +178,20 @@ dependencies:
178
178
  - - ">="
179
179
  - !ruby/object:Gem::Version
180
180
  version: '0'
181
+ - !ruby/object:Gem::Dependency
182
+ name: mysql2
183
+ requirement: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - "~>"
186
+ - !ruby/object:Gem::Version
187
+ version: '0.5'
188
+ type: :development
189
+ prerelease: false
190
+ version_requirements: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - "~>"
193
+ - !ruby/object:Gem::Version
194
+ version: '0.5'
181
195
  - !ruby/object:Gem::Dependency
182
196
  name: pg
183
197
  requirement: !ruby/object:Gem::Requirement