card 1.96.7 → 1.96.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (112) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/db/migrate_core_cards/20120611203506_rails_inflection_updates.rb +2 -2
  4. data/db/migrate_core_cards/20130823192433_add_style_cards.rb +5 -5
  5. data/db/migrate_core_cards/20130910183318_move_styles_to_content.rb +1 -1
  6. data/db/migrate_core_cards/20130920291703_update_stylesheets.rb +1 -1
  7. data/db/migrate_core_cards/20131016172445_common_css_patch.rb +1 -1
  8. data/db/migrate_core_cards/20140110193325_reset_account_request_type.rb +1 -1
  9. data/db/migrate_core_cards/20140307231621_user_data_to_cards.rb +1 -1
  10. data/db/migrate_core_cards/20140512155840_add_script_cards.rb +1 -1
  11. data/db/migrate_core_cards/20140629222005_add_email_cards.rb +2 -2
  12. data/db/migrate_core_cards/20141120120605_fix_notification_html_message.rb +1 -1
  13. data/db/migrate_core_cards/20141204061304_watchers_to_following.rb +1 -1
  14. data/db/migrate_core_cards/20150202143810_import_bootstrap_layout.rb +4 -4
  15. data/db/migrate_core_cards/20150317162412_bootstrap_themes.rb +1 -1
  16. data/db/migrate_core_cards/20150326205655_bootswatch_themes.rb +3 -3
  17. data/db/migrate_core_cards/20150331135745_new_card_menu.rb +1 -1
  18. data/db/migrate_core_cards/20150501010515_responsive_sidebar.rb +1 -1
  19. data/db/migrate_core_cards/20150510031118_fix_skin_codenames.rb +1 -1
  20. data/db/migrate_core_cards/20150610180019_add_recaptcha_key_and_admin_info_cards.rb +1 -1
  21. data/db/migrate_core_cards/20150627205133_fix_script_bootstrap_card_type.rb +1 -1
  22. data/db/migrate_core_cards/20150702130543_remove_edit_toolbar_pinned.rb +1 -1
  23. data/db/migrate_core_cards/20150724123438_update_file_and_image_cards.rb +2 -2
  24. data/db/migrate_core_cards/20150824135418_update_file_history.rb +1 -1
  25. data/db/migrate_core_cards/20150910085603_remove_performance_log_card.rb +1 -1
  26. data/db/migrate_core_cards/20160801143221_change_bootstrap_card_type_to_scss.rb +1 -1
  27. data/db/migrate_core_cards/20160811115836_rename_stats_to_admin.rb +1 -1
  28. data/db/migrate_core_cards/20170830210517_correct_signup_success_message.rb +1 -1
  29. data/db/migrate_core_cards/data/1.12_stylesheets/traditional.scss +0 -9
  30. data/db/seed/test/seed.rb +3 -3
  31. data/lib/card/act_manager.rb +1 -1
  32. data/lib/card/cache.rb +5 -1
  33. data/lib/card/codename.rb +1 -1
  34. data/lib/card/model/save_helper.rb +3 -4
  35. data/lib/card/query.rb +15 -9
  36. data/lib/card/query/abstract_query/tie.rb +1 -0
  37. data/lib/card/query/card_query/interpretation.rb +1 -1
  38. data/lib/card/query/card_query/match_attributes.rb +2 -2
  39. data/lib/card/query/card_query/normalization.rb +6 -3
  40. data/lib/card/query/value.rb +3 -2
  41. data/lib/card/set/event/delayed_event.rb +1 -0
  42. data/mod/account/set/right/account.rb +4 -12
  43. data/mod/account/set/type/signup.rb +4 -0
  44. data/mod/account/spec/set/all/account_spec.rb +3 -3
  45. data/mod/account/spec/set/right/account_spec.rb +27 -20
  46. data/mod/account/spec/set/right/email_spec.rb +3 -3
  47. data/mod/account/spec/set/right/password_spec.rb +4 -5
  48. data/mod/account/spec/set/self/signin_spec.rb +8 -9
  49. data/mod/account/spec/set/type/signup_spec.rb +3 -3
  50. data/mod/admin/spec/set/self/admin_spec.rb +4 -4
  51. data/mod/bootstrap/db/migrate_core_cards/20180423160231_migrate_customized_bootstrap_skin.rb +2 -2
  52. data/mod/bootstrap/db/migrate_core_cards/20180423170283_add_type_bootswatch_skin.rb +1 -1
  53. data/mod/bootstrap/db/migrate_core_cards/20180601133753_migrate_skins.rb +1 -1
  54. data/mod/bootstrap/db/migrate_core_cards/data/20181108181219_migrate_classic_skins_to_bootstrap.rb +2 -2
  55. data/mod/bootstrap/lib/stylesheets/style_bootstrap_cards.scss +3 -0
  56. data/mod/bootstrap/set/abstract/bootswatch_theme.rb +1 -1
  57. data/mod/bootstrap/spec/set/type/bootswatch_skin_spec.rb +1 -1
  58. data/mod/bootstrap/spec/set/type/customized_bootswatch_skin_spec.rb +1 -1
  59. data/mod/carrierwave/lib/carrier_wave/file_card_uploader.rb +2 -2
  60. data/mod/carrierwave/set/abstract/attachment.rb +1 -1
  61. data/mod/carrierwave/set/abstract/attachment/storage_type.rb +2 -2
  62. data/mod/carrierwave/set/abstract/attachment/upload_cache.rb +2 -2
  63. data/mod/carrierwave/spec/set/type/file_spec.rb +9 -12
  64. data/mod/carrierwave/spec/set/type/image_spec.rb +2 -2
  65. data/mod/core/set/all/actify.rb +5 -2
  66. data/mod/core/set/all/cache.rb +1 -1
  67. data/mod/core/set/all/content.rb +12 -30
  68. data/mod/core/set/all/contextual_content.rb +28 -0
  69. data/mod/core/set/all/name.rb +1 -1
  70. data/mod/core/set/all/rules.rb +1 -0
  71. data/mod/core/set/all/trash.rb +2 -2
  72. data/mod/core/set/all/utils.rb +2 -2
  73. data/mod/core/spec/set/all/actify_spec.rb +45 -2
  74. data/mod/core/spec/set/all/codename_spec.rb +2 -2
  75. data/mod/core/spec/set/all/event_conditions_spec.rb +15 -16
  76. data/mod/core/spec/set/all/name_events_spec.rb +2 -2
  77. data/mod/core/spec/set/all/observer_spec.rb +1 -1
  78. data/mod/core/spec/set/all/permissions_spec.rb +3 -3
  79. data/mod/core/spec/set/all/references_spec.rb +1 -1
  80. data/mod/core/spec/set/all/rename_spec.rb +2 -2
  81. data/mod/core/spec/set/all/trash_spec.rb +1 -1
  82. data/mod/follow/set/all/follow/follow_link.rb +7 -1
  83. data/mod/follow/spec/set/all/notify_spec.rb +2 -2
  84. data/mod/follow/spec/set/right/account_spec.rb +2 -2
  85. data/mod/follow/spec/set/right/followers_spec.rb +2 -2
  86. data/mod/follow/spec/set/self/follow_defaults_spec.rb +1 -1
  87. data/mod/follow/spec/set/type/notification_template_spec.rb +1 -1
  88. data/mod/history/set/all/history.rb +1 -1
  89. data/mod/history/set/all/history/act_listing.rb +2 -1
  90. data/mod/history/set/all/history/events.rb +3 -3
  91. data/mod/machines/lib/stylesheets/style_cards.scss +17 -16
  92. data/mod/machines/set/abstract/machine.rb +3 -2
  93. data/mod/machines/set/abstract/machine/output_cache.rb +1 -1
  94. data/mod/machines/set/abstract/machine_input.rb +1 -1
  95. data/mod/machines/spec/set/right/machine_cache_spec.rb +2 -2
  96. data/mod/machines/spec/set/type/skin_spec.rb +2 -2
  97. data/mod/pointer/spec/set/abstract/pointer/events_spec.rb +2 -2
  98. data/mod/search/set/abstract/01_filter_form_helper.rb +5 -1
  99. data/mod/search/set/abstract/search/views.rb +1 -1
  100. data/mod/settings/spec/set/right/comment_spec.rb +1 -1
  101. data/mod/solid_cache/set/right/solid_cache.rb +1 -1
  102. data/mod/solid_cache/spec/set/abstract/solid_cache_spec.rb +4 -4
  103. data/mod/standard/set/self/activity_toolbar_button.rb +1 -1
  104. data/mod/standard/spec/content/chunk/include_spec.rb +1 -1
  105. data/mod/standard/spec/set/all/history_spec.rb +5 -5
  106. data/mod/standard/spec/set/type/email_template/email_config_spec.rb +2 -2
  107. data/mod/standard/spec/set/type/list_spec.rb +9 -9
  108. data/mod/standard/spec/set/type/listed_by_spec.rb +9 -9
  109. data/mod/standard/spec/set/type/search_type_spec.rb +2 -3
  110. data/mod/virtual/lib/card/virtual.rb +1 -1
  111. data/mod/virtual/set/abstract/virtual_cache.rb +2 -2
  112. metadata +5 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dfe773b2796cebb8c834d94c16e8eba012a108db
