maestrano-connector-rails 0.3.0 → 0.3.1

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: 2f0083a436b601632884149aff3e8111b01ba1a6
4
- data.tar.gz: c0e95181ea0b2a66b137e2ec6047ddd4bdc40f2c
3
+ metadata.gz: 7aacc2acd6c8b4ae959bc04f22610a0579eac001
4
+ data.tar.gz: d0291c5cdc84f85e25e11a845080792e420b27dc
5
5
  SHA512:
6
- metadata.gz: 41fceaf54ad78bdca9cbc7dd6dc07f5d22b67ad6ce532b5cf39d59aa57faccc57f3c657371b75a359570e58b648e3b59cfb0d2d271db4c13c1e8dd9f712e37fa
7
- data.tar.gz: 639653b1337385bb1b60d45e160b2bb9db96308c4bb023dbfc1a86942e6fdabc78c923351884fed05f2fb83a938b38e4c76ad7bc385a1405a1bd9db69df306a5
6
+ metadata.gz: 237c78f0dbf7fcf046858a580eda157c0d2a0629dfbc03048dc79a3218168c2c196a5f6efb308f1a4e4e719b07294d9b8e0d6bc729735280b2581c81f66f48ab
7
+ data.tar.gz: bc8df72fe6d4e8d81f84b4da628c72011e56d04344053f58ad9dc475ccf5c596fa39f78265fad03ab8badc8eef2ac5cebd95cbabd673c72b7a3a14f433e158f0
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.0
1
+ 0.3.1
@@ -49,13 +49,14 @@ module Maestrano::Connector::Rails
49
49
  def sync_entity(entity_name, organization, connec_client, external_client, last_synchronization, opts)
50
50
  entity_instance = "Entities::#{entity_name.titleize.split.join}".constantize.new
51
51
 
52
- entity_instance.before_sync(connec_client, external_client, organization, opts)
52
+
53
+ entity_instance.before_sync(connec_client, external_client, last_synchronization, organization, opts)
53
54
  external_entities = entity_instance.get_external_entities(external_client, last_synchronization, organization, opts)
54
55
  connec_entities = entity_instance.get_connec_entities(connec_client, last_synchronization, organization, opts)
55
56
  mapped_entities = entity_instance.consolidate_and_map_data(connec_entities, external_entities, organization, opts)
56
57
  entity_instance.push_entities_to_external(external_client, mapped_entities[:connec_entities], organization)
57
58
  entity_instance.push_entities_to_connec(connec_client, mapped_entities[:external_entities], organization)
58
- entity_instance.after_sync(connec_client, external_client, organization, opts)
59
+ entity_instance.after_sync(connec_client, external_client, last_synchronization, organization, opts)
59
60
  end
60
61
  end
61
62
  end
@@ -341,11 +341,11 @@ module Maestrano::Connector::Rails::Concerns::Entity
341
341
  # ----------------------------------------------
342
342
  # After and before sync
343
343
  # ----------------------------------------------
344
- def before_sync(connec_client, external_client, organization)
344
+ def before_sync(connec_client, external_client, last_synchronization, organization, opts)
345
345
  # Does nothing by default
346
346
  end
347
347
 
348
- def after_sync(connec_client, external_client, organization)
348
+ def after_sync(connec_client, external_client, last_synchronization, organization, opts)
349
349
  # Does nothing by default
350
350
  end
351
351
 
@@ -16,7 +16,7 @@
16
16
  # when 'person'
17
17
  # Entities::SubEntities::ContactMapper.denormalize(entity)
18
18
  # else
19
- # raise "Impossible mapping from #{self.entity_name} to #{name}"
19
+ # raise "Impossible mapping from #{self.class.entity_name} to #{name}"
20
20
  # end
21
21
  # end
22
22
 
@@ -16,7 +16,7 @@
16
16
  # when 'person'
17
17
  # Entities::SubEntities::LeadMapper.denormalize(entity).merge(is_lead: true)
18
18
  # else
19
- # raise "Impossible mapping from #{self.entity_name} to #{name}"
19
+ # raise "Impossible mapping from #{self.class.entity_name} to #{name}"
20
20
  # end
21
21
  # end
22
22
 
@@ -17,7 +17,7 @@
17
17
  # when 'contact'
18
18
  # Enities::SubEntities::ContactMapper.normalize(entity)
19
19
  # else
20
- # raise "Impossible mapping from #{self.entity_name} to #{name}"
20
+ # raise "Impossible mapping from #{self.class.entity_name} to #{name}"
21
21
  # end
22
22
  # end
23
23
 
@@ -2,11 +2,11 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: maestrano-connector-rails 0.3.0 ruby lib
5
+ # stub: maestrano-connector-rails 0.3.1 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "maestrano-connector-rails"
9
- s.version = "0.3.0"
9
+ s.version = "0.3.1"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maestrano-connector-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pierre Berard