card 1.96.7 → 1.96.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/db/migrate_core_cards/20120611203506_rails_inflection_updates.rb +2 -2
- data/db/migrate_core_cards/20130823192433_add_style_cards.rb +5 -5
- data/db/migrate_core_cards/20130910183318_move_styles_to_content.rb +1 -1
- data/db/migrate_core_cards/20130920291703_update_stylesheets.rb +1 -1
- data/db/migrate_core_cards/20131016172445_common_css_patch.rb +1 -1
- data/db/migrate_core_cards/20140110193325_reset_account_request_type.rb +1 -1
- data/db/migrate_core_cards/20140307231621_user_data_to_cards.rb +1 -1
- data/db/migrate_core_cards/20140512155840_add_script_cards.rb +1 -1
- data/db/migrate_core_cards/20140629222005_add_email_cards.rb +2 -2
- data/db/migrate_core_cards/20141120120605_fix_notification_html_message.rb +1 -1
- data/db/migrate_core_cards/20141204061304_watchers_to_following.rb +1 -1
- data/db/migrate_core_cards/20150202143810_import_bootstrap_layout.rb +4 -4
- data/db/migrate_core_cards/20150317162412_bootstrap_themes.rb +1 -1
- data/db/migrate_core_cards/20150326205655_bootswatch_themes.rb +3 -3
- data/db/migrate_core_cards/20150331135745_new_card_menu.rb +1 -1
- data/db/migrate_core_cards/20150501010515_responsive_sidebar.rb +1 -1
- data/db/migrate_core_cards/20150510031118_fix_skin_codenames.rb +1 -1
- data/db/migrate_core_cards/20150610180019_add_recaptcha_key_and_admin_info_cards.rb +1 -1
- data/db/migrate_core_cards/20150627205133_fix_script_bootstrap_card_type.rb +1 -1
- data/db/migrate_core_cards/20150702130543_remove_edit_toolbar_pinned.rb +1 -1
- data/db/migrate_core_cards/20150724123438_update_file_and_image_cards.rb +2 -2
- data/db/migrate_core_cards/20150824135418_update_file_history.rb +1 -1
- data/db/migrate_core_cards/20150910085603_remove_performance_log_card.rb +1 -1
- data/db/migrate_core_cards/20160801143221_change_bootstrap_card_type_to_scss.rb +1 -1
- data/db/migrate_core_cards/20160811115836_rename_stats_to_admin.rb +1 -1
- data/db/migrate_core_cards/20170830210517_correct_signup_success_message.rb +1 -1
- data/db/migrate_core_cards/data/1.12_stylesheets/traditional.scss +0 -9
- data/db/seed/test/seed.rb +3 -3
- data/lib/card/act_manager.rb +1 -1
- data/lib/card/cache.rb +5 -1
- data/lib/card/codename.rb +1 -1
- data/lib/card/model/save_helper.rb +3 -4
- data/lib/card/query.rb +15 -9
- data/lib/card/query/abstract_query/tie.rb +1 -0
- data/lib/card/query/card_query/interpretation.rb +1 -1
- data/lib/card/query/card_query/match_attributes.rb +2 -2
- data/lib/card/query/card_query/normalization.rb +6 -3
- data/lib/card/query/value.rb +3 -2
- data/lib/card/set/event/delayed_event.rb +1 -0
- data/mod/account/set/right/account.rb +4 -12
- data/mod/account/set/type/signup.rb +4 -0
- data/mod/account/spec/set/all/account_spec.rb +3 -3
- data/mod/account/spec/set/right/account_spec.rb +27 -20
- data/mod/account/spec/set/right/email_spec.rb +3 -3
- data/mod/account/spec/set/right/password_spec.rb +4 -5
- data/mod/account/spec/set/self/signin_spec.rb +8 -9
- data/mod/account/spec/set/type/signup_spec.rb +3 -3
- data/mod/admin/spec/set/self/admin_spec.rb +4 -4
- data/mod/bootstrap/db/migrate_core_cards/20180423160231_migrate_customized_bootstrap_skin.rb +2 -2
- data/mod/bootstrap/db/migrate_core_cards/20180423170283_add_type_bootswatch_skin.rb +1 -1
- data/mod/bootstrap/db/migrate_core_cards/20180601133753_migrate_skins.rb +1 -1
- data/mod/bootstrap/db/migrate_core_cards/data/20181108181219_migrate_classic_skins_to_bootstrap.rb +2 -2
- data/mod/bootstrap/lib/stylesheets/style_bootstrap_cards.scss +3 -0
- data/mod/bootstrap/set/abstract/bootswatch_theme.rb +1 -1
- data/mod/bootstrap/spec/set/type/bootswatch_skin_spec.rb +1 -1
- data/mod/bootstrap/spec/set/type/customized_bootswatch_skin_spec.rb +1 -1
- data/mod/carrierwave/lib/carrier_wave/file_card_uploader.rb +2 -2
- data/mod/carrierwave/set/abstract/attachment.rb +1 -1
- data/mod/carrierwave/set/abstract/attachment/storage_type.rb +2 -2
- data/mod/carrierwave/set/abstract/attachment/upload_cache.rb +2 -2
- data/mod/carrierwave/spec/set/type/file_spec.rb +9 -12
- data/mod/carrierwave/spec/set/type/image_spec.rb +2 -2
- data/mod/core/set/all/actify.rb +5 -2
- data/mod/core/set/all/cache.rb +1 -1
- data/mod/core/set/all/content.rb +12 -30
- data/mod/core/set/all/contextual_content.rb +28 -0
- data/mod/core/set/all/name.rb +1 -1
- data/mod/core/set/all/rules.rb +1 -0
- data/mod/core/set/all/trash.rb +2 -2
- data/mod/core/set/all/utils.rb +2 -2
- data/mod/core/spec/set/all/actify_spec.rb +45 -2
- data/mod/core/spec/set/all/codename_spec.rb +2 -2
- data/mod/core/spec/set/all/event_conditions_spec.rb +15 -16
- data/mod/core/spec/set/all/name_events_spec.rb +2 -2
- data/mod/core/spec/set/all/observer_spec.rb +1 -1
- data/mod/core/spec/set/all/permissions_spec.rb +3 -3
- data/mod/core/spec/set/all/references_spec.rb +1 -1
- data/mod/core/spec/set/all/rename_spec.rb +2 -2
- data/mod/core/spec/set/all/trash_spec.rb +1 -1
- data/mod/follow/set/all/follow/follow_link.rb +7 -1
- data/mod/follow/spec/set/all/notify_spec.rb +2 -2
- data/mod/follow/spec/set/right/account_spec.rb +2 -2
- data/mod/follow/spec/set/right/followers_spec.rb +2 -2
- data/mod/follow/spec/set/self/follow_defaults_spec.rb +1 -1
- data/mod/follow/spec/set/type/notification_template_spec.rb +1 -1
- data/mod/history/set/all/history.rb +1 -1
- data/mod/history/set/all/history/act_listing.rb +2 -1
- data/mod/history/set/all/history/events.rb +3 -3
- data/mod/machines/lib/stylesheets/style_cards.scss +17 -16
- data/mod/machines/set/abstract/machine.rb +3 -2
- data/mod/machines/set/abstract/machine/output_cache.rb +1 -1
- data/mod/machines/set/abstract/machine_input.rb +1 -1
- data/mod/machines/spec/set/right/machine_cache_spec.rb +2 -2
- data/mod/machines/spec/set/type/skin_spec.rb +2 -2
- data/mod/pointer/spec/set/abstract/pointer/events_spec.rb +2 -2
- data/mod/search/set/abstract/01_filter_form_helper.rb +5 -1
- data/mod/search/set/abstract/search/views.rb +1 -1
- data/mod/settings/spec/set/right/comment_spec.rb +1 -1
- data/mod/solid_cache/set/right/solid_cache.rb +1 -1
- data/mod/solid_cache/spec/set/abstract/solid_cache_spec.rb +4 -4
- data/mod/standard/set/self/activity_toolbar_button.rb +1 -1
- data/mod/standard/spec/content/chunk/include_spec.rb +1 -1
- data/mod/standard/spec/set/all/history_spec.rb +5 -5
- data/mod/standard/spec/set/type/email_template/email_config_spec.rb +2 -2
- data/mod/standard/spec/set/type/list_spec.rb +9 -9
- data/mod/standard/spec/set/type/listed_by_spec.rb +9 -9
- data/mod/standard/spec/set/type/search_type_spec.rb +2 -3
- data/mod/virtual/lib/card/virtual.rb +1 -1
- data/mod/virtual/set/abstract/virtual_cache.rb +2 -2
- metadata +5 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6715082009c2c58c4ed4d8a36b1f0c826552efae
|
|
4
|
+
data.tar.gz: 78c2b43dd24a1009608b1bf096eacc83556fbf39
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e7b2fc3c66eb5c4f52f039f379b1012fbd1f40bb73f31e94707b2c380a6ca7c51dfd620c8bc63e1338394198e8fbb72e422630eaed598abda8382eebae3dcea9
|
|
7
|
+
data.tar.gz: de15fad77c70810cfec22af1639d8dde030f4c1e89fe8720f636bd8a4d3c0f84c2bc651aa41721f0b493766c7226e75d559cf7b37e022d0b54c33de18aa7ea10
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.6.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
15
|
+
new_css.update(css_attributes) unless new_css.new_card?
|
|
16
16
|
new_css.save!
|
|
17
17
|
|
|
18
|
-
old_css.
|
|
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.
|
|
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.
|
|
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}"].
|
|
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.
|
|
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.
|
|
8
|
+
card.update! content: File.read("#{dir}/common.scss")
|
|
9
9
|
end
|
|
10
10
|
end
|
|
11
11
|
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].
|
|
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
|
|
@@ -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.
|
|
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.
|
|
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.
|
|
8
|
+
html_message.update! content: File.read(File.join(dir, "#{codename}.html"))
|
|
9
9
|
end
|
|
10
10
|
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.
|
|
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.
|
|
21
|
+
style_rule_card.update!(
|
|
22
22
|
content: "[[customized bootstrap skin]]"
|
|
23
23
|
)
|
|
24
24
|
else
|
|
25
|
-
style_rule_card.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
}
|
|
@@ -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.
|
|
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).
|
|
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.
|
|
32
|
+
home.update! content: new_content
|
|
33
33
|
end
|
|
34
34
|
|
|
35
35
|
def create_recaptcha_settings
|
|
@@ -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.
|
|
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.
|
|
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.
|
|
17
|
+
content_change.update! value: value
|
|
18
18
|
end
|
|
19
19
|
end
|
|
20
20
|
Card.search(right: { codename: "machine_output" }).each(&:delete!)
|
|
@@ -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.
|
|
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].
|
|
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.
|
|
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 {
|
data/db/seed/test/seed.rb
CHANGED
|
@@ -117,8 +117,8 @@ class SharedData
|
|
|
117
117
|
|
|
118
118
|
# -------- For history testing: -----------
|
|
119
119
|
first = create "First", "egg"
|
|
120
|
-
first.
|
|
121
|
-
first.
|
|
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.
|
|
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
|
data/lib/card/act_manager.rb
CHANGED
|
@@ -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', '
|
|
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.
|
data/lib/card/cache.rb
CHANGED
|
@@ -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
|
-
|
|
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
|
data/lib/card/codename.rb
CHANGED
|
@@ -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].
|
|
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.
|
|
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.
|
|
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
|