caboose-rets 0.1.185 → 0.1.189

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b7f22c4ab33e1c864cff0298d16551920513574e1d296ccc75fc5d52acc5c300
4
- data.tar.gz: e79b67affd54f55d61a093ec355747fc5aba4b7d1ba46b6f3b85128599afe4a6
3
+ metadata.gz: 315ade1ef137b27cad9c1b1c0860a7da8e6dd3feab9a965467d56d4078cbe6d9
4
+ data.tar.gz: 9476364e035d5a7fc6e8a80faebfe36b2b3c3d3a75aaa7855601ebd7cc484a55
5
5
  SHA512:
6
- metadata.gz: 480f45304f7255a65af0f879097b469215d6d0f0de3fd3011a8a8b3e296eae682ea0d769f33872ac849cb34f2ae231bb1b72de60688beffc85d0746af9c82ec5
7
- data.tar.gz: fde9c087f4a562ac5716a5776bbf12463b2ea8596217a82d8e62cdac0ab14ea12c2bf6f03c228df4b02fa55d90e49d7fb4790d0f7e6ae95c218b9b97b486070b
6
+ metadata.gz: cdbfdb54071aa93f7781431852a6e86e3db7943d8ab411ba7261ff74f07a8562f6d1888ef1e02d3b2b8eca0c69179291a698f34a1f2cb4817d3ef1b2029dc319
7
+ data.tar.gz: 30ca35eb2cb85865c433c0074cd7df8da9b07c5f794acc16900019c22b477c8b8a8d73e6b5cadfefa2a64b5d7318269c6740e954b50801ee0a331b0dace64f80
@@ -40,7 +40,7 @@ class CabooseRets::Agent < ActiveRecord::Base
40
40
  CabooseRets::RetsImporter.import_agent(self.mls_id)
41
41
  end
42
42
 
43
- # Sends a SMS to the agent (using Twilio) notifying them that a new user has registered and been assigned to them
43
+ # Sends a SMS to the agent (using Twilio) notifying them that a new user has registered and been assigned to them.
44
44
  def send_text(message, site_id)
45
45
  s1 = Caboose::Setting.where(:site_id => site_id, :name => "twilio_account_sid").first
46
46
  account_sid = s1 ? s1.value : nil
@@ -18,7 +18,7 @@ class CabooseRets::Notification < ActiveRecord::Base
18
18
  user_ids.each do |user_id|
19
19
  user = Caboose::User.where(uwhere).where(:id => user_id, :tax_exempt => false).first
20
20
  d1 = DateTime.now - 24.hours
21
- if user && user.site && user.site.use_rets
21
+ if user && user.site && user.site.use_rets && !Caboose::BouncedEmail.where(:email_address => user.email).exists?
22
22
  # Check if a similar notification has already been sent
23
23
  n = CabooseRets::Notification.where(
24
24
  :user_id => user.id,
@@ -64,7 +64,7 @@ class CabooseRets::Notification < ActiveRecord::Base
64
64
  user_ids.each do |user_id|
65
65
  user = Caboose::User.where(uwhere).where(:id => user_id, :tax_exempt => false).first
66
66
  d1 = DateTime.now - 24.hours
67
- if user && user.site && user.site.use_rets
67
+ if user && user.site && user.site.use_rets && !Caboose::BouncedEmail.where(:email_address => user.email).exists?
68
68
  # Check if a similar notification has already been sent
69
69
  n = CabooseRets::Notification.where(
70
70
  :user_id => user.id,
@@ -115,6 +115,8 @@ class CabooseRets::Notification < ActiveRecord::Base
115
115
 
116
116
  users.each do |user|
117
117
 
118
+ next if user.email.blank? || Caboose::BouncedEmail.where(:email_address => user.email).exists?
119
+
118
120
  puts "Gathering data for user: #{user.username}" if Rails.env.development?
119
121
 
120
122
  saved_mls = CabooseRets::SavedProperty.where(:user_id => user.id).pluck(:mls_number)
@@ -185,7 +185,6 @@ class CabooseRets::RetsImporter # < ActiveRecord::Base
185
185
 
186
186
  end
187
187
 
188
-
189
188
  #=============================================================================
190
189
  # Single model import methods (called from a worker dyno)
191
190
  #=============================================================================
@@ -17,7 +17,7 @@
17
17
  <p style="margin:0 0 5px 0;font-size:16px;line-height:18px;"><strong><%= number_to_currency(p.list_price, :precision => 0) %></strong></p>
18
18
  <p style="margin:0 0 5px 0;font-size:15px;line-height:17px;">
19
19
  <% if !p.beds_total.blank? %><span><strong><%= p.beds_total %></strong> beds</span><br /><% end %>
20
- <% if !p.baths_full.blank? %><span><strong><%= p.baths_full %>&nbsp;<% if !p.baths_half.blank? && p.baths_half > 0 %><%= p.baths_half %>&nbsp;½<% end %></strong>baths</span><br /><% end %>
20
+ <% if !p.baths_full.blank? %><span><strong><%= p.baths_full %>&nbsp;<% if p.baths_half == 1 %>½&nbsp;<% end %></strong>baths</span><br /><% end %>
21
21
  <% if !p.sqft_total.blank? %><span><strong><%= number_with_delimiter(p.sqft_total.to_i, :delimiter => ',') %></strong> sqft</span><% end %>
22
22
  </p>
23
23
  <% if !p.original_entry_timestamp.blank? %>
@@ -1,3 +1,3 @@
1
1
  module CabooseRets
2
- VERSION = '0.1.185'
2
+ VERSION = '0.1.189'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caboose-rets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.185
4
+ version: 0.1.189
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-12 00:00:00.000000000 Z
11
+ date: 2021-08-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: caboose-cms