card 1.103.4 → 1.104.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (140) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/config/environments/development.rb +4 -2
  4. data/config/environments/test.rb +1 -1
  5. data/config/initializers/01_core_extensions/array.rb +4 -1
  6. data/config/initializers/01_core_extensions/object.rb +1 -1
  7. data/config/initializers/02_patches/active_record.rb +16 -17
  8. data/config/locales/de.yml +8 -564
  9. data/config/locales/es.yml +2 -3
  10. data/db/migrate/20110511221913_require_earlier_migrations.rb +1 -1
  11. data/db/migrate/20120105203350_require_1_8_migrations.rb +1 -1
  12. data/db/migrate/20121111025347_require_1_10_migrations.rb +1 -1
  13. data/db/migrate/20211128040849_virtuals_updated_at.rb +11 -0
  14. data/db/migrate_core_cards/20190502130029_add_shark_and_help_desk_role.rb +0 -1
  15. data/db/schema.rb +19 -16
  16. data/db/seed/new/card_actions.yml +1323 -2091
  17. data/db/seed/new/card_acts.yml +2 -2
  18. data/db/seed/new/card_references.yml +629 -741
  19. data/db/seed/new/cards.yml +2593 -5557
  20. data/db/seed/new/schema_migrations.yml +2 -0
  21. data/db/seed/new/schema_migrations_core_cards.yml +8 -0
  22. data/db/seed/test/fixtures/card_actions.yml +2555 -3395
  23. data/db/seed/test/fixtures/card_acts.yml +606 -666
  24. data/db/seed/test/fixtures/card_changes.yml +101 -101
  25. data/db/seed/test/fixtures/card_references.yml +1609 -1686
  26. data/db/seed/test/fixtures/cards.yml +4363 -7541
  27. data/db/seed/test/fixtures/schema_migrations.yml +2 -0
  28. data/db/seed/test/fixtures/schema_migrations_core_cards.yml +8 -0
  29. data/db/test_seed.rb +1 -4
  30. data/db/version.txt +1 -1
  31. data/db/version_core_cards.txt +1 -1
  32. data/lib/card/auth/current.rb +1 -1
  33. data/lib/card/auth/permissions.rb +37 -35
  34. data/lib/card/content/all.rb +3 -3
  35. data/lib/card/content/chunk.rb +1 -0
  36. data/lib/card/director/act_direction.rb +1 -3
  37. data/lib/card/director/card_methods.rb +0 -1
  38. data/lib/card/director/phases.rb +1 -0
  39. data/lib/card/director.rb +1 -0
  40. data/lib/card/fetch/all.rb +3 -3
  41. data/lib/card/fetch/card_class.rb +5 -11
  42. data/lib/card/fetch/results.rb +2 -2
  43. data/lib/card/model/save_helper.rb +2 -2
  44. data/lib/card/name/all/descendants.rb +9 -7
  45. data/lib/card/name/all/parts.rb +1 -1
  46. data/lib/card/name/all.rb +4 -3
  47. data/lib/card/name/card_class.rb +1 -0
  48. data/lib/card/name/fields_and_traits.rb +6 -30
  49. data/lib/card/name/name_variants.rb +5 -1
  50. data/lib/card/name.rb +0 -8
  51. data/lib/card/query/abstract_query/tie.rb +2 -3
  52. data/lib/card/query/card_query/normalization.rb +1 -1
  53. data/lib/card/query/sql_statement/order.rb +5 -6
  54. data/lib/card/query/value.rb +10 -7
  55. data/lib/card/reference/all.rb +9 -7
  56. data/lib/card/reference.rb +36 -41
  57. data/lib/card/rule/all.rb +3 -3
  58. data/lib/card/set/advanced_api.rb +5 -0
  59. data/lib/card/set/event/delayed_event.rb +8 -1
  60. data/lib/card/set/event.rb +1 -0
  61. data/lib/card/set/helpers.rb +30 -17
  62. data/lib/card/set/pattern/all.rb +13 -4
  63. data/lib/card/set/pattern/base.rb +12 -18
  64. data/lib/card/set/pattern/class_methods.rb +13 -13
  65. data/lib/card/set/pattern.rb +30 -19
  66. data/lib/card/set/trait.rb +16 -1
  67. data/lib/card/set/type.rb +3 -0
  68. data/lib/card/subcards/add.rb +1 -3
  69. data/lib/card/subcards/all.rb +30 -56
  70. data/lib/card/view/options.rb +7 -5
  71. data/lib/cardio/cli.rb +1 -0
  72. data/lib/cardio/commands/custom.rb +60 -0
  73. data/lib/cardio/commands/rake_command/parser.rb +49 -48
  74. data/lib/cardio/commands/rake_command.rb +17 -15
  75. data/lib/cardio/commands/rspec_command.rb +2 -0
  76. data/lib/cardio/commands.rb +69 -69
  77. data/lib/cardio/generators.rb +56 -3
  78. data/lib/cardio/migration/deck.rb +0 -0
  79. data/lib/cardio/migration/deck_structure.rb +2 -0
  80. data/lib/cardio/migration/import/import_data/card_content.rb +1 -1
  81. data/lib/cardio/migration/import.rb +2 -2
  82. data/lib/cardio/migration.rb +26 -2
  83. data/lib/cardio/mod/class_methods.rb +112 -0
  84. data/lib/cardio/mod/dirs.rb +15 -11
  85. data/lib/cardio/mod/eat/edibles.rb +92 -0
  86. data/lib/cardio/mod/eat.rb +81 -0
  87. data/lib/cardio/mod/load_strategy/tmp_files.rb +1 -1
  88. data/lib/cardio/mod/modfile_api.rb +5 -0
  89. data/lib/cardio/mod/poop.rb +135 -0
  90. data/lib/cardio/mod.rb +20 -80
  91. data/lib/cardio/railtie.rb +15 -3
  92. data/lib/cardio/schema.rb +11 -10
  93. data/lib/cardio/version.rb +35 -0
  94. data/lib/cardio.rb +4 -0
  95. data/lib/generators/deck/templates/Gemfile.erb +0 -4
  96. data/lib/generators/deck/templates/rspec.erb +1 -1
  97. data/lib/generators/deck/templates/spec/javascripts/support/decko_jasmine.yml.erb +0 -1
  98. data/lib/generators/mod/USAGE +1 -0
  99. data/lib/tasks/card/migrate.rake +41 -1
  100. data/lib/tasks/card/mod.rake +15 -8
  101. data/lib/tasks/card.rake +47 -87
  102. data/mod/admin/locales/de.yml +4 -0
  103. data/mod/admin/set/self/admin.rb +10 -8
  104. data/mod/core/data/production.yml +7 -0
  105. data/mod/core/data/test.yml +30 -0
  106. data/mod/core/locales/de.yml +28 -0
  107. data/mod/core/set/all/assign_attributes.rb +1 -33
  108. data/mod/core/set/all/content.rb +3 -1
  109. data/mod/core/set/all/initialize.rb +1 -4
  110. data/mod/core/set/all/name_events.rb +3 -18
  111. data/mod/core/set/all/reference_events.rb +29 -28
  112. data/mod/core/set/all/subcards.rb +6 -2
  113. data/mod/core/set/all/trash.rb +2 -3
  114. data/mod/core/set/all/type.rb +67 -18
  115. data/mod/core/set/self/version.rb +1 -1
  116. data/mod/core/spec/set/self/trash_spec.rb +1 -1
  117. data/mod/standard/{file → data/files}/favicon/image-icon.png +0 -0
  118. data/mod/standard/{file → data/files}/favicon/image-large.png +0 -0
  119. data/mod/standard/{file → data/files}/favicon/image-medium.png +0 -0
  120. data/mod/standard/{file → data/files}/favicon/image-original.png +0 -0
  121. data/mod/standard/{file → data/files}/favicon/image-small.png +0 -0
  122. data/mod/standard/{file → data/files}/logo/image-original.svg +0 -0
  123. metadata +37 -28
  124. data/db/migrate_core_cards/20150605115802_add_performance_log_card.rb +0 -7
  125. data/lib/card/set/code_nest.rb +0 -15
  126. data/lib/card/version.rb +0 -11
  127. data/lib/cardio/commands/USAGE +0 -28
  128. data/lib/cardio/generators/class_methods.rb +0 -35
  129. data/lib/tasks/card/asset.rake +0 -22
  130. data/mod/core/spec/set/all/clean_me_spec.rb +0 -258
  131. data/mod/core/spec/set/all/export_spec.rb +0 -71
  132. data/tmpsets/set_pattern/100-all.rb +0 -22
  133. data/tmpsets/set_pattern/101-all_plus.rb +0 -24
  134. data/tmpsets/set_pattern/102-type.rb +0 -40
  135. data/tmpsets/set_pattern/103-star.rb +0 -26
  136. data/tmpsets/set_pattern/104-rstar.rb +0 -28
  137. data/tmpsets/set_pattern/105-rule.rb +0 -28
  138. data/tmpsets/set_pattern/106-right.rb +0 -35
  139. data/tmpsets/set_pattern/107-type_plus_right.rb +0 -43
  140. data/tmpsets/set_pattern/108-self.rb +0 -34
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cc3a6a522e4dd786e401df27413a66abcf8136c1c652a09aca31013405049fb9
4
- data.tar.gz: 81116ac245a51a038853a82297785d90772af0d1ff1f7d998ee3b30c70448e80
3
+ metadata.gz: 7dcdec3e3b06925733e468201d3993d5346924f5bf0724bbd29624af3d34700d
4
+ data.tar.gz: 90c61f571d0df0b8f8c84ec608998e124f29a19a3f7e26999a0890554f3f3d2e
5
5
  SHA512:
