snails 0.3.6 → 0.3.7
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/lib/snails/app.rb +6 -6
- data/snails.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2884b6fbeeb8692a10ebb8fe3851f41332a3821dfbd92f8cab779c61b93ae352
|
4
|
+
data.tar.gz: 39b6da7ab41ae0fe673a6bc3f41d6b6a23bef2721bf38877001c062bcea91734
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f61cffeadec77837e0fb22102c2e57252acd8ef9335b6ae583b3aefd6432468cd48b11807f73765a5dd46f385379057c08026c75e759e78c98a9dfa54948855
|
7
|
+
data.tar.gz: 45851a5c085d1b0033cbf2574067bca6c55036e363438a762bed68c5f95ea69f40c713d1cf1be2cfff0c07bceff4fc5618c37ae4e51b83cbed33e349463e4611
|
data/lib/snails/app.rb
CHANGED
@@ -13,7 +13,7 @@ module Snails
|
|
13
13
|
module All
|
14
14
|
|
15
15
|
# usage:
|
16
|
-
#
|
16
|
+
#
|
17
17
|
# class App < Snails::App
|
18
18
|
# register Snails::All
|
19
19
|
# end
|
@@ -99,7 +99,7 @@ module Snails
|
|
99
99
|
|
100
100
|
cwd = Pathname.new(Dir.pwd)
|
101
101
|
app.set :sprockets, Sprockets::Environment.new(cwd)
|
102
|
-
app.set :digest_assets, false
|
102
|
+
app.set :digest_assets, false
|
103
103
|
app.set :assets_prefix, app.setting(:assets_prefix, '/assets') # URL
|
104
104
|
app.set :assets_paths, app.setting(:assets_paths, %w(assets)) # source files
|
105
105
|
app.set :assets_public_path, app.setting(:assets_public_path, cwd.join('public', 'assets')) # output dir
|
@@ -308,8 +308,8 @@ module Snails
|
|
308
308
|
label = options[:label] || field.to_s.gsub('_', ' ').capitalize
|
309
309
|
example = options[:example] ? "<small class='example'>#{options[:example]}</small>" : ''
|
310
310
|
|
311
|
-
id = "#{get_model_name(object).downcase}_#{options[:key] || field}"
|
312
|
-
name = "#{get_model_name(object).downcase}[#{field}]"
|
311
|
+
id = options[:id] || "#{get_model_name(object).downcase}_#{options[:key] || field}"
|
312
|
+
name = options[:name] || "#{get_model_name(object).downcase}[#{field}]"
|
313
313
|
label = options[:label] == false ? '' : "<label for='#{id}'>#{label}#{example}</label>\n"
|
314
314
|
|
315
315
|
@tabindex = @tabindex ? @tabindex + 1 : 1
|
@@ -381,7 +381,7 @@ module Snails
|
|
381
381
|
|
382
382
|
def self.registered(app)
|
383
383
|
app.set :sessions, {
|
384
|
-
key: app.setting(:session_key, 'snails.session'),
|
384
|
+
key: app.setting(:session_key, 'snails.session'),
|
385
385
|
path: app.setting(:session_path, '/'),
|
386
386
|
expire_after: app.setting(:session_expire_after, 2592000), # one month in seconds
|
387
387
|
secret: app.session_secret # uses previous set :session_secret or generates one
|
@@ -411,7 +411,7 @@ module Snails
|
|
411
411
|
enable :logging
|
412
412
|
|
413
413
|
use Rack::CommonLogger, Snails.logger
|
414
|
-
use Rack::Static, urls: static_paths, root: 'public' unless Snails.env.production?
|
414
|
+
use Rack::Static, urls: static_paths, root: 'public' unless Snails.env.production?
|
415
415
|
|
416
416
|
configure :production, :staging do
|
417
417
|
set :raise_errors, true
|
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.3.
|
4
|
+
version: 0.3.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomás Pollak
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-08-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|