active_model-inherited_partials 0.1.3 → 0.1.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: 88930d32801dd1b68c96d0c0742fffd87adc90316f58922ec90a6e6c186c16f8
4
- data.tar.gz: 45d3db3a36010f7de102e00e9cf5a0d7bdd644c23647fb6064ccb9f46c759c95
3
+ metadata.gz: 2519af20626ffddd38d67f97c052b8ecbc2e91e9f179b79254173c18fc517eaa
4
+ data.tar.gz: c76ef6cac6976c74c0d399ee3b74f01df93a86662ee9d45a6354e4355161e590
5
5
  SHA512:
6
- metadata.gz: 5c9649ba792581d227c2506d17ff1a0e4767f674b27d0ce0deef8bf7021f7c7449bb6dc9ca664e9496b07cfd8aeb4179b750fe172b286d01e1274bb06bdeef56
7
- data.tar.gz: e961f3e600275c02577fe926e298366bdfec35b8722e4894c160347185d196cc1b58ac41563454bbd2a33b0f675a9aed8d1548bc98eacae15d7c1934e2baeb94
6
+ metadata.gz: b51d6ec10efc6e2bcb688534a228ae5759aaf643faf34701376e4f553d077cd1ab4d86dcdc32f56425061b595fa32a169f9e491acc1031b1ca1da53fdc1ab0cb
7
+ data.tar.gz: e62f57cf97e25bc169a3b92d5d62622ecfea4ebfeeb13fbc02921f69b36d60afe27d5b3d73314187ade9df6628229041b8bb4cb8e0672b19f7ae64198375e8aa
@@ -1,5 +1,5 @@
1
1
  module ActiveModel
2
2
  module InheritedPartials
3
- VERSION = '0.1.3'
3
+ VERSION = '0.1.4'
4
4
  end
5
5
  end
@@ -20,13 +20,13 @@ module ActiveModel
20
20
 
21
21
  def namespaced_partial_path
22
22
  namespace_model
23
- &.then { _1.partial_dir / model_name.element / _1.partial_name }
23
+ &.then { it.partial_dir / model_name.element / it.partial_name }
24
24
  &.to_s
25
25
  end
26
26
 
27
27
  def namespace_model
28
28
  namespace_classes
29
- .reverse.find { _1.respond_to? :model_name }
29
+ .reverse.find { it.respond_to? :model_name }
30
30
  end
31
31
 
32
32
  def namespace_classes
@@ -35,7 +35,7 @@ module ActiveModel
35
35
  .split('::')
36
36
  .each.with_object([]) { |name, namespaces| namespaces << "#{namespaces.last}::#{name}" }
37
37
  .map(&:constantize)
38
- .select { _1.in? ancestors }
38
+ .intersection(ancestors)
39
39
  end
40
40
 
41
41
  def find_or_inherit path
metadata CHANGED
@@ -1,26 +1,26 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_model-inherited_partials
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Senko
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2024-06-28 00:00:00.000000000 Z
10
+ date: 2025-03-10 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: rails
14
14
  requirement: !ruby/object:Gem::Requirement
15
15
  requirements:
16
- - - "~>"
16
+ - - ">="
17
17
  - !ruby/object:Gem::Version
18
18
  version: '7.1'
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
- - - "~>"
23
+ - - ">="
24
24
  - !ruby/object:Gem::Version
25
25
  version: '7.1'
26
26
  description: A Rails Engine to let models inherit partials until overridden.
@@ -34,15 +34,6 @@ files:
34
34
  - MIT-LICENSE
35
35
  - README.md
36
36
  - Rakefile
