card-mod-alias 0.13.2 → 0.15

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: 47b5badea3b74f6029fd4b286f15a134fae3a850c855bc4d90523c7e6869fd7a
4
- data.tar.gz: deda440beeda6bdb68def6fbf12da394da183d391822b0a8bccd45760f2e3702
3
+ metadata.gz: 96402c19592f4cfe22a7dabac187643173388437ee6a795395a3414a68f2ab18
4
+ data.tar.gz: f91d6830b6bfd52691d089832d5f1ba714f1dcaba1a9767634a92e0c774db116
5
5
  SHA512:
6
- metadata.gz: 6679ed2e8f74ba3a831b50f236cb3644b467280740cae3410b67e5ab72dda35f833826e4edde6221ac50b27c20e542b99fd5b24bf9bfa4584b75b4cb69d5450d
7
- data.tar.gz: 00645d56669442945c61e67e5220ee3294ac3d3ebfd72c11b55ad3cf5b263535e97b807e7db0b94702a95d0922473bc04c40fcaa3acfb6167accb73ba09c09af
6
+ metadata.gz: 70ad88e0d0dcd36041c77d4a55f760d82245142d15fa72bbd7241d3d405bb69d0ae7a9bb2457e3b240a8e1191270004d31bcb19af0d412c3f0e60f88c4643229
7
+ data.tar.gz: e7c96d1ec0dc231dba194cad6ec9594a9786e1f9488347983ff94fb823ab68eb71220e31a02f8918c51373fe47af05999fd02036ec709ed6d5b5cde96b8781ed
data/README.md CHANGED
@@ -2,22 +2,23 @@
2
2
  # @title README - mod: alias
3
3
  -->
4
4
 
5
- # Alias Mod
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
- handles all descendants, redirecting /Former+field to /Current+field and /My+Former+Life
13
- to /My+Current+Life.
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
- will not be redirected and will instead return the view of the Alias card itself.
19
- Similarly, transactional requests (create, update, and delete) to the alias card
20
- will take effect on the alias, not the target.
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
- An alias card's name is the alias's *source*, and its content is its target. So, in the
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
- Extends `#edit_name_buttons` so that when renaming, user is presented with a checkbox
54
- to trigger the creation of an alias
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
- Module that enables card controller to handle alias-driven redirects and ensure that
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).
data/set/all/alias.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # triggerable event to auto-add an alias upon renaming a card
2
2
  event :create_alias_upon_rename, :finalize,
3
3
  on: :update, changed: :name, trigger: :required do
4
- add_subcard name_before_act, type_code: :alias, content: name
4
+ subcard name_before_act, type_code: :alias, content: name
5
5
  end
6
6
 
7
7
  # actual aliases override this in narrower sets.
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.13.2
4
+ version: '0.15'
5
5
  platform: ruby
6
6
  authors:
7
- - Ethan McCutchen
8
7
  - Philipp Kühl
9
- - Gerry Gleason
8
+ - Ethan McCutchen
10
9
  autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2021-08-06 00:00:00.000000000 Z
12
+ date: 2021-12-23 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: 1.103.2
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: 1.103.2
27
+ version: '0'
29
28
  description: ''
30
29
  email:
31
30
  - info@decko.org
@@ -34,23 +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
- - init/late/init_aliasing.rb
39
36
  - lib/card_controller/aliasing.rb
40
- - locales/en.yml
41
37
  - set/all/alias.rb
42
38
  - set/all/auto_alias_checkbox.haml
43
39
  - set/all_plus/alias.rb
44
40
  - set/type/alias.rb
45
- homepage: https://decko.org
41
+ homepage: http://decko.org
46
42
  licenses:
47
43
  - GPL-3.0
48
44
  metadata:
49
- source_code_uri: https://github.com/decko-commons/decko
50
- homepage_uri: https://decko.org
51
- bug_tracker_uri: https://github.com/decko-commons/decko/issues
52
- wiki_uri: https://decko.org
53
- documentation_url: http://docs.decko.org/
54
45
  card-mod: alias
55
46
  post_install_message:
56
47
  rdoc_options: []
@@ -67,7 +58,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
67
58
  - !ruby/object:Gem::Version
68
59
  version: '0'
69
60
  requirements: []
70
- rubygems_version: 3.1.6
61
+ rubygems_version: 3.2.15
71
62
  signing_key:
72
63
  specification_version: 4
73
64
  summary: Aliases
@@ -1,7 +0,0 @@
1
- # -*- encoding : utf-8 -*-
2
-
3
- class AddAliasType < Cardio::Migration
4
- def up
5
- ensure_code_card "Alias", name: "Alias", type_code: :cardtype
6
- end
7
- end
@@ -1 +0,0 @@
1
- CardController.include CardController::Aliasing
data/locales/en.yml DELETED
@@ -1,5 +0,0 @@
1
- en:
2
- alias_target_must_be_simple: "must be aliased to a single, valid simple card"
3
- alias_must_be_simple: "must be a simple (not a compound) card"
4
- alias_cards_no_children: "Alias cards can't have children"
5
- alias_redirect_former_name: "redirect former name to new one"