snails 0.8.1 → 0.9.0
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 +4 -4
- data/.gitignore +2 -0
- data/Gemfile +1 -1
- data/example/app.rb +1 -3
- data/example/app2.rb +1 -3
- data/example/boot.rb +7 -0
- data/example/config.ru +0 -4
- data/lib/snails/app.rb +12 -2
- data/lib/snails/mailer.rb +1 -2
- data/lib/snails.rb +1 -0
- data/snails.gemspec +1 -1
- metadata +8 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5bd58d0b9693a06138e4c59111c6549648cedd24187bf8edaf751c2d9631824f
|
4
|
+
data.tar.gz: b80ef3591f34a1ac4e8e0180192e3721025a9223f82ce92832cd515dcc49a3a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e6497eed09aa83b446ff727d9590418a8a9963cb75cfa85db83671360c3526b49d0adc70817325b44147932578416adaa6faf8a03e4bb44c1d71373afb94adb
|
7
|
+
data.tar.gz: 7d77f6f64280dba88e152dc56f9c41569df7a75fbb95ca37d6a6be68670d0e6a117f4d3ac2efae5a662c7924271ab95e111a6068d046d748e0dffe93a0e4d628
|
data/.gitignore
CHANGED
data/Gemfile
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
source
|
1
|
+
source 'https://rubygems.org'
|
2
2
|
gemspec # specified in gemspec
|
data/example/app.rb
CHANGED
data/example/app2.rb
CHANGED
data/example/boot.rb
ADDED
data/example/config.ru
CHANGED
data/lib/snails/app.rb
CHANGED
@@ -107,7 +107,6 @@ module Snails
|
|
107
107
|
app.set :assets_precompile, app.setting(:assets_precompile, %w(js/main.js css/main.css))
|
108
108
|
app.set :assets_remove_digests, app.setting(:assets_remove_digests, false)
|
109
109
|
|
110
|
-
|
111
110
|
app.configure do
|
112
111
|
app.assets_paths.each do |path|
|
113
112
|
app.sprockets.append_path cwd.join(path)
|
@@ -348,9 +347,17 @@ module Snails
|
|
348
347
|
|
349
348
|
def partial(name, opts = {})
|
350
349
|
partial_name = name.to_s["/"] ? name.to_s.reverse.sub("/", "_/").reverse : "_#{name}"
|
351
|
-
|
350
|
+
locals = opts.delete(:locals) || {}
|
351
|
+
erb(partial_name.to_sym, { layout: false }.merge(opts), locals)
|
352
352
|
end
|
353
353
|
|
354
|
+
# Possible render options are:
|
355
|
+
# :content_type The content type to use, same arguments as content_type.
|
356
|
+
# :layout If set to something falsy, no layout is rendered, otherwise the specified layout is used (Ignored for sass)
|
357
|
+
# :layout_engine Engine to use for rendering the layout. :locals A hash with local variables that should be available in the template
|
358
|
+
# :scope If set, template is evaluate with the binding of the given object rather than the application instance.
|
359
|
+
# :views Views directory to use.
|
360
|
+
|
354
361
|
def view(view_name, opts = {})
|
355
362
|
layout = request.xhr? ? false : true
|
356
363
|
erb(view_name.to_sym, { layout: layout }.merge(opts))
|
@@ -398,6 +405,9 @@ module Snails
|
|
398
405
|
path: app.setting(:session_path, '/'),
|
399
406
|
domain: app.setting(:session_domain, nil),
|
400
407
|
expire_after: app.setting(:session_expire_after, 2592000), # one month in seconds
|
408
|
+
same_site: app.setting(:session_same_site, false),
|
409
|
+
http_only: app.setting(:session_http_only, nil),
|
410
|
+
secure: app.setting(:session_secure, false),
|
401
411
|
secret: app.session_secret # uses previous set :session_secret or generates one
|
402
412
|
}
|
403
413
|
|
data/lib/snails/mailer.rb
CHANGED
@@ -2,6 +2,7 @@ require 'snails/util'
|
|
2
2
|
require 'erb'
|
3
3
|
require 'tilt/erb'
|
4
4
|
require 'snails'
|
5
|
+
require 'stringio'
|
5
6
|
|
6
7
|
module Snails
|
7
8
|
|
@@ -169,8 +170,6 @@ A <%= @exception.class %> occurred in <%= @url %>:
|
|
169
170
|
def initialize(config = {})
|
170
171
|
@debug = config[:debug]
|
171
172
|
|
172
|
-
puts "-- #{config.inspect}"
|
173
|
-
|
174
173
|
if key = config.dig(:dkim, :private_key) and File.exist?(key)
|
175
174
|
config[:dkim][:private_key] = IO.read(key)
|
176
175
|
elsif config[:dkim]
|
data/lib/snails.rb
CHANGED
data/snails.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: snails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomás Pollak
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-07-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -156,6 +156,7 @@ files:
|
|
156
156
|
- example/Rakefile
|
157
157
|
- example/app.rb
|
158
158
|
- example/app2.rb
|
159
|
+
- example/boot.rb
|
159
160
|
- example/config.ru
|
160
161
|
- lib/snails.rb
|
161
162
|
- lib/snails/app.rb
|
@@ -167,10 +168,10 @@ files:
|
|
167
168
|
- lib/snails/util.rb
|
168
169
|
- snails.gemspec
|
169
170
|
- spec/app_spec.rb
|
170
|
-
homepage:
|
171
|
+
homepage:
|
171
172
|
licenses: []
|
172
173
|
metadata: {}
|
173
|
-
post_install_message:
|
174
|
+
post_install_message:
|
174
175
|
rdoc_options: []
|
175
176
|
require_paths:
|
176
177
|
- lib
|
@@ -185,8 +186,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
185
186
|
- !ruby/object:Gem::Version
|
186
187
|
version: 1.3.6
|
187
188
|
requirements: []
|
188
|
-
rubygems_version: 3.
|
189
|
-
signing_key:
|
189
|
+
rubygems_version: 3.5.3
|
190
|
+
signing_key:
|
190
191
|
specification_version: 4
|
191
192
|
summary: Ruby on Snails.
|
192
193
|
test_files: []
|