decko 0.16.0 → 0.18.0

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: cb2ef3c75e49f6ec50882c377983937ab0abc26bae51fff8485e6f4596e17165
4
- data.tar.gz: 2824c5962c35521bffb04f7cbec13f749197ec785e5a17cdcc7e681a316982b3
3
+ metadata.gz: f7f8865405246a2f98333824a9cb519cffa31b15b17b484c31100e02ccb4a33c
4
+ data.tar.gz: c8fa8770a4c07b0ae4130a0c416767a9a3cce5fe61c07ce34218601a4199017b
5
5
  SHA512:
6
- metadata.gz: a8816b93e93a81c5612101fd5a8e70f29ea19bd2372b3dbb1b1f07948b3b3ce9c0297e2a008709608edf84d4869292783ce5a81a2edad729d09f896d8542529d
7
- data.tar.gz: c4541b11102aefcc3877af7b3f90e1948034333d7654ed552625ce3fc0011271c726b71dd02b383f3f7472b00816a4c3d358e06692be852fc384bb4b0829fa3d
6
+ metadata.gz: 7a3cf9fb3aeb955c271b8fc181b26931df13849a68c3c825b0d88446221f30a36202859347d75a3fe9be26c0070ad316ed7ca8199be37486116d1ec88080b811
7
+ data.tar.gz: 2b53e0d42c7ce6d56723a87f20910d1b5273db62b22ddc2b0115d9d65a378b15b0f77f9f016d8cd34471efef968c957faec48d7f8be027cfa43b3ef22bb6a2f1
@@ -14,7 +14,7 @@ Decko.application.class.configure do
14
14
  # For more information see https://rspec.lighthouseapp.com/projects/16211/tickets/165
15
15
  config.cache_classes = true
16
16
 
17
- config.prepopulate_cache = true
17
+ config.seed_cache_from_stash = true
18
18
 
19
19
  # Log error messages when you accidentally call methods on nil.
20
20
  config.whiny_nils = true
@@ -37,7 +37,6 @@ Decko.application.class.configure do
37
37
 
38
38
  config.use_transactional_fixtures = false
39
39
 
40
- config.rescue_all_in_controller = false
41
40
  config.raise_all_rendering_errors = true
42
41
 
43
42
  config.paging_limit = 10
@@ -0,0 +1,3 @@
1
+ Decko.application.class.configure do
2
+ config.rescue_all_in_controller = true
3
+ end
@@ -1,2 +1,8 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  # Be sure to restart your server when you modify this file.
3
+
4
+ # Uncomment this if we can show that cookies are not secure in production
5
+ #
6
+ # Rails.application.config.session_store :cookie_store,
7
+ # key: "_my_app_session",
8
+ # secure: Rails.env.production?
@@ -8,6 +8,7 @@ class CardController
8
8
  private
9
9
 
10
10
  def respond format, result, status
11
+ Rails.logger.info Card::Cache.tallies if Cardio.config.cache_log_level
11
12
  if status.in? [302, 303]
12
13
  hard_redirect result
13
14
  elsif format.is_a?(Card::Format::FileFormat) && status == 200
@@ -60,10 +61,6 @@ class CardController
60
61
  show
61
62
  end
62
63
 
63
- def reload
64
- render json: { reload: true }
65
- end
66
-
67
64
  def soft_redirect_params
68
65
  new_params = params.clone
69
66
  new_params.delete :card
@@ -71,6 +68,18 @@ class CardController
71
68
  new_params.merge Card::Env.success.params
72
69
  end
73
70
 
71
+ def reload
72
+ render json: { reload: true }
73
+ end
74
+
75
+ def slotter_magic_response
76
+ render json: { magic: true }
77
+ end
78
+
79
+ def slotter_magic?
80
+ params["slotter_mode"]&.in? %w[silent-success update-modal-origin update-origin]
81
+ end
82
+
74
83
  def require_card_for_soft_redirect!
75
84
  return if card.is_a? Card
76
85
 
@@ -29,8 +29,8 @@ class CardController
29
29
  private
30
30
 
31
31
  def setup
32
- Card::Assets.refresh unless params[:explicit_file]
33
32
  Card::Cache.renew
33
+ Card::Assets.refresh unless params[:explicit_file]
34
34
  Card::Env.reset self
35
35
  end
36
36
 
@@ -83,6 +83,8 @@ class CardController
83
83
  success = Card::Env.success.in_context card.name
