wagn 1.14.8 → 1.14.9
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/mod/01_core/set/all/content.rb +1 -1
- data/mod/01_core/set/all/fetch.rb +4 -1
- data/mod/01_core/spec/set/all/templating_spec.rb +4 -1
- data/mod/03_machines/set/type/scss.rb +5 -9
- data/mod/03_machines/spec/set/type/css_spec.rb +1 -0
- data/mod/03_machines/spec/set/type/scss_spec.rb +8 -0
- data/mod/05_email/set/right/bcc.rb +2 -0
- data/mod/05_email/set/type/email_template.rb +2 -2
- data/mod/05_standard/set/right/account.rb +8 -2
- data/mod/05_standard/set/type/signup.rb +1 -0
- data/mod/05_standard/spec/set/type/signup_spec.rb +21 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f6e661b341c8a71e483cd218c80a8b2e20033d0b
|
4
|
+
data.tar.gz: bf400c1756544a093fb3a1f9c2bc40d23bd19888
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c13311a967f128a8684e2c8eae810ac4386ae2e07320f0d567bfded8168c1981eca877d3c4a30301553685daaa0ff4070b7a0bd1f43ba27821b16efca39bc063
|
7
|
+
data.tar.gz: 42eccd892969a798788f4a1e0dbe5fe79a6af5815e0f659851795a2abef22a3b83b31f8e6d946bdd6889dcfd76a4b2f4a6a1a58efeecf8c21050ba0a5f16555e
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.14.
|
1
|
+
1.14.9
|
@@ -54,8 +54,11 @@ module ClassMethods
|
|
54
54
|
if card.new_card?
|
55
55
|
if opts[:new]
|
56
56
|
return card.renew(opts) if !clean_cache_opts? opts
|
57
|
+
elsif opts[:skip_virtual]
|
58
|
+
return
|
57
59
|
else
|
58
|
-
|
60
|
+
card.include_set_modules unless opts[:skip_modules] # need to load modules here to call the right virtual? method
|
61
|
+
return unless card.virtual?
|
59
62
|
end
|
60
63
|
card.name = mark.to_s if mark && mark.to_s != card.name
|
61
64
|
end
|
@@ -57,6 +57,7 @@ describe Card::Set::All::Templating do
|
|
57
57
|
Card::Auth.as_bot do
|
58
58
|
@bt = Card.create! :name=>"birthday+*right+*default", :type=>'Date', :content=>"Today!"
|
59
59
|
end
|
60
|
+
@bb = Card.new :name=>'Bob+birthday'
|
60
61
|
@jb = Card.create! :name=>"Jim+birthday"
|
61
62
|
end
|
62
63
|
|
@@ -69,7 +70,9 @@ describe Card::Set::All::Templating do
|
|
69
70
|
end
|
70
71
|
|
71
72
|
it "should apply to new cards" do
|
72
|
-
|
73
|
+
pb = Card.new :name=>"Pete+birthday"
|
74
|
+
expect(pb.raw_content).to eq('Today!')
|
75
|
+
expect(pb.content).to eq('Today!')
|
73
76
|
end
|
74
77
|
end
|
75
78
|
|
@@ -1,16 +1,13 @@
|
|
1
|
-
include
|
1
|
+
include Type::Css
|
2
2
|
|
3
|
-
format :html do
|
4
|
-
view :core, :mod=>Css::HtmlFormat
|
5
|
-
view :editor, :mod=>PlainText::HtmlFormat
|
6
|
-
view :content_changes, :mod=>CoffeeScript::HtmlFormat
|
7
|
-
end
|
8
|
-
|
9
3
|
def diff_args
|
10
4
|
{:format=>:text}
|
11
5
|
end
|
12
6
|
|
7
|
+
|
13
8
|
format do
|
9
|
+
include Css::Format
|
10
|
+
|
14
11
|
view :core do |args|
|
15
12
|
process_content compile_scss(_render_raw)
|
16
13
|
end
|
@@ -21,7 +18,6 @@ format do
|
|
21
18
|
e
|
22
19
|
end
|
23
20
|
|
24
|
-
|
25
21
|
end
|
26
22
|
|
27
|
-
|
23
|
+
format( :html ) { include Css::HtmlFormat }
|
@@ -38,6 +38,14 @@ describe Card::Set::Type::Scss do
|
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
41
|
+
it "should process links and inclusions but not urls" do
|
42
|
+
Card::Auth.as_bot do
|
43
|
+
scss = ".TYPE-X.no-citations {\n color: #BA5B5B;\n}\n"
|
44
|
+
card = Card.create! :name=>'minimal css', :type=>'scss', :content=>scss
|
45
|
+
card.format(:css).render_core.should == scss
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
41
49
|
it_should_behave_like 'content machine', that_produces_css do
|
42
50
|
let(:machine_card) { Card.gimme! "test scss", :type => :scss, :content => scss }
|
43
51
|
let(:card_content) do
|
@@ -23,6 +23,8 @@ format :email_text do
|
|
23
23
|
view :email_addresses do |args|
|
24
24
|
context = args[:context] || self
|
25
25
|
card.item_names(:context=>context.cardname).map do |item_name|
|
26
|
+
# note that context is processed twice here because pointers absolutize item_names by default
|
27
|
+
# while other types can return relative names. That's poor default behavior and should be fixed!
|
26
28
|
item_name = item_name.to_name.to_absolute(context).to_s
|
27
29
|
if item_name.match /.+\@.+\..+/
|
28
30
|
item_name
|
@@ -58,8 +58,8 @@ def email_config args={}
|
|
58
58
|
if default_from=Card::Mailer.default[:from]
|
59
59
|
config[:from] = from_email ? "#{from_name || from_email} <#{default_from}>" : default_from
|
60
60
|
config[:reply_to] ||= config[:from]
|
61
|
-
|
62
|
-
config[:from]
|
61
|
+
elsif config[:from].blank?
|
62
|
+
config[:from] = Card[Card::WagnBotID].account.email
|
63
63
|
end
|
64
64
|
config.select {|k,v| v.present? }
|
65
65
|
end
|
@@ -25,7 +25,7 @@ end
|
|
25
25
|
|
26
26
|
format do
|
27
27
|
view :verify_url do |args|
|
28
|
-
wagn_url "
|
28
|
+
wagn_url "update/#{card.cardname.left_name.url_key}?token=#{card.token}"
|
29
29
|
end
|
30
30
|
|
31
31
|
view :verify_days do |args|
|
@@ -33,7 +33,7 @@ format do
|
|
33
33
|
end
|
34
34
|
|
35
35
|
view :reset_password_url do |args|
|
36
|
-
wagn_url "
|
36
|
+
wagn_url "update/#{card.cardname.url_key}?reset_token=#{card.token_card.refresh(true).content}"
|
37
37
|
end
|
38
38
|
|
39
39
|
view :reset_password_days do |args|
|
@@ -128,6 +128,12 @@ event :reset_token do
|
|
128
128
|
end
|
129
129
|
|
130
130
|
|
131
|
+
event :send_welcome_email do
|
132
|
+
if ((welcome = Card['welcome email']) && welcome.type_code == :email_template)
|
133
|
+
welcome.deliver(:context=>left, :to=>self.email)
|
134
|
+
end
|
135
|
+
end
|
136
|
+
|
131
137
|
event :send_account_verification_email, :on=>:create, :after=>:extend, :when=>proc{ |c| c.token.present? } do
|
132
138
|
Card[:verification_email].deliver( :context => self, :to => self.email )
|
133
139
|
end
|
@@ -98,6 +98,7 @@ end
|
|
98
98
|
event :activate_account do
|
99
99
|
subcards['+*account'] = {'+*status'=>'active'}
|
100
100
|
self.type_id = Card.default_accounted_type_id
|
101
|
+
account.send_welcome_email
|
101
102
|
end
|
102
103
|
|
103
104
|
event :approve_with_token, :on=>:update, :before=>:approve, :when=>proc {|c| Env.params[:approve_with_token] } do
|
@@ -83,7 +83,6 @@ describe Card::Set::Type::Signup do
|
|
83
83
|
success = Card::Env.params[:success]
|
84
84
|
expect(success[:message]).to match(/expired/) # user notified of expired token
|
85
85
|
end
|
86
|
-
|
87
86
|
end
|
88
87
|
|
89
88
|
|
@@ -121,7 +120,7 @@ describe Card::Set::Type::Signup do
|
|
121
120
|
|
122
121
|
end
|
123
122
|
|
124
|
-
it '
|
123
|
+
it 'does not send verification email' do
|
125
124
|
expect(Mail::TestMailer.deliveries[-2]).to be_nil
|
126
125
|
end
|
127
126
|
|
@@ -155,6 +154,26 @@ describe Card::Set::Type::Signup do
|
|
155
154
|
|
156
155
|
end
|
157
156
|
|
157
|
+
context 'a welcome email card exists' do
|
158
|
+
before do
|
159
|
+
Card::Auth.as_bot do
|
160
|
+
Card.create! :name=>'welcome email', :subcards=>{'+*subject'=>'welcome',
|
161
|
+
'+*html_message'=>'Welcome {{_self|name}}'}, :type_id=>Card::EmailTemplateID
|
162
|
+
end
|
163
|
+
Mail::TestMailer.deliveries.clear
|
164
|
+
@signup = Card.create! :name=>'Big Bad Sheep', :type_id=>Card::SignupID,
|
165
|
+
'+*account'=>{'+*email'=>'sheep@wagn.org', '+*password'=>'sheep'}
|
166
|
+
|
167
|
+
end
|
168
|
+
it 'sends welcome email when account is activated' do
|
169
|
+
@signup.activate_account
|
170
|
+
@mail = ActionMailer::Base.deliveries.find{ |a| a.subject == 'welcome' }
|
171
|
+
Mail::TestMailer.deliveries.clear
|
172
|
+
|
173
|
+
expect(@mail).to be_truthy
|
174
|
+
expect(@mail.body.raw_source ).to include('Welcome Big Bad Sheep')
|
175
|
+
end
|
176
|
+
end
|
158
177
|
|
159
178
|
context 'invitation' do
|
160
179
|
before do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wagn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.14.
|
4
|
+
version: 1.14.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ethan McCutchen
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2015-02-
|
13
|
+
date: 2015-02-15 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|