esse-jbuilder 0.0.2 → 0.0.3

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: '0329554a1adfbaa16fa2050f6d6eab3b72f58fcd3eb9997bd2deaf3ff2bf60c5'
4
- data.tar.gz: f68ce58c54b66d87f35200ef43bdbdaf4aec32a7bbc527f3d7a5d446171250f2
3
+ metadata.gz: 4c9d92a08fe845ce9f9968ea1ed52bc474840a69d5a8518796ba280ddb7302b0
4
+ data.tar.gz: 105bcaf8affc36b00d8cb2240b467892846f4d91db474e20aa748e77f75ac4ea
5
5
  SHA512:
6
- metadata.gz: e0e9e74eb4f301b3fa8fd40802c32f770ab9f90d9bde6766e923efaf5679663bbf36fe2a5e1e5f0698ca88515371142b8340a035df9cf812c03a71bb4b50db8a
7
- data.tar.gz: f0e328c4db4c1d1cf05d190d9abf45b821388036dbaadce57b7d279bdffb12e50aef92abf365f197f2852a1db995db2d7ca7ba1c13a2a9ed5e5a109a33616c70
6
+ metadata.gz: 0153223571deb1c9564deb4323fee714abafd2d3a7f4a9a2ee219f7b1d7f688a5b26594532debef61da9b678715e9d3863b9a34734780f2f99e13eec94d73e87
7
+ data.tar.gz: eba02c64ff04a2a72f28718532fa77f810221bef51c81307b5d5cacd57ec325e7809bd000579ba23c0207bb67d3872247fe6ce76c6fc65b11f5b6dc5a347d070
data/CHANGELOG.md CHANGED
@@ -4,6 +4,11 @@ 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.3 - 2023-11-28
8
+ * Create a new `SearchRequestView` class that inherits from `ActionView::Base` with default lookup context.
9
+ * Passing formats to ActionView::Base will no longer be supported.
10
+ * 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.
11
+
7
12
  ## 0.0.2 - 2023-11-27
8
13
  * Esse::Jbuilder::ViewTemplate.call returns a hash with symbolized keys.
9
14
 
data/Gemfile.lock CHANGED
@@ -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.3)
14
14
  esse (>= 0.2.4)
15
15
  jbuilder (>= 2)
16
16
 
@@ -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.3)
14
14
  esse (>= 0.2.4)
15
15
  jbuilder (>= 2)
16
16
 
