organizer-rails 0.2.1 → 0.2.3

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: 4e8757c4fd30584304c8f35dcc9d56bbe76d910a5dd4aca8bcd1205b8a16a96a
4
- data.tar.gz: 6167dbc661dd04a78f6b5078ae498a280917084d61a9e65eb545bd21a3741565
3
+ metadata.gz: 0410c1e8b042043694a31123c18a5897b7ecd7185ff7965df4a512ba8b28ecb5
4
+ data.tar.gz: 0bccd9a363ebfd6bf37e28771e165119665e4f2a31562b1659ab1bd1a18d393d
5
5
  SHA512:
6
- metadata.gz: a0649f46e0edcd3bae00d6fb56d0fce8b4153da136f6e143d2c7e034cef6e6a00b66684d6a5cd50fc8cda69983736f9c15cc04ce06a503b85c983614a30db389
7
- data.tar.gz: 422586546c3c9334bf4ad0ed6decb2eb5b095c3625fed75ff78271880f45b0f23cab44c4e24ad8681aba6d80c3cfe316760b8d09b7a62a9645232387efe25949
6
+ metadata.gz: e8867a9d15337e6b3bf0113b0d77dfe9b87338e48ba1f19d4e4ae2cee2bdba61cc11b319e5828fd1636fc0f9cacdedd5585168e1fe200ce027cf794fa029435a
7
+ data.tar.gz: e8cc06d373e693236769fea0ace5f2c957d1ae9b02fabc2e0ec18a5e4c8b38e9b057c5ac238984d688ecaf4728109b01edb19538c8a2cb0afe5eb6c58a907aec
@@ -1,5 +1,3 @@
1
- require 'memery'
2
-
3
1
  module Organizer
4
2
  concern :Identifiable do
5
3
  class << self
@@ -12,13 +10,7 @@ module Organizer
12
10
  end
13
11
 
14
12
  class_methods do # public API
15
- define_method column_name.to_s.pluralize do
16
- if @symbolize_ids
17
- identifiers.map &:to_sym
18
- else
19
- identifiers
20
- end.to_set
21
- end
13
+ define_method(column_name.to_s.pluralize) { identifiers }
22
14
  end
23
15
  end
24
16
  end
@@ -26,8 +18,6 @@ module Organizer
26
18
  end
27
19
 
28
20
  class_methods do
29
- include Memery
30
-
31
21
  def [] *id
32
22
  return id.map { self[_1] } if id.many?
33
23
 
@@ -42,8 +32,9 @@ module Organizer
42
32
 
43
33
  private
44
34
 
45
- memoize def identifiers
35
+ def identifiers
46
36
  all.pluck(@identified_by)
37
+ .then { @symbolize_ids ? _1.map(&:to_sym) : _1 }
47
38
  end
48
39
  end
49
40
  end
@@ -1,3 +1,3 @@
1
1
  module Organizer
2
- VERSION = '0.2.1'
2
+ VERSION = '0.2.3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: organizer-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Senko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-02-10 00:00:00.000000000 Z
11
+ date: 2024-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -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: memery
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
27
  description: Use lists, tags, flags, etc. to organize your application records.
42
28
  email:
43
29
  - Alexander.Senko@gmail.com
@@ -72,7 +58,7 @@ licenses:
72
58
  metadata:
73
59
  homepage_uri: https://github.com/Alexander-Senko/organizer
74
60
  source_code_uri: https://github.com/Alexander-Senko/organizer
75
- changelog_uri: https://github.com/Alexander-Senko/organizer/blob/v0.2.1/CHANGELOG.md
61
+ changelog_uri: https://github.com/Alexander-Senko/organizer/blob/v0.2.3/CHANGELOG.md
76
62
  post_install_message:
77
63
  rdoc_options: []
78
64
  require_paths: