esse-jbuilder 0.0.3 → 0.0.5

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: 4c9d92a08fe845ce9f9968ea1ed52bc474840a69d5a8518796ba280ddb7302b0
4
- data.tar.gz: 105bcaf8affc36b00d8cb2240b467892846f4d91db474e20aa748e77f75ac4ea
3
+ metadata.gz: d72277de0e4b3280bd38e8f0fc54e6d22ee5b12910eb730fc25ba2bec1f62dfd
4
+ data.tar.gz: 00f91cbd2e3bd44edd206517a4b3ee48023d2c3167cf643f1e7273c40062149d
5
5
  SHA512:
6
- metadata.gz: 0153223571deb1c9564deb4323fee714abafd2d3a7f4a9a2ee219f7b1d7f688a5b26594532debef61da9b678715e9d3863b9a34734780f2f99e13eec94d73e87
7
- data.tar.gz: eba02c64ff04a2a72f28718532fa77f810221bef51c81307b5d5cacd57ec325e7809bd000579ba23c0207bb67d3872247fe6ce76c6fc65b11f5b6dc5a347d070
6
+ metadata.gz: 76f8057626181603eefccdc72997644b3acd9d9dd154243b818a0ba4f7ba75ff42a413070e666ba971a7a959b0583cca5c17e00526f587f7789438af9410497f
7
+ data.tar.gz: a8aaa7b9aab193c2535e589a077096efe4bc9a78fbc7bb3e7b93c4bd674dd6467b08197f94b50f5f01c111bdf1d341e7c0624c9f694476c1ec7667734a0bd084
data/CHANGELOG.md CHANGED
@@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## 0.0.4 - 2023-11-29
8
+ * Include `lib/esse-jbuilder.rb` file as fallback to loading `esse/jbuilder` file.
9
+
7
10
  ## 0.0.3 - 2023-11-28
8
11
  * Create a new `SearchRequestView` class that inherits from `ActionView::Base` with default lookup context.
9
12
  * Passing formats to ActionView::Base will no longer be supported.
data/Gemfile.lock CHANGED
@@ -1,146 +1,165 @@
1
1
  GIT
2
2
  remote: https://github.com/marcosgz/esse.git
3
- revision: c094ea2f7f6d6d65dc5540b98e41ecd1bd33b43f
3
+ revision: e6bd857087e5dfa76665eb32550919819967ea93
4
4
  branch: main
5
5
  specs:
6
- esse (0.2.4)
6
+ esse (0.4.0.rc5)
7
7
  multi_json
8
8
  thor (>= 0.19)
9
9
 
10
10
  PATH
11
11
  remote: .
12
12
  specs:
13
- esse-jbuilder (0.0.3)
13
+ esse-jbuilder (0.0.5)
14
14
  esse (>= 0.2.4)
15
15
  jbuilder (>= 2)
16
16
 
17
17
  GEM
18
18
  remote: https://rubygems.org/
19
19
  specs:
20
- actionview (7.1.2)
21
- activesupport (= 7.1.2)
20
+ actionview (7.1.6)
21
+ activesupport (= 7.1.6)
22
22
  builder (~> 3.1)
23
+ cgi
23
24
  erubi (~> 1.11)
24
25
  rails-dom-testing (~> 2.2)
25
26
  rails-html-sanitizer (~> 1.6)
26
- activesupport (7.1.2)
27
+ activesupport (7.1.6)
27
28
  base64
29
+ benchmark (>= 0.3)
28
30
  bigdecimal
29
31
  concurrent-ruby (~> 1.0, >= 1.0.2)
30
32
  connection_pool (>= 2.2.5)
31
33
  drb
32
34
  i18n (>= 1.6, < 2)
35
+ logger (>= 1.4.2)
33
36
  minitest (>= 5.1)
34
37
  mutex_m
38
+ securerandom (>= 0.3)
35
39
  tzinfo (~> 2.0)
