crm_integration 0.0.0

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.
@@ -0,0 +1,10 @@
1
+ module CrmCallback
2
+ extend ActiveSupport::Concern
3
+
4
+ included do
5
+ after_create { CrmLeadRepository.post(self) }
6
+ after_update { CrmLeadRepository.update(self) }
7
+ after_destroy { CrmLeadRepository.delete(self) }
8
+ end
9
+
10
+ end
@@ -0,0 +1,15 @@
1
+ class CrmLeadRepository
2
+
3
+ def self.post(rd_lead)
4
+ p "[POST to CRM] #{rd_lead}"
5
+ end
6
+
7
+ def self.update(rd_lead)
8
+ p "[UPDATE to CRM] #{rd_lead}"
9
+ end
10
+
11
+ def self.delete(rd_lead)
12
+ p "[DELETE to CRM] #{rd_lead}"
13
+ end
14
+
15
+ end
@@ -0,0 +1,2 @@
1
+ require 'crm_integration/crm_callback'
2
+ require 'crm_integration/crm_lead_repository'
metadata ADDED
@@ -0,0 +1,59 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: crm_integration
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Otavio Medeiros
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-08-24 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: activesupport
16
+ requirement: &75095670 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - =
20
+ - !ruby/object:Gem::Version
21
+ version: 3.2.13
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *75095670
25
+ description: A simple CRM integration for test
26
+ email: otaviorm@gmail.com
27
+ executables: []
28
+ extensions: []
29
+ extra_rdoc_files: []
30
+ files:
31
+ - lib/crm_integration.rb
32
+ - lib/crm_integration/crm_callback.rb
33
+ - lib/crm_integration/crm_lead_repository.rb
34
+ homepage: http://rubygems.org/gems/crm_integration
35
+ licenses:
36
+ - MIT
37
+ post_install_message:
38
+ rdoc_options: []
39
+ require_paths:
40
+ - lib
41
+ required_ruby_version: !ruby/object:Gem::Requirement
42
+ none: false
43
+ requirements:
44
+ - - ! '>='
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
47
+ required_rubygems_version: !ruby/object:Gem::Requirement
48
+ none: false
49
+ requirements:
50
+ - - ! '>='
51
+ - !ruby/object:Gem::Version
52
+ version: '0'
53
+ requirements: []
54
+ rubyforge_project:
55
+ rubygems_version: 1.8.11
56
+ signing_key:
57
+ specification_version: 3
58
+ summary: RD CRM Integration
59
+ test_files: []