familia 1.2.1 → 1.2.2

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
  SHA256:
3
- metadata.gz: 1b58a2281e311670f6372d3060eb390405993de85c2569df67d7d63531f3c34d
4
- data.tar.gz: bbe73bcc515fdd85021c1d7d8c112b573f7bcfd2d7240fc2e555b88c8d5ba078
3
+ metadata.gz: 969b9307f36ebcbc6174af20be7b408260daaaf1a273a366f45a20cde7cb6243
4
+ data.tar.gz: 9ce626f524f4208902d887dbe3bab701573e55c4a5cc6a64c1c7ff5e35b3b2f2
5
5
  SHA512:
6
- metadata.gz: f3e921580f9be913646412f394fecb3112b21c6d7d5a7ff9e2aa5989d78068277ef49b6cb7efe6d1db1cfb4cdcb2b2f320e16fcf32c50a5949067d5873976135
7
- data.tar.gz: 3f38209a50ade5b412b0e4ea2dfc23c3aa0dfe4a86a5265f227470d3680dfa2f777f3fde6380a3129db71caf592722ffc73e27e3617f1fd1abd0763edb395841
6
+ metadata.gz: 81caa35023632653f04f11e4f457fc3a6a0e9865cb361372a1f98644eefb12f956eb86ee1d911d7e0f17d8000e2cabd9faa9f23050668de652359997e42cbca3
7
+ data.tar.gz: d2e1bb0cfaa6af02a0475985355f873d85b1f13a5f54cecb5a92db95f408a57c502e1323db29a80a60ab262879a41d1aec89982fe9f517b01a59ec4df2e54723
data/.gitignore CHANGED
@@ -18,3 +18,4 @@ log
18
18
  tmp
19
19
  vendor
20
20
  *.gem
21
+ .yardoc
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- familia (1.2.1)
4
+ familia (1.1.0.pre.rc1)
5
5
  redis (>= 4.8.1, < 6.0)
6
6
  stringio (~> 3.1.1)
7
7
  uri-redis (~> 1.3)
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :MAJOR: 1
3
3
  :MINOR: 2
4
- :PATCH: 1
4
+ :PATCH: 2
@@ -139,6 +139,12 @@ module Familia
139
139
  # end
140
140
  #
141
141
  define_method :"#{name}!" do |*args|
142
+
143
+ if method_defined?(:"#{name}!")
144
+ warn "Method #{name}! is already defined for #{self}"
145
+ return
146
+ end
147
+
142
148
  # Check if the correct number of arguments is provided (exactly one).
143
149
  raise ArgumentError, "wrong number of arguments (given #{args.size}, expected 0 or 1)" if args.size > 1
144
150
 
@@ -235,6 +241,20 @@ module Familia
235
241
  @prefix || name.downcase.gsub('::', Familia.delim).to_sym
236
242
  end
237
243
 
244
+ # Converts the class name into a string that can be used to look up
245
+ # configuration values. This is particularly useful when mapping
246
+ # familia models with specific database numbers in the configuration.
247
+ #
248
+ # @example V2::Session.config_name => 'session'
249
+ #
250
+ # @return [String] The underscored class name as a string
251
+ def config_name
252
+ name.split('::').last
253
+ .gsub(/([A-Z]+)([A-Z][a-z])/, '\1_\2')
254
+ .gsub(/([a-z\d])([A-Z])/, '\1_\2')
255
+ .downcase
256
+ end
257
+
238
258
  # Creates and persists a new instance of the class.
239
259
  #
240
260
  # @param *args [Array] Variable number of positional arguments to be passed
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: familia
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Delano Mandelbaum
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2025-07-14 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: redis
@@ -132,7 +131,6 @@ licenses:
132
131
  - MIT
133
132
  metadata:
134
133
  rubygems_mfa_required: 'true'
135
- post_install_message:
136
134
  rdoc_options: []
137
135
  require_paths:
138
136
  - lib
@@ -147,8 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
147
145
  - !ruby/object:Gem::Version
148
146
  version: '0'
149
147
  requirements: []
150
- rubygems_version: 3.5.16
151
- signing_key:
148
+ rubygems_version: 3.6.9
152
149
  specification_version: 4
153
150
  summary: An ORM for Redis in Ruby.
154
151
  test_files: []