decko 0.6.5 → 0.6.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/images/smoothness/ui-icons_222222_256x240.png +0 -0
- data/app/assets/images/smoothness/ui-icons_2e83ff_256x240.png +0 -0
- data/app/assets/images/smoothness/ui-icons_454545_256x240.png +0 -0
- data/app/assets/images/smoothness/ui-icons_888888_256x240.png +0 -0
- data/app/assets/images/smoothness/ui-icons_cd0a0a_256x240.png +0 -0
- data/lib/decko/response.rb +5 -1
- data/rails/controllers/card_controller.rb +14 -7
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9c7470e38fb2ea83657b0a479d24ea5c682f357c
|
4
|
+
data.tar.gz: 981f6171d85c98551cbc02b3df6f65941eb9c785
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: febc67212bd21e942d57aaa635c4c270d2a2635b43f448138daf9b2cb31312cf7eda6f0ab7e28520227d57e5835aae760e8055909af0130f6574c56e1d390c61
|
7
|
+
data.tar.gz: 61bd7956343a66cc2f14fee2232aefb6eb2b99de31e6bba70a5607f7eb7f1e609bb946588958f8b157362e926ac391030962816253f3eafaea61b2deeb7e0d9f
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/lib/decko/response.rb
CHANGED
@@ -65,10 +65,14 @@ module Decko
|
|
65
65
|
# Both this file and that would make sense as submodules of CardController
|
66
66
|
|
67
67
|
def load_format
|
68
|
-
request.format = :html if
|
68
|
+
request.format = :html if implicit_html?
|
69
69
|
card.format format_name_from_params
|
70
70
|
end
|
71
71
|
|
72
|
+
def implicit_html?
|
73
|
+
(Card::Env.ajax? && !params[:format]) || request.format.to_s == "*/*"
|
74
|
+
end
|
75
|
+
|
72
76
|
def format_name_from_params
|
73
77
|
explicit_file_format? ? :file : request.format.to_sym
|
74
78
|
end
|
@@ -121,13 +121,20 @@ class CardController < ActionController::Base
|
|
121
121
|
end
|
122
122
|
end
|
123
123
|
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
124
|
+
def handle_exception exception
|
125
|
+
@card ||= Card.new
|
126
|
+
Card::Error.current = exception
|
127
|
+
error = Card::Error.cardify_exception exception, card
|
128
|
+
error.report
|
129
|
+
show error.class.view, error.class.status_code
|
130
|
+
end
|
131
|
+
|
132
|
+
class << self
|
133
|
+
def rescue_from_class klass
|
134
|
+
rescue_from(klass) { |exception| handle_exception exception }
|
131
135
|
end
|
132
136
|
end
|
137
|
+
|
138
|
+
rescue_from_class ActiveRecord::RecordInvalid
|
139
|
+
rescue_from_class(Rails.env.development? ? Card::Error::UserError : StandardError)
|
133
140
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: decko
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ethan McCutchen
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2018-11-
|
14
|
+
date: 2018-11-30 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: card
|
@@ -19,14 +19,14 @@ dependencies:
|
|
19
19
|
requirements:
|
20
20
|
- - '='
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 1.96.
|
22
|
+
version: 1.96.6
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - '='
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 1.96.
|
29
|
+
version: 1.96.6
|
30
30
|
description: a wiki approach to stuctured data, dynamic interaction, and web design
|
31
31
|
email:
|
32
32
|
- info@decko.org
|