4
- data.tar.gz: b946f6dac8f928032af10071185bd8c24f0b4e70
3
+ metadata.gz: 6715082009c2c58c4ed4d8a36b1f0c826552efae
4
+ data.tar.gz: 78c2b43dd24a1009608b1bf096eacc83556fbf39
5
5
  SHA512:
6
- metadata.gz: 243b96583e9ba34479a8150ede0041b4f84cd8e03e6c7ba2a6d0306ee320e9554d7fbb3e8a6d839447e7c303c26849eb7a320f34ee4d4a5e4715bb7666a27cb3
7
- data.tar.gz: 596d3775d722028dbb4a79f0881b6b1e5f0ee215584b252a7c509722ea55a165e23be45523acf56ba3a8756ed8393866ae24b62acfede690e27bc17b2cc061e7
6
+ metadata.gz: e7b2fc3c66eb5c4f52f039f379b1012fbd1f40bb73f31e94707b2c380a6ca7c51dfd620c8bc63e1338394198e8fbb72e422630eaed598abda8382eebae3dcea9
7
+ data.tar.gz: de15fad77c70810cfec22af1639d8dde030f4c1e89fe8720f636bd8a4d3c0f84c2bc651aa41721f0b493766c7226e75d559cf7b37e022d0b54c33de18aa7ea10
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.7
1
+ 0.6.8
@@ -57,7 +57,7 @@ class RailsInflectionUpdates < Card::Migration::Core
57
57
  elsif Card.find_by_key new_key
