alchemy_crm 2.0.2 → 2.0.3
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.
- data/Gemfile +1 -3
- data/app/controllers/alchemy_crm/admin/contacts_controller.rb +25 -20
- data/app/models/alchemy_crm/contact.rb +20 -38
- data/app/views/alchemy_crm/admin/contacts/_contact.html.erb +1 -1
- data/app/views/alchemy_crm/admin/contacts/_form.html.erb +2 -2
- data/app/views/alchemy_crm/admin/contacts/index.html.erb +1 -1
- data/app/views/alchemy_crm/admin/contacts/vcf_import_result.html.erb +4 -2
- data/app/views/csv_magic/import_errors.html.erb +1 -1
- data/config/alchemy_crm.config.yml +7 -3
- data/config/locales/alchemy_crm.de.yml +5 -4
- data/db/migrate/20120515150400_rename_alchemy_crm_contacts_organisation_into_company.rb +9 -0
- data/lib/alchemy_crm/version.rb +1 -1
- data/spec/controllers/alchemy_crm/contacts_controller_spec.rb +2 -2
- data/spec/controllers/alchemy_crm/mailings_controller_spec.rb +2 -2
- data/spec/dummy/db/schema.rb +2 -2
- data/spec/models/alchemy_crm/contact_group_spec.rb +2 -2
- data/spec/models/alchemy_crm/contact_spec.rb +1 -1
- data/spec/models/alchemy_crm/newsletter_spec.rb +3 -3
- metadata +5 -4
data/Gemfile
CHANGED
@@ -6,9 +6,7 @@ gemspec
|
|
6
6
|
group :development do
|
7
7
|
if !ENV["CI"]
|
8
8
|
gem 'guard-spork'
|
9
|
-
gem 'ruby-
|
10
|
-
gem 'linecache19', '~> 0.5.13', :platform => :ruby_19
|
11
|
-
gem 'ruby-debug19', '~> 0.11.6', :require => 'ruby-debug', :platform => :ruby_19
|
9
|
+
gem 'ruby-debug19', :require => 'ruby-debug', :platform => :ruby_19
|
12
10
|
gem 'ruby-debug', :platform => :ruby_18
|
13
11
|
end
|
14
12
|
end
|
@@ -7,18 +7,19 @@ module AlchemyCrm
|
|
7
7
|
|
8
8
|
csv_magic_config(
|
9
9
|
:mapping => {
|
10
|
-
Contact.
|
11
|
-
Contact.
|
12
|
-
Contact.
|
13
|
-
Contact.
|
14
|
-
Contact.
|
15
|
-
Contact.
|
16
|
-
Contact.
|
17
|
-
Contact.
|
18
|
-
Contact.
|
19
|
-
Contact.
|
20
|
-
Contact.
|
21
|
-
Contact.
|
10
|
+
Contact.clean_human_attribute_name(:salutation) => :salutation,
|
11
|
+
Contact.clean_human_attribute_name(:title) => :title,
|
12
|
+
Contact.clean_human_attribute_name(:firstname) => :firstname,
|
13
|
+
Contact.clean_human_attribute_name(:lastname) => :lastname,
|
14
|
+
Contact.clean_human_attribute_name(:email) => :email,
|
15
|
+
Contact.clean_human_attribute_name(:company) => :company,
|
16
|
+
Contact.clean_human_attribute_name(:address) => :address,
|
17
|
+
Contact.clean_human_attribute_name(:zip) => :zip,
|
18
|
+
Contact.clean_human_attribute_name(:city) => :city,
|
19
|
+
Contact.clean_human_attribute_name(:country) => :country,
|
20
|
+
Contact.clean_human_attribute_name(:phone) => :phone,
|
21
|
+
Contact.clean_human_attribute_name(:mobile) => :mobile,
|
22
|
+
Contact.human_attribute_name(:tag_list) => :tag_list
|
22
23
|
}
|
23
24
|
)
|
24
25
|
|
@@ -32,13 +33,10 @@ module AlchemyCrm
|
|
32
33
|
def import
|
33
34
|
if request.post?
|
34
35
|
if params[:verified] == "1"
|
35
|
-
if params[:fields] ||
|
36
|
+
if params[:fields] || (params[:file] && !is_vcard_file?(params[:file]))
|
36
37
|
handle_csv_post_request
|
37
|
-
elsif !(params[:file].content_type =~ /vcard|directory/i).nil?
|
38
|
-
handle_vcf_post_request
|
39
38
|
else
|
40
|
-
|
41
|
-
redirect_to admin_contacts_path
|
39
|
+
handle_vcf_post_request
|
42
40
|
end
|
43
41
|
else
|
44
42
|
@error = build_error_message(alchemy_crm_t(:imported_contacts_not_verified))
|
@@ -79,12 +77,11 @@ module AlchemyCrm
|
|
79
77
|
reader.each do |row|
|
80
78
|
@contacts << contact = Contact.new(row)
|
81
79
|
contact.verified = true
|
82
|
-
contact.skip_validation = true
|
83
80
|
unless contact.save
|
84
81
|
@csv_import_errors.push [contact, contact.errors]
|
85
82
|
end
|
86
83
|
end
|
87
|
-
@valid_contacts = @contacts.select(&:valid?)
|
84
|
+
@valid_contacts = @contacts.select(&:valid?)
|
88
85
|
reader.remove_file if @csv_import_errors.empty?
|
89
86
|
end
|
90
87
|
|
@@ -97,7 +94,9 @@ module AlchemyCrm
|
|
97
94
|
@errors = build_error_message(alchemy_crm_t(:missing_vcard))
|
98
95
|
else
|
99
96
|
@contacts = Contact.new_from_vcard(params[:file], true)
|
100
|
-
if @contacts.
|
97
|
+
if @contacts.empty?
|
98
|
+
flash[:error] = alchemy_crm_t(:no_contacts_imported)
|
99
|
+
elsif @contacts.detect(&:invalid?).nil?
|
101
100
|
flash[:notice] = alchemy_crm_t(:successfully_imported_contacts)
|
102
101
|
else
|
103
102
|
@errors = build_error_message(alchemy_crm_t(:please_check_highlighted_vcards_on_errors))
|
@@ -107,6 +106,12 @@ module AlchemyCrm
|
|
107
106
|
render :vcf_import_result
|
108
107
|
end
|
109
108
|
|
109
|
+
def is_vcard_file?(file)
|
110
|
+
content = file.read
|
111
|
+
file.rewind
|
112
|
+
content.starts_with?("BEGIN:VCARD")
|
113
|
+
end
|
114
|
+
|
110
115
|
end
|
111
116
|
end
|
112
117
|
end
|
@@ -16,42 +16,23 @@ module AlchemyCrm
|
|
16
16
|
:address,
|
17
17
|
:zip,
|
18
18
|
:city,
|
19
|
-
:
|
20
|
-
:country,
|
21
|
-
:subscriptions_attributes
|
22
|
-
)
|
23
|
-
|
24
|
-
attr_accessible(
|
25
|
-
:salutation,
|
26
|
-
:title,
|
27
|
-
:firstname,
|
28
|
-
:lastname,
|
29
|
-
:email,
|
30
|
-
:phone,
|
31
|
-
:mobile,
|
32
|
-
:address,
|
33
|
-
:zip,
|
34
|
-
:city,
|
35
|
-
:organisation,
|
19
|
+
:company,
|
36
20
|
:country,
|
37
21
|
:subscriptions_attributes,
|
38
22
|
:verified,
|
39
23
|
:disabled,
|
40
|
-
:tag_list
|
41
|
-
:as => :admin
|
24
|
+
:tag_list
|
42
25
|
)
|
43
26
|
|
44
27
|
has_many :subscriptions, :dependent => :destroy
|
45
28
|
has_many :newsletters, :through => :subscriptions, :uniq => true
|
46
29
|
has_many :recipients
|
47
30
|
|
48
|
-
attr_accessor :skip_validation
|
49
|
-
|
50
31
|
accepts_nested_attributes_for :subscriptions, :allow_destroy => true
|
51
32
|
|
52
|
-
|
53
|
-
|
54
|
-
|
33
|
+
Config.get(:additional_contact_validations).each do |field|
|
34
|
+
validates_presence_of field.to_sym
|
35
|
+
end
|
55
36
|
validates_presence_of :email
|
56
37
|
validates_uniqueness_of :email
|
57
38
|
validates_format_of :email, :with => ::Authlogic::Regex.email, :if => proc { errors[:email].blank? }
|
@@ -72,7 +53,7 @@ module AlchemyCrm
|
|
72
53
|
[::I18n.t(:zip, :scope => 'activerecord.attributes.alchemy_crm/contact', :default => 'Zipcode'), "zip"],
|
73
54
|
[::I18n.t(:city, :scope => 'activerecord.attributes.alchemy_crm/contact', :default => 'City'), "city"],
|
74
55
|
[::I18n.t(:country, :scope => 'activerecord.attributes.alchemy_crm/contact', :default => 'Country'), "country"],
|
75
|
-
[::I18n.t(:
|
56
|
+
[::I18n.t(:company, :scope => 'activerecord.attributes.alchemy_crm/contact', :default => 'Company'), "company"]
|
76
57
|
]
|
77
58
|
|
78
59
|
INTERPOLATION_NAME_METHODS = %w(fullname name_with_title firstname lastname name email)
|
@@ -81,7 +62,7 @@ module AlchemyCrm
|
|
81
62
|
update_attributes({
|
82
63
|
:verified => false,
|
83
64
|
:disabled => true
|
84
|
-
}
|
65
|
+
})
|
85
66
|
subscriptions.destroy_all
|
86
67
|
end
|
87
68
|
|
@@ -96,14 +77,14 @@ module AlchemyCrm
|
|
96
77
|
end
|
97
78
|
|
98
79
|
# Translated salutation
|
99
|
-
#
|
80
|
+
#
|
100
81
|
# Translate the saluations in your +config/LOCALE.yml+
|
101
|
-
#
|
82
|
+
#
|
102
83
|
# alchemy_crm:
|
103
84
|
# salutations:
|
104
|
-
# mr:
|
105
|
-
# ms:
|
106
|
-
#
|
85
|
+
# mr:
|
86
|
+
# ms:
|
87
|
+
#
|
107
88
|
def translated_salutation
|
108
89
|
::I18n.t(salutation, :scope => [:alchemy_crm, :salutations], :default => salutation.to_s.capitalize)
|
109
90
|
end
|
@@ -146,7 +127,7 @@ module AlchemyCrm
|
|
146
127
|
:address => ::I18n.t(:address, :scope => 'alchemy_crm.fake_contact_attributes', :default => 'Street 1'),
|
147
128
|
:zip => ::I18n.t(:zip, :scope => 'alchemy_crm.fake_contact_attributes', :default => '10000'),
|
148
129
|
:city => ::I18n.t(:city, :scope => 'alchemy_crm.fake_contact_attributes', :default => 'City'),
|
149
|
-
:
|
130
|
+
:company => ::I18n.t(:company, :scope => 'alchemy_crm.fake_contact_attributes', :default => 'Company inc.'),
|
150
131
|
:country => ::I18n.t(:country, :scope => 'alchemy_crm.fake_contact_attributes', :default => 'US')
|
151
132
|
)
|
152
133
|
fake.readonly!
|
@@ -196,6 +177,10 @@ module AlchemyCrm
|
|
196
177
|
self.subscriptions.inject(true){|acc, s| acc = s.verified? && acc; acc}
|
197
178
|
end
|
198
179
|
|
180
|
+
def self.clean_human_attribute_name(attrb)
|
181
|
+
human_attribute_name(attrb).gsub(/\*$/, '')
|
182
|
+
end
|
183
|
+
|
199
184
|
def self.new_from_recipient(recipient)
|
200
185
|
raise "No recipient found!" if recipient.nil?
|
201
186
|
contact = new(:email => recipient.email, :lastname => recipient.email)
|
@@ -209,7 +194,7 @@ module AlchemyCrm
|
|
209
194
|
contacts = []
|
210
195
|
::Vpim::Vcard.decode(vcard).each do |card|
|
211
196
|
remapped_attributes = {
|
212
|
-
:
|
197
|
+
:company => card.org.blank? ? nil : card.org.first,
|
213
198
|
:lastname => card.name.blank? ? nil : card.name.family,
|
214
199
|
:firstname => card.name.blank? ? nil : card.name.given,
|
215
200
|
:title => card.name.blank? ? nil : card.name.prefix,
|
@@ -222,10 +207,7 @@ module AlchemyCrm
|
|
222
207
|
:mobile => card.telephones.detect { |t| t.location.include?("cell") }.to_s,
|
223
208
|
:verified => true
|
224
209
|
}
|
225
|
-
|
226
|
-
contact.skip_validation = true
|
227
|
-
contact.save
|
228
|
-
contacts << contact
|
210
|
+
contacts << Contact.create(remapped_attributes)
|
229
211
|
end
|
230
212
|
contacts
|
231
213
|
end
|
@@ -246,7 +228,7 @@ module AlchemyCrm
|
|
246
228
|
addr.locality = city
|
247
229
|
addr.country = country
|
248
230
|
end
|
249
|
-
maker.org =
|
231
|
+
maker.org = company
|
250
232
|
end
|
251
233
|
vcf = File.new(Rails.root.to_s + "/tmp/#{fullname}.vcf", "w")
|
252
234
|
vcf.write(card.encode)
|
@@ -8,7 +8,7 @@
|
|
8
8
|
<td class="name" style="width: 180px">
|
9
9
|
<%= contact.firstname %>
|
10
10
|
</td>
|
11
|
-
<td class="name"><%= contact.
|
11
|
+
<td class="name"><%= contact.company %></td>
|
12
12
|
<td class="email"><%= contact.email %></td>
|
13
13
|
<td class="tags"><%= contact.tag_list %></td>
|
14
14
|
<td class="center"><%= render_icon contact.verified? && !contact.disabled %></td>
|
@@ -31,8 +31,8 @@
|
|
31
31
|
<td colspan="3" class="input"><%= f.text_field :lastname, :class => "thin_border very_long" %></td>
|
32
32
|
</tr>
|
33
33
|
<tr>
|
34
|
-
<td class="label"><%= f.label :
|
35
|
-
<td colspan="3" class="input"><%= f.text_field :
|
34
|
+
<td class="label"><%= f.label :company %></td>
|
35
|
+
<td colspan="3" class="input"><%= f.text_field :company, :class => "thin_border very_long" %></td>
|
36
36
|
</tr>
|
37
37
|
<tr>
|
38
38
|
<td class="label"><%= f.label :email %></td>
|
@@ -39,7 +39,7 @@
|
|
39
39
|
<th class="icon"></th>
|
40
40
|
<th class="name" style="width: 180px"><%= translate_model_attribute(:contact, :lastname).gsub(/\*$/, '') %></th>
|
41
41
|
<th class="name" style="width: 180px"><%= translate_model_attribute(:contact, :firstname).gsub(/\*$/, '') %></th>
|
42
|
-
<th class="name"><%= translate_model_attribute(:contact, :
|
42
|
+
<th class="name"><%= translate_model_attribute(:contact, :company) %></th>
|
43
43
|
<th class="name"><%= translate_model_attribute(:contact, :email).gsub(/\*$/, '') %></th>
|
44
44
|
<th class="name"><%= translate_model_attribute(:contact, :tags) %></th>
|
45
45
|
<th class="center"><%= translate_model_attribute(:contact, :verified) %></th>
|
@@ -21,7 +21,7 @@
|
|
21
21
|
</div>
|
22
22
|
<% end -%>
|
23
23
|
|
24
|
-
<% if @contacts -%>
|
24
|
+
<% if @contacts.any? -%>
|
25
25
|
<table>
|
26
26
|
<tr>
|
27
27
|
<th><%= translate_model_attribute(:contact, :name) %></th>
|
@@ -42,8 +42,10 @@
|
|
42
42
|
</tr>
|
43
43
|
<% end -%>
|
44
44
|
</table>
|
45
|
+
<% else -%>
|
46
|
+
<p><%= alchemy_crm_t(:no_contacts_imported) %></p>
|
45
47
|
<% end -%>
|
46
48
|
|
47
|
-
<p style="margin: 8px 0">
|
49
|
+
<p style="margin: 8px 0; height: 25px">
|
48
50
|
<%= link_to t(:continue), admin_contacts_path, :class => 'button' %>
|
49
51
|
</p>
|
@@ -8,14 +8,18 @@ send_mails_in_chunks_of: 200
|
|
8
8
|
send_mail_chunks_every: 5
|
9
9
|
|
10
10
|
# Specify the method that is used to interpolate the %{name} in newsletter mails and forms.
|
11
|
-
#
|
11
|
+
#
|
12
12
|
# === Available methods:
|
13
|
-
#
|
13
|
+
#
|
14
14
|
# * +fullname+
|
15
15
|
# * +name_with_title+
|
16
16
|
# * +firstname+
|
17
17
|
# * +lastname+
|
18
18
|
# * +name+
|
19
19
|
# * +email+
|
20
|
-
#
|
20
|
+
#
|
21
21
|
name_interpolation_method: fullname
|
22
|
+
|
23
|
+
# Specify additional attributes to validate for presence on a contact.
|
24
|
+
# NOTE: Email will be always validated.
|
25
|
+
additional_contact_validations: [salutation, firstname, lastname]
|
@@ -26,7 +26,7 @@ de:
|
|
26
26
|
contacts_tagged_with: 'Kontakte mit diesen Tag(s)'
|
27
27
|
copy: Kopie
|
28
28
|
copy_mailing: Mailing kopieren
|
29
|
-
'%{count} contacts imported successfully': '%{count} Kontakt(e)
|
29
|
+
'%{count} contacts imported successfully': '%{count} Kontakt(e) wurde(n) erfolgreich importiert'
|
30
30
|
count_of_bounced_emails: Davon sind nicht angekommen
|
31
31
|
count_of_recipients_that_clicked_a_link: Davon haben auf einen Link geklickt
|
32
32
|
count_of_recipients_that_received_the_email: 'Davon haben die E-Mail geöffnet'
|
@@ -61,7 +61,7 @@ de:
|
|
61
61
|
address: Straße beim Weg 1
|
62
62
|
zip: 12345
|
63
63
|
city: Stadt
|
64
|
-
|
64
|
+
company: Firma GmbH
|
65
65
|
country: DE
|
66
66
|
file: Datei
|
67
67
|
filter: 'Verfeinerungs-Filter'
|
@@ -87,6 +87,7 @@ de:
|
|
87
87
|
missing_vcard: "Bitte laden Sie eine V-Card hoch"
|
88
88
|
newsletter_layout_not_found_notice: 'Es wurde kein Newsletter Layout gefunden. Bitte legen Sie erst eins an.'
|
89
89
|
none: 'Keine'
|
90
|
+
no_contacts_imported: "Es konnten keine Kontake importiert werden."
|
90
91
|
not_yet_delivered_mailings_can_be_rescheduled: 'Noch nicht versendete Mailings können neu geplant werden, in dem Sie auf das Versanddatum klicken'
|
91
92
|
not_yet_delivered_mailings_can_be_canceled: 'Noch nicht versendete Mailings können storniert werden'
|
92
93
|
or_replace_it_with_an_existing_tag: 'Oder Sie ersetzen es durch ein vorhandenes Tag'
|
@@ -147,7 +148,7 @@ de:
|
|
147
148
|
alchemy_crm/newsletter:
|
148
149
|
public: 'öffentlich?'
|
149
150
|
contacts_count: Empfänger insgesamt
|
150
|
-
subscribers_count: Anzahl der Abonennten
|
151
|
+
subscribers_count: Anzahl der Abonennten
|
151
152
|
contact_group_contacts_count: Anzahl der Zielgruppenkontakte
|
152
153
|
contact_groups: Zielgruppen
|
153
154
|
alchemy_crm/contact:
|
@@ -155,7 +156,7 @@ de:
|
|
155
156
|
title: Titel
|
156
157
|
firstname: "Vorname*"
|
157
158
|
lastname: "Name*"
|
158
|
-
|
159
|
+
company: Firma
|
159
160
|
address: Adresse
|
160
161
|
zip: PLZ
|
161
162
|
city: Ort
|
data/lib/alchemy_crm/version.rb
CHANGED
@@ -118,7 +118,7 @@ module AlchemyCrm
|
|
118
118
|
context "receiving an email for verified contact" do
|
119
119
|
|
120
120
|
before(:each) do
|
121
|
-
@contact = Contact.create!({:email => 'jon@doe.com', :firstname => 'Jon', :lastname => 'Doe', :salutation => 'mr', :verified => true}
|
121
|
+
@contact = Contact.create!({:email => 'jon@doe.com', :firstname => 'Jon', :lastname => 'Doe', :salutation => 'mr', :verified => true})
|
122
122
|
end
|
123
123
|
|
124
124
|
it "should deliver signout mail." do
|
@@ -146,7 +146,7 @@ module AlchemyCrm
|
|
146
146
|
describe '#disable' do
|
147
147
|
|
148
148
|
before(:all) do
|
149
|
-
@contact = Contact.create!({:email => 'jon@doe.com', :firstname => 'Jon', :lastname => 'Doe', :salutation => 'mr', :verified => true}
|
149
|
+
@contact = Contact.create!({:email => 'jon@doe.com', :firstname => 'Jon', :lastname => 'Doe', :salutation => 'mr', :verified => true})
|
150
150
|
end
|
151
151
|
|
152
152
|
context "receiving hash from existing contact" do
|
@@ -29,7 +29,7 @@ module AlchemyCrm
|
|
29
29
|
context "receiving a hash and email from recipient with contact" do
|
30
30
|
|
31
31
|
before(:each) do
|
32
|
-
@contact = Contact.create!({:email => 'jon@doe.com', :firstname => 'Jon', :lastname => 'Doe', :salutation => 'mr', :verified => true}
|
32
|
+
@contact = Contact.create!({:email => 'jon@doe.com', :firstname => 'Jon', :lastname => 'Doe', :salutation => 'mr', :verified => true})
|
33
33
|
@recipient = Recipient.create!(:email => 'foo@baz.org', :contact => @contact)
|
34
34
|
@delivery = Delivery.create!(:recipients => [@recipient], :mailing => @mailing)
|
35
35
|
get :show, {:m => @mailing.sha1, :r => @recipient.sha1, :use_route => :alchemy_crm}
|
@@ -69,7 +69,7 @@ module AlchemyCrm
|
|
69
69
|
render_views
|
70
70
|
|
71
71
|
before(:each) do
|
72
|
-
@contact = Contact.create!({:email => 'jon@doe.com', :firstname => 'Jon', :lastname => 'Doe', :salutation => 'mr', :verified => true}
|
72
|
+
@contact = Contact.create!({:email => 'jon@doe.com', :firstname => 'Jon', :lastname => 'Doe', :salutation => 'mr', :verified => true})
|
73
73
|
@recipient = Recipient.create!(:email => 'foo@baz.org', :contact => @contact)
|
74
74
|
@delivery = Delivery.create!(:recipients => [@recipient], :mailing => @mailing)
|
75
75
|
@language_root = Alchemy::Page.create!(:name => 'Language Root', :page_layout => 'standard', :language => Alchemy::Language.get_default, :parent_id => Alchemy::Page.root.id)
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
#
|
12
12
|
# It's strongly recommended to check this file into your version control system.
|
13
13
|
|
14
|
-
ActiveRecord::Schema.define(:version =>
|
14
|
+
ActiveRecord::Schema.define(:version => 20120515150400) do
|
15
15
|
|
16
16
|
create_table "alchemy_attachments", :force => true do |t|
|
17
17
|
t.string "name"
|
@@ -85,7 +85,7 @@ ActiveRecord::Schema.define(:version => 20120327174339) do
|
|
85
85
|
t.string "zip"
|
86
86
|
t.string "city"
|
87
87
|
t.string "country"
|
88
|
-
t.string "
|
88
|
+
t.string "company"
|
89
89
|
t.string "email_sha1"
|
90
90
|
t.string "email_salt"
|
91
91
|
t.boolean "verified", :default => false
|
@@ -6,8 +6,8 @@ module AlchemyCrm
|
|
6
6
|
describe "#contacts" do
|
7
7
|
|
8
8
|
before(:each) do
|
9
|
-
@verified_contact = Contact.create!({:email => 'jon@doe.com', :firstname => 'Jon', :lastname => 'Doe', :salutation => 'mr', :tag_list => 'father', :verified => true}
|
10
|
-
@contact = Contact.create!({:email => 'jane@smith.com', :firstname => 'Jane', :lastname => 'Smith', :salutation => 'ms', :tag_list => 'mother'}
|
9
|
+
@verified_contact = Contact.create!({:email => 'jon@doe.com', :firstname => 'Jon', :lastname => 'Doe', :salutation => 'mr', :tag_list => 'father', :verified => true})
|
10
|
+
@contact = Contact.create!({:email => 'jane@smith.com', :firstname => 'Jane', :lastname => 'Smith', :salutation => 'ms', :tag_list => 'mother'})
|
11
11
|
@contact_group = ContactGroup.create!(:name => 'Family', :contact_tag_list => 'father, mother, son')
|
12
12
|
end
|
13
13
|
|
@@ -4,7 +4,7 @@ module AlchemyCrm
|
|
4
4
|
describe Contact do
|
5
5
|
|
6
6
|
before(:all) do
|
7
|
-
@contact = Contact.create!({:email => 'jon@doe.com', :title => 'Dr.', :firstname => 'Jon', :lastname => 'Doe', :salutation => 'mr', :verified => true}
|
7
|
+
@contact = Contact.create!({:email => 'jon@doe.com', :title => 'Dr.', :firstname => 'Jon', :lastname => 'Doe', :salutation => 'mr', :verified => true})
|
8
8
|
end
|
9
9
|
|
10
10
|
describe '.create' do
|
@@ -5,11 +5,11 @@ module AlchemyCrm
|
|
5
5
|
|
6
6
|
before(:each) do
|
7
7
|
@newsletter = Newsletter.create!(:name => 'Newsletter', :layout => 'standard')
|
8
|
-
@verified_contact = Contact.create!({:email => 'jon@doe.com', :firstname => 'Jon', :lastname => 'Doe', :salutation => 'mr', :verified => true}
|
8
|
+
@verified_contact = Contact.create!({:email => 'jon@doe.com', :firstname => 'Jon', :lastname => 'Doe', :salutation => 'mr', :verified => true})
|
9
9
|
@subscription = Subscription.create!(:contact => @verified_contact, :newsletter => @newsletter, :verified => true, :wants => true)
|
10
10
|
@contact = Contact.create!(:email => 'jon_2@doe.com', :firstname => 'Jon', :lastname => 'Doe', :salutation => 'mr')
|
11
|
-
@father = Contact.create!({:email => 'father@family.com', :firstname => 'Jon', :lastname => 'Doe', :salutation => 'mr', :tag_list => 'father', :verified => true}
|
12
|
-
@mother = Contact.create!({:email => 'mother@family.com', :firstname => 'Jane', :lastname => 'Doe', :salutation => 'ms', :tag_list => 'mother', :verified => true}
|
11
|
+
@father = Contact.create!({:email => 'father@family.com', :firstname => 'Jon', :lastname => 'Doe', :salutation => 'mr', :tag_list => 'father', :verified => true})
|
12
|
+
@mother = Contact.create!({:email => 'mother@family.com', :firstname => 'Jane', :lastname => 'Doe', :salutation => 'ms', :tag_list => 'mother', :verified => true})
|
13
13
|
@son = Contact.create!(:email => 'son@family.com', :firstname => 'Jim', :lastname => 'Doe', :salutation => 'mr', :tag_list => 'son')
|
14
14
|
|
15
15
|
@subscription_2 = Subscription.create!(:contact => @contact, :newsletter => @newsletter)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alchemy_crm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-05-
|
12
|
+
date: 2012-05-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: alchemy_cms
|
@@ -338,6 +338,7 @@ files:
|
|
338
338
|
- db/migrate/20120320103412_add_indexes_to_alchemy_crm_sha1_columns.rb
|
339
339
|
- db/migrate/20120321105455_add_queue_to_delayed_jobs.rb
|
340
340
|
- db/migrate/20120327174301_add_more_indexes_to_alchemy_crm_tables.rb
|
341
|
+
- db/migrate/20120515150400_rename_alchemy_crm_contacts_organisation_into_company.rb
|
341
342
|
- lib/alchemy_crm.rb
|
342
343
|
- lib/alchemy_crm/bounced_delivery.rb
|
343
344
|
- lib/alchemy_crm/config.rb
|
@@ -417,7 +418,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
417
418
|
version: '0'
|
418
419
|
segments:
|
419
420
|
- 0
|
420
|
-
hash:
|
421
|
+
hash: 1964275261730037542
|
421
422
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
422
423
|
none: false
|
423
424
|
requirements:
|
@@ -426,7 +427,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
426
427
|
version: '0'
|
427
428
|
segments:
|
428
429
|
- 0
|
429
|
-
hash:
|
430
|
+
hash: 1964275261730037542
|
430
431
|
requirements: []
|
431
432
|
rubyforge_project:
|
432
433
|
rubygems_version: 1.8.24
|