@@ -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,252 @@
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.3)
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
+ minitest (5.20.0)
112
+ multi_json (1.15.0)
113
+ net-imap (0.4.6)
114
+ date
115
+ net-protocol
116
+ net-pop (0.1.2)
117
+ net-protocol
118
+ net-protocol (0.2.2)
119
+ timeout
120
+ net-smtp (0.4.0)
121
+ net-protocol
122
+ nio4r (2.6.1)
123
+ nokogiri (1.15.5-x86_64-linux)
124
+ racc (~> 1.4)
125
+ parallel (1.23.0)
126
+ parser (3.2.2.4)
127
+ ast (~> 2.4.1)
128
+ racc
129
+ pry (0.14.2)
130
+ coderay (~> 1.1)
131
+ method_source (~> 1.0)
132
+ racc (1.7.3)
133
+ rack (2.2.8)
134
+ rack-test (2.1.0)
135
+ rack (>= 1.3)
136
+ rails (6.1.7.6)
137
+ actioncable (= 6.1.7.6)
138
+ actionmailbox (= 6.1.7.6)
139
+ actionmailer (= 6.1.7.6)
140
+ actionpack (= 6.1.7.6)
141
+ actiontext (= 6.1.7.6)
142
+ actionview (= 6.1.7.6)
143
+ activejob (= 6.1.7.6)
144
+ activemodel (= 6.1.7.6)
145
+ activerecord (= 6.1.7.6)
146
+ activestorage (= 6.1.7.6)
147
+ activesupport (= 6.1.7.6)
148
+ bundler (>= 1.15.0)
149
+ railties (= 6.1.7.6)
150
+ sprockets-rails (>= 2.0.0)
151
+ rails-dom-testing (2.2.0)
152
+ activesupport (>= 5.0.0)
153
+ minitest
154
+ nokogiri (>= 1.6)
155
+ rails-html-sanitizer (1.6.0)
156
+ loofah (~> 2.21)
157
+ nokogiri (~> 1.14)
158
+ railties (6.1.7.6)
159
+ actionpack (= 6.1.7.6)
160
+ activesupport (= 6.1.7.6)
161
+ method_source
162
+ rake (>= 12.2)
163
+ thor (~> 1.0)
164
+ rainbow (3.1.1)
165
+ rake (13.1.0)
166
+ regexp_parser (2.8.2)
167
+ rexml (3.2.6)
168
+ rspec (3.12.0)
169
+ rspec-core (~> 3.12.0)
170
+ rspec-expectations (~> 3.12.0)
171
+ rspec-mocks (~> 3.12.0)
172
+ rspec-core (3.12.2)
173
+ rspec-support (~> 3.12.0)
174
+ rspec-expectations (3.12.3)
175
+ diff-lcs (>= 1.2.0, < 2.0)
176
+ rspec-support (~> 3.12.0)
177
+ rspec-mocks (3.12.6)
178
+ diff-lcs (>= 1.2.0, < 2.0)
179
+ rspec-support (~> 3.12.0)
180
+ rspec-support (3.12.1)
181
+ rubocop (1.57.2)
182
+ json (~> 2.3)
183
+ language_server-protocol (>= 3.17.0)
184
+ parallel (~> 1.10)
185
+ parser (>= 3.2.2.4)
186
+ rainbow (>= 2.2.2, < 4.0)
187
+ regexp_parser (>= 1.8, < 3.0)
188
+ rexml (>= 3.2.5, < 4.0)
189
+ rubocop-ast (>= 1.28.1, < 2.0)
190
+ ruby-progressbar (~> 1.7)
191
+ unicode-display_width (>= 2.4.0, < 3.0)
192
+ rubocop-ast (1.30.0)
193
+ parser (>= 3.2.1.0)
194
+ rubocop-capybara (2.19.0)
195
+ rubocop (~> 1.41)
196
+ rubocop-factory_bot (2.24.0)
197
+ rubocop (~> 1.33)
198
+ rubocop-performance (1.19.1)
199
+ rubocop (>= 1.7.0, < 2.0)
200
+ rubocop-ast (>= 0.4.0)
201
+ rubocop-rspec (2.25.0)
202
+ rubocop (~> 1.40)
203
+ rubocop-capybara (~> 2.17)
204
+ rubocop-factory_bot (~> 2.22)
205
+ ruby-progressbar (1.13.0)
206
+ sprockets (4.2.1)
207
+ concurrent-ruby (~> 1.0)
208
+ rack (>= 2.2.4, < 4)
209
+ sprockets-rails (3.4.2)
210
+ actionpack (>= 5.2)
211
+ activesupport (>= 5.2)
212
+ sprockets (>= 3.0.0)
213
+ standard (1.32.0)
214
+ language_server-protocol (~> 3.17.0.2)
215
+ lint_roller (~> 1.0)
216
+ rubocop (~> 1.57.2)
217
+ standard-custom (~> 1.0.0)
218
+ standard-performance (~> 1.2)
219
+ standard-custom (1.0.2)
220
+ lint_roller (~> 1.0)
221
+ rubocop (~> 1.50)
222
+ standard-performance (1.2.1)
223
+ lint_roller (~> 1.1)
224
+ rubocop-performance (~> 1.19.1)
225
+ thor (1.3.0)
226
+ timeout (0.4.1)
227
+ tzinfo (2.0.6)
228
+ concurrent-ruby (~> 1.0)
229
+ unicode-display_width (2.5.0)
230
+ websocket-driver (0.7.6)
231
+ websocket-extensions (>= 0.1.0)
232
+ websocket-extensions (0.1.5)
233
+ zeitwerk (2.6.12)
234
+
235
+ PLATFORMS
236
+ x86_64-linux
237
+
238
+ DEPENDENCIES
239
+ esse!
240
+ esse-jbuilder!
241
+ esse-rspec
242
+ jbuilder (~> 2.11)
243
+ pry
244
+ rails (~> 6.1)
245
+ rspec
246
+ rubocop
247
+ rubocop-performance
248
+ rubocop-rspec
249
+ standard
250
+
251
+ BUNDLED WITH
252
+ 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,285 @@
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.3)
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
+ minitest (5.20.0)
136
+ multi_json (1.15.0)
137
+ mutex_m (0.2.0)
138
+ net-imap (0.4.6)
139
+ date
140
+ net-protocol
141
+ net-pop (0.1.2)
142
+ net-protocol
143
+ net-protocol (0.2.2)
144
+ timeout
145
+ net-smtp (0.4.0)
146
+ net-protocol
147
+ nio4r (2.6.1)
148
+ nokogiri (1.15.5-x86_64-linux)
149
+ racc (~> 1.4)
150
+ parallel (1.23.0)
151
+ parser (3.2.2.4)
152
+ ast (~> 2.4.1)
153
+ racc
154
+ pry (0.14.2)
155
+ coderay (~> 1.1)
156
+ method_source (~> 1.0)
157
+ psych (5.1.1.1)
158
+ stringio
159
+ racc (1.7.3)
160
+ rack (3.0.8)
161
+ rack-session (2.0.0)
162
+ rack (>= 3.0.0)
163
+ rack-test (2.1.0)
164
+ rack (>= 1.3)
165
+ rackup (2.1.0)
166
+ rack (>= 3)
167
+ webrick (~> 1.8)
168
+ rails (7.1.2)
169
+ actioncable (= 7.1.2)
170
+ actionmailbox (= 7.1.2)
171
+ actionmailer (= 7.1.2)
172
+ actionpack (= 7.1.2)
173
+ actiontext (= 7.1.2)
174
+ actionview (= 7.1.2)
175
+ activejob (= 7.1.2)
176
+ activemodel (= 7.1.2)
177
+ activerecord (= 7.1.2)
178
+ activestorage (= 7.1.2)
179
+ activesupport (= 7.1.2)
180
+ bundler (>= 1.15.0)
181
+ railties (= 7.1.2)
182
+ rails-dom-testing (2.2.0)
183
+ activesupport (>= 5.0.0)
184
+ minitest
185
+ nokogiri (>= 1.6)
186
+ rails-html-sanitizer (1.6.0)
187
+ loofah (~> 2.21)
188
+ nokogiri (~> 1.14)
189
+ railties (7.1.2)
190
+ actionpack (= 7.1.2)
191
+ activesupport (= 7.1.2)
192
+ irb
193
+ rackup (>= 1.0.0)
194
+ rake (>= 12.2)
195
+ thor (~> 1.0, >= 1.2.2)
196
+ zeitwerk (~> 2.6)
197
+ rainbow (3.1.1)
198
+ rake (13.1.0)
199
+ rdoc (6.6.0)
200
+ psych (>= 4.0.0)
201
+ regexp_parser (2.8.2)
202
+ reline (0.4.0)
203
+ io-console (~> 0.5)
204
+ rexml (3.2.6)
205
+ rspec (3.12.0)
206
+ rspec-core (~> 3.12.0)
207
+ rspec-expectations (~> 3.12.0)
208
+ rspec-mocks (~> 3.12.0)
209
+ rspec-core (3.12.2)
210
+ rspec-support (~> 3.12.0)
211
+ rspec-expectations (3.12.3)
212
+ diff-lcs (>= 1.2.0, < 2.0)
213
+ rspec-support (~> 3.12.0)
214
+ rspec-mocks (3.12.6)
215
+ diff-lcs (>= 1.2.0, < 2.0)
216
+ rspec-support (~> 3.12.0)
217
+ rspec-support (3.12.1)
218
+ rubocop (1.57.2)
219
+ json (~> 2.3)
220
+ language_server-protocol (>= 3.17.0)
221
+ parallel (~> 1.10)
222
+ parser (>= 3.2.2.4)
223
+ rainbow (>= 2.2.2, < 4.0)
224
+ regexp_parser (>= 1.8, < 3.0)
225
+ rexml (>= 3.2.5, < 4.0)
226
+ rubocop-ast (>= 1.28.1, < 2.0)
227
+ ruby-progressbar (~> 1.7)
228
+ unicode-display_width (>= 2.4.0, < 3.0)
229
+ rubocop-ast (1.30.0)
230
+ parser (>= 3.2.1.0)
231
+ rubocop-capybara (2.19.0)
232
+ rubocop (~> 1.41)
233
+ rubocop-factory_bot (2.24.0)
234
+ rubocop (~> 1.33)
235
+ rubocop-performance (1.19.1)
236
+ rubocop (>= 1.7.0, < 2.0)
237
+ rubocop-ast (>= 0.4.0)
238
+ rubocop-rspec (2.25.0)
239
+ rubocop (~> 1.40)
240
+ rubocop-capybara (~> 2.17)
241
+ rubocop-factory_bot (~> 2.22)
242
+ ruby-progressbar (1.13.0)
243
+ ruby2_keywords (0.0.5)
244
+ standard (1.32.0)
245
+ language_server-protocol (~> 3.17.0.2)
246
+ lint_roller (~> 1.0)
247
+ rubocop (~> 1.57.2)
248
+ standard-custom (~> 1.0.0)
249
+ standard-performance (~> 1.2)
250
+ standard-custom (1.0.2)
251
+ lint_roller (~> 1.0)
252
+ rubocop (~> 1.50)
253
+ standard-performance (1.2.1)
254
+ lint_roller (~> 1.1)
255
+ rubocop-performance (~> 1.19.1)
256
+ stringio (3.1.0)
257
+ thor (1.3.0)
258
+ timeout (0.4.1)
259
+ tzinfo (2.0.6)
260
+ concurrent-ruby (~> 1.0)
261
+ unicode-display_width (2.5.0)
262
+ webrick (1.8.1)
263
+ websocket-driver (0.7.6)
264
+ websocket-extensions (>= 0.1.0)
265
+ websocket-extensions (0.1.5)
266
+ zeitwerk (2.6.12)
267
+
268
+ PLATFORMS
269
+ x86_64-linux
270
+
271
+ DEPENDENCIES
272
+ esse!
273
+ esse-jbuilder!
274
+ esse-rspec
275
+ jbuilder (~> 2.11, >= 2.11.5)
276
+ pry
277
+ rails (~> 7.1)
278
+ rspec
279
+ rubocop
280
+ rubocop-performance
281
+ rubocop-rspec
282
+ standard
283
+
284
+ BUNDLED WITH
285
+ 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,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Esse
4
+ module Jbuilder
5
+ class SearchRequestView < ::ActionView::Base
6
+ def initialize(assings = {})
7
+ lookup_context = ::ActionView::LookupContext.new(Esse.config.search_view_path)
8
+ super(lookup_context, assings, nil)
9
+ end
10
+
11
+ def compiled_method_container
12
+ self.class
13
+ end
14
+ end
15
+ end
16
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Esse
4
4
  module Jbuilder
5
- VERSION = "0.0.2"
5
+ VERSION = "0.0.3"
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
metadata CHANGED
@@ -1,14 +1,14 @@
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.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcos G. Zimmermann
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-11-27 00:00:00.000000000 Z
11
+ date: 2023-11-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: esse
@@ -138,10 +138,15 @@ files:
138
138
  - Rakefile
139
139
  - ci/Gemfile.rails-5.2
140
140
  - ci/Gemfile.rails-5.2.lock
141
+ - ci/Gemfile.rails-6.1
142
+ - ci/Gemfile.rails-6.1.lock
143
+ - ci/Gemfile.rails-7.1
144
+ - ci/Gemfile.rails-7.1.lock
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