37
- - app/assets/config/active_model_inherited_partials_manifest.js
38
- - app/assets/stylesheets/active_model/inherited_partials/application.css
39
- - app/controllers/active_model/inherited_partials/application_controller.rb
40
- - app/helpers/active_model/inherited_partials/application_helper.rb
41
- - app/jobs/active_model/inherited_partials/application_job.rb
42
- - app/mailers/active_model/inherited_partials/application_mailer.rb
43
- - app/models/active_model/inherited_partials/application_record.rb
44
- - app/views/layouts/active_model/inherited_partials/application.html.erb
45
- - config/routes.rb
46
37
  - lib/active_model/inherited_partials.rb
47
38
  - lib/active_model/inherited_partials/authors.rb
48
39
  - lib/active_model/inherited_partials/engine.rb
@@ -54,7 +45,7 @@ licenses:
54
45
  metadata:
55
46
  homepage_uri: https://github.com/Alexander-Senko/active_model-inherited_partials
56
47
  source_code_uri: https://github.com/Alexander-Senko/active_model-inherited_partials
57
- changelog_uri: https://github.com/Alexander-Senko/active_model-inherited_partials/blob/v0.1.3/CHANGELOG.md
48
+ changelog_uri: https://github.com/Alexander-Senko/active_model-inherited_partials/blob/v0.1.4/CHANGELOG.md
58
49
  rdoc_options: []
59
50
  require_paths:
60
51
  - lib
@@ -62,14 +53,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
62
53
  requirements:
63
54
  - - ">="
64
55
  - !ruby/object:Gem::Version
65
- version: '3.2'
56
+ version: '3.4'
66
57
  required_rubygems_version: !ruby/object:Gem::Requirement
67
58
  requirements:
68
59
  - - ">="
69
60
  - !ruby/object:Gem::Version
70
61
  version: '0'
71
62
  requirements: []
72
- rubygems_version: 3.6.0.dev
63
+ rubygems_version: 3.6.5
73
64
  specification_version: 4
74
65
  summary: Inheritable partials for Rails
75
66
  test_files: []
@@ -1 +0,0 @@
1
- //= link_directory ../stylesheets/active_model/inherited_partials .css
@@ -1,15 +0,0 @@
1
- /*
2
- * This is a manifest file that'll be compiled into application.css, which will include all the files
3
- * listed below.
4
- *
5
- * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
- * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
7
- *
8
- * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
- * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
10
- * files in this directory. Styles in this file should be added after the last require_* statement.
11
- * It is generally better to create a new file per style scope.
12
- *
13
- *= require_tree .
14
- *= require_self
15
- */
@@ -1,6 +0,0 @@
1
- module ActiveModel
2
- module InheritedPartials
3
- class ApplicationController < ActionController::Base
4
- end
5
- end
6
- end
@@ -1,6 +0,0 @@
1
- module ActiveModel
2
- module InheritedPartials
3
- module ApplicationHelper
4
- end
5
- end
6
- end
@@ -1,6 +0,0 @@
1
- module ActiveModel
2
- module InheritedPartials
3
- class ApplicationJob < ActiveJob::Base
4
- end
5
- end
6
- end
@@ -1,8 +0,0 @@
1
- module ActiveModel
2
- module InheritedPartials
3
- class ApplicationMailer < ActionMailer::Base
4
- default from: "from@example.com"
5
- layout "mailer"
6
- end
7
- end
8
- end
@@ -1,7 +0,0 @@
1
- module ActiveModel
2
- module InheritedPartials
3
- class ApplicationRecord < ActiveRecord::Base
4
- self.abstract_class = true
5
- end
6
- end
7
- end
@@ -1,15 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>Active model inherited partials</title>
5
- <%= csrf_meta_tags %>
6
- <%= csp_meta_tag %>
7
-
8
- <%= stylesheet_link_tag "active_model/inherited_partials/application", media: "all" %>
9
- </head>
10
- <body>
11
-
12
- <%= yield %>
13
-
14
- </body>
15
- </html>
data/config/routes.rb DELETED
@@ -1,2 +0,0 @@
1
- ActiveModel::InheritedPartials::Engine.routes.draw do
2
- end