36
- ast (2.4.2)
37
- base64 (0.2.0)
38
- bigdecimal (3.1.4)
39
- builder (3.2.4)
40
+ addressable (2.8.9)
41
+ public_suffix (>= 2.0.2, < 8.0)
42
+ ast (2.4.3)
43
+ base64 (0.3.0)
44
+ benchmark (0.5.0)
45
+ bigdecimal (4.0.1)
46
+ builder (3.3.0)
47
+ cgi (0.5.1)
40
48
  coderay (1.1.3)
41
- concurrent-ruby (1.2.2)
42
- connection_pool (2.4.1)
49
+ concurrent-ruby (1.3.6)
50
+ connection_pool (2.5.5)
43
51
  crass (1.0.6)
44
- diff-lcs (1.5.0)
45
- drb (2.2.0)
46
- ruby2_keywords
47
- erubi (1.12.0)
52
+ diff-lcs (1.6.2)
53
+ drb (2.2.3)
54
+ erubi (1.13.1)
48
55
  esse-rspec (0.0.6)
49
56
  esse (>= 0.2.4)
50
57
  rspec (>= 3)
51
- i18n (1.14.1)
58
+ i18n (1.14.8)
52
59
  concurrent-ruby (~> 1.0)
53
- jbuilder (2.11.5)
60
+ io-console (0.8.2)
61
+ jbuilder (2.13.0)
54
62
  actionview (>= 5.0.0)
55
63
  activesupport (>= 5.0.0)
56
- json (2.6.3)
57
- language_server-protocol (3.17.0.3)
64
+ json (2.19.1)
65
+ json-schema (6.2.0)
66
+ addressable (~> 2.8)
67
+ bigdecimal (>= 3.1, < 5)
68
+ language_server-protocol (3.17.0.5)
58
69
  lint_roller (1.1.0)
59
- loofah (2.22.0)
70
+ logger (1.7.0)
71
+ loofah (2.25.1)
60
72
  crass (~> 1.0.2)
61
73
  nokogiri (>= 1.12.0)
62
- method_source (1.0.0)
63
- minitest (5.20.0)
74
+ mcp (0.8.0)
75
+ json-schema (>= 4.1)
76
+ method_source (1.1.0)
77
+ mini_portile2 (2.8.9)
78
+ minitest (5.26.1)
64
79
  multi_json (1.15.0)
65
- mutex_m (0.2.0)
66
- nokogiri (1.15.5-x86_64-linux)
80
+ mutex_m (0.3.0)
81
+ nokogiri (1.15.7)
82
+ mini_portile2 (~> 2.8.2)
67
83
  racc (~> 1.4)
68
- parallel (1.23.0)
69
- parser (3.2.2.4)
84
+ parallel (1.27.0)
85
+ parser (3.3.10.2)
70
86
  ast (~> 2.4.1)
71
87
  racc
72
- pry (0.14.2)
88
+ prism (1.9.0)
89
+ pry (0.16.0)
73
90
  coderay (~> 1.1)
74
91
  method_source (~> 1.0)
75
- racc (1.7.3)
76
- rails-dom-testing (2.2.0)
92
+ reline (>= 0.6.0)
93
+ public_suffix (5.1.1)
94
+ racc (1.8.1)
95
+ rails-dom-testing (2.3.0)
77
96
  activesupport (>= 5.0.0)
78
97
  minitest
79
98
  nokogiri (>= 1.6)
80
- rails-html-sanitizer (1.6.0)
81
- loofah (~> 2.21)
82
- nokogiri (~> 1.14)
99
+ rails-html-sanitizer (1.7.0)
100
+ loofah (~> 2.25)
101
+ nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
83
102
  rainbow (3.1.1)
84
- regexp_parser (2.8.2)
85
- rexml (3.2.6)
86
- rspec (3.12.0)
87
- rspec-core (~> 3.12.0)
88
- rspec-expectations (~> 3.12.0)
89
- rspec-mocks (~> 3.12.0)
90
- rspec-core (3.12.2)
91
- rspec-support (~> 3.12.0)
92
- rspec-expectations (3.12.3)
103
+ regexp_parser (2.11.3)
104
+ reline (0.6.3)
105
+ io-console (~> 0.5)
106
+ rspec (3.13.2)
107
+ rspec-core (~> 3.13.0)
108
+ rspec-expectations (~> 3.13.0)
109
+ rspec-mocks (~> 3.13.0)
110
+ rspec-core (3.13.6)
111
+ rspec-support (~> 3.13.0)
112
+ rspec-expectations (3.13.5)
93
113
  diff-lcs (>= 1.2.0, < 2.0)
