decko 0.11.3 → 0.11.4
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 98dd5887f73f65f3b84bab40ddf902f93c56dfbfeea2da826d8eaa2aee9d7bd4
|
4
|
+
data.tar.gz: b4c0bdf1ee67823675b78aa04ab11dc4f69f5a6b45f35ae85775dad115b965be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a9f0f9de1c86d450689c19766436f7d001437603a55bbd7c040ce0655fd60004408357ebe5deb5577836dcb08aa2c89cfd6233066dc1812a62c4204327f9482
|
7
|
+
data.tar.gz: 61af0fa92f3dae055ca3c8278cde3a924e1882dc13dccd46d16ff130c69323396b476c5be7fca2dc560dd6b12b36f8ce5e3f6999ce3ea2f39733eb8c02f5398c
|
data/lib/decko/application.rb
CHANGED
@@ -63,7 +63,9 @@ module Decko
|
|
63
63
|
config.filter_parameters += [:password]
|
64
64
|
|
65
65
|
# Rails.autoloaders.log!
|
66
|
-
Rails.autoloaders.main.ignore(
|
66
|
+
Rails.autoloaders.main.ignore(
|
67
|
+
File.join(Cardio.gem_root, "lib/card/seed_consts.rb")
|
68
|
+
)
|
67
69
|
config
|
68
70
|
end
|
69
71
|
end
|
data/lib/decko/cli.rb
CHANGED
@@ -3,7 +3,7 @@ require "decko/script_decko_loader"
|
|
3
3
|
|
4
4
|
# If we are inside a Decko application this method performs an exec and thus
|
5
5
|
# the rest of this script is not run.
|
6
|
-
Decko::ScriptDeckoLoader.
|
6
|
+
Decko::ScriptDeckoLoader.exec!
|
7
7
|
|
8
8
|
require "rails/ruby_version_check"
|
9
9
|
Signal.trap("INT") { puts; exit(1) }
|
@@ -36,11 +36,11 @@ module <%= app_const_base %>
|
|
36
36
|
# CACHING
|
37
37
|
# config.cache_store = :file_store, "tmp/cache"
|
38
38
|
# determines caching mechanism. options include: file_store, memory_store,
|
39
|
-
# mem_cache_store
|
39
|
+
# mem_cache_store...
|
40
40
|
#
|
41
41
|
# for production, we highly recommend memcache
|
42
42
|
# here's a sample configuration for use with the dalli gem
|
43
|
-
# config.cache_store = :
|
43
|
+
# config.cache_store = :mem_cache_store, []
|
44
44
|
|
45
45
|
|
46
46
|
# FILES
|
data/lib/decko/response.rb
CHANGED
@@ -75,12 +75,6 @@ module Decko
|
|
75
75
|
raise Card::Error, "tried to do soft redirect without a card"
|
76
76
|
end
|
77
77
|
|
78
|
-
# (obviously) deprecated
|
79
|
-
def send_deprecated_asset
|
80
|
-
filename = [params[:mark], params[:format]].compact.join(".")
|
81
|
-
send_file asset_file_path(filename), x_sendfile: true
|
82
|
-
end
|
83
|
-
|
84
78
|
def asset_file_path filename
|
85
79
|
path = Decko::Engine.paths["gem-assets"].existent.first
|
86
80
|
path = File.join path, filename
|
@@ -6,26 +6,40 @@ module Decko
|
|
6
6
|
RbConfig::CONFIG["EXEEXT"]
|
7
7
|
SCRIPT_DECKO = File.join("script", "decko")
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
9
|
+
class << self
|
10
|
+
def exec!
|
11
|
+
cwd = Dir.pwd
|
12
|
+
return unless continue?
|
13
|
+
exec_decko_script
|
14
|
+
recurse cwd
|
15
|
+
rescue SystemCallError
|
16
|
+
# could not chdir, no problem just return
|
17
17
|
end
|
18
|
-
rescue SystemCallError
|
19
|
-
# could not chdir, no problem just return
|
20
|
-
end
|
21
18
|
|
22
|
-
|
23
|
-
|
24
|
-
|
19
|
+
def recurse cwd
|
20
|
+
Dir.chdir("..") do
|
21
|
+
# Recurse in a chdir block: if the search fails we want to be sure
|
22
|
+
# the application is generated in the original working directory.
|
23
|
+
exec! unless cwd == Dir.pwd
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
def exec_decko_script
|
28
|
+
exec RUBY, SCRIPT_DECKO, *ARGV if in_application?
|
29
|
+
end
|
25
30
|
|
26
|
-
|
27
|
-
|
28
|
-
|
31
|
+
def continue?
|
32
|
+
in_application? || in_application_subdirectory?
|
33
|
+
end
|
34
|
+
|
35
|
+
def in_application?
|
36
|
+
File.exist?(SCRIPT_DECKO)
|
37
|
+
end
|
38
|
+
|
39
|
+
def in_application_subdirectory? path=Pathname.new(Dir.pwd)
|
40
|
+
File.exist?(File.join(path, SCRIPT_DECKO)) ||
|
41
|
+
!path.root? && in_application_subdirectory?(path.parent)
|
42
|
+
end
|
29
43
|
end
|
30
44
|
end
|
31
45
|
end
|
@@ -29,11 +29,10 @@ class CardController < ApplicationController
|
|
29
29
|
handle { card.delete! }
|
30
30
|
end
|
31
31
|
|
32
|
-
# @deprecated
|
33
32
|
def asset
|
34
|
-
|
35
|
-
|
36
|
-
|
33
|
+
body = "Decko installation error: missing asset symlinks"
|
34
|
+
Rails.logger.info "#{body}.\n >>> Try `rake decko:update_assets_symlink`"
|
35
|
+
render body: body, status: 404
|
37
36
|
end
|
38
37
|
|
39
38
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
@@ -57,7 +56,7 @@ class CardController < ApplicationController
|
|
57
56
|
end
|
58
57
|
|
59
58
|
def authenticate
|
60
|
-
Card::Auth.signin_with
|
59
|
+
Card::Auth.signin_with params
|
61
60
|
end
|
62
61
|
|
63
62
|
def load_mark
|
@@ -117,6 +116,7 @@ class CardController < ApplicationController
|
|
117
116
|
end
|
118
117
|
|
119
118
|
def view_from_params
|
120
|
-
|
119
|
+
%i[view v].each { |k| return params[k] if params[k].present? }
|
120
|
+
nil
|
121
121
|
end
|
122
122
|
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.11.
|
4
|
+
version: 0.11.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ethan McCutchen
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2021-
|
13
|
+
date: 2021-05-05 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: card
|
@@ -18,28 +18,28 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - '='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 1.101.
|
21
|
+
version: 1.101.4
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
26
|
- - '='
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version: 1.101.
|
28
|
+
version: 1.101.4
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: card-mod-defaults
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
32
32
|
requirements:
|
33
33
|
- - '='
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version: 0.11.
|
35
|
+
version: 0.11.4
|
36
36
|
type: :runtime
|
37
37
|
prerelease: false
|
38
38
|
version_requirements: !ruby/object:Gem::Requirement
|
39
39
|
requirements:
|
40
40
|
- - '='
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: 0.11.
|
42
|
+
version: 0.11.4
|
43
43
|
description: a wiki approach to structured data, dynamic interaction, and web design
|
44
44
|
email:
|
45
45
|
- info@decko.org
|