esse-jbuilder 0.0.2 → 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: '0329554a1adfbaa16fa2050f6d6eab3b72f58fcd3eb9997bd2deaf3ff2bf60c5'
4
- data.tar.gz: f68ce58c54b66d87f35200ef43bdbdaf4aec32a7bbc527f3d7a5d446171250f2
3
+ metadata.gz: d72277de0e4b3280bd38e8f0fc54e6d22ee5b12910eb730fc25ba2bec1f62dfd
4
+ data.tar.gz: 00f91cbd2e3bd44edd206517a4b3ee48023d2c3167cf643f1e7273c40062149d
5
5
  SHA512:
6
- metadata.gz: e0e9e74eb4f301b3fa8fd40802c32f770ab9f90d9bde6766e923efaf5679663bbf36fe2a5e1e5f0698ca88515371142b8340a035df9cf812c03a71bb4b50db8a
7
- data.tar.gz: f0e328c4db4c1d1cf05d190d9abf45b821388036dbaadce57b7d279bdffb12e50aef92abf365f197f2852a1db995db2d7ca7ba1c13a2a9ed5e5a109a33616c70
6
+ metadata.gz: 76f8057626181603eefccdc72997644b3acd9d9dd154243b818a0ba4f7ba75ff42a413070e666ba971a7a959b0583cca5c17e00526f587f7789438af9410497f
7
+ data.tar.gz: a8aaa7b9aab193c2535e589a077096efe4bc9a78fbc7bb3e7b93c4bd674dd6467b08197f94b50f5f01c111bdf1d341e7c0624c9f694476c1ec7667734a0bd084
data/CHANGELOG.md CHANGED
@@ -4,6 +4,14 @@ 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
+
10
+ ## 0.0.3 - 2023-11-28
11
+ * Create a new `SearchRequestView` class that inherits from `ActionView::Base` with default lookup context.
12
+ * Passing formats to ActionView::Base will no longer be supported.
13
+ * Disable the symbolized keys for the `Esse::Jbuilder::ViewTemplate` class to avoid extra allocations and computations. Use `Esse::Jbuilder::ViewTemplate.symbolize_keys = true` to enable it.
14
+
7
15
  ## 0.0.2 - 2023-11-27
8
16
  * Esse::Jbuilder::ViewTemplate.call returns a hash with symbolized keys.
