card 1.103.2 → 1.104.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (197) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/config/environments/development.rb +4 -2
  4. data/config/environments/production.rb +9 -9
  5. data/config/environments/test.rb +1 -1
  6. data/config/initializers/01_core_extensions/array.rb +4 -1
  7. data/config/initializers/01_core_extensions/object.rb +1 -1
  8. data/config/initializers/02_patches/active_record.rb +16 -17
  9. data/config/locales/de.yml +8 -564
  10. data/config/locales/es.yml +2 -3
  11. data/db/migrate/20110511221913_require_earlier_migrations.rb +1 -1
  12. data/db/migrate/20120105203350_require_1_8_migrations.rb +1 -1
  13. data/db/migrate/20121111025347_require_1_10_migrations.rb +1 -1
  14. data/db/migrate/20211128040849_virtuals_updated_at.rb +11 -0
  15. data/db/migrate_core_cards/20130411191151_renaming_for_menu.rb +0 -1
  16. data/db/migrate_core_cards/20140317035504_account_requests_to_signups.rb +0 -2
  17. data/db/migrate_core_cards/20150202143810_import_bootstrap_layout.rb +0 -2
  18. data/db/migrate_core_cards/20190417142612_reorganize_scripts_2.rb +1 -3
  19. data/db/migrate_core_cards/20190502130029_add_shark_and_help_desk_role.rb +1 -2
  20. data/db/migrate_core_cards/20190710090209_homepage_tweaks.rb +3 -7
  21. data/db/migrate_core_cards/20190823220018_cleanup_for_decko_1_0.rb +2 -4
  22. data/db/migrate_core_cards/20190902193208_input_type.rb +3 -8
  23. data/db/migrate_core_cards/20190904174403_token_upgrade.rb +1 -1
  24. data/db/migrate_core_cards/data/1.12_stylesheets/traditional.scss +1 -2
  25. data/db/schema.rb +19 -16
  26. data/db/seed/new/card_actions.yml +2615 -3383
  27. data/db/seed/new/card_acts.yml +3 -3
  28. data/db/seed/new/card_references.yml +1588 -1707
  29. data/db/seed/new/cards.yml +5450 -8416
  30. data/db/seed/new/schema_migrations.yml +2 -0
  31. data/db/seed/new/schema_migrations_core_cards.yml +8 -0
  32. data/db/seed/test/fixtures/card_actions.yml +4304 -5144
  33. data/db/seed/test/fixtures/card_acts.yml +780 -840
  34. data/db/seed/test/fixtures/card_changes.yml +110 -110
  35. data/db/seed/test/fixtures/card_references.yml +2908 -2992
  36. data/db/seed/test/fixtures/cards.yml +8775 -11955
  37. data/db/seed/test/fixtures/schema_migrations.yml +2 -0
  38. data/db/seed/test/fixtures/schema_migrations_core_cards.yml +8 -0
  39. data/db/test_seed.rb +2 -5
  40. data/db/version.txt +1 -1
  41. data/db/version_core_cards.txt +1 -1
  42. data/lib/card/auth/current.rb +1 -1
  43. data/lib/card/auth/permissions.rb +37 -35
  44. data/lib/card/content/all.rb +3 -3
  45. data/lib/card/content/chunk.rb +1 -1
  46. data/lib/card/content/diff/summary.rb +14 -18
  47. data/lib/card/content.rb +9 -1
  48. data/lib/card/director/act_direction.rb +6 -6
  49. data/lib/card/director/card_methods.rb +0 -1
  50. data/lib/card/director/phases.rb +1 -0
  51. data/lib/card/director/stages.rb +2 -0
  52. data/lib/card/director.rb +1 -0
  53. data/lib/card/fetch/all.rb +3 -3
  54. data/lib/card/fetch/card_class.rb +5 -11
  55. data/lib/card/fetch/results.rb +8 -8
  56. data/lib/card/{tasks/card/file_card_creator → file_card_creator}/abstract_file_card/migration_file.rb +0 -0
  57. data/lib/card/{tasks/card/file_card_creator → file_card_creator}/abstract_file_card/ruby_file.rb +0 -0
  58. data/lib/card/{tasks/card/file_card_creator → file_card_creator}/abstract_file_card/source_file.rb +0 -0
  59. data/lib/card/{tasks/card/file_card_creator → file_card_creator}/abstract_file_card.rb +0 -5
  60. data/lib/card/{tasks/card/file_card_creator → file_card_creator}/haml_card.rb +0 -0
  61. data/lib/card/{tasks/card/file_card_creator → file_card_creator}/output_helper.rb +0 -0
  62. data/lib/card/{tasks/card/file_card_creator → file_card_creator}/script_card.rb +0 -0
  63. data/lib/card/{tasks/card/file_card_creator → file_card_creator}/style_card.rb +0 -0
  64. data/lib/card/{tasks/card/file_card_creator.rb → file_card_creator.rb} +0 -5
  65. data/lib/card/format/content.rb +5 -7
  66. data/lib/card/format/error.rb +2 -2
  67. data/lib/card/format/render.rb +10 -10
  68. data/lib/card/format.rb +3 -8
  69. data/lib/card/lexicon.rb +30 -7
  70. data/lib/card/model/save_helper/save_arguments.rb +2 -2
  71. data/lib/card/model/save_helper.rb +3 -3
  72. data/lib/card/name/all/descendants.rb +9 -7
  73. data/lib/card/name/all/parts.rb +1 -1
  74. data/lib/card/name/all.rb +4 -3
  75. data/lib/card/name/card_class.rb +2 -1
  76. data/lib/card/name/fields_and_traits.rb +6 -30
  77. data/lib/card/name/name_variants.rb +5 -1
  78. data/lib/card/name.rb +6 -14
  79. data/lib/card/query/abstract_query/tie.rb +2 -3
  80. data/lib/card/query/card_query/normalization.rb +1 -1
  81. data/lib/card/query/sql_statement/order.rb +5 -6
  82. data/lib/card/query/value.rb +10 -7
  83. data/lib/card/reference/all.rb +9 -7
  84. data/lib/card/reference.rb +36 -41
  85. data/lib/card/rule/all.rb +3 -3
  86. data/lib/card/set/advanced_api.rb +5 -0
  87. data/lib/card/set/card_methods.rb +13 -0
  88. data/lib/card/set/event/delayed_event.rb +8 -1
  89. data/lib/card/set/event/skip_and_trigger.rb +8 -0
  90. data/lib/card/set/event.rb +1 -0
  91. data/lib/card/set/format/abstract_format/wrapper.rb +1 -1
  92. data/lib/card/set/format/abstract_format.rb +2 -1
  93. data/lib/card/set/format.rb +2 -3
  94. data/lib/card/set/helpers.rb +68 -0
  95. data/lib/card/set/inheritance.rb +1 -1
  96. data/lib/card/set/pattern/all.rb +20 -10
  97. data/lib/card/set/pattern/base.rb +12 -18
  98. data/lib/card/set/pattern/class_methods.rb +13 -13
  99. data/lib/card/set/pattern.rb +46 -24
  100. data/lib/card/set/registrar.rb +8 -2
  101. data/lib/card/set/trait.rb +16 -1
  102. data/lib/card/set/type.rb +3 -0
  103. data/lib/card/set.rb +14 -7
  104. data/lib/card/subcards/add.rb +1 -3
  105. data/lib/card/subcards/all.rb +30 -56
  106. data/lib/card/view/classy.rb +15 -27
  107. data/lib/card/view/options/voo_api.rb +3 -1
  108. data/lib/card/view/options.rb +7 -5
  109. data/lib/card/view/permission.rb +4 -11
  110. data/lib/card/view.rb +1 -0
  111. data/lib/card.rb +9 -11
  112. data/lib/cardio/cli.rb +1 -0
  113. data/lib/cardio/commands/custom.rb +60 -0
  114. data/lib/cardio/commands/rake_command/parser.rb +49 -48
  115. data/lib/cardio/commands/rake_command.rb +17 -15
  116. data/lib/cardio/commands/rspec_command.rb +2 -0
  117. data/lib/cardio/commands.rb +69 -69
  118. data/lib/cardio/generators/deck_helper.rb +0 -4
  119. data/lib/cardio/generators.rb +56 -3
  120. data/lib/cardio/migration/deck.rb +0 -0
  121. data/lib/cardio/migration/deck_structure.rb +2 -0
  122. data/lib/cardio/migration/import/import_data/card_content.rb +1 -1
  123. data/lib/cardio/migration/import.rb +2 -2
  124. data/lib/cardio/migration.rb +26 -2
  125. data/lib/cardio/mod/class_methods.rb +112 -0
  126. data/lib/cardio/mod/dirs.rb +15 -11
  127. data/lib/cardio/mod/eat/edibles.rb +92 -0
  128. data/lib/cardio/mod/eat.rb +81 -0
  129. data/lib/cardio/mod/load_strategy/set_tmp_files.rb +10 -4
  130. data/lib/cardio/mod/load_strategy/tmp_files.rb +1 -1
  131. data/lib/cardio/mod/load_strategy.rb +3 -4
  132. data/lib/cardio/mod/loader/set_loader.rb +13 -13
  133. data/lib/cardio/mod/loader.rb +1 -1
  134. data/lib/cardio/mod/modfile_api.rb +5 -0
  135. data/lib/cardio/mod/poop.rb +135 -0
  136. data/lib/cardio/mod.rb +20 -80
  137. data/lib/cardio/railtie.rb +24 -6
  138. data/lib/cardio/schema.rb +11 -10
  139. data/lib/cardio/version.rb +35 -0
  140. data/lib/cardio.rb +4 -0
  141. data/lib/generators/deck/deck_generator.rb +3 -2
  142. data/lib/generators/deck/templates/Gemfile.erb +1 -5
  143. data/lib/generators/deck/templates/Rakefile.erb +6 -2
  144. data/lib/generators/deck/templates/rspec.erb +1 -1
  145. data/lib/generators/deck/templates/simplecov.rb.erb +7 -11
  146. data/lib/generators/deck/templates/spec/javascripts/support/decko_jasmine.yml.erb +0 -1
  147. data/lib/generators/mod/USAGE +1 -0
  148. data/lib/{card/tasks → tasks}/card/create.rake +0 -0
  149. data/lib/{card/tasks → tasks}/card/migrate.rake +41 -1
  150. data/lib/{card/tasks → tasks}/card/mod.rake +15 -8
  151. data/lib/tasks/card.rake +65 -0
  152. data/mod/admin/locales/de.yml +4 -0
  153. data/mod/admin/set/all/admin.rb +16 -0
  154. data/mod/admin/set/self/admin.rb +12 -14
  155. data/mod/admin/set/self/admin_info.rb +2 -5
  156. data/mod/core/data/production.yml +7 -0
  157. data/mod/core/data/test.yml +30 -0
  158. data/mod/core/locales/de.yml +28 -0
  159. data/mod/core/locales/en.yml +4 -5
  160. data/mod/core/set/all/assign_attributes.rb +1 -33
  161. data/mod/core/set/all/content.rb +3 -1
  162. data/mod/core/set/all/initialize.rb +1 -4
  163. data/mod/core/set/all/name_events.rb +3 -18
  164. data/mod/core/set/all/reference_events.rb +32 -36
  165. data/mod/core/set/all/subcards.rb +6 -2
  166. data/mod/core/set/all/trash.rb +4 -6
  167. data/mod/core/set/all/type.rb +67 -18
  168. data/mod/core/set/self/version.rb +1 -1
  169. data/mod/core/spec/set/all/name_events_spec.rb +10 -10
  170. data/mod/core/spec/set/all/trash_spec.rb +1 -1
  171. data/mod/core/spec/set/self/trash_spec.rb +1 -1
  172. data/mod/standard/{file → data/files}/favicon/image-icon.png +0 -0
  173. data/mod/standard/{file → data/files}/favicon/image-large.png +0 -0
  174. data/mod/standard/{file → data/files}/favicon/image-medium.png +0 -0
  175. data/mod/standard/{file → data/files}/favicon/image-original.png +0 -0
  176. data/mod/standard/{file → data/files}/favicon/image-small.png +0 -0
  177. data/mod/standard/{file → data/files}/logo/image-original.svg +0 -0
  178. metadata +52 -42
  179. data/db/migrate_core_cards/20150605115802_add_performance_log_card.rb +0 -7
  180. data/lib/card/set/basket.rb +0 -59
  181. data/lib/card/set/code_nest.rb +0 -15
  182. data/lib/card/tasks/card/asset.rake +0 -22
  183. data/lib/card/tasks/card.rake +0 -105
  184. data/lib/card/version.rb +0 -11
  185. data/lib/cardio/commands/USAGE +0 -28
  186. data/lib/cardio/generators/class_methods.rb +0 -35
  187. data/mod/core/spec/set/all/clean_me_spec.rb +0 -258
  188. data/mod/core/spec/set/all/export_spec.rb +0 -71
  189. data/tmpsets/set_pattern/100-all.rb +0 -22
  190. data/tmpsets/set_pattern/101-all_plus.rb +0 -24
  191. data/tmpsets/set_pattern/102-type.rb +0 -40
  192. data/tmpsets/set_pattern/103-star.rb +0 -26
  193. data/tmpsets/set_pattern/104-rstar.rb +0 -28
  194. data/tmpsets/set_pattern/105-rule.rb +0 -28
  195. data/tmpsets/set_pattern/106-right.rb +0 -35
  196. data/tmpsets/set_pattern/107-type_plus_right.rb +0 -43
  197. data/tmpsets/set_pattern/108-self.rb +0 -34
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a103418a0534171f7933b6f350004e5f1d61bacb42598e148b91fea6da0923b9
4
- data.tar.gz: 7400a95136bc83250cbfff52c3dab675af28cc310cbb2bf4fa928c0282ebe7eb
3
+ metadata.gz: ae1fc116c9fb870d1d6b8a27a566d7aca5313f249b4bf4784209b677a8589ab7
4
+ data.tar.gz: b8ede92d2f96959e197a87fc8a4d3af678a0bfc1426683a8af8c29545444e224
5
5
  SHA512:
