para 0.9.3.3 → 0.9.4

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: 8f742ef6484e0ccd595c1a79e219f4cb2a03c72a7fbf9f584990c638412f19e0
4
- data.tar.gz: 8c231925d6c2ecc4d0eb7208c5c4b530410d1a30d8a1276d849f31d3e52f5f76
3
+ metadata.gz: 45b33c0018d1c19e222c84f62ef8c0eb3820fbbe60dcc6c99da7a40bf229fc1b
4
+ data.tar.gz: fe48b49c545495cc4103418d4c75f3d34447b1003ef690ac45076768509cfc30
5
5
  SHA512:
6
- metadata.gz: e42df31fcb4d4d490f5b5127939494fbc9e07855ee1123fd720f089c2e36737b4e1f706b347d36699270ed00eeeb4a228ca81050bdc8ae35b84bbde8a7dfd7b6
7
- data.tar.gz: 707696ad2b1f6a2c43f6944f6543ca5dd8dd5a17c3c91942d0d3c38b43e5d2c652d1b76a35409c2de0019c11658f81a6922931d3e4126a6490a77ed189bd8e8a
6
+ metadata.gz: f8e403bd825fbeba4dd042eb2a01a0f17562b9ab145ec400aa216ed81ed07e483b2b22984e9c6a63b55408367ef7b0faf7022e931a262fe61640a1fffc7c03da
7
+ data.tar.gz: c9e6a4da03d11873890d5c7c1c338f109fe03f0ebfe605022b304bce43758f650e05580df1899b5c68bfe523d47b16e3988f86ed5247b9e999bd4dd1816fef87
@@ -2,6 +2,7 @@ module Para
2
2
  module Breadcrumbs
3
3
  module Controller
4
4
  extend ActiveSupport::Concern
5
+ include ActionController::Helpers
5
6
 
6
7
  included do
7
8
  class_attribute :_class_level_breadcrumbs
@@ -1,17 +1,21 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Para
2
4
  class ComponentsCleaner
3
5
  # Hide class instanciation
4
- def self.run; new.run; end
6
+ def self.run
7
+ new.run
8
+ end
5
9
 
6
10
  def run
7
11
  components.each do |component|
8
- unless component == Para.components.component_for(component.identifier)
12
+ if component.id != Para.components.components_ids_hash[component.identifier]
9
13
  component.destroy
10
14
  end
11
15
  end
12
16
 
13
17
  Para::ComponentSection.find_each do |section|
14
- unless Para.components.section_for(section.identifier)
18
+ unless Para.components.sections_ids_hash[section.identifier]
15
19
  section.destroy
16
20
  end
17
21
  end
@@ -76,6 +76,14 @@ module Para
76
76
  nil
77
77
  end
78
78
 
79
+ def sections_ids_hash
80
+ @sections_ids_hash ||= {}.with_indifferent_access
81
+ end
82
+
83
+ def components_ids_hash
84
+ @components_ids_hash ||= {}.with_indifferent_access
85
+ end
86
+
79
87
  private
80
88
 
81
89
  def build
@@ -93,14 +101,6 @@ module Para
93
101
  end
94
102
  end
95
103
 
96
- def sections_ids_hash
97
- @sections_ids_hash ||= {}.with_indifferent_access
98
- end
99
-
100
- def components_ids_hash
101
- @components_ids_hash ||= {}.with_indifferent_access
102
- end
103
-
104
104
  # Only store sections cache for the request duration to avoid expired
105
105
  # references to AR objects between requests
106
106
  #
@@ -88,6 +88,8 @@ module Para
88
88
  join_resources.find do |res|
89
89
  res.send(attribute_field.through_relation_source_foreign_key) == resource.id
90
90
  end
91
+ else
92
+ resource
91
93
  end
92
94
 
93
95
  existing_resource.position
data/lib/para/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Para
4
- VERSION = '0.9.3.3'
4
+ VERSION = '0.9.4'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: para
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.3.3
4
+ version: 0.9.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Valentin Ballestrino
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-02 00:00:00.000000000 Z
11
+ date: 2022-12-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '4.0'
20
20
  - - "<="
21
21
  - !ruby/object:Gem::Version
22
- version: '7.0'
22
+ version: '8.0'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: '4.0'
30
30
  - - "<="
31
31
  - !ruby/object:Gem::Version
32
- version: '7.0'
32
+ version: '8.0'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: rails-i18n
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -852,7 +852,7 @@ homepage: http://github.com/glyph-fr/para
852
852
  licenses:
853
853
  - MIT
854
854
  metadata: {}
855
- post_install_message:
855
+ post_install_message:
856
856
  rdoc_options: []
857
857
  require_paths:
858
858
  - lib
@@ -867,8 +867,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
867
867
  - !ruby/object:Gem::Version
868
868
  version: '0'
869
869
  requirements: []
870
- rubygems_version: 3.1.4
871
- signing_key:
870
+ rubygems_version: 3.3.7
871
+ signing_key:
872
872
  specification_version: 4
873
873
  summary: Rails admin engine
874
874
  test_files: []