9
17
 
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.2)
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.2)
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
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "esse", git: "https://github.com/marcosgz/esse.git", branch: "main"
6
+ gem "jbuilder", "~> 2.11"
7
+ gem "rails", "~> 6.1"
8
+ gem "esse-rspec"
9
+
10
+ gemspec path: ".."
@@ -0,0 +1,257 @@
1
+ GIT
2
+ remote: https://github.com/marcosgz/esse.git
3
+ revision: 23c5a1cbb5695d6c68defb8a50e41f365fed9ca2
4
+ branch: main
5
+ specs:
6
+ esse (0.2.6)
7
+ multi_json
8
+ thor (>= 0.19)
9
+
10
+ PATH
11
+ remote: ..
12
+ specs:
13
+ esse-jbuilder (0.0.5)
14
+ esse (>= 0.2.4)
15
+ jbuilder (>= 2)
16
+
17
+ GEM
18
+ remote: https://rubygems.org/
19
+ specs:
20
+ actioncable (6.1.7.6)
21
+ actionpack (= 6.1.7.6)
22
+ activesupport (= 6.1.7.6)
23
+ nio4r (~> 2.0)
24
+ websocket-driver (>= 0.6.1)
25
+ actionmailbox (6.1.7.6)
26
+ actionpack (= 6.1.7.6)
27
+ activejob (= 6.1.7.6)
28
+ activerecord (= 6.1.7.6)
29
+ activestorage (= 6.1.7.6)
30
+ activesupport (= 6.1.7.6)
31
+ mail (>= 2.7.1)
32
+ actionmailer (6.1.7.6)
33
+ actionpack (= 6.1.7.6)
34
+ actionview (= 6.1.7.6)
35
+ activejob (= 6.1.7.6)
36
+ activesupport (= 6.1.7.6)
37
+ mail (~> 2.5, >= 2.5.4)
38
+ rails-dom-testing (~> 2.0)
39
+ actionpack (6.1.7.6)
40
+ actionview (= 6.1.7.6)
41
+ activesupport (= 6.1.7.6)
42
+ rack (~> 2.0, >= 2.0.9)
43
+ rack-test (>= 0.6.3)
44
+ rails-dom-testing (~> 2.0)
45
+ rails-html-sanitizer (~> 1.0, >= 1.2.0)
46
+ actiontext (6.1.7.6)
47
+ actionpack (= 6.1.7.6)
48
+ activerecord (= 6.1.7.6)
49
+ activestorage (= 6.1.7.6)
50
+ activesupport (= 6.1.7.6)
51
+ nokogiri (>= 1.8.5)
52
+ actionview (6.1.7.6)
53
+ activesupport (= 6.1.7.6)
54
+ builder (~> 3.1)
55
+ erubi (~> 1.4)
56
+ rails-dom-testing (~> 2.0)
57
+ rails-html-sanitizer (~> 1.1, >= 1.2.0)
58
+ activejob (6.1.7.6)
59
+ activesupport (= 6.1.7.6)
60
+ globalid (>= 0.3.6)
61
+ activemodel (6.1.7.6)
62
+ activesupport (= 6.1.7.6)
63
+ activerecord (6.1.7.6)
64
+ activemodel (= 6.1.7.6)
65
+ activesupport (= 6.1.7.6)
66
+ activestorage (6.1.7.6)
67
+ actionpack (= 6.1.7.6)
68
+ activejob (= 6.1.7.6)
69
+ activerecord (= 6.1.7.6)
70
+ activesupport (= 6.1.7.6)
71
+ marcel (~> 1.0)
72
+ mini_mime (>= 1.1.0)
73
+ activesupport (6.1.7.6)
74
+ concurrent-ruby (~> 1.0, >= 1.0.2)
75
+ i18n (>= 1.6, < 2)
76
+ minitest (>= 5.1)
77
+ tzinfo (~> 2.0)
78
+ zeitwerk (~> 2.3)
79
+ ast (2.4.2)
80
+ builder (3.2.4)
81
+ coderay (1.1.3)
82
+ concurrent-ruby (1.2.2)
83
+ crass (1.0.6)
84
+ date (3.3.4)
85
+ diff-lcs (1.5.0)
86
+ erubi (1.12.0)
87
+ esse-rspec (0.0.6)
88
+ esse (>= 0.2.4)
89
+ rspec (>= 3)
90
+ globalid (1.2.1)
91
+ activesupport (>= 6.1)
92
+ i18n (1.14.1)
93
+ concurrent-ruby (~> 1.0)
94
+ jbuilder (2.11.5)
95
+ actionview (>= 5.0.0)
96
+ activesupport (>= 5.0.0)
97
+ json (2.6.3)
98
+ language_server-protocol (3.17.0.3)
99
+ lint_roller (1.1.0)
100
+ loofah (2.22.0)
101
+ crass (~> 1.0.2)
102
+ nokogiri (>= 1.12.0)
103
+ mail (2.8.1)
104
+ mini_mime (>= 0.1.1)
105
+ net-imap
106
+ net-pop
107
+ net-smtp
108
+ marcel (1.0.2)
109
+ method_source (1.0.0)
110
+ mini_mime (1.1.5)
111
+ mini_portile2 (2.8.9)
112
+ minitest (5.20.0)
113
+ multi_json (1.15.0)
114
+ net-imap (0.4.6)
115
+ date
116
+ net-protocol
117
+ net-pop (0.1.2)
118
+ net-protocol
119
+ net-protocol (0.2.2)
120
+ timeout
121
+ net-smtp (0.4.0)
122
+ net-protocol
123
+ nio4r (2.6.1)
124
+ nokogiri (1.15.5)
125
+ mini_portile2 (~> 2.8.2)
126
+ racc (~> 1.4)
127
+ nokogiri (1.15.5-x86_64-linux)
128
+ racc (~> 1.4)
129
+ parallel (1.23.0)
130
+ parser (3.2.2.4)
131
+ ast (~> 2.4.1)
132
+ racc
133
+ pry (0.14.2)
134
+ coderay (~> 1.1)
135
+ method_source (~> 1.0)
136
+ racc (1.7.3)
137
+ rack (2.2.8)
138
+ rack-test (2.1.0)
139
+ rack (>= 1.3)
140
+ rails (6.1.7.6)
141
+ actioncable (= 6.1.7.6)
142
+ actionmailbox (= 6.1.7.6)
143
+ actionmailer (= 6.1.7.6)
144
+ actionpack (= 6.1.7.6)
145
+ actiontext (= 6.1.7.6)
146
+ actionview (= 6.1.7.6)
147
+ activejob (= 6.1.7.6)
148
+ activemodel (= 6.1.7.6)
149
+ activerecord (= 6.1.7.6)
150
+ activestorage (= 6.1.7.6)
151
+ activesupport (= 6.1.7.6)
152
+ bundler (>= 1.15.0)
153
+ railties (= 6.1.7.6)
154
+ sprockets-rails (>= 2.0.0)
155
+ rails-dom-testing (2.2.0)
156
+ activesupport (>= 5.0.0)
157
+ minitest
158
+ nokogiri (>= 1.6)
159
+ rails-html-sanitizer (1.6.0)
160
+ loofah (~> 2.21)
161
+ nokogiri (~> 1.14)
162
+ railties (6.1.7.6)
163
+ actionpack (= 6.1.7.6)
164
+ activesupport (= 6.1.7.6)
165
+ method_source
166
+ rake (>= 12.2)
167
+ thor (~> 1.0)
168
+ rainbow (3.1.1)
169
+ rake (13.1.0)
170
+ regexp_parser (2.8.2)
171
+ rexml (3.2.6)
172
+ rspec (3.12.0)
173
+ rspec-core (~> 3.12.0)
174
+ rspec-expectations (~> 3.12.0)
175
+ rspec-mocks (~> 3.12.0)
176
+ rspec-core (3.12.2)
177
+ rspec-support (~> 3.12.0)
178
+ rspec-expectations (3.12.3)
179
+ diff-lcs (>= 1.2.0, < 2.0)
180
+ rspec-support (~> 3.12.0)
181
+ rspec-mocks (3.12.6)
182
+ diff-lcs (>= 1.2.0, < 2.0)
183
+ rspec-support (~> 3.12.0)
184
+ rspec-support (3.12.1)
185
+ rubocop (1.57.2)
186
+ json (~> 2.3)
187
+ language_server-protocol (>= 3.17.0)
188
+ parallel (~> 1.10)
189
+ parser (>= 3.2.2.4)
190
+ rainbow (>= 2.2.2, < 4.0)
191
+ regexp_parser (>= 1.8, < 3.0)
192
+ rexml (>= 3.2.5, < 4.0)
193
+ rubocop-ast (>= 1.28.1, < 2.0)
194
+ ruby-progressbar (~> 1.7)
195
+ unicode-display_width (>= 2.4.0, < 3.0)
196
+ rubocop-ast (1.30.0)
197
+ parser (>= 3.2.1.0)
198
+ rubocop-capybara (2.19.0)
199
+ rubocop (~> 1.41)
200
+ rubocop-factory_bot (2.24.0)
201
+ rubocop (~> 1.33)
202
+ rubocop-performance (1.19.1)
203
+ rubocop (>= 1.7.0, < 2.0)
204
+ rubocop-ast (>= 0.4.0)
205
+ rubocop-rspec (2.25.0)
206
+ rubocop (~> 1.40)
207
+ rubocop-capybara (~> 2.17)
208
+ rubocop-factory_bot (~> 2.22)
209
+ ruby-progressbar (1.13.0)
210
+ sprockets (4.2.1)
211
+ concurrent-ruby (~> 1.0)
212
+ rack (>= 2.2.4, < 4)
213
+ sprockets-rails (3.4.2)
214
+ actionpack (>= 5.2)
215
+ activesupport (>= 5.2)
216
+ sprockets (>= 3.0.0)
217
+ standard (1.32.0)
218
+ language_server-protocol (~> 3.17.0.2)
219
+ lint_roller (~> 1.0)
220
+ rubocop (~> 1.57.2)
221
+ standard-custom (~> 1.0.0)
222
+ standard-performance (~> 1.2)
223
+ standard-custom (1.0.2)
224
+ lint_roller (~> 1.0)
225
+ rubocop (~> 1.50)
226
+ standard-performance (1.2.1)
227
+ lint_roller (~> 1.1)
228
+ rubocop-performance (~> 1.19.1)
229
+ thor (1.3.0)
230
+ timeout (0.4.1)
231
+ tzinfo (2.0.6)
232
+ concurrent-ruby (~> 1.0)
233
+ unicode-display_width (2.5.0)
234
+ websocket-driver (0.7.6)
235
+ websocket-extensions (>= 0.1.0)
236
+ websocket-extensions (0.1.5)
237
+ zeitwerk (2.6.12)
238
+
239
+ PLATFORMS
240
+ ruby
241
+ x86_64-linux
242
+
243
+ DEPENDENCIES
244
+ esse!
245
+ esse-jbuilder!
246
+ esse-rspec
247
+ jbuilder (~> 2.11)
248
+ pry
249
+ rails (~> 6.1)
250
+ rspec
251
+ rubocop
252
+ rubocop-performance
253
+ rubocop-rspec
254
+ standard
255
+
256
+ BUNDLED WITH
257
+ 2.4.13
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "esse", git: "https://github.com/marcosgz/esse.git", branch: "main"
6
+ gem 'jbuilder', '~> 2.11', '>= 2.11.5'
7
+ gem "rails", "~> 7.1"
8
+ gem "esse-rspec"
9
+
10
+ gemspec path: ".."
@@ -0,0 +1,290 @@
1
+ GIT
2
+ remote: https://github.com/marcosgz/esse.git
3
+ revision: 23c5a1cbb5695d6c68defb8a50e41f365fed9ca2
4
+ branch: main
5
+ specs:
6
+ esse (0.2.6)
7
+ multi_json
8
+ thor (>= 0.19)
9
+
10
+ PATH
11
+ remote: ..
12
+ specs:
13
+ esse-jbuilder (0.0.5)
14
+ esse (>= 0.2.4)
15
+ jbuilder (>= 2)
16
+
17
+ GEM
18
+ remote: https://rubygems.org/
19
+ specs:
20
+ actioncable (7.1.2)
21
+ actionpack (= 7.1.2)
22
+ activesupport (= 7.1.2)
23
+ nio4r (~> 2.0)
24
+ websocket-driver (>= 0.6.1)
25
+ zeitwerk (~> 2.6)
26
+ actionmailbox (7.1.2)
27
+ actionpack (= 7.1.2)
28
+ activejob (= 7.1.2)
29
+ activerecord (= 7.1.2)
30
+ activestorage (= 7.1.2)
31
+ activesupport (= 7.1.2)
32
+ mail (>= 2.7.1)
33
+ net-imap
34
+ net-pop
35
+ net-smtp
36
+ actionmailer (7.1.2)
37
+ actionpack (= 7.1.2)
38
+ actionview (= 7.1.2)
39
+ activejob (= 7.1.2)
40
+ activesupport (= 7.1.2)
41
+ mail (~> 2.5, >= 2.5.4)
42
+ net-imap
43
+ net-pop
44
+ net-smtp
45
+ rails-dom-testing (~> 2.2)
46
+ actionpack (7.1.2)
47
+ actionview (= 7.1.2)
48
+ activesupport (= 7.1.2)
49
+ nokogiri (>= 1.8.5)
50
+ racc
51
+ rack (>= 2.2.4)
52
+ rack-session (>= 1.0.1)
53
+ rack-test (>= 0.6.3)
54
+ rails-dom-testing (~> 2.2)
55
+ rails-html-sanitizer (~> 1.6)
56
+ actiontext (7.1.2)
57
+ actionpack (= 7.1.2)
58
+ activerecord (= 7.1.2)
59
+ activestorage (= 7.1.2)
60
+ activesupport (= 7.1.2)
61
+ globalid (>= 0.6.0)
62
+ nokogiri (>= 1.8.5)
63
+ actionview (7.1.2)
64
+ activesupport (= 7.1.2)
65
+ builder (~> 3.1)
66
+ erubi (~> 1.11)
67
+ rails-dom-testing (~> 2.2)
68
+ rails-html-sanitizer (~> 1.6)
69
+ activejob (7.1.2)
70
+ activesupport (= 7.1.2)
71
+ globalid (>= 0.3.6)
72
+ activemodel (7.1.2)
73
+ activesupport (= 7.1.2)
74
+ activerecord (7.1.2)
75
+ activemodel (= 7.1.2)
76
+ activesupport (= 7.1.2)
77
+ timeout (>= 0.4.0)
78
+ activestorage (7.1.2)
79
+ actionpack (= 7.1.2)
80
+ activejob (= 7.1.2)
81
+ activerecord (= 7.1.2)
82
+ activesupport (= 7.1.2)
83
+ marcel (~> 1.0)
84
+ activesupport (7.1.2)
85
+ base64
86
+ bigdecimal
87
+ concurrent-ruby (~> 1.0, >= 1.0.2)
88
+ connection_pool (>= 2.2.5)
89
+ drb
90
+ i18n (>= 1.6, < 2)
91
+ minitest (>= 5.1)
92
+ mutex_m
93
+ tzinfo (~> 2.0)
94
+ ast (2.4.2)
95
+ base64 (0.2.0)
96
+ bigdecimal (3.1.4)
97
+ builder (3.2.4)
98
+ coderay (1.1.3)
99
+ concurrent-ruby (1.2.2)
100
+ connection_pool (2.4.1)
101
+ crass (1.0.6)
102
+ date (3.3.4)
103
+ diff-lcs (1.5.0)
104
+ drb (2.2.0)
105
+ ruby2_keywords
106
+ erubi (1.12.0)
107
+ esse-rspec (0.0.6)
108
+ esse (>= 0.2.4)
109
+ rspec (>= 3)
110
+ globalid (1.2.1)
111
+ activesupport (>= 6.1)
112
+ i18n (1.14.1)
113
+ concurrent-ruby (~> 1.0)
114
+ io-console (0.6.0)
115
+ irb (1.9.1)
116
+ rdoc
117
+ reline (>= 0.3.8)
118
+ jbuilder (2.11.5)
119
+ actionview (>= 5.0.0)
120
+ activesupport (>= 5.0.0)
121
+ json (2.6.3)
122
+ language_server-protocol (3.17.0.3)
123
+ lint_roller (1.1.0)
124
+ loofah (2.22.0)
125
+ crass (~> 1.0.2)
126
+ nokogiri (>= 1.12.0)
127
+ mail (2.8.1)
128
+ mini_mime (>= 0.1.1)
129
+ net-imap
130
+ net-pop
131
+ net-smtp
132
+ marcel (1.0.2)
133
+ method_source (1.0.0)
134
+ mini_mime (1.1.5)
135
+ mini_portile2 (2.8.9)
136
+ minitest (5.20.0)
137
+ multi_json (1.15.0)
138
+ mutex_m (0.2.0)
139
+ net-imap (0.4.6)
140
+ date
141
+ net-protocol
142
+ net-pop (0.1.2)
143
+ net-protocol
144
+ net-protocol (0.2.2)
145
+ timeout
146
+ net-smtp (0.4.0)
147
+ net-protocol
148
+ nio4r (2.6.1)
149
+ nokogiri (1.15.5)
150
+ mini_portile2 (~> 2.8.2)
151
+ racc (~> 1.4)
152
+ nokogiri (1.15.5-x86_64-linux)
153
+ racc (~> 1.4)
154
+ parallel (1.23.0)
155
+ parser (3.2.2.4)
156
+ ast (~> 2.4.1)
157
+ racc
158
+ pry (0.14.2)
159
+ coderay (~> 1.1)
160
+ method_source (~> 1.0)
161
+ psych (5.1.1.1)
162
+ stringio
163
+ racc (1.7.3)
164
+ rack (3.0.8)
165
+ rack-session (2.0.0)
166
+ rack (>= 3.0.0)
167
+ rack-test (2.1.0)
168
+ rack (>= 1.3)
169
+ rackup (2.1.0)
170
+ rack (>= 3)
171
+ webrick (~> 1.8)
172
+ rails (7.1.2)
173
+ actioncable (= 7.1.2)
174
+ actionmailbox (= 7.1.2)
175
+ actionmailer (= 7.1.2)
176
+ actionpack (= 7.1.2)
177
+ actiontext (= 7.1.2)
178
+ actionview (= 7.1.2)
179
+ activejob (= 7.1.2)
180
+ activemodel (= 7.1.2)
181
+ activerecord (= 7.1.2)
182
+ activestorage (= 7.1.2)
183
+ activesupport (= 7.1.2)
184
+ bundler (>= 1.15.0)
185
+ railties (= 7.1.2)
186
+ rails-dom-testing (2.2.0)
187
+ activesupport (>= 5.0.0)
188
+ minitest
189
+ nokogiri (>= 1.6)
190
+ rails-html-sanitizer (1.6.0)
191
+ loofah (~> 2.21)
192
+ nokogiri (~> 1.14)
193
+ railties (7.1.2)
194
+ actionpack (= 7.1.2)
195
+ activesupport (= 7.1.2)
196
+ irb
197
+ rackup (>= 1.0.0)
198
+ rake (>= 12.2)
199
+ thor (~> 1.0, >= 1.2.2)
200
+ zeitwerk (~> 2.6)
201
+ rainbow (3.1.1)
202
+ rake (13.1.0)
203
+ rdoc (6.6.0)
204
+ psych (>= 4.0.0)
205
+ regexp_parser (2.8.2)
206
+ reline (0.4.0)
207
+ io-console (~> 0.5)
208
+ rexml (3.2.6)
209
+ rspec (3.12.0)
210
+ rspec-core (~> 3.12.0)
211
+ rspec-expectations (~> 3.12.0)
212
+ rspec-mocks (~> 3.12.0)
213
+ rspec-core (3.12.2)
214
+ rspec-support (~> 3.12.0)
215
+ rspec-expectations (3.12.3)
216
+ diff-lcs (>= 1.2.0, < 2.0)
217
+ rspec-support (~> 3.12.0)
218
+ rspec-mocks (3.12.6)
219
+ diff-lcs (>= 1.2.0, < 2.0)
220
+ rspec-support (~> 3.12.0)
221
+ rspec-support (3.12.1)
222
+ rubocop (1.57.2)
223
+ json (~> 2.3)
224
+ language_server-protocol (>= 3.17.0)
225
+ parallel (~> 1.10)
226
+ parser (>= 3.2.2.4)
227
+ rainbow (>= 2.2.2, < 4.0)
228
+ regexp_parser (>= 1.8, < 3.0)
229
+ rexml (>= 3.2.5, < 4.0)
230
+ rubocop-ast (>= 1.28.1, < 2.0)
231
+ ruby-progressbar (~> 1.7)
232
+ unicode-display_width (>= 2.4.0, < 3.0)
233
+ rubocop-ast (1.30.0)
234
+ parser (>= 3.2.1.0)
235
+ rubocop-capybara (2.19.0)
236
+ rubocop (~> 1.41)
237
+ rubocop-factory_bot (2.24.0)
238
+ rubocop (~> 1.33)
239
+ rubocop-performance (1.19.1)
240
+ rubocop (>= 1.7.0, < 2.0)
241
+ rubocop-ast (>= 0.4.0)
242
+ rubocop-rspec (2.25.0)
243
+ rubocop (~> 1.40)
244
+ rubocop-capybara (~> 2.17)
245
+ rubocop-factory_bot (~> 2.22)
246
+ ruby-progressbar (1.13.0)
247
+ ruby2_keywords (0.0.5)
248
+ standard (1.32.0)
249
+ language_server-protocol (~> 3.17.0.2)
250
+ lint_roller (~> 1.0)
251
+ rubocop (~> 1.57.2)
252
+ standard-custom (~> 1.0.0)
253
+ standard-performance (~> 1.2)
254
+ standard-custom (1.0.2)
255
+ lint_roller (~> 1.0)
256
+ rubocop (~> 1.50)
257
+ standard-performance (1.2.1)
258
+ lint_roller (~> 1.1)
259
+ rubocop-performance (~> 1.19.1)
260
+ stringio (3.1.0)
261
+ thor (1.3.0)
262
+ timeout (0.4.1)
263
+ tzinfo (2.0.6)
264
+ concurrent-ruby (~> 1.0)
265
+ unicode-display_width (2.5.0)
266
+ webrick (1.8.1)
267
+ websocket-driver (0.7.6)
268
+ websocket-extensions (>= 0.1.0)
269
+ websocket-extensions (0.1.5)
270
+ zeitwerk (2.6.12)
271
+
272
+ PLATFORMS
273
+ ruby
274
+ x86_64-linux
275
+
276
+ DEPENDENCIES
277
+ esse!
278
+ esse-jbuilder!
279
+ esse-rspec
280
+ jbuilder (~> 2.11, >= 2.11.5)
281
+ pry
282
+ rails (~> 7.1)
283
+ rspec
284
+ rubocop
285
+ rubocop-performance
286
+ rubocop-rspec
287
+ standard
288
+
289
+ BUNDLED WITH
290
+ 2.4.13
@@ -18,9 +18,9 @@ module Esse
18
18
 