6
- metadata.gz: eca498b931c57eace4109ee90dbf87dc02348582c27a506b2cc77534b38c7ece0f7b9075f8ae7b2fc338224cd69ef2fb08ab45d9be5bc955718334d6c3bfd961
7
- data.tar.gz: aa10c7965db719969ca3b063e913629a57b65c089670a03c933c25d991a6cdcb9e81697ca359c70fc4e32b31a5bf2a66964f00ef5030f0e80e14f4fa6ae7ba37
6
+ metadata.gz: a192861e2d5fec66e431f55a80aaa840a45d77b4ebc10a2c16bca1af4a51a249f3cd655877c82c8ddc51e74c356a8c5da75e02347b1c80b1d6fb01e7c79bb808
7
+ data.tar.gz: 7ec8399cc23e2339d03fab541614347aa37110f12dcc0bf73fd13dc93bc98bd63e4a46434dbbcad7c09ecc6efeef2aad93963a8ed62d975965d9e5c2fb483c56
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.13.2
1
+ 0.14.1
@@ -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
@@ -20,13 +20,13 @@ Cardio.application.class.configure do
20
20
  config.serve_static_files = defined?(Rails::Server)
21
21
 
22
22
  # Compress JavaScripts and CSS
23
- config.assets.compress = true
24
-
25
- # Don't fallback to assets pipeline if a precompiled asset is missed
26
- config.assets.compile = false
27
-
28
- # Generate digests for assets URLs
29
- config.assets.digest = true
23
+ # config.assets.compress = true
24
+ #
25
+ # # Don't fallback to assets pipeline if a precompiled asset is missed
26
+ # config.assets.compile = false
27
+ #
28
+ # # Generate digests for assets URLs
29
+ # config.assets.digest = true
30
30
 
31
31
  # Defaults to Rails.root.join("public/assets")
32
32
  # config.assets.manifest = File.join(Decko.gem_root, "public/assets")
@@ -51,8 +51,8 @@ Cardio.application.class.configure do
51
51
  # config.action_controller.asset_host = "http://assets.example.com"
52
52
 
53
53
  # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
54
- config.assets.precompile += %w[application-all.css application-print.css barebones.css
55
- html5shiv-printshiv.js]
54
+ # config.assets.precompile += %w[application-all.css application-print.css barebones.css
55
+ # html5shiv-printshiv.js]
56
56
 
57
57
  # Disable delivery errors, bad email addresses will be ignored
58
58
  # config.action_mailer.raise_delivery_errors = false
@@ -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