decko 0.13.3 → 0.14.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/environments/cucumber.rb +1 -1
- data/config/initializers/cypress.rb +1 -0
- data/lib/card_controller/mark.rb +2 -1
- data/lib/card_controller/response.rb +2 -1
- data/lib/card_controller/rest.rb +5 -3
- data/lib/decko/commands.rb +15 -10
- data/lib/decko/generators.rb +0 -14
- data/lib/decko/mods_spec_helper.rb +0 -4
- data/lib/generators/deck/deck_generator.rb +1 -0
- data/lib/rake_tasks/decko/seed.rake +16 -44
- data/lib/rake_tasks/decko.rake +5 -4
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3c6db755b2db7ac79e35bb2b9d5f2b8b38edaeb528985cd00631c5b0e6f883e2
|
4
|
+
data.tar.gz: 7a6b0e083047509d211e77a8fd68e5c22bc2bc081d40c933f3777ee17e498aa3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04ad5d539b80b8c5ae27f2c1bcc8d716c6a4a5ec36283410797320896f861a8124e141901bcdd0cc7e45522c46d516840c155e20b0812f6182353cd131c8c50c
|
7
|
+
data.tar.gz: bb637881c97f37183f475c952ee2af0ef71b5cc8089bbd854d729d72a9963c54038ace067b2ec238a9215daab02d97bd41114d1356d1a55c6830af905114ce8a
|
data/lib/card_controller/mark.rb
CHANGED
@@ -21,7 +21,8 @@ class CardController
|
|
21
21
|
|
22
22
|
def explicit_mark mark
|
23
23
|
# we should find the place where we produce these bad urls
|
24
|
-
mark.valid_encoding? ? mark : mark.force_encoding("ISO-8859-1").encode("UTF-8")
|
24
|
+
# mark.valid_encoding? ? mark : mark.force_encoding("ISO-8859-1").encode("UTF-8")
|
25
|
+
mark
|
25
26
|
end
|
26
27
|
|
27
28
|
def implicit_mark
|
data/lib/card_controller/rest.rb
CHANGED
@@ -29,9 +29,9 @@ class CardController
|
|
29
29
|
private
|
30
30
|
|
31
31
|
def setup
|
32
|
-
Card::
|
32
|
+
Card::Assets.refresh_assets unless params[:explicit_file]
|
33
33
|
Card::Cache.renew
|
34
|
-
Card::Env.reset
|
34
|
+
Card::Env.reset self
|
35
35
|
end
|
36
36
|
|
37
37
|
def authenticate
|
@@ -39,6 +39,8 @@ class CardController
|
|
39
39
|
end
|
40
40
|
|
41
41
|
def authenticators
|
42
|
+
return {} unless request
|
43
|
+
|
42
44
|
{ token: token_from_header || params[:token] }
|
43
45
|
end
|
44
46
|
|
@@ -62,7 +64,7 @@ class CardController
|
|
62
64
|
|
63
65
|
# TODO: refactor this away this when new layout handling is ready
|
64
66
|
def record_as_main
|
65
|
-
Card::Env
|
67
|
+
Card::Env.main_name = params[:main] || card&.name || ""
|
66
68
|
end
|
67
69
|
|
68
70
|
def refresh_card
|
data/lib/decko/commands.rb
CHANGED
@@ -4,23 +4,28 @@ require "cardio/commands"
|
|
4
4
|
|
5
5
|
module Decko
|
6
6
|
class Commands < Cardio::Commands
|
7
|
-
|
7
|
+
def map
|
8
|
+
@map ||= super.merge(
|
9
|
+
server: { desc: "start a local web server", group: :shark, alias: :s },
|
10
|
+
cucumber: { desc: "run cucumber tests", group: :monkey, alias: :cc, via: :call}
|
11
|
+
)
|
12
|
+
end
|
13
|
+
|
14
|
+
def generator_requirement
|
15
|
+
"decko/generators"
|
16
|
+
end
|
8
17
|
|
9
|
-
|
10
|
-
|
18
|
+
def gem
|
19
|
+
"decko"
|
20
|
+
end
|
11
21
|
|
12
22
|
def run_cucumber
|
13
23
|
require "decko/commands/cucumber_command"
|
14
24
|
CucumberCommand.new(args).run
|
15
25
|
end
|
16
26
|
|
17
|
-
def
|
18
|
-
"
|
19
|
-
end
|
20
|
-
|
21
|
-
def run_rails
|
22
|
-
require "decko/generators" if command == "generate"
|
23
|
-
super
|
27
|
+
def run_version
|
28
|
+
puts "Decko #{Cardio::Version.release}".light_cyan
|
24
29
|
end
|
25
30
|
|
26
31
|
new(ARGV).run
|
data/lib/decko/generators.rb
CHANGED
@@ -1,17 +1,3 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
2
|
|
3
3
|
require "cardio/generators"
|
4
|
-
require "cardio/generators/class_methods"
|
5
|
-
|
6
|
-
# note: despite the decko file name the base class is Cardio
|
7
|
-
module Cardio
|
8
|
-
module Generators
|
9
|
-
# main definition of this module is in card gem
|
10
|
-
module ClassMethods
|
11
|
-
# generator USAGE docs will use "decko" rather than "card" when called with decko
|
12
|
-
def banner_command
|
13
|
-
"decko"
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
@@ -15,10 +15,6 @@ CardSpecLoader.prefork do
|
|
15
15
|
CardSpecLoader.rspec_config
|
16
16
|
end
|
17
17
|
|
18
|
-
CardSpecLoader.each_run do
|
19
|
-
# This code will be run each time you run your specs.
|
20
|
-
end
|
21
|
-
|
22
18
|
CardSpecLoader.helper
|
23
19
|
|
24
20
|
Decko::ModsSpecHelper = :needs_a_value_so_spring_loader_is_happy
|
@@ -6,7 +6,9 @@ namespace :decko do
|
|
6
6
|
task update: :environment do
|
7
7
|
ENV["STAMP_MIGRATIONS"] = "true"
|
8
8
|
ENV["GENERATE_FIXTURES"] = "true"
|
9
|
-
%w[reseed update
|
9
|
+
%w[reseed update
|
10
|
+
mod:uninstall mod:install seed:make_asset_output_coded
|
11
|
+
seed:clean seed:supplement seed:dump].each do |task|
|
10
12
|
Rake::Task["decko:#{task}"].invoke
|
11
13
|
end
|
12
14
|
end
|
@@ -24,7 +26,8 @@ namespace :decko do
|
|
24
26
|
# change actors so we can delete unwanted user cards that made changes
|
25
27
|
Card::Act.update_all actor_id: Card::WagnBotID
|
26
28
|
delete_ignored_cards
|
27
|
-
|
29
|
+
refresh_assets
|
30
|
+
Card::Assets.make_output_coded
|
28
31
|
# clean_unwanted_cards
|
29
32
|
Card.empty_trash
|
30
33
|
end
|
@@ -41,53 +44,22 @@ namespace :decko do
|
|
41
44
|
end
|
42
45
|
end
|
43
46
|
|
44
|
-
task
|
45
|
-
|
47
|
+
task refresh_assets: :environment do
|
48
|
+
refresh_assets
|
46
49
|
end
|
47
50
|
|
48
|
-
def
|
49
|
-
puts "
|
50
|
-
Card::
|
51
|
-
|
52
|
-
clean_inputs_and_outputs
|
53
|
-
end
|
54
|
-
|
55
|
-
def reseed_machine_output
|
56
|
-
machine_seed_names.each do |name|
|
57
|
-
puts "coding machine output for #{name}"
|
58
|
-
Card[name].make_machine_output_coded
|
59
|
-
end
|
60
|
-
Card.search(type_id: Card::ModScriptAssetsID) do |card|
|
61
|
-
card.make_machine_output_coded true
|
62
|
-
end
|
63
|
-
end
|
64
|
-
|
65
|
-
def clean_inputs_and_outputs
|
66
|
-
# FIXME: can this be associated with the machine module somehow?
|
67
|
-
%w[machine_input machine_output machine_cache].each do |codename|
|
68
|
-
Card.search(right: { codename: codename }).each do |card|
|
69
|
-
FileUtils.rm_rf File.join("files", card.id.to_s), secure: true
|
70
|
-
next if reserved_output? card.name
|
71
|
-
|
72
|
-
card.delete!
|
73
|
-
end
|
51
|
+
def refresh_assets
|
52
|
+
puts "refresh assets"
|
53
|
+
Card::Auth.as_bot do
|
54
|
+
Card.where(right_id: :asset_input.card_id).delete_all
|
74
55
|
end
|
56
|
+
Card::Cache.reset_all
|
57
|
+
Cardio.config.compress_assets = true
|
58
|
+
Card::Assets.refresh_assets force: true
|
75
59
|
end
|
76
60
|
|
77
|
-
|
78
|
-
|
79
|
-
(name.right_name.key == :machine_output.cardname.key)
|
80
|
-
end
|
81
|
-
|
82
|
-
def machine_seed_member? name
|
83
|
-
machine_seed_names.member?(name.left_name.key) || name.match(/^mod:/)
|
84
|
-
end
|
85
|
-
|
86
|
-
def machine_seed_names
|
87
|
-
@machine_seed_names ||=
|
88
|
-
[%i[all style], [:script_html5shiv_printshiv]].map do |name|
|
89
|
-
Card::Name[*name]
|
90
|
-
end
|
61
|
+
task make_asset_output_coded: :environment do
|
62
|
+
Card::Assets.make_output_coded
|
91
63
|
end
|
92
64
|
|
93
65
|
# def clean_files
|
data/lib/rake_tasks/decko.rake
CHANGED
@@ -94,13 +94,15 @@ decko_namespace = namespace :decko do
|
|
94
94
|
decko_namespace["migrate"].invoke
|
95
95
|
decko_namespace["reset_tmp"].invoke
|
96
96
|
Card::Cache.reset_all
|
97
|
+
Rake::Task["card:mod:uninstall"].invoke
|
97
98
|
Rake::Task["card:mod:install"].invoke
|
98
99
|
Rake::Task["card:mod:symlink"].invoke
|
99
100
|
end
|
100
101
|
end
|
101
102
|
|
102
|
-
|
103
|
-
|
103
|
+
%i[list symlink missing uninstall install].each do |task|
|
104
|
+
alias_task "mod:#{task}", "card:mod:#{task}"
|
105
|
+
end
|
104
106
|
alias_task :migrate, "card:migrate"
|
105
107
|
|
106
108
|
desc "insert existing card migrations into schema_migrations_cards " \
|
@@ -112,8 +114,7 @@ decko_namespace = namespace :decko do
|
|
112
114
|
|
113
115
|
def seed with_cache_reset: true
|
114
116
|
ENV["SCHEMA"] ||= "#{Cardio.gem_root}/db/schema.rb"
|
115
|
-
# FIXME: this should be an option, but should not happen on standard
|
116
|
-
# creates!
|
117
|
+
# FIXME: this should be an option, but should not happen on standard creates!
|
117
118
|
begin
|
118
119
|
Rake::Task["db:drop"].invoke
|
119
120
|
rescue StandardError
|
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.
|
4
|
+
version: 0.14.2
|
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:
|
13
|
+
date: 2022-01-08 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: actionpack
|
@@ -32,28 +32,28 @@ dependencies:
|
|
32
32
|
requirements:
|
33
33
|
- - '='
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version: 1.
|
35
|
+
version: 1.104.2
|
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.
|
42
|
+
version: 1.104.2
|
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.
|
49
|
+
version: 0.14.2
|
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.
|
56
|
+
version: 0.14.2
|
57
57
|
description: a wiki approach to structured data, dynamic interaction, and web design
|
58
58
|
email:
|
59
59
|
- info@decko.org
|
@@ -144,7 +144,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
144
144
|
- !ruby/object:Gem::Version
|
145
145
|
version: '0'
|
146
146
|
requirements: []
|
147
|
-
rubygems_version: 3.
|
147
|
+
rubygems_version: 3.2.15
|
148
148
|
signing_key:
|
149
149
|
specification_version: 4
|
150
150
|
summary: structured wiki web platform
|