card-mod-alias 0.13.1 → 0.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +18 -14
- metadata +9 -16
- data/db/migrate_cards/20210504195646_add_alias_type.rb +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9caf011a5bc830b39903912eabbf4d6b77f03dd7ff54e22d8789e7780d26ada3
|
4
|
+
data.tar.gz: 9a728a648490fdd606bf9d132b5c8e6b4dd4ab8386e3a666ea6c66d39db0cf2b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 20692fd223071dd9dbbc39fe8aa92278ac129817d11963b8c0aeb6ec0bf95bc712893dc9ea24cd4885ddcf6c00f500570a02e6b87d631074674f9531de4fb1f7
|
7
|
+
data.tar.gz: 1311cadbcea770aa2735ff37fa109e14f58ad0218f42ea781f640bb6df69aaff6cb4d1f7b7e9f17b82c24a989faae27d318f76de4b44dbf8229ede88f58e56fc
|
data/README.md
CHANGED
@@ -2,22 +2,23 @@
|
|
2
2
|
# @title README - mod: alias
|
3
3
|
-->
|
4
4
|
|
5
|
-
# Alias
|
5
|
+
# Alias mod
|
6
|
+
|
6
7
|
Enable Alias cards, which alias one simple card name to another.
|
7
8
|
|
8
|
-
The primary use case for alias cards is for handling redirects, for example after a card
|
9
|
+
The primary use case for alias cards is for handling redirects, for example after a card
|
9
10
|
has been renamed. Suppose, for example, a card's name is changed from *Former* to
|
10
11
|
*Current*. One can create an Alias card named "Former" with the content "Current". This
|
11
|
-
not only insures that links to /Former will be redirected to /Current, but it also
|
12
|
-
|
13
|
-
|
12
|
+
not only insures that links to /Former will be redirected to /Current, but it also handles
|
13
|
+
all descendants, redirecting /Former+field to /Current+field and /My+Former+Life to
|
14
|
+
/My+Current+Life.
|
14
15
|
|
15
16
|
Alias cards themselves must be simple cards and are not allowed to have children.
|
16
17
|
|
17
|
-
If a request to an alias specifies a view, eg `/Former?view=edit`, then the request
|
18
|
-
|
19
|
-
|
20
|
-
|
18
|
+
If a request to an alias specifies a view, eg `/Former?view=edit`, then the request will
|
19
|
+
not be redirected and will instead return the view of the Alias card itself. Similarly,
|
20
|
+
transactional requests (create, update, and delete) to the alias card will take effect on
|
21
|
+
the alias, not the target.
|
21
22
|
|
22
23
|
## Cards with codenames
|
23
24
|
|
@@ -28,7 +29,8 @@ will take effect on the alias, not the target.
|
|
28
29
|
## Sets with code rules
|
29
30
|
|
30
31
|
### {Card::Set::Type::Alias type: Alias}
|
31
|
-
|
32
|
+
|
33
|
+
An alias card's name is the alias's *source*, and its content is its target. So, in the
|
32
34
|
example above, the Alias card would be named *Former* and its content would be *Current*.
|
33
35
|
|
34
36
|
Content is stored as a card id.
|
@@ -48,12 +50,13 @@ Content is stored as a card id.
|
|
48
50
|
|:---------:|:------:|:-------:|
|
49
51
|
| create_alias_upon_rename | triggered | creates an alias from old name to new one |
|
50
52
|
|
51
|
-
|
52
53
|
#### HtmlFormat
|
53
|
-
|
54
|
-
|
54
|
+
|
55
|
+
Extends `#edit_name_buttons` so that when renaming, user is presented with a checkbox to
|
56
|
+
trigger the creation of an alias
|
55
57
|
|
56
58
|
### {Card::Set::AllPlus::Alias All Plus}
|
59
|
+
|
57
60
|
Handle aliasing of compound names when at least one name part is an alias.
|
58
61
|
|
59
62
|
#### Events
|
@@ -63,6 +66,7 @@ Handle aliasing of compound names when at least one name part is an alias.
|
|
63
66
|
| validate_not_alias | on save | prevents creation of deescendents of aliases |
|
64
67
|
|
65
68
|
## {CardController::Aliasing}
|
66
|
-
|
69
|
+
|
70
|
+
Module that enables card controller to handle alias-driven redirects and ensure that
|
67
71
|
transaction requests act upon the correct card (the alias when simple, the target when
|
68
72
|
compound).
|
metadata
CHANGED
@@ -1,31 +1,30 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: card-mod-alias
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: '0.14'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
- Ethan McCutchen
|
8
7
|
- Philipp Kühl
|
9
|
-
-
|
8
|
+
- Ethan McCutchen
|
10
9
|
autorequire:
|
11
10
|
bindir: bin
|
12
11
|
cert_chain: []
|
13
|
-
date: 2021-
|
12
|
+
date: 2021-10-26 00:00:00.000000000 Z
|
14
13
|
dependencies:
|
15
14
|
- !ruby/object:Gem::Dependency
|
16
15
|
name: card
|
17
16
|
requirement: !ruby/object:Gem::Requirement
|
18
17
|
requirements:
|
19
|
-
- -
|
18
|
+
- - ">="
|
20
19
|
- !ruby/object:Gem::Version
|
21
|
-
version:
|
20
|
+
version: '0'
|
22
21
|
type: :runtime
|
23
22
|
prerelease: false
|
24
23
|
version_requirements: !ruby/object:Gem::Requirement
|
25
24
|
requirements:
|
26
|
-
- -
|
25
|
+
- - ">="
|
27
26
|
- !ruby/object:Gem::Version
|
28
|
-
version:
|
27
|
+
version: '0'
|
29
28
|
description: ''
|
30
29
|
email:
|
31
30
|
- info@decko.org
|
@@ -34,21 +33,15 @@ extensions: []
|
|
34
33
|
extra_rdoc_files: []
|
35
34
|
files:
|
36
35
|
- README.md
|
37
|
-
- db/migrate_cards/20210504195646_add_alias_type.rb
|
38
36
|
- lib/card_controller/aliasing.rb
|
39
37
|
- set/all/alias.rb
|
40
38
|
- set/all/auto_alias_checkbox.haml
|
41
39
|
- set/all_plus/alias.rb
|
42
40
|
- set/type/alias.rb
|
43
|
-
homepage:
|
41
|
+
homepage: http://decko.org
|
44
42
|
licenses:
|
45
43
|
- GPL-3.0
|
46
44
|
metadata:
|
47
|
-
source_code_uri: https://github.com/decko-commons/decko
|
48
|
-
homepage_uri: https://decko.org
|
49
|
-
bug_tracker_uri: https://github.com/decko-commons/decko/issues
|
50
|
-
wiki_uri: https://decko.org
|
51
|
-
documentation_url: http://docs.decko.org/
|
52
45
|
card-mod: alias
|
53
46
|
post_install_message:
|
54
47
|
rdoc_options: []
|
@@ -65,7 +58,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
65
58
|
- !ruby/object:Gem::Version
|
66
59
|
version: '0'
|
67
60
|
requirements: []
|
68
|
-
rubygems_version: 3.
|
61
|
+
rubygems_version: 3.2.28
|
69
62
|
signing_key:
|
70
63
|
specification_version: 4
|
71
64
|
summary: Aliases
|