19
19
  def render_jbuilder_template(&block)
20
20
  if defined?(Rails)
21
- lookup_context = ::ActionView::LookupContext.new(Esse.config.search_view_path)
22
- context = ActionView::Base.new(lookup_context, {}, nil, %i[json])
23
- ::JbuilderTemplate.new(context, &block).attributes!
21
+ require_relative "view_template"
22
+ view = Esse::Jbuilder::SearchRequestView.new({})
23
+ ::JbuilderTemplate.new(view, &block).attributes!
24
24
  else
25
25
  ::Jbuilder.new(&block).attributes!
26
26
  end
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Esse
4
+ module Jbuilder
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
+
21
+ def initialize(assings = {})
22
+ super(self.class.lookup_context, assings, nil)
23
+ end
24
+
25
+ def compiled_method_container
26
+ self.class
27
+ end
28
+ end
29
+ end
30
+ end
@@ -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.2"
5
+ VERSION = "0.0.5"
6
6
  end
7
7
  end
@@ -2,6 +2,7 @@
2
2
 
3
3
  require "rails"
4
4
  require "jbuilder/jbuilder_template"
5
+ require_relative "search_request_view"
5
6
 
6
7
  module Esse
7
8
  module Jbuilder
@@ -15,6 +16,8 @@ module Esse
15
16
  end
