isomorfeus 2.0.22 → 2.1.0

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: f8965369603ff672e9fa4866d1dccfa533fbd3fda20362b728c28e5efbf94098
4
- data.tar.gz: d48876c922b6baaf18fab9417e3bbe6c3df4082635ef407658a21c974da1e10a
3
+ metadata.gz: 974b7780f3f86a5eda815759c0dc4a67d9dde2b3e5c463a9b014622a975bee79
4
+ data.tar.gz: fb1205fb67bc06cc306ed3e9dc96dfca45956373a2cba033434fff2092745058
5
5
  SHA512:
6
- metadata.gz: 80b066b5d51595a840f40e9f112b01892b3092d2409af89f9b46ea8e959de348002c948162c3e0dc28e7646f2fd59deab782358e408773948fed321c9332bfb6
7
- data.tar.gz: cc5de76de65997196951309b4e6ac1eed3cb2c922c1db9bbc83ad43290a7df7a5bdeb7c6a431cd17b2a80bea8f6359a0e3ae5b3aa7f472e96a24cda3d599ad49
6
+ metadata.gz: 83ef6f5e5fe5b9298afc2578f4bfef492d5bdb202e46d3f2e2cef2e3355c2b398c2ca32cd2f47f199f9e8cb4d01b39b15dbe195799d6632dd0b7f7b379b059a3
7
+ data.tar.gz: 0fee44edab8ff78f2fe70b5817fdacb48115dc3c016be2263f3fb78048ad5a1dcd9345ef1e8215a6146a6f85b11f545b2a782af74cbcb8eb55fd88482664af78
@@ -27,7 +27,7 @@ module Isomorfeus
27
27
  %w[channels components data layouts locales mail_components operations policies server].each do |isomorfeus_dir|
28
28
  create_directory(File.join('app', isomorfeus_dir))
29
29
  end
30
- create_directory('data')
30
+ create_directory('storage')
31
31
  create_directory('public')
32
32
  create_directory('spec')
33
33
  create_directory('config')
@@ -1,10 +1,10 @@
1
1
  require 'opal'
2
2
  require 'isomorfeus-redux'
3
- require 'isomorfeus-preact'
4
- require 'isomorfeus-policy'
5
3
  require 'isomorfeus-transport'
6
- require 'isomorfeus-data'
4
+ require 'isomorfeus-policy'
7
5
  require 'isomorfeus-i18n'
6
+ require 'isomorfeus-preact'
7
+ require 'isomorfeus-data'
8
8
  require 'isomorfeus-operation'
9
9
 
10
10
  require_tree 'policies', autoload: true
