decko 0.15.0 → 0.15.1

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: 248a2dc0a741869d8f08dac5d37fe27836bf0e1739fb07753718700ede5af334
4
- data.tar.gz: cd47e990d0affdc1d4555f18601a9d69a1e8fa1c366f95610c4b1a1774dae563
3
+ metadata.gz: 2081109ab4f7475908b5c2c8fd690b1c58584975561ce1ca73e1376bcf4719d2
4
+ data.tar.gz: 277ca52989cf6d13b6aa4914ed61c543bc12258bdc1718aecac20b007be4f602
5
5
  SHA512:
6
- metadata.gz: 8d59e274fdf05490bde9e154b0c9888273575bb0a5d8887e79bd25fc6bdd1db5ba8a10c2eb17398db945e80bdb9cbf0abf36ec7d165671bf689cdc8916f4ac30
7
- data.tar.gz: e316371fb24578a2879c1eb5f2d13225175dfe0b2f79cf6ed3a1a69f9a799663c69f2b690aedafb078d078a6d0c9a7c692694a0a11dff6440a0f218de1a505f5
6
+ metadata.gz: 3e84a4808dd8d1a64b2d4ba3dce51d374e47c08f501b63d37f97980f7ceaea7ac869b23580ac26ad75205c0608c623c09f3ce949a595b8d9456a2d209475849d
7
+ data.tar.gz: f45771071748174e4f0b5db63240e8a44a22f57632a6fe028294a3db1316da04323f78bca3589720d55cf2419aa5f4518b44fe97e16dc01dbaf579e06ba550b8
@@ -1,30 +0,0 @@
1
- def alias_task name, old_name
2
- t = Rake::Task[old_name]
3
- desc t.full_comment if t.full_comment
4
- task name, *t.arg_names do |_, args|
5
- # values_at is broken on Rake::TaskArguments
6
- args = t.arg_names.map { |a| args[a] }
7
- t.invoke(args)
8
- end
9
- end
10
-
11
- def append_to_namespace namespace, part
12
- [namespace, part].compact.join(":")
13
- end
14
-
15
- def link_task task, from: nil, to: nil, namespace: nil
16
- case task
17
- when Hash
18
- task.each do |key, val|
19
- link_task val, from: from, to: to,
20
- namespace: append_to_namespace(namespace, key)
21
- end
22
- when Array
23
- task.each do |t|
24
- link_task t, from: from, to: to, namespace: namespace
25
- end
26
- else
27
- shared_part = append_to_namespace namespace, task
28
- alias_task "#{from}:#{shared_part}", "#{to}:#{shared_part}"
29
- end
30
- end
@@ -3,10 +3,41 @@ require_relative "alias"
3
3
 
4
4
  CARD_TASKS = (
5
5
  %i[eat migrate reset_cache reset_tmp seed setup sow update] +
6
- [{ assets: %i[refresh code wipe] },
7
- { migrate: %i[cards structure core_cards deck_cards redo stamp] },
8
- { mod: %i[list symlink missing uninstall install] },
6
+ # { assets: %i[refresh code wipe] },
7
+ # above caused loading problem because of .sort is rails' #run_tasks_blocks
8
+ [{ migrate: %i[cards structure core_cards deck_cards redo stamp] },
9
+ { mod: %i[list symlink leftover uninstall install] },
9
10
  { seed: %i[build clean dump plow polish replant update] }]
10
11
  ).freeze
11
12
 
13
+ def link_task task, from: nil, to: nil, namespace: nil
14
+ case task
15
+ when Hash
16
+ task.each do |key, val|
17
+ link_task val, from: from, to: to, namespace: append_to_namespace(namespace, key)
18
+ end
19
+ when Array
20
+ task.each { |t| link_task t, from: from, to: to, namespace: namespace }
21
+ else
22
+ shared_part = append_to_namespace namespace, task
23
+ alias_task "#{from}:#{shared_part}", "#{to}:#{shared_part}"
24
+ end
25
+ end
26
+
27
+ private
28
+
29
+ def alias_task name, old_name
30
+ t = Rake::Task[old_name]
31
+ desc t.full_comment if t.full_comment
32
+ task name, *t.arg_names do |_, args|
33
+ # values_at is broken on Rake::TaskArguments
34
+ args = t.arg_names.map { |a| args[a] }
35
+ t.invoke(args)
36
+ end
37
+ end
38
+
39
+ def append_to_namespace namespace, part
40
+ [namespace, part].compact.join(":")
41
+ end
42
+
12
43
  link_task CARD_TASKS, from: :decko, to: :card
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.15.0
4
+ version: 0.15.1
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-01-04 00:00:00.000000000 Z
13
+ date: 2023-03-29 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.105.0
35
+ version: 1.105.1
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.105.0
42
+ version: 1.105.1
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.15.0
49
+ version: 0.15.1
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.15.0
56
+ version: 0.15.1
57
57
  description: a wiki approach to structured data, dynamic interaction, and web design
58
58
  email:
59
59
  - info@decko.org
@@ -114,7 +114,6 @@ files:
114
114
  - lib/rake_tasks/alias.rb
115
115
  - lib/rake_tasks/cucumber.rake
116
116
  - lib/rake_tasks/decko.rake
117
- - lib/rake_tasks/decko/benchmark.rake
118
117
  - lib/rake_tasks/decko/docs.rake
119
118
  homepage: https://decko.org
120
119
  licenses:
@@ -1,34 +0,0 @@
1
- require "colorize"
2
- require "benchmark"
3
-
4
- namespace :decko do
5
- namespace :benchmark do
6
- desc "(for platypuses) measure time for script generation"
7
- task machines: :environment do
8
- Benchmark.bm do |x|
9
- regenerate x, :style
10
- regenerate x, :script
11
- end
12
- end
13
- end
14
- end
15
-
16
- def regenerate benchmarker, all_field
17
- Card::Auth.as_bot do
18
- card = Card[:all, all_field]
19
- Card::Machine.reset_all
20
-
21
- card.machine_input_card.extended_item_cards.each do |i_card|
22
- puts i_card
23
- i_card.expire_machine_cache
24
- end
25
-
26
- Card::Cache.reset_all
27
-
28
- benchmarker.report(all_field) do
29
- card.update_machine_output
30
- # regenerate_machine_output
31
- end
32
- # puts Card[:all, all_field, :machine_output].attachment.read
33
- end
34
- end