16
17
 
17
18
  class ViewTemplate
19
+ class_attribute :symbolize_keys, default: false
20
+
18
21
  attr_reader :view_filename, :assigns
19
22
 
20
23
  def self.call(view_filename, assigns = {})
@@ -27,12 +30,11 @@ module Esse
27
30
  end
28
31
 
29
32
  def to_hash
30
- lookup_context = ::ActionView::LookupContext.new(Esse.config.search_view_path)
31
- view = ActionView::Base.new(lookup_context, assigns, nil, %i[json])
33
+ view = Esse::Jbuilder::SearchRequestView.new(assigns)
32
34
  hash = JbuilderTemplate.new(view) do |json|
33
35
  json._render_template! view_filename
34
36
  end.attributes!
35
- Esse::HashUtils.deep_transform_keys(hash, &:to_sym)
37
+ self.class.symbolize_keys ? Esse::HashUtils.deep_transform_keys(hash, &:to_sym) : hash
36
38
  end
37
39
  end
38
40
  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.2
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-27 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
@@ -138,10 +137,16 @@ files:
138
137
  - Rakefile
139
138
  - ci/Gemfile.rails-5.2
140
139
  - ci/Gemfile.rails-5.2.lock
140
+ - ci/Gemfile.rails-6.1
141
+ - ci/Gemfile.rails-6.1.lock
142
+ - ci/Gemfile.rails-7.1
143
+ - ci/Gemfile.rails-7.1.lock
144
+ - lib/esse-jbuilder.rb
141
145
  - lib/esse/jbuilder.rb
142
146
  - lib/esse/jbuilder/config.rb
143
147
  - lib/esse/jbuilder/index.json.jbuilder
144
148
  - lib/esse/jbuilder/search_query.rb
149
+ - lib/esse/jbuilder/search_request_view.rb
145
150
  - lib/esse/jbuilder/template.rb
146
151
  - lib/esse/jbuilder/version.rb
147
152
  - lib/esse/jbuilder/view_template.rb
@@ -152,7 +157,6 @@ metadata:
152
157
  homepage_uri: https://github.com/marcosgz/esse-jbuilder
153
158
  source_code_uri: https://github.com/marcosgz/esse-jbuilder
154
159
  changelog_uri: https://github.com/marcosgz/esse-jbuilder/blob/main/CHANGELOG.md
155
- post_install_message:
156
160
  rdoc_options: []
157
161
  require_paths:
158
162
  - lib
@@ -167,8 +171,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
167
171
  - !ruby/object:Gem::Version
168
172
  version: '0'
169
173
  requirements: []
170
- rubygems_version: 3.3.7
171
- signing_key:
174
+ rubygems_version: 3.6.9
172
175
  specification_version: 4
173
176
  summary: Extensions for the Esse Search using Jbuilder DSL
174
177
  test_files: []