94
- rspec-support (~> 3.12.0)
95
- rspec-mocks (3.12.6)
114
+ rspec-support (~> 3.13.0)
115
+ rspec-mocks (3.13.8)
96
116
  diff-lcs (>= 1.2.0, < 2.0)
97
- rspec-support (~> 3.12.0)
98
- rspec-support (3.12.1)
99
- rubocop (1.57.2)
117
+ rspec-support (~> 3.13.0)
118
+ rspec-support (3.13.7)
119
+ rubocop (1.85.1)
100
120
  json (~> 2.3)
101
- language_server-protocol (>= 3.17.0)
121
+ language_server-protocol (~> 3.17.0.2)
122
+ lint_roller (~> 1.1.0)
123
+ mcp (~> 0.6)
102
124
  parallel (~> 1.10)
103
- parser (>= 3.2.2.4)
125
+ parser (>= 3.3.0.2)
104
126
  rainbow (>= 2.2.2, < 4.0)
105
- regexp_parser (>= 1.8, < 3.0)
106
- rexml (>= 3.2.5, < 4.0)
107
- rubocop-ast (>= 1.28.1, < 2.0)
127
+ regexp_parser (>= 2.9.3, < 3.0)
128
+ rubocop-ast (>= 1.49.0, < 2.0)
108
129
  ruby-progressbar (~> 1.7)
109
- unicode-display_width (>= 2.4.0, < 3.0)
110
- rubocop-ast (1.30.0)
111
- parser (>= 3.2.1.0)
112
- rubocop-capybara (2.19.0)
113
- rubocop (~> 1.41)
114
- rubocop-factory_bot (2.24.0)
115
- rubocop (~> 1.33)
116
- rubocop-performance (1.19.1)
117
- rubocop (>= 1.7.0, < 2.0)
118
- rubocop-ast (>= 0.4.0)
119
- rubocop-rspec (2.25.0)
120
- rubocop (~> 1.40)
121
- rubocop-capybara (~> 2.17)
122
- rubocop-factory_bot (~> 2.22)
130
+ unicode-display_width (>= 2.4.0, < 4.0)
131
+ rubocop-ast (1.49.1)
132
+ parser (>= 3.3.7.2)
133
+ prism (~> 1.7)
134
+ rubocop-performance (1.21.1)
135
+ rubocop (>= 1.48.1, < 2.0)
136
+ rubocop-ast (>= 1.31.1, < 2.0)
137
+ rubocop-rspec (3.9.0)
138
+ lint_roller (~> 1.1)
139
+ rubocop (~> 1.81)
123
140
  ruby-progressbar (1.13.0)
124
- ruby2_keywords (0.0.5)
125
- standard (1.32.0)
141
+ securerandom (0.3.2)
142
+ standard (1.35.0.1)
126
143
  language_server-protocol (~> 3.17.0.2)
127
144
  lint_roller (~> 1.0)
128
- rubocop (~> 1.57.2)
145
+ rubocop (~> 1.62)
129
146
  standard-custom (~> 1.0.0)
130
- standard-performance (~> 1.2)
147
+ standard-performance (~> 1.3)
131
148
  standard-custom (1.0.2)
132
149
  lint_roller (~> 1.0)
133
150
  rubocop (~> 1.50)
134
- standard-performance (1.2.1)
151
+ standard-performance (1.4.0)
135
152
  lint_roller (~> 1.1)
136
- rubocop-performance (~> 1.19.1)
137
- thor (1.3.0)
153
+ rubocop-performance (~> 1.21.0)
154
+ thor (1.5.0)
138
155
  tzinfo (2.0.6)
139
156
  concurrent-ruby (~> 1.0)
140
- unicode-display_width (2.5.0)
157
+ unicode-display_width (3.2.0)
158
+ unicode-emoji (~> 4.1)
159
+ unicode-emoji (4.2.0)
141
160
 
142
161
  PLATFORMS
143
- x86_64-linux
162
+ ruby
144
163
 
145
164
  DEPENDENCIES
146
165
  esse!
@@ -155,4 +174,4 @@ DEPENDENCIES
155
174
  standard
156
175
 
157
176
  BUNDLED WITH
158
- 2.4.13
177
+ 2.1.4
@@ -10,7 +10,7 @@ GIT
10
10
  PATH
11
11
  remote: ..
12
12
  specs:
13
- esse-jbuilder (0.0.3)
13
+ esse-jbuilder (0.0.5)
14
14
  esse (>= 0.2.4)
15
15
  jbuilder (>= 2)
16
16
 
@@ -91,6 +91,7 @@ GEM
91
91
  marcel (1.0.2)
92
92
  method_source (1.0.0)
93
93
  mini_mime (1.1.5)
94
+ mini_portile2 (2.8.9)
94
95
  minitest (5.20.0)
95
96
  multi_json (1.15.0)
96
97
  net-imap (0.4.6)
@@ -103,6 +104,9 @@ GEM
103
104
  net-smtp (0.4.0)
104
105
  net-protocol
105
106
  nio4r (2.6.1)
107
+ nokogiri (1.15.5)
108
+ mini_portile2 (~> 2.8.2)
109
+ racc (~> 1.4)
106
110
  nokogiri (1.15.5-x86_64-linux)
107
111
  racc (~> 1.4)
108
112
  parallel (1.23.0)
@@ -214,6 +218,7 @@ GEM
214
218
  websocket-extensions (0.1.5)
215
219
 
216
220
  PLATFORMS
221
+ ruby
217
222
  x86_64-linux
218
223
 
219
224
  DEPENDENCIES
@@ -10,7 +10,7 @@ GIT
10
10
  PATH
11
11
  remote: ..
12
12
  specs:
13
- esse-jbuilder (0.0.3)
13
+ esse-jbuilder (0.0.5)
14
14
  esse (>= 0.2.4)
15
15
  jbuilder (>= 2)
16
16
 
@@ -108,6 +108,7 @@ GEM
108
108
  marcel (1.0.2)
109
109
  method_source (1.0.0)
110
110
  mini_mime (1.1.5)
111
+ mini_portile2 (2.8.9)
111
112
  minitest (5.20.0)
112
113
  multi_json (1.15.0)
113
114
  net-imap (0.4.6)
@@ -120,6 +121,9 @@ GEM
120
121
  net-smtp (0.4.0)
121
122
  net-protocol
122
123
  nio4r (2.6.1)
124
+ nokogiri (1.15.5)
125
+ mini_portile2 (~> 2.8.2)
126
+ racc (~> 1.4)
123
127
  nokogiri (1.15.5-x86_64-linux)
124
128
  racc (~> 1.4)
125
129
  parallel (1.23.0)
@@ -233,6 +237,7 @@ GEM
233
237
  zeitwerk (2.6.12)
234
238
 
235
239
  PLATFORMS
240
+ ruby
236
241
  x86_64-linux
237
242
 
238
243
  DEPENDENCIES
@@ -10,7 +10,7 @@ GIT
10
10
  PATH
11
11
  remote: ..
12
12
  specs:
13
- esse-jbuilder (0.0.3)
13
+ esse-jbuilder (0.0.5)
14
14
  esse (>= 0.2.4)
15
15
  jbuilder (>= 2)
16
16
 
@@ -132,6 +132,7 @@ GEM
132
132
  marcel (1.0.2)
133
133
  method_source (1.0.0)
134
134
  mini_mime (1.1.5)
135
+ mini_portile2 (2.8.9)
135
136
  minitest (5.20.0)
136
137
  multi_json (1.15.0)
137
138
  mutex_m (0.2.0)