84
84
  if success.reload?
85
85
  reload # instruct JSON to reload
86
+ elsif slotter_magic?
87
+ slotter_magic_response
86
88
  else
87
89
  redirect_cud_success success
88
90
  end
data/lib/decko/cli.rb CHANGED
@@ -6,7 +6,7 @@ Cardio::ScriptLoader.script_name = "decko"
6
6
  # the rest of this script is not run.
7
7
  Cardio::ScriptLoader.exec!
8
8
 
9
- require "rails/ruby_version_check"
9
+ # require "rails/ruby_version_check"
10
10
  Signal.trap("INT") { exit(1) }
11
11
 
12
12
  require "decko/commands/application"
data/lib/decko/railtie.rb CHANGED
@@ -4,6 +4,10 @@ module Decko
4
4
  config.assets.enabled = false
5
5
  # config.assets.version = "1.0" # does the version matter if not enabled??
6
6
 
7
+ # if false, errors that reach the controller make the app fail loudly
8
+ # if true, errors are rescued and then error messages are rendered
9
+ config.rescue_all_in_controller = false
10
+
7
11
  config.before_configuration do |app|
8
12
  gem_root = Decko.gem_root
9
13
  app.config.tap do |c|
@@ -1,7 +1,7 @@
1
1
  require "decko/application"
2
2
 
3
3
  CARD_TASKS = (
4
- %i[eat migrate reset_cache reset_tmp seed setup sow update] +
4
+ %i[eat migrate reset seed setup sow update] +
5
5
  # { assets: %i[refresh code wipe] },
6
6
  # above caused loading problem because of .sort is rails' #run_tasks_blocks
7
7
  [{ migrate: %i[schema transform redo stamp port recode] },
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.16.0
4
+ version: 0.18.0
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: 2023-11-18 00:00:00.000000000 Z
13
+ date: 2024-10-31 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: actionpack
@@ -18,42 +18,42 @@ dependencies:
18
18
  requirements:
19
19
  - - "~>"
20
20
  - !ruby/object:Gem::Version
21
- version: 6.1.4
21
+ version: '7.1'
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: 6.1.4
28
+ version: '7.1'
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: card
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
33
  - - '='
34
34
  - !ruby/object:Gem::Version
35
- version: 1.106.0
35
+ version: 1.108.0
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: 1.106.0
42
+ version: 1.108.0
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: card-mod-defaults
45
45
  requirement: !ruby/object:Gem::Requirement
46
46
  requirements:
47
47
  - - '='
48
48
  - !ruby/object:Gem::Version
49
- version: 0.16.0
49
+ version: 0.18.0
50
50
  type: :runtime
51
51
  prerelease: false
52
52
  version_requirements: !ruby/object:Gem::Requirement
53
53
  requirements:
54
54
  - - '='
55
55
  - !ruby/object:Gem::Version
56
- version: 0.16.0
56
+ version: 0.18.0
57
57
  description: a wiki approach to structured data, dynamic interaction, and web design
58
58
  email:
59
59
  - info@decko.org
@@ -85,6 +85,7 @@ files:
85
85
  - config/environments/cucumber.rb
86
86
  - config/environments/cypress.rb
87
87
  - config/environments/development.rb
88
+ - config/environments/production.rb
88
89
  - config/initializers/cypress.rb
89
90
  - config/initializers/secret_token.rb
90
91
  - config/initializers/sedate_parser.rb
@@ -116,7 +117,7 @@ files:
116
117
  - lib/rake_tasks/decko/docs.rake
117
118
  homepage: https://decko.org
118
119
  licenses:
119
- - GPL-3.0
120
+ - GPL-3.0-or-later
120
121
  metadata:
121
122
  source_code_uri: https://github.com/decko-commons/decko
122
123
  homepage_uri: https://decko.org
@@ -131,14 +132,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
131
132
  requirements:
132
133
  - - ">="
133
134
  - !ruby/object:Gem::Version
134
- version: '2.5'
135
+ version: '3.0'
135
136
  required_rubygems_version: !ruby/object:Gem::Requirement
136
137
  requirements:
137
138
  - - ">="
138
139
  - !ruby/object:Gem::Version
139
140
  version: '0'
140
141
  requirements: []
141
- rubygems_version: 3.4.10
142
+ rubygems_version: 3.5.7
142
143
  signing_key:
143
144
  specification_version: 4
144
145
  summary: structured wiki web platform