snfoil 0.5.3 → 0.5.4

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: f6aa27a0dd5398b8e3abea471b5e8d3548aa4ff5239edabe7ee229306bde4787
4
- data.tar.gz: 358b5e5b46347c30768272c5f50c08aa8f61a3fb44a016f26504a700f82c2c11
3
+ metadata.gz: 8691b33751a878d5963ff71517fc31a11e75d2be79fa5816155f62f13d490042
4
+ data.tar.gz: c97c4b4f5e17ccb51ba00bfca92e17243c93e591ee1e7967021bedeb8db3d5ce
5
5
  SHA512:
6
- metadata.gz: cf0c36ee0cf32bdf2f43503aec6076f8115df1f84e9cb0b954c7d58d0ea2583236d2dd7dd9dcab14f2ccb7680b8e004ae43fdcfcfc0df627681d2c1e365b077c
7
- data.tar.gz: 613b3ce470d9c567d4fa06c915a1610e8b3ad35d26691f69455dc4e95cad874497bcbf21ca40f7f717df506730f7ecbc8b0f0a297393b6dbd166c7cdf1c76d6c
6
+ metadata.gz: d40b1751013aa15d36752126f8d0950c38b53c370ec6be45b62a7ebbcfd6744bd17803dd63b3e32dba5659e07c54b5b67e5c594adc07341bd2f156344cd545b3
7
+ data.tar.gz: 8c17c0a10e1fa7507596ea19d34a4af9ca3c718e21b14bc200ef55c6f0afa18e2ecd5a999631caa67b0a67bf6eca269cab4671c9cc57252306b59366a1375cc7
@@ -10,6 +10,8 @@ require_relative 'sn_foil/contexts/destroy_context'
10
10
  require_relative 'sn_foil/context'
11
11
  require_relative 'sn_foil/policy'
12
12
  require_relative 'sn_foil/searcher'
13
+ require_relative 'sn_foil/adapters/orms/base_adapter'
14
+ require_relative 'sn_foil/adapters/orms/active_record'
13
15
  require 'active_support/core_ext/module/attribute_accessors'
14
16
  require 'logger'
15
17
 
@@ -1,11 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require_relative 'base_adapter'
4
+
3
5
  module SnFoil
4
6
  module Adapters
5
7
  module ORMs
6
8
  class ActiveRecord < SnFoil::Adapters::ORMs::BaseAdapter
7
- def new(*params)
8
- self.class.new(__getobj__.new(*params))
9
+ def new(**params)
10
+ self.class.new(__getobj__.new(params))
9
11
  end
10
12
 
11
13
  def all
@@ -21,7 +23,7 @@ module SnFoil
21
23
  __getobj__.destroyed?
22
24
  end
23
25
 
24
- def attributes=(*attributes)
26
+ def attributes=(attributes)
25
27
  __getobj__.attributes = attributes
26
28
  end
27
29
  end
@@ -4,7 +4,7 @@ module SnFoil
4
4
  module Adapters
5
5
  module ORMs
6
6
  class BaseAdapter < SimpleDelegator
7
- def new(*_params)
7
+ def new(**_params)
8
8
  raise NotImplementedError, '#new not implemented in adapter'
9
9
  end
10
10
 
@@ -20,7 +20,7 @@ module SnFoil
20
20
  raise NotImplementedError, '#destroy not implemented in adapter'
21
21
  end
22
22
 
23
- def attributes=(**_attributes)
23
+ def attributes=(_attributes)
24
24
  raise NotImplementedError, '#attributes= not implemented in adapter'
25
25
  end
26
26
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SnFoil
4
- VERSION = '0.5.3'
4
+ VERSION = '0.5.4'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: snfoil
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3
4
+ version: 0.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Howes
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-06-30 00:00:00.000000000 Z
12
+ date: 2020-07-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport