decko 0.9.1 → 0.9.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/decko/application.rb +7 -5
- data/lib/decko/config/environments/cypress.rb +7 -7
- data/lib/decko/config/environments/development.rb +11 -9
- data/lib/decko/engine.rb +2 -1
- data/lib/decko/generators/decko/templates/Gemfile +0 -1
- data/lib/decko/tasks/decko.rake +1 -1
- data/rails/controllers/card_controller.rb +7 -10
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0009a6016bd8f767f1d76e388b713edad0abcaaf85a6c77c6bdc03e83c8407d4'
|
4
|
+
data.tar.gz: 802012ba6e744887a7b2f6a00e38ee0e9f981a39cdf384511806b76f8703d77d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 36a24c6d78443dd2a9b8fdda3b7ea47b0fb613bb8ae1d3da9d886bfea541d7bb2514f176ecf997940cb40f5f677bc810ac021e9cd185135697a23924a53155ab
|
7
|
+
data.tar.gz: 2e4b4e98775847928a52f39f5597eb2814c9c2fc83deee743a2eac3c4fdcc51b5f31c9a810e9cd7e495664d60ac5530f15072f8244f7d290764484899f5e2af2
|
data/lib/decko/application.rb
CHANGED
@@ -20,10 +20,6 @@ module Decko
|
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
23
|
-
initializer :load_card, after: :load_config_initializers, group: :all do
|
24
|
-
Card if Cardio.load_card?
|
25
|
-
end
|
26
|
-
|
27
23
|
class << self
|
28
24
|
def inherited base
|
29
25
|
super
|
@@ -53,12 +49,15 @@ module Decko
|
|
53
49
|
# therefore, in general, they should be restricted to settings that
|
54
50
|
# (1) are specific to the web environment, and
|
55
51
|
# (2) should not be overridden
|
56
|
-
#
|
52
|
+
# ..and we should address (c) above!
|
57
53
|
|
58
54
|
# general card settings (overridable and not) should be in cardio.rb
|
59
55
|
# overridable decko-specific settings don't have a place yet
|
60
56
|
# but should probably follow the cardio pattern.
|
61
57
|
|
58
|
+
# config.load_defaults "6.0"
|
59
|
+
config.autoloader = :zeitwerk
|
60
|
+
config.load_default = "6.0"
|
62
61
|
config.i18n.enforce_available_locales = true
|
63
62
|
# config.active_record.raise_in_transactional_callbacks = true
|
64
63
|
|
@@ -67,6 +66,9 @@ module Decko
|
|
67
66
|
config.assets.version = "1.0"
|
68
67
|
|
69
68
|
config.filter_parameters += [:password]
|
69
|
+
|
70
|
+
# Rails.autoloaders.log!
|
71
|
+
Rails.autoloaders.main.ignore(File.join(Cardio.gem_root, "lib/card/seed_consts.rb"))
|
70
72
|
config
|
71
73
|
end
|
72
74
|
end
|
@@ -20,13 +20,13 @@ Decko.application.class.configure do
|
|
20
20
|
config.cache_classes = false
|
21
21
|
config.reload_classes_only_on_change = false
|
22
22
|
|
23
|
-
if defined?(RailsDevTweaks)
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
end
|
23
|
+
# if defined?(RailsDevTweaks)
|
24
|
+
# config.dev_tweaks.autoload_rules do
|
25
|
+
# skip "/files"
|
26
|
+
# skip "/favicon.ico"
|
27
|
+
# skip /view\=status/
|
28
|
+
# end
|
29
|
+
# end
|
30
30
|
|
31
31
|
# Log error messages when you accidentally call methods on nil.
|
32
32
|
config.whiny_nils = true
|
@@ -20,15 +20,17 @@ Decko.application.class.configure do
|
|
20
20
|
# every request. This slows down response time but is perfect for development
|
21
21
|
# since you don't have to restart the web server when you make code changes.
|
22
22
|
config.cache_classes = false
|
23
|
-
config.reload_classes_only_on_change =
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
23
|
+
config.reload_classes_only_on_change = true
|
24
|
+
|
25
|
+
config.reload_sets = true
|
26
|
+
|
27
|
+
# if defined?(RailsDevTweaks)
|
28
|
+
# config.dev_tweaks.autoload_rules do
|
29
|
+
# skip "/files"
|
30
|
+
# skip "/favicon.ico"
|
31
|
+
# skip /view\=status/
|
32
|
+
# end
|
33
|
+
# end
|
32
34
|
|
33
35
|
# Log error messages when you accidentally call methods on nil.
|
34
36
|
config.whiny_nils = true
|
data/lib/decko/engine.rb
CHANGED
@@ -48,7 +48,8 @@ module Decko
|
|
48
48
|
ActiveRecord::Base.establish_connection(::Rails.env.to_sym)
|
49
49
|
end
|
50
50
|
ActiveSupport.on_load(:after_initialize) do
|
51
|
-
|
51
|
+
# require "card" if Cardio.load_card?
|
52
|
+
Card if Cardio.load_card?
|
52
53
|
rescue ActiveRecord::StatementInvalid => e
|
53
54
|
::Rails.logger.warn "database not available[#{::Rails.env}] #{e}"
|
54
55
|
end
|
data/lib/decko/tasks/decko.rake
CHANGED
@@ -171,7 +171,7 @@ decko_namespace = namespace :decko do
|
|
171
171
|
follower_hash.each do |user, items|
|
172
172
|
next unless (card = Card.fetch(user)) && card.account
|
173
173
|
Card::Auth.as(user) do
|
174
|
-
following = card.fetch
|
174
|
+
following = card.fetch "following", new: {}
|
175
175
|
following.items = items
|
176
176
|
end
|
177
177
|
end
|
@@ -1,15 +1,10 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
2
|
|
3
|
-
require_dependency "card"
|
4
|
-
require_dependency "decko/response"
|
5
|
-
require_dependency "card/mailer" # otherwise Net::SMTPError rescues can cause
|
6
|
-
# problems when error raised comes before Card::Mailer is mentioned
|
7
|
-
|
8
3
|
# Decko's only controller.
|
9
4
|
class CardController < ApplicationController
|
10
|
-
include Card::Env::Location
|
11
|
-
include Recaptcha::Verify
|
12
|
-
include Decko::Response
|
5
|
+
include ::Card::Env::Location
|
6
|
+
include ::Recaptcha::Verify
|
7
|
+
include ::Decko::Response
|
13
8
|
|
14
9
|
layout nil
|
15
10
|
attr_reader :card
|
@@ -55,13 +50,14 @@ class CardController < ApplicationController
|
|
55
50
|
before_action :refresh_card, only: [:create, :update, :delete]
|
56
51
|
|
57
52
|
def setup
|
53
|
+
Card::Mod::Loader.reload_sets if Cardio.config.reload_sets
|
58
54
|
Card::Machine.refresh_script_and_style unless params[:explicit_file]
|
59
55
|
Card::Cache.renew
|
60
56
|
Card::Env.reset controller: self
|
61
57
|
end
|
62
58
|
|
63
59
|
def authenticate
|
64
|
-
Card::Auth.
|
60
|
+
Card::Auth.signin_with token: params[:token], api_key: params[:api_key]
|
65
61
|
end
|
66
62
|
|
67
63
|
def load_mark
|
@@ -136,6 +132,7 @@ class CardController < ApplicationController
|
|
136
132
|
def debug_exception? e
|
137
133
|
!e.is_a?(Card::Error::UserError) &&
|
138
134
|
!e.is_a?(ActiveRecord::RecordInvalid) &&
|
135
|
+
Card::Codename[:debugger] &&
|
139
136
|
Card[:debugger]&.content =~ /on/ # && !Card::Env.ajax?
|
140
137
|
end
|
141
138
|
|
@@ -147,7 +144,7 @@ class CardController < ApplicationController
|
|
147
144
|
end
|
148
145
|
|
149
146
|
def rescue_all?
|
150
|
-
|
147
|
+
Cardio.config.rescue_all_in_controller
|
151
148
|
end
|
152
149
|
end
|
153
150
|
|
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.9.
|
4
|
+
version: 0.9.2
|
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:
|
14
|
+
date: 2020-02-12 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.99.
|
22
|
+
version: 1.99.2
|
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.99.
|
29
|
+
version: 1.99.2
|
30
30
|
description: a wiki approach to stuctured data, dynamic interaction, and web design
|
31
31
|
email:
|
32
32
|
- info@decko.org
|