6
- metadata.gz: 1d022bb95a2ec8cc69ecfcd0ce95163b7e8a6f92c885e002e2738ed1feb22eee9ee1f4f7bac1ec8cc12d9d7cbfa0211d4ed679defe3134139c3b6e52f8e463fc
7
- data.tar.gz: 8e55dab5e3c2d4afc29afd85e363ccda7b6592cebdef55f8754887e1fde0bb7ee7b9bd130cf09d811f5312ab190b3e8a266ffdb62256ede0a1f76f36766019b3
6
+ metadata.gz: 5f9d0feffad92c0f9d34fc41a58973b69cdbf3b6912385e2dcffed716a3fdf13b6000882ad9aeb8323766db4ed7119288c7ff745929b76645869796bb6beea33
7
+ data.tar.gz: 45a655ca331b5c42412c7da5f74b1c69ba9af8982c0d9eb638dd4560a0ddd75fba7941b3b0f6d0a302d84308aa6378ba385b40bf126bff51cf98255218aa7580
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.13.4
1
+ 0.14.0
@@ -7,8 +7,10 @@ Cardio.application.class.configure do
7
7
 
8
8
  config.eager_load = false
9
9
 
10
- config.machine_refresh = :eager
11
- config.compress_javascript = false
10
+ config.asset_refresh = :eager
11
+ config.compress_assets = false
12
+
13
+ config.sql_comments = true
12
14
 
