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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1b9bc36458b9257a589b641371cae03b9111f35e
4
- data.tar.gz: 757b06318d3a029fa19809da9bb888d503bcb262
3
+ metadata.gz: 5559048fe9409be3c6b0757a06203021ce668f9f
4
+ data.tar.gz: 1620611e87fd996080fc859d36e761f80d25636c
5
5
  SHA512:
6
- metadata.gz: 2dfa505a9746b9f15fda0e105436c401f687774a5c5e9683cc357931db04ff96e75ea07f2b2b09e4c09684cc4552cf4046e5b7996440b688c4d1e91d970d0b6c
7
- data.tar.gz: c643c63402876af74cb07db51374ef5f106de154f6a92a859506c1e48e2cabdd7cebf5e2c05dfe96c092982c384260616b7193aef17627cfe205153e36420e6c
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, host: Rails.application.routes.default_url_options[:host])
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
 
@@ -1,5 +1,6 @@
1
1
  require 'solidus_core'
2
2
  require 'solidus_mailchimp_sync/engine'
3
+ require 'solidus_mailchimp_sync/util'
3
4
 
4
5
  module SolidusMailchimpSync
5
6
  mattr_accessor :api_key
@@ -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
@@ -1,3 +1,3 @@
1
1
  module SolidusMailchimpSync
2
- VERSION = '1.0.0.beta04'
2
+ VERSION = '1.0.0.beta05'
3
3
  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.beta04
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-05 00:00:00.000000000 Z
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