solidus_mailchimp_sync 1.0.0.beta04 → 1.0.0.beta05
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/serializers/solidus_mailchimp_sync/order_serializer.rb +1 -1
- data/app/serializers/solidus_mailchimp_sync/product_serializer.rb +4 -2
- data/lib/solidus_mailchimp_sync.rb +1 -0
- data/lib/solidus_mailchimp_sync/util.rb +12 -0
- data/lib/solidus_mailchimp_sync/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5559048fe9409be3c6b0757a06203021ce668f9f
|
4
|
+
data.tar.gz: 1620611e87fd996080fc859d36e761f80d25636c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e01426b1cd638b8b97670a4f38caf42863989c73f228cd10e0eab897c616ba8bba7a5ea1d2b0ed772e258f58299616bd34554aa7bd7fa0d44d31344b0b573056
|
7
|
+
data.tar.gz: 50c96608536adffe94dde5072457c46df0f5accc5e76df0f5e42363662f73b3005b50de5733e556466e9325e6552710fbc86db0663b732d20397eb1f73e1cc3d
|
@@ -32,7 +32,7 @@ module SolidusMailchimpSync
|
|
32
32
|
end
|
33
33
|
|
34
34
|
if order.completed_at.present?
|
35
|
-
hash["processed_at_foreign"] = order.completed_at.iso8601
|
35
|
+
hash["processed_at_foreign"] = order.completed_at.utc.iso8601
|
36
36
|
end
|
37
37
|
|
38
38
|
hash["shipping_total"] = shipping_total if shipping_total
|
@@ -33,7 +33,7 @@ module SolidusMailchimpSync
|
|
33
33
|
end
|
34
34
|
|
35
35
|
if product.available_on
|
36
|
-
hash[:published_at_foreign] = product.available_on.iso8601
|
36
|
+
hash[:published_at_foreign] = product.available_on.utc.iso8601
|
37
37
|
end
|
38
38
|
|
39
39
|
hash
|
@@ -42,7 +42,9 @@ module SolidusMailchimpSync
|
|
42
42
|
# Override in custom serializer for custom front-end url
|
43
43
|
def url
|
44
44
|
if Rails.application.routes.default_url_options[:host] && Spree::Core::Engine.routes.url_helpers.respond_to?(:product_url)
|
45
|
-
Spree::Core::Engine.routes.url_helpers.product_url(product,
|
45
|
+
Spree::Core::Engine.routes.url_helpers.product_url(product,
|
46
|
+
host: Rails.application.routes.default_url_options[:host],
|
47
|
+
protocol: Rails.application.config.force_ssl ? "https" : "http")
|
46
48
|
end
|
47
49
|
end
|
48
50
|
|
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'digest/md5'
|
2
|
+
|
3
|
+
module SolidusMailchimpSync
|
4
|
+
module Util
|
5
|
+
# lowercased then MD5 hashed.
|
6
|
+
# http://developer.mailchimp.com/documentation/mailchimp/guides/manage-subscribers-with-the-mailchimp-api/
|
7
|
+
# Mailchimp does not support non-ascii chars in email addresses as of Aug 2016 according to support.
|
8
|
+
def self.subscriber_hash(email_address)
|
9
|
+
Digest::MD5.hexdigest(email_address.downcase)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solidus_mailchimp_sync
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.beta05
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan Rochkind, Friends of the Web
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-08-
|
11
|
+
date: 2016-08-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: solidus_core
|
@@ -274,6 +274,7 @@ files:
|
|
274
274
|
- lib/solidus_mailchimp_sync.rb
|
275
275
|
- lib/solidus_mailchimp_sync/engine.rb
|
276
276
|
- lib/solidus_mailchimp_sync/factories.rb
|
277
|
+
- lib/solidus_mailchimp_sync/util.rb
|
277
278
|
- lib/solidus_mailchimp_sync/version.rb
|
278
279
|
- lib/tasks/solidus_mailchimp_sync.rake
|
279
280
|
homepage: http://github.com/friendsoftheweb/solidus_mailchimp_sync
|