13
15
  # In the development environment your application's code is reloaded on
14
16
  # every request. This slows down response time but is perfect for development
@@ -5,7 +5,7 @@ Cardio.application.class.configure do
5
5
 
6
6
  config.eager_load = false
7
7
 
8
- config.machine_refresh = :never
8
+ config.asset_refresh = :never
9
9
 
10
10
  # The test environment is used exclusively to run your application's
11
11
  # test suite. You never need to work with it otherwise. Remember that
@@ -3,7 +3,10 @@ module CoreExtensions
3
3
  def to_pointer_content
4
4
  map do |item|
5
5
  item = item.to_s.strip
6
- item =~ /^\[\[.+\]\]$/ ? item : "[[#{item}]]"
6
+ item.gsub!(/^\[\[/, "")
7
+ item.gsub!(/\]\]$/, "")
8
+ item
9
+ # item =~ /^\[\[.+\]\]$/ ? item : "[[#{item}]]"
7
10
  end.join "\n"
8
11
  end
9
12
 
@@ -31,7 +31,7 @@ module CoreExtensions
31
31
 
32
32
  # @return [Integer] id of card with name
33
33
  def card_id
34
- cardname.card_id
34
+ Card.id self
35
35
  end
36
36
 
37
37
  def name?
@@ -18,31 +18,30 @@ module Patches
18
18
  module ActiveRecord
19
19
  module Relation
20
20
  def pluck_in_batches *columns, batch_size: 1000
21
- prepare_pluck_in_batches(
22
- columns
23
- ) do |batch_start, select_columns, id_index, remove_id_from_results|
21
+ batch_start = nil
22
+ select_columns, id_index, remove_id = prepare_batch_pluck columns
24
23
 
25
- loop do
26
- items = pluck_in_batches_items batch_size, batch_start, select_columns
27
- break if items.empty?
24
+ loop do
25
+ items = pluck_in_batches_items batch_size, batch_start, select_columns
26
+ break if items.empty?
28
27
 
29
- batch_start = pluck_in_batches_batch_start items, id_index
30
- # Remove :id column if not in *columns
31
- items.map! { |row| row[1..-1] } if remove_id_from_results
32
- yield items
28
+ batch_start = pluck_in_batches_batch_start items, id_index
29
+ cleaned_batch_items items, remove_id
30
+ yield items
33
31
 
34
- break if items.size < batch_size
35
- end
32
+ break if items.size < batch_size
36
33
  end
37
34
  end
38
35
 
39
36
  private
40
37
 
41
- def prepare_pluck_in_batches columns
42
- raise "There must be at least one column to pluck" if columns.empty?
38
+ # Remove :id column if not in *columns
39
+ def cleaned_batch_items items, remove_id
40
+ items.map! { |row| row[1..-1] } if remove_id
41
+ end
43
42
 
44
- # the :id to start the query at
45
- batch_start = nil
43
+ def prepare_batch_pluck columns
44
+ raise "There must be at least one column to pluck" if columns.empty?
46
45
 
47
46
  # It's cool. We're only taking in symbols
48
47
  # no deep clone needed
@@ -61,7 +60,7 @@ module Patches
61
60
  remove_id_from_results = true
62
61
  end
63
62
 
64
- yield batch_start, select_columns, id_index, remove_id_from_results
63
+ [select_columns, id_index, remove_id_from_results]
65
64
  end
66
65
 
67
66
  def pluck_in_batches_batch_start items, id_index