active_model-inherited_partials 0.1.2 → 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: c02c997c640fee1c1c4bb55050b80cb29940988b4f079819ed02eba27447ecbd
4
- data.tar.gz: 0aaa9cf694fbdde7c5a595696ab4f51a04e31da1eb772ca5d033d6c397041129
3
+ metadata.gz: 2519af20626ffddd38d67f97c052b8ecbc2e91e9f179b79254173c18fc517eaa
4
+ data.tar.gz: c76ef6cac6976c74c0d399ee3b74f01df93a86662ee9d45a6354e4355161e590
5
5
  SHA512:
6
- metadata.gz: 294c8d5a35996d7508051d4a4547202d9d8c1b2f3fe8294011e90e8d504447c04744377e7df28cc160bd878a9be4f9e894baffd1360259b3ea906f75829528f0
7
- data.tar.gz: 10342fc34c1a6a7a4c5c26a75812cfabac6d0b9d2aa197cdb0a572f9eef11caacebd5c0b27663b28b32a323bbfbb3843ab1c187599e384996c4ed911a8f54285
6
+ metadata.gz: b51d6ec10efc6e2bcb688534a228ae5759aaf643faf34701376e4f553d077cd1ab4d86dcdc32f56425061b595fa32a169f9e491acc1031b1ca1da53fdc1ab0cb
7
+ data.tar.gz: e62f57cf97e25bc169a3b92d5d62622ecfea4ebfeeb13fbc02921f69b36d60afe27d5b3d73314187ade9df6628229041b8bb4cb8e0672b19f7ae64198375e8aa
@@ -1,3 +1,5 @@
1
+ require 'active_model'
2
+
1
3
  module ActiveModel
2
4
  module InheritedPartials
3
5
  class Engine < ::Rails::Engine
@@ -1,5 +1,5 @@
1
1
  module ActiveModel
2
2
  module InheritedPartials
3
- VERSION = '0.1.2'
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,27 +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.2
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Senko
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-03-28 00:00:00.000000000 Z
10
+ date: 2025-03-10 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: rails
15
14
  requirement: !ruby/object:Gem::Requirement
16
15
  requirements:
17
- - - "~>"
16
+ - - ">="
18
17
  - !ruby/object:Gem::Version
19
18
  version: '7.1'
20
19
  type: :runtime
21
20
  prerelease: false
22
21
  version_requirements: !ruby/object:Gem::Requirement
23
22
  requirements:
24
- - - "~>"
23
+ - - ">="
25
24
  - !ruby/object:Gem::Version
26
25
  version: '7.1'
27
26
  description: A Rails Engine to let models inherit partials until overridden.
@@ -35,15 +34,6 @@ files:
35
34
  - MIT-LICENSE
36
35
  - README.md
37
36
  - Rakefile
38
- - app/assets/config/active_model_inherited_partials_manifest.js
39
- - app/assets/stylesheets/active_model/inherited_partials/application.css
40
- - app/controllers/active_model/inherited_partials/application_controller.rb
41
- - app/helpers/active_model/inherited_partials/application_helper.rb
42
- - app/jobs/active_model/inherited_partials/application_job.rb
43
- - app/mailers/active_model/inherited_partials/application_mailer.rb
44
- - app/models/active_model/inherited_partials/application_record.rb
45
- - app/views/layouts/active_model/inherited_partials/application.html.erb
46
- - config/routes.rb
47
37
  - lib/active_model/inherited_partials.rb
48
38
  - lib/active_model/inherited_partials/authors.rb
49
39
  - lib/active_model/inherited_partials/engine.rb
@@ -55,8 +45,7 @@ licenses:
55
45
  metadata:
56
46
  homepage_uri: https://github.com/Alexander-Senko/active_model-inherited_partials
57
47
  source_code_uri: https://github.com/Alexander-Senko/active_model-inherited_partials
58
- changelog_uri: https://github.com/Alexander-Senko/active_model-inherited_partials/blob/v0.1.2/CHANGELOG.md
59
- post_install_message:
48
+ changelog_uri: https://github.com/Alexander-Senko/active_model-inherited_partials/blob/v0.1.4/CHANGELOG.md
60
49
  rdoc_options: []
61
50
  require_paths:
62
51
  - lib
@@ -64,15 +53,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
64
53
  requirements:
65
54
  - - ">="
66
55
  - !ruby/object:Gem::Version
67
- version: '3.2'
56
+ version: '3.4'
68
57
  required_rubygems_version: !ruby/object:Gem::Requirement
69
58
  requirements:
70
59
  - - ">="
71
60
  - !ruby/object:Gem::Version
72
61
  version: '0'
73
62
  requirements: []
74
- rubygems_version: 3.5.6
75
- signing_key:
63
+ rubygems_version: 3.6.5
76
64
  specification_version: 4
77
65
  summary: Inheritable partials for Rails
78
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