bp3-activestorage 0.1.1 → 0.1.2

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: 5e5c67003411959eb9a46ed29f88d43805422aff300e11b26891f94642beadc8
4
- data.tar.gz: fe3712363cffc7ace5a83f6b18f4c5c6e1bba9fa2cfa0f21557519e204086866
3
+ metadata.gz: 8ba10a046499654047521674b4a0e5e1b925b3f7faa88ca34c3216c430b6ce34
4
+ data.tar.gz: f39b54ccc4eaaabc36307a17e8a3ed79e1fe1270734dbfaa34d43a63b5a018b4
5
5
  SHA512:
6
- metadata.gz: 81d7eb9157e499bb9f82330c9c782c74cea00551390a704aafc85aa14b295c02dc31df244e9f46492ca80160d4a25afcdb789a4cca6de0fd3796048e1d41f7c4
7
- data.tar.gz: 2bf61b92f8374745e0b4f622b4fde047474b284ccb2ee567c06e10debe5e9600b386cfc5a6e0a8d09a368d40ce3a07eb7a30ee80824d3ad9082c34901aca0fda
6
+ metadata.gz: 729ed3a43a32bcf5f7fccdb3aa8d47871eb34186f52f6dc43d63374e11d5a9fa2fca79c015d3c2ce1109ccd7d2c229d83d6e41e803e5a4edc6ee0bf13902aaeb
7
+ data.tar.gz: aaf63ae6e20fc81d3f6fbc676e34d959f07b1d699db3e0a0aa0f39cba4249c8a95b2939d801943c88053e50e45fca90d1e85f442fe24ec96ce96f119b9d2c20b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.1.2] - 2024-11-08
4
+
5
+ - Make classes Ransackable
6
+ - Add .table_name_basis
7
+
3
8
  ## [0.1.1] - 2024-05-31
4
9
 
5
10
  - Tweaks and documentation
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bp3-activestorage (0.1.1)
4
+ bp3-activestorage (0.1.2)
5
5
  activestorage (~> 7.1)
6
6
  bp3-core (>= 0.1.0, < 2)
7
7
  paper_trail (~> 15.1)
@@ -150,6 +150,7 @@ GEM
150
150
 
151
151
  PLATFORMS
152
152
  x86_64-darwin-22
153
+ x86_64-darwin-23
153
154
 
154
155
  DEPENDENCIES
155
156
  bp3-activestorage!
@@ -32,8 +32,8 @@ Gem::Specification.new do |spec|
32
32
  spec.require_paths = ['lib']
33
33
 
34
34
  spec.add_dependency 'activestorage', '~> 7.1'
35
- spec.add_dependency 'paper_trail', '~> 15.1'
36
35
  spec.add_dependency 'bp3-core', ['>= 0.1.0', '< 2']
36
+ spec.add_dependency 'paper_trail', '~> 15.1'
37
37
 
38
38
  spec.add_development_dependency 'byebug'
39
39
  spec.add_development_dependency 'rake', '~> 13.0'
@@ -2,6 +2,7 @@
2
2
 
3
3
  # require 'rails/railtie'
4
4
 
5
+ # rubocop:disable Metrics/BlockLength
5
6
  module Bp3
6
7
  module Activestorage
7
8
  if defined?(Rails.env)
@@ -28,12 +29,17 @@ module Bp3
28
29
  alias site sites_site
29
30
  alias site= sites_site=
30
31
  belongs_to :tenant, optional: true
32
+
33
+ def self.table_name_basis
34
+ table_name.gsub(/\Apublic\./, '').singularize
35
+ end
31
36
  end
32
37
 
33
38
  class Blob
34
39
  include Bp3::Core::Rqid
35
40
  include Bp3::Core::Sqnr
36
41
  include Bp3::Core::Displayable
42
+ include Bp3::Core::Ransackable
37
43
 
38
44
  use_sqnr_for_ordering
39
45
  has_paper_trail
@@ -43,6 +49,10 @@ module Bp3
43
49
  alias site= sites_site=
44
50
  belongs_to :tenant, optional: true
45
51
 
52
+ def self.table_name_basis
53
+ table_name.gsub(/\Apublic\./, '').singularize
54
+ end
55
+
46
56
  private
47
57
 
48
58
  def version_filter_mask
@@ -53,6 +63,7 @@ module Bp3
53
63
  class VariantRecord
54
64
  include Bp3::Core::Rqid
55
65
  include Bp3::Core::Sqnr
66
+ include Bp3::Core::Ransackable
56
67
 
57
68
  use_sqnr_for_ordering
58
69
  has_paper_trail
@@ -61,6 +72,10 @@ module Bp3
61
72
  alias site sites_site
62
73
  alias site= sites_site=
63
74
  belongs_to :tenant, optional: true
75
+
76
+ def self.table_name_basis
77
+ table_name.gsub(/\Apublic\./, '').singularize
78
+ end
64
79
  end
65
80
 
66
81
  class BaseController
@@ -92,3 +107,4 @@ module Bp3
92
107
  end
93
108
  end
94
109
  end
110
+ # rubocop:enable Metrics/BlockLength
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Bp3
4
4
  module Activestorage
5
- VERSION = '0.1.1'
5
+ VERSION = '0.1.2'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bp3-activestorage
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wim den Braven
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-05-31 00:00:00.000000000 Z
11
+ date: 2024-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activestorage
@@ -24,20 +24,6 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '7.1'
27
- - !ruby/object:Gem::Dependency
28
- name: paper_trail
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '15.1'
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '15.1'
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: bp3-core
43
29
  requirement: !ruby/object:Gem::Requirement
@@ -58,6 +44,20 @@ dependencies:
58
44
  - - "<"
59
45
  - !ruby/object:Gem::Version
60
46
  version: '2'
47
+ - !ruby/object:Gem::Dependency
48
+ name: paper_trail
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: '15.1'
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - "~>"
59
+ - !ruby/object:Gem::Version
60
+ version: '15.1'
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: byebug
63
63
  requirement: !ruby/object:Gem::Requirement
@@ -188,7 +188,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
188
188
  - !ruby/object:Gem::Version
189
189
  version: '0'
190
190
  requirements: []
191
- rubygems_version: 3.5.11
191
+ rubygems_version: 3.5.23
192
192
  signing_key:
193
193
  specification_version: 4
194
194
  summary: bp3-activestorage adapts activestorage for BP3 (persuavis/black_phoebe_3).