card 1.20.2 → 1.20.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/card.gemspec +3 -1
- data/config/initializers/01_core_extensions/array.rb +1 -1
- data/config/initializers/01_core_extensions/module.rb +1 -1
- data/config/initializers/02_patches/active_record.rb +66 -0
- data/config/initializers/patches.rb +4 -0
- data/db/migrate_core_cards/20170314175313_add_notification_event_card.rb +21 -0
- data/db/seed/new/card_actions.yml +723 -475
- data/db/seed/new/card_acts.yml +45 -45
- data/db/seed/new/card_changes.yml +2306 -1675
- data/db/seed/new/card_references.yml +389 -116
- data/db/seed/new/cards.yml +2537 -2067
- data/db/seed/test/fixtures/card_actions.yml +1709 -1445
- data/db/seed/test/fixtures/card_acts.yml +302 -290
- data/db/seed/test/fixtures/card_changes.yml +5494 -4818
- data/db/seed/test/fixtures/card_references.yml +1137 -794
- data/db/seed/test/fixtures/cards.yml +3631 -3120
- data/db/version_core_cards.txt +1 -1
- data/lib/card/auth/current.rb +21 -0
- data/lib/card/env.rb +7 -2
- data/lib/card/env/success.rb +13 -3
- data/lib/card/format/render.rb +13 -4
- data/lib/card/migration.rb +4 -6
- data/lib/card/mod/loader.rb +8 -0
- data/lib/card/model/save_helper.rb +45 -0
- data/lib/card/name/view_name.rb +8 -6
- data/lib/card/query/join.rb +4 -2
- data/lib/card/query/sorting.rb +26 -22
- data/lib/card/reference.rb +2 -2
- data/lib/card/set/advanced_api.rb +31 -6
- data/lib/card/set/event.rb +16 -8
- data/lib/card/set/format.rb +15 -0
- data/lib/card/set/format/haml_views.rb +78 -0
- data/lib/card/set/loader.rb +3 -2
- data/lib/cardio.rb +17 -1
- data/mod/Modfile +2 -1
- data/mod/account/spec/set/all/account_spec.rb +1 -1
- data/mod/basic_formats/set/all/all_css.rb +4 -5
- data/mod/bootstrap/set/all/bootstrap/navbar.rb +6 -0
- data/mod/bootstrap/set/all/bootstrap/tabs.rb +13 -6
- data/mod/carrierwave/set/abstract/attachment/upload_cache.rb +6 -0
- data/mod/core/set/all/assign_attributes.rb +3 -0
- data/mod/core/set/all/fetch.rb +3 -3
- data/mod/core/spec/set/all/collection_spec.rb +5 -3
- data/mod/history/lib/card/change.rb +2 -2
- data/mod/machines/file/all_script_machine_output/file.js +37 -121
- data/mod/machines/file/all_style_machine_output/file.css +4 -4
- data/mod/machines/lib/javascript/wagn.js.coffee +4 -0
- data/mod/machines/lib/javascript/wagn_mod.js.coffee +0 -2
- data/mod/machines/set/type/css.rb +6 -0
- data/mod/{email → notifications}/format/email_html_format.rb +0 -0
- data/mod/{email → notifications}/format/email_text_format.rb +0 -0
- data/mod/{email → notifications}/lib/card/follow_option.rb +0 -0
- data/mod/{email → notifications}/set/abstract/test_context.rb +0 -0
- data/mod/{email → notifications}/set/all/email_html.rb +0 -0
- data/mod/{email → notifications}/set/all/email_text.rb +0 -0
- data/mod/{email → notifications}/set/all/follow.rb +0 -0
- data/mod/notifications/set/all/observer.rb +22 -0
- data/mod/{email/set/all/notify.rb → notifications/set/all/send_notifications.rb} +0 -0
- data/mod/notifications/set/all/show_notifications.rb +7 -0
- data/mod/{email → notifications}/set/right/bcc.rb +0 -0
- data/mod/{email → notifications}/set/right/cc.rb +0 -0
- data/mod/{email → notifications}/set/right/follow.rb +0 -0
- data/mod/{email → notifications}/set/right/follow_fields.rb +0 -0
- data/mod/{email → notifications}/set/right/followers.rb +0 -0
- data/mod/{email → notifications}/set/right/following.rb +0 -0
- data/mod/{email → notifications}/set/right/from.rb +0 -0
- data/mod/{email → notifications}/set/right/html_message.rb +0 -0
- data/mod/{email → notifications}/set/right/subject.rb +0 -0
- data/mod/{email → notifications}/set/right/text_message.rb +0 -0
- data/mod/{email → notifications}/set/right/to.rb +0 -0
- data/mod/{email → notifications}/set/self/always.rb +0 -0
- data/mod/{email → notifications}/set/self/created.rb +0 -0
- data/mod/{email → notifications}/set/self/edited.rb +0 -0
- data/mod/{email → notifications}/set/self/follow.rb +0 -0
- data/mod/{email → notifications}/set/self/follow_defaults.rb +0 -0
- data/mod/{email → notifications}/set/self/never.rb +0 -0
- data/mod/{email → notifications}/set/type/email_template.rb +0 -0
- data/mod/{email → notifications}/set/type/email_template/email_config.rb +0 -0
- data/mod/notifications/set/type/notification_template.rb +23 -0
- data/mod/{email → notifications}/set/type_plus_right/user/follow.rb +0 -0
- data/mod/{email → notifications}/spec/set/all/follow_spec.rb +14 -5
- data/mod/{email → notifications}/spec/set/all/notify_spec.rb +1 -1
- data/mod/{email → notifications}/spec/set/all/observer_spec.rb +1 -1
- data/mod/{email → notifications}/spec/set/right/followers_spec.rb +0 -0
- data/mod/{email → notifications}/spec/set/right/following_spec.rb +0 -0
- data/mod/{email → notifications}/spec/set/self/follow_defaults_spec.rb +0 -0
- data/mod/notifications/spec/set/type/notification_template_spec.rb +58 -0
- data/mod/{standard/set/abstract/search/paging.rb → pointer/set/abstract/00_paging.rb} +10 -1
- data/mod/{standard/set/abstract/search/paging → pointer/set/abstract/00_paging}/paging_links.rb +0 -0
- data/mod/pointer/set/abstract/01_pointer.rb +13 -1
- data/mod/pointer/spec/set/type/pointer_spec.rb +7 -0
- data/mod/standard/set/abstract/01_search_params.rb +4 -0
- data/mod/standard/set/abstract/search.rb +1 -0
- data/mod/standard/set/abstract/wql_search.rb +6 -4
- data/mod/standard/set/all/rich_html/toolbar.rb +31 -16
- data/mod/standard/set/all/rich_html/wrapper.rb +3 -1
- data/mod/standard/set/self/search.rb +28 -8
- data/mod/standard/set/type/search_type.rb +10 -8
- data/mod/standard/spec/set/all/rich_html/editing_spec.rb +2 -1
- data/mod/standard/spec/set/all/rich_html/form_spec.rb +2 -2
- data/mod/standard/spec/set/self/search_spec.rb +8 -1
- data/mod/standard/spec/set/type/phrase_spec.rb +2 -1
- data/mod/twitter/Gemfile +3 -0
- data/mod/twitter/db/migrate_cards/20170305112346_add_twitter_cards.rb +30 -0
- data/mod/twitter/set/type/twitter_template.rb +22 -0
- data/spec/lib/card/query/sorting_spec.rb +68 -0
- data/spec/lib/card/query_spec.rb +0 -65
- metadata +78 -40
- data/mod/email/set/all/observer.rb +0 -26
- data/mod/standard/spec/set/all/email_html_spec.rb +0 -15
@@ -1,26 +0,0 @@
|
|
1
|
-
def send_action_mails args
|
2
|
-
setting = "on_#{args[:on]}".to_sym
|
3
|
-
email_templates_for(setting) do |mailcard|
|
4
|
-
mailcard.deliver(context: self)
|
5
|
-
end
|
6
|
-
end
|
7
|
-
|
8
|
-
def email_templates_for setting
|
9
|
-
if (email_templates = @email_template_cache ||
|
10
|
-
((event_card = rule_card(setting)) && event_card.extended_item_cards))
|
11
|
-
email_templates.each do |mailcard|
|
12
|
-
yield(mailcard)
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
[:create, :update, :delete].each do |action|
|
18
|
-
event "observer_#{action}".to_sym, :integrate, on: action do
|
19
|
-
send_action_mails on: action
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
event :cache_delete_email_templates, :store, on: :delete do
|
24
|
-
event_card = rule_card(:on_delete)
|
25
|
-
@email_template_cache = event_card && event_card.extended_item_cards
|
26
|
-
end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
# -*- encoding : utf-8 -*-
|
2
|
-
|
3
|
-
describe Card::Format::EmailHtmlFormat do
|
4
|
-
it "renders full urls" do
|
5
|
-
Card::Env[:protocol] = "http://"
|
6
|
-
Card::Env[:host] = "www.fake.com"
|
7
|
-
expect(render_content("[[B]]", format: "email_html")).to eq('<a class="known-card" href="http://www.fake.com/B">B</a>')
|
8
|
-
end
|
9
|
-
|
10
|
-
describe "raw view" do
|
11
|
-
it "renders missing included cards as blank" do
|
12
|
-
expect(render_content("{{strombooby}}", format: "email_html")).to eq("")
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|