@@ -145,6 +146,9 @@ GEM
145
146
  net-smtp (0.4.0)
146
147
  net-protocol
147
148
  nio4r (2.6.1)
149
+ nokogiri (1.15.5)
150
+ mini_portile2 (~> 2.8.2)
151
+ racc (~> 1.4)
148
152
  nokogiri (1.15.5-x86_64-linux)
149
153
  racc (~> 1.4)
150
154
  parallel (1.23.0)
@@ -266,6 +270,7 @@ GEM
266
270
  zeitwerk (2.6.12)
267
271
 
268
272
  PLATFORMS
273
+ ruby
269
274
  x86_64-linux
270
275
 
271
276
  DEPENDENCIES
@@ -3,9 +3,23 @@
3
3
  module Esse
4
4
  module Jbuilder
5
5
  class SearchRequestView < ::ActionView::Base
6
+ # Cache the LookupContext at the class level to avoid creating a new one
7
+ # per template render. LookupContext initializes file system resolvers,
8
+ # path sets, and detail hashes — expensive objects that are stateless
9
+ # relative to template assigns. Reusing it eliminates ~15K+ short-lived
10
+ # object graphs per minute under production traffic, reducing heap
11
+ # fragmentation that causes RSS growth over time.
12
+ def self.lookup_context
13
+ view_path = Esse.config.search_view_path
14
+ if @lookup_context.nil? || @lookup_context_path != view_path
15
+ @lookup_context_path = view_path
16
+ @lookup_context = ::ActionView::LookupContext.new(view_path)
17
+ end
18
+ @lookup_context
19
+ end
20
+
6
21
  def initialize(assings = {})
7
- lookup_context = ::ActionView::LookupContext.new(Esse.config.search_view_path)
8
- super(lookup_context, assings, nil)
22
+ super(self.class.lookup_context, assings, nil)
9
23
  end
10
24
 
11
25
  def compiled_method_container
@@ -14,8 +14,8 @@ module Esse
14
14
  __assigns[key]
15
15
  end
16
16
 
17
- def partial!(view_filename, **assigns)
18
- raise ::NotImplementedError, "Partial rendering is not supported. Consider using Esse::Jbuilder::ViewTemplate.call instead."
17
+ def partial!(*)
18
+ ::Kernel.raise ::NotImplementedError, "Partial rendering is not supported. Consider using Esse::Jbuilder::ViewTemplate.call instead."
19
19
  end
20
20
  end
21
21
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Esse
4
4
  module Jbuilder
5
- VERSION = "0.0.3"
5
+ VERSION = "0.0.5"
6
6
  end
7
7
  end
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "esse/jbuilder"
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: esse-jbuilder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcos G. Zimmermann
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2023-11-28 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: esse
@@ -142,6 +141,7 @@ files:
142
141
  - ci/Gemfile.rails-6.1.lock
143
142
  - ci/Gemfile.rails-7.1
144
143
  - ci/Gemfile.rails-7.1.lock
144
+ - lib/esse-jbuilder.rb
145
145
  - lib/esse/jbuilder.rb
146
146
  - lib/esse/jbuilder/config.rb
147
147
  - lib/esse/jbuilder/index.json.jbuilder
@@ -157,7 +157,6 @@ metadata:
157
157
  homepage_uri: https://github.com/marcosgz/esse-jbuilder
158
158
  source_code_uri: https://github.com/marcosgz/esse-jbuilder
159
159
  changelog_uri: https://github.com/marcosgz/esse-jbuilder/blob/main/CHANGELOG.md
160
- post_install_message:
161
160
  rdoc_options: []
162
161
  require_paths:
163
162
  - lib
@@ -172,8 +171,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
172
171
  - !ruby/object:Gem::Version
173
172
  version: '0'
174
173
  requirements: []
175
- rubygems_version: 3.3.7
176
- signing_key:
174
+ rubygems_version: 3.6.9
177
175
  specification_version: 4
178
176
  summary: Extensions for the Esse Search using Jbuilder DSL
179
177
  test_files: []