@@ -3,6 +3,7 @@ Isomorfeus.load_configuration(File.expand_path(File.join(__dir__, '..', '..', 'c
3
3
  class <%= roda_app_class %> < Roda
4
4
  extend Isomorfeus::Transport::Middlewares
5
5
  include Isomorfeus::PreactViewHelper
6
+ include LucidI18n::Mixin
6
7
 
7
8
  use_isomorfeus_middlewares
8
9
 
@@ -11,12 +12,6 @@ class <%= roda_app_class %> < Roda
11
12
  @@templates = {}
12
13
  @@templates_path = File.expand_path(File.join(__dir__, '..', 'layouts'))
13
14
 
14
- def locale
15
- env.http_accept_language.preferred_language_from(Isomorfeus.available_locales) ||
16
- env.http_accept_language.compatible_language_from(Isomorfeus.available_locales) ||
17
- Isomorfeus.locale
18
- end
19
-
20
15
  def page_content(env, location)
21
16
  if Isomorfeus.development?
22
17
  req = Rack::Request.new(env)
@@ -24,7 +19,7 @@ class <%= roda_app_class %> < Roda
24
19
  else
25
20
  skip_ssr = false
26
21
  end
27
- mount_component('<%= app_class %>', { location_host: env['HTTP_HOST'], location: location, locale: locale }, 'ssr.js', skip_ssr: skip_ssr)
22
+ mount_component('<%= app_class %>', { location_host: env['HTTP_HOST'], location: location, locale: current_locale }, 'ssr.js', skip_ssr: skip_ssr)
28
23
  end
29
24
 
30
25
  def render(template_name, locals: {})
@@ -57,7 +52,7 @@ class <%= roda_app_class %> < Roda
57
52
  unless Isomorfeus.production?
58
53
  r.on 'mail_preview', String do |component_name|
59
54
  component_class = component_name.camelize
60
- props = { location_host: env['HTTP_HOST'], location: '/mail_preview', locale: locale }.merge(r.params)
55
+ props = { location_host: env['HTTP_HOST'], location: '/mail_preview', locale: current_locale }.merge(r.params)
61
56
  content = mount_component(component_class, props, 'mail_components.js')
62
57
  response.status = ssr_response_status
63
58
  render('mail_preview', locals: { content: content, component_class: component_class, ssr_styles: ssr_styles })
@@ -1,3 +1,3 @@
1
1
  module Isomorfeus
2
- VERSION = '2.0.22'
2
+ VERSION = '2.1.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: isomorfeus
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.22
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Biedermann
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-12 00:00:00.000000000 Z
11
+ date: 2022-02-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -100,28 +100,28 @@ dependencies:
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: 0.14.9
103
+ version: 0.14.10
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: 0.14.9
110
+ version: 0.14.10
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: isomorfeus-preact
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: 10.6.31
117
+ version: 10.6.34
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: 10.6.31
124
+ version: 10.6.34
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: isomorfeus-redux
127
127
  requirement: !ruby/object:Gem::Requirement
@@ -142,84 +142,84 @@ dependencies:
142
142
  requirements:
143
143
  - - '='
144
144
  - !ruby/object:Gem::Version
145
- version: 2.0.22
145
+ version: 2.1.0
146
146
  type: :runtime
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - '='
151
151
  - !ruby/object:Gem::Version
152
- version: 2.0.22
152
+ version: 2.1.0
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: isomorfeus-transport
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
157
  - - '='
158
158
  - !ruby/object:Gem::Version
159
- version: 2.0.22
159
+ version: 2.1.0
160
160
  type: :runtime
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - '='
165
165
  - !ruby/object:Gem::Version
166
- version: 2.0.22
166
+ version: 2.1.0
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: isomorfeus-data
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
171
  - - '='
172
172
  - !ruby/object:Gem::Version
173
- version: 2.0.22
173
+ version: 2.1.0
174
174
  type: :runtime
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
178
  - - '='
179
179
  - !ruby/object:Gem::Version
180
- version: 2.0.22
180
+ version: 2.1.0
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: isomorfeus-i18n
183
183
  requirement: !ruby/object:Gem::Requirement
184
184
  requirements:
185
185
  - - '='
186
186
  - !ruby/object:Gem::Version
187
- version: 2.0.22
187
+ version: 2.1.0
188
188
  type: :runtime
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
192
  - - '='
193
193
  - !ruby/object:Gem::Version
194
- version: 2.0.22
194
+ version: 2.1.0
195
195
  - !ruby/object:Gem::Dependency
196
196
  name: isomorfeus-operation
197
197
  requirement: !ruby/object:Gem::Requirement
198
198
  requirements:
199
199
  - - '='
200
200
  - !ruby/object:Gem::Version
201
- version: 2.0.22
201
+ version: 2.1.0
202
202
  type: :runtime
203
203
  prerelease: false
204
204
  version_requirements: !ruby/object:Gem::Requirement
205
205
  requirements:
206
206
  - - '='
207
207
  - !ruby/object:Gem::Version
208
- version: 2.0.22
208
+ version: 2.1.0
209
209
  - !ruby/object:Gem::Dependency
210
210
  name: isomorfeus-mailer
211
211
  requirement: !ruby/object:Gem::Requirement
212
212
  requirements:
213
213
  - - '='
214
214
  - !ruby/object:Gem::Version
215
- version: 2.0.22
215
+ version: 2.1.0
216
216
  type: :runtime
217
217
  prerelease: false
218
218
  version_requirements: !ruby/object:Gem::Requirement
219
219
  requirements:
220
220
  - - '='
221
221
  - !ruby/object:Gem::Version
222
- version: 2.0.22
222
+ version: 2.1.0
223
223
  - !ruby/object:Gem::Dependency
224
224
  name: bundler
225
225
  requirement: !ruby/object:Gem::Requirement