58
58
  puts "Could not update #{name}. Key '#{new_key}' already exists."
59
59
  else
60
- card.update_attributes! key: new_key
60
+ card.update! key: new_key
61
61
  end
62
62
  end
63
63
  end
@@ -75,7 +75,7 @@ class RailsInflectionUpdates < Card::Migration::Core
75
75
  new_content = new_content.gsub(wrong_sing, correct_sing)
76
76
  end
77
77
  end
78
- card.update_attributes! content: new_content if content_changed
78
+ card.update! content: new_content if content_changed
79
79
  end
80
80
  end
81
81
  end
@@ -4,7 +4,7 @@ class AddStyleCards < Card::Migration::Core
4
4
  def up
5
5
  # TAKE "CSS" CODENAME FROM OLD *CSS CARD
6
6
  old_css = Card[:css]
7
- old_css.update_attributes codename: nil
7
+ old_css.update codename: nil
8
8
  # old *css card no longer needs this codename
9
9
 
10
10
  # CREATE CSS AND SCSS TYPES
@@ -12,16 +12,16 @@ class AddStyleCards < Card::Migration::Core
12
12
  # need better api to support this?
13
13
  css_attributes = { codename: :css, type_id: Card::CardtypeID }
14
14
  new_css = Card.fetch "CSS", new: css_attributes
15
- new_css.update_attributes(css_attributes) unless new_css.new_card?
15
+ new_css.update(css_attributes) unless new_css.new_card?
16
16
  new_css.save!
17
17
 
18
- old_css.update_attributes type_id: new_css.id
18
+ old_css.update type_id: new_css.id
19
19
 
20
20
  Card.create! name: "SCSS", codename: :scss, type_id: Card::CardtypeID
21
21
 
22
22
  skin_attributes = { codename: :skin, type_id: Card::CardtypeID }
23
23
  skin_card = Card.fetch "Skin", new: skin_attributes
24
- skin_card.update_attributes(skin_attributes) unless skin_card.new_card?
24
+ skin_card.update(skin_attributes) unless skin_card.new_card?
25
25
  skin_card.save!
26
26
 
27
27
  # PERMISSIONS FOR CSS AND SCSS TYPES
@@ -93,7 +93,7 @@ class AddStyleCards < Card::Migration::Core
93
93
  rescue
94
94
  if default_skin =~ /customized/
95
95
  all_style = Card["#{Card[:all].name}+*style"]
96
- all_style.update_attributes content: "[[classic skin]]"
96
+ all_style.update content: "[[classic skin]]"
97
97
  end
98
98
  end
99
99
  end
@@ -4,7 +4,7 @@ class MoveStylesToContent < Card::Migration::Core
4
4
  def up
5
5
  dir = File.join data_path, "1.12_stylesheets"
6
6
  %w(right_sidebar common classic_cards traditional).each do |sheetname|
7
- Card["style: #{sheetname}"].update_attributes! codename: nil, content: File.read("#{dir}/#{sheetname}.scss")
7
+ Card["style: #{sheetname}"].update! codename: nil, content: File.read("#{dir}/#{sheetname}.scss")
8
8
  end
9
9
  end
10
10
  end
@@ -6,7 +6,7 @@ class UpdateStylesheets < Card::Migration::Core
6
6
  %w(common traditional).each do |sheetname|
7
7
  card = Card["style: #{sheetname}"]
8
8
  if card && card.pristine?
9
- card.update_attributes! content: File.read("#{dir}/#{sheetname}.scss")
9
+ card.update! content: File.read("#{dir}/#{sheetname}.scss")
10
10
  end
11
11
  end
12
12
 
@@ -5,7 +5,7 @@ class CommonCssPatch < Card::Migration::Core
5
5
  dir = File.join data_path, "1.12_stylesheets"
6
6
  card = Card["style: common"]
7
7
  if card && card.pristine?
8
- card.update_attributes! content: File.read("#{dir}/common.scss")
8
+ card.update! content: File.read("#{dir}/common.scss")
9
9
  end
10
10
  end
11
11
  end
@@ -4,7 +4,7 @@ class ResetAccountRequestType < Card::Migration::Core
4
4
  def up
5
5
  arcard = Card[:signup]
6
6
  if arcard.type_code != :cardtype
7
- arcard.update_attributes type_id: Card::CardtypeID
7
+ arcard.update type_id: Card::CardtypeID
8
8
  end
9
9
  end
10
10
  end
@@ -33,7 +33,7 @@ class UserDataToCards < Card::Migration::Core
33
33
  puts "supporting legacy handling of +*email on User cards"
34
34
  oldname = [:email, :right, :structure].map { |code| Card[code].name } * "+"
35
35
  newname = [:user, :email, :type_plus_right, :structure].map { |code| Card[code].name } * "+"
36
- Card[oldname].update_attributes! name: newname
36
+ Card[oldname].update! name: newname
37
37
 
38
38
  puts "importing all user details (for those not in trash) into +*account attributes"
39
39
  Card::Env[:no_password_encryptions] = true
@@ -12,7 +12,7 @@ class Card
12
12
  def putty args={}
13
13
  Card::Auth.as_bot do
14
14
  if args.present?
15
- update_attributes! args
15
+ update! args
16
16
  else
17
17
  save!
18
18
  end
@@ -17,7 +17,7 @@ class AddEmailCards < Card::Migration::Core
17
17
  default_rule.save!
18
18
 
19
19
  Card.search(right: { codename: field.to_s }).each do |field_card|
20
- field_card.update_attributes! type_id: Card::PointerID
20
+ field_card.update! type_id: Card::PointerID
21
21
  end
22
22
 
23
23
  options_rule = set.fetch(trait: :options, new: { type_code: :search_type })
@@ -118,7 +118,7 @@ class AddEmailCards < Card::Migration::Core
118
118
 
119
119
  send = Card[:send]
120
120
  return unless send
121
- send.update_attributes codename: nil
121
+ send.update codename: nil
122
122
  send.delete!
123
123
  end
124
124
  end
@@ -5,6 +5,6 @@ class FixNotificationHtmlMessage < Card::Migration::Core
5
5
  codename = :follower_notification_email
6
6
  dir = File.join data_path, "mailer"
7
7
  html_message = Card[codename].fetch trait: "html_message"
8
- html_message.update_attributes! content: File.read(File.join(dir, "#{codename}.html"))
8
+ html_message.update! content: File.read(File.join(dir, "#{codename}.html"))
9
9
  end
10
10
  end
@@ -27,7 +27,7 @@ class WatchersToFollowing < Card::Migration::Core
27
27
  end
28
28
 
29
29
  if watchers = Card[:watchers]
30
- watchers.update_attributes codename: nil
30
+ watchers.update codename: nil
31
31
  watchers.delete!
32
32
  end
33
33
  end
@@ -14,15 +14,15 @@ class ImportBootstrapLayout < Card::Migration::Core
14
14
  layout_rule_card = all.fetch trait: :layout
15
15
  style_rule_card = all.fetch trait: :style
16
16
  if layout_rule_card.pristine? && style_rule_card.pristine?
17
- layout_rule_card.update_attributes! content: "[[Default Layout]]"
17
+ layout_rule_card.update! content: "[[Default Layout]]"
18
18
  if style_rule_card.item_name == "customized classic skin"
19
19
  Card.create! name: "customized bootstrap skin", type: "Skin",
20
20
  content: "[[classic bootstrap skin]]\n[[*css]]"
21
- style_rule_card.update_attributes!(
21
+ style_rule_card.update!(
22
22
  content: "[[customized bootstrap skin]]"
23
23
  )
24
24
  else
25
- style_rule_card.update_attributes!(
25
+ style_rule_card.update!(
26
26
  content: "[[classic bootstrap skin]]"
27
27
  )
28
28
  end
@@ -70,7 +70,7 @@ class ImportBootstrapLayout < Card::Migration::Core
70
70
  nest.explicit_view =
71
71
  nest.options[:nest_name] == "_main" ? "open" : "core"
72
72
  end
73
- lcard.update_attributes! content: lcontent.to_s
73
+ lcard.update! content: lcontent.to_s
74
74
  end
75
75
 
76
76
  Card::Cache.reset_all
@@ -31,7 +31,7 @@ class BootstrapThemes < Card::Migration::Core
31
31
 
32
32
  if sidebar_card = Card["*sidebar"]
33
33
  new_content = sidebar_card.db_content.gsub(/(\*(logo|credit))\|content/, '\1|content_panel')
34
- sidebar_card.update_attributes! content: new_content
34
+ sidebar_card.update! content: new_content
35
35
  end
36
36
  end
37
37
  end
@@ -3,9 +3,9 @@
3
3
  class BootswatchThemes < Card::Migration::Core
4
4
  def up
5
5
  themeless = Card.fetch "themeless bootstrap skin", new: { type_code: :skin }
6
- themeless.update_attributes! content: "[[style: jquery-ui-smoothness]]\n[[style: cards]]\n[[style: right sidebar]]\n[[style: bootstrap cards]]"
6
+ themeless.update! content: "[[style: jquery-ui-smoothness]]\n[[style: cards]]\n[[style: right sidebar]]\n[[style: bootstrap cards]]"
7
7
  bs = Card[:bootstrap_css]
8
- bs.update_attributes! codename: nil
8
+ bs.update! codename: nil
9
9
  bs.delete!
10
10
 
11
11
  Card.create! name: "bootswatch shared", type_code: :scss, codename: "bootswatch_shared"
@@ -14,7 +14,7 @@ class BootswatchThemes < Card::Migration::Core
14
14
  path = data_path "themes/#{theme_name}"
15
15
  theme = Card.fetch "#{theme_name} skin"
16
16
  if theme
17
- theme.update_attributes! type_id: Card::SkinID, content: "[[themeless bootstrap skin]]\n[[+bootswatch theme]]", subcards: {
17
+ theme.update! type_id: Card::SkinID, content: "[[themeless bootstrap skin]]\n[[+bootswatch theme]]", subcards: {
18
18
  "+variables" => { type_id: Card::ScssID, content: File.read(File.join path, "_variables.scss") },
19
19
  "+style" => { type_id: Card::ScssID, content: File.read(File.join path, "_bootswatch.scss") }
20
20
  }
@@ -3,6 +3,6 @@
3
3
  class NewCardMenu < Card::Migration::Core
4
4
  def up
5
5
  menu_js = Card[:script_card_menu]
6
- menu_js.update_attributes! type_id: Card::CoffeeScriptID
6
+ menu_js.update! type_id: Card::CoffeeScriptID
7
7
  end
8
8
  end
@@ -5,7 +5,7 @@ class ResponsiveSidebar < Card::Migration::Core
5
5
  if (layout = Card.fetch "Default Layout") &&
6
6
  layout.updater.id == Card::WagnBotID
7
7
  new_content = layout.db_content.gsub "<body>", '<body class="right-sidebar">'
8
- layout.update_attributes! content: new_content
8
+ layout.update! content: new_content
9
9
  end
10
10
  end
11
11
  end
@@ -6,7 +6,7 @@ class FixSkinCodenames < Card::Migration::Core
6
6
  # They were no longer needed for style handling but are still needed for images
7
7
  %w(bootstrap_default cerulean cosmo cyborg darkly flatly journal lumen paper readable sandstone simplex slate spacelab superhero united yeti).each do |theme_name|
8
8
  theme_name = "#{theme_name}_skin"
9
- Card.fetch(theme_name).update_attributes! codename: theme_name
9
+ Card.fetch(theme_name).update! codename: theme_name
10
10
  end
11
11
  end
12
12
  end
@@ -29,7 +29,7 @@ class AddRecaptchaKeyAndAdminInfoCards < Card::Migration::Core
29
29
  def add_admin_info_to_home_card
30
30
  return unless (home = Card[Card[:home].db_content])
31
31
  new_content = home.db_content.prepend "{{*admin info|content}}\n"
32
- home.update_attributes! content: new_content
32
+ home.update! content: new_content
33
33
  end
34
34
 
35
35
  def create_recaptcha_settings
@@ -2,6 +2,6 @@
2
2
 
3
3
  class FixScriptBootstrapCardType < Card::Migration::Core
4
4
  def up
5
- Card[:bootstrap_js].update_attributes! type_id: Card::JavaScriptID
5
+ Card[:bootstrap_js].update! type_id: Card::JavaScriptID
6
6
  end
7
7
  end
@@ -3,7 +3,7 @@
3
3
  class RemoveEditToolbarPinned < Card::Migration::Core
4
4
  def up
5
5
  card = Card[:edit_toolbar_pinned]
6
- card.update_attributes! codename: nil
6
+ card.update! codename: nil
7
7
  card.delete
8
8
  end
9
9
  end
@@ -63,7 +63,7 @@ class UpdateFileAndImageCards < Card::Migration::Core
63
63
  card.actions.each do |action|
64
64
  if (content_change = action.change :db_content)
65
65
  original_filename = content_change.value.split("\n").first
66
- action.update_attributes! comment: original_filename
66
+ action.update! comment: original_filename
67
67
  end
68
68
  end
69
69
  end
@@ -74,7 +74,7 @@ class UpdateFileAndImageCards < Card::Migration::Core
74
74
  simplex_skin slate_skin spacelab_skin superhero_skin united_skin
75
75
  yeti_skin).each do |name|
76
76
  next unless (card = Card[name.to_sym])
77
- card.update_attributes! codename: nil
77
+ card.update! codename: nil
78
78
  if (card = Card.fetch name, :image)
79
79
  card.update_column :codename, "#{name}_image"
80
80
  end
@@ -14,7 +14,7 @@ class UpdateFileHistory < Card::Migration::Core
14
14
  else
15
15
  "~#{card.id}/#{action_id}#{::File.extname(original_filename)}"
16
16
  end
17
- content_change.update_attributes! value: value
17
+ content_change.update! value: value
18
18
  end
19
19
  end
20
20
  Card.search(right: { codename: "machine_output" }).each(&:delete!)
@@ -3,7 +3,7 @@
3
3
  class RemovePerformanceLogCard < Card::Migration::Core
4
4
  def up
5
5
  if card = Card[:performance_log]
6
- card.update_attributes! codename: nil
6
+ card.update! codename: nil
7
7
  card.delete
8
8
  end
9
9
  end
@@ -4,7 +4,7 @@ class ChangeBootstrapCardTypeToScss < Card::Migration::Core
4
4
  def up
5
5
  create_or_update name: "*machine cache", codename: "machine_cache"
6
6
  if (card = Card[:bootstrap_cards])
7
- card.update_attributes! type_id: Card::ScssID
7
+ card.update! type_id: Card::ScssID
8
8
  end
9
9
  end
10
10
  end
@@ -3,6 +3,6 @@
3
3
  class RenameStatsToAdmin < Card::Migration::Core
4
4
  def up
5
5
  return if Card::Codename.exist?(:admin) || !Card::Codename.exist?(:stats)
6
- Card[:stats].update_attributes! name: "*admin", codename: "admin"
6
+ Card[:stats].update! name: "*admin", codename: "admin"
7
7
  end
8
8
  end
@@ -4,7 +4,7 @@ class CorrectSignupSuccessMessage < Card::Migration::Core
4
4
  def up
5
5
  if (card = Card["signup success"]) && card.db_content.include?("{{*title}}")
6
6
  new_content = card.db_content.gsub "{{*title}}", "{{*title|core}}"
7
- card.update_attributes! content: new_content
7
+ card.update! content: new_content
8
8
  end
9
9
  end
10
10
  end
@@ -133,15 +133,6 @@ body, p, ol, ul {
133
133
  content:'';
134
134
  }
135
135
 
136
- /* many sites may want this external link behavior; it's here because it's a nuisance to override when not desired */
137
-
138
- a.external-link,
139
- .closed-content a.external-link {
140
- color: #729;
141
- background: url([[/assets/external_link.png]]) center right no-repeat;
142
- padding-right: 13px !important;
143
- }
144
-
145
136
  .SELF-home-original > .d0-card-content p,
146
137
  .SELF-wagneer_menu > .d0-card-content {
147
138
  a.external-link {
@@ -117,8 +117,8 @@ class SharedData
117
117
 
118
118
  # -------- For history testing: -----------
119
119
  first = create "First", "egg"
120
- first.update_attributes! content: "chicken"
121
- first.update_attributes! content: "chick"
120
+ first.update! content: "chicken"
121
+ first.update! content: "chick"
122
122
 
123
123
  # -------- For rename testing: -----------
124
124
  [
@@ -224,7 +224,7 @@ class SharedData
224
224
  magnifier = create "Magnifier+lens"
225
225
 
226
226
  Card::Auth.current_id = Card["Narcissist"].id
227
- magnifier.update_attributes! content: "zoom in"
227
+ magnifier.update! content: "zoom in"
228
228
  create_optic "Sunglasses", "{{+tint}}{{+lens}}"
229
229
 
230
230
  Card::Auth.current_id = Card["Optic fan"].id
@@ -67,7 +67,7 @@ class Card
67
67
  # the card invalid to save
68
68
  # 2) 'secure' means you are sure that the change doesn't affect the validation
69
69
  # 3) In all stages except IGwD:
70
- # If you call 'create', 'update_attributes' or 'save' the card will become
70
+ # If you call 'create', 'update' or 'save' the card will become
71
71
  # part of the same act and all stage of the validation and storage phase
72
72
  # will be executed immediately for that card. The integration phase will be
73
73
  # executed together with the act card and its subcards.
@@ -48,13 +48,17 @@ class Card
48
48
  # clear the temporary caches and ensure we're using the latest stamp
49
49
  # on the persistent caches.
50
50
  def renew
51
- Card::Cache::Persistent.renew if persistent_cache
51
+ renew_persistent
52
52
  cache_by_class.each_value do |cache|
53
53
  cache.soft.reset
54
54
  cache.hard.renew if cache.hard
55
55
  end
56
56
  end
57
57
 
58
+ def renew_persistent
59
+ Card::Cache::Persistent.renew if persistent_cache
60
+ end
61
+
58
62
  # reset standard cached for all classes
59
63
  def reset
60
64
  reset_hard
@@ -14,7 +14,7 @@ class Card
14
14
  #
15
15
  # ...or via the api like
16
16
  #
17
- # Card[CARDNAME].update_attributes! codename: CODENAME
17
+ # Card[CARDNAME].update! codename: CODENAME
18
18
  #
19
19
  # Generally speaking, _codenames_ are represented by Symbols.
20
20
  #
@@ -22,7 +22,7 @@ class Card
22
22
  def update_card name, content_or_args
23
23
  args = standardize_update_args name, content_or_args
24
24
  resolve_name_conflict args
25
- Card[name].update_attributes! args
25
+ Card[name].update! args
26
26
  end
27
27
 
28
28
  def create_or_update_card name_or_args, content_or_args=nil
@@ -48,7 +48,7 @@ class Card
48
48
  end
49
49
  return unless Card.exist?(name)
50
50
  card = Card[name]
51
- card.update_attributes! codename: nil
51
+ card.update! codename: nil
52
52
  card.delete!
53
53
  end
54
54
 
@@ -271,8 +271,7 @@ class Card
271
271
 
272
272
  return if update_args.empty? && subcards.empty?
273
273
  # FIXME: use ensure_attributes for subcards
274
- card.update_attributes! update_args.merge(subcards: subcards,
275
- skip: :validate_renaming)
274
+ card.update! update_args.merge(subcards: subcards, skip: :validate_renaming)
276
275
  end
277
276
 
278
277
  def changing_args card, args