testrd_gem 0.3.0 → 1.0.0

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: bcf93728071d04d827ac7ca8190fa898e01c4be0
4
- data.tar.gz: 581ccdc7d044c5981033e3c390f26fbe2118948f
3
+ metadata.gz: 89467778104754729338c45415c4ccc2142ed727
4
+ data.tar.gz: 6202d0302259848ca35f508c24af10d4857ee296
5
5
  SHA512:
6
- metadata.gz: fe413aa6d99118f876daa38f8eb065965ace2fbbb046f13d9e74743166c44e8e295967c40c6f049c5ee3fb2403e0045c358ab6e69d90553aac9309644a4e5194
7
- data.tar.gz: 25da3f0cd36f5885628e894a6af0fe7b4046d8ad050dde75301487e29479e30fbd11efbad8552d125d100b416963bf37d23fae80944c8412af50431be4e2acd2
6
+ metadata.gz: dbacf9de2098c36b32feab93fef2698f5b74536868806e021a1b8cdce7988e4bf036608e2da50ee54e296c59e0f7ba2b930503d6f5b780f29805dc9d102519cf
7
+ data.tar.gz: 41f7c058e56fafe9dee6084984f499ac7360dab3ae59079552dc9058abac0635ad89b246f9350ab7488b3af40cc59c1cc84d81f25be9e2061e9a478f03c2f893
data/README.md CHANGED
@@ -2,17 +2,16 @@
2
2
 
3
3
  # TestrdGem
4
4
 
5
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/testrd_gem`. To experiment with that code, run `bin/console` for an interactive prompt.
5
+ This project is design as part of the Resultados Digitais Evaluation Project. It offers CRUD operations with Leads and integration with [Salesforce](http://www.salesforce.com/).
6
+
7
+ Written by [Vicente Silveira Inácio](https://br.linkedin.com/pub/vicente-silveira-inácio/25/734/588)
6
8
 
7
- TODO: Delete this and the text above, and describe your gem
8
9
 
9
10
  ## Installation
10
11
 
11
12
  Add this line to your application's Gemfile:
12
13
 
13
- ```ruby
14
- gem 'testrd_gem'
15
- ```
14
+ gem 'testrd_gem'
16
15
 
17
16
  And then execute:
18
17
 
@@ -24,7 +23,47 @@ Or install it yourself as:
24
23
 
25
24
  ## Usage
26
25
 
27
- TODO: Write usage instructions here
26
+ ### Create
27
+ Create a new lead
28
+
29
+ TestrdGem::new(name, last_name, email, company, job_title, phone, website)
30
+
31
+ ### Retrieve
32
+ Retrieve a single lead, by id.
33
+
34
+ TestrdGem::show(id)
35
+
36
+ Retrieve all leads
37
+
38
+ TestrdGem::all()
39
+
40
+ ### Delete
41
+ Delete a user, by id.
42
+
43
+ TestrdGem::delete(id)
44
+
45
+ ### Count
46
+ Return the number of registered leads.
47
+
48
+ TestrdGem::count()
49
+
50
+ ### Integration with Salesforce
51
+
52
+ TestrdGem uses a external gem for connecting to Salesforce: [salesforce-bulk](https://github.com/jorgevaldivia/salesforce_bulk)
53
+
54
+ Lead integration with Salesforce
55
+
56
+ TestrdGem::integrate(username, password, token)
57
+
58
+ * Username: Salesforce identification
59
+ * Password: Salesforce password
60
+ * Token: Salesforce security token
61
+
62
+ ## Example
63
+
64
+ require 'testrd_gem'
65
+
66
+ lead = TestrdGem::new('a','b','c@email.com','foozzb,'dev','5555555','http://website.foobar.com')
28
67
 
29
68
  ## Development
30
69
 
@@ -35,4 +74,3 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
35
74
  ## Contributing
36
75
 
37
76
  Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/testrd_gem.
38
-
@@ -1,3 +1,5 @@
1
+ require 'salesforce_bulk'
2
+
1
3
  module TestrdGem
2
4
  class Lead
3
5
 
@@ -50,5 +52,11 @@ module TestrdGem
50
52
  end
51
53
  end
52
54
 
55
+ def self.integrate(username, password, token)
56
+ puts "Salesforce Integration"
57
+ #salesforce = SalesforceBulk::Api.new("YOUR_SALESFORCE_USERNAME", "YOUR_SALESFORCE_PASSWORD+YOUR_SALESFORCE_TOKEN")
58
+ salesforce = SalesforceBulk::Api.new(username, password + token)
59
+ end
60
+
53
61
  end
54
62
  end
@@ -1,3 +1,3 @@
1
1
  module TestrdGem
2
- VERSION = "0.3.0"
2
+ VERSION = "1.0.0"
3
3
  end
data/testrd_gem.gemspec CHANGED
@@ -17,10 +17,10 @@ Gem::Specification.new do |spec|
17
17
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
18
18
  spec.require_paths = ["lib"]
19
19
 
20
+ spec.add_runtime_dependency "salesforce_bulk"
21
+
20
22
  spec.add_development_dependency "bundler", "~> 1.10"
21
23
  spec.add_development_dependency "rake", "~> 10.0"
22
24
  spec.add_development_dependency "rspec"
23
- spec.add_development_dependency "guard"
24
- spec.add_development_dependency "guard-rspec"
25
25
  spec.add_development_dependency "coveralls"
26
26
  end
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: testrd_gem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vicente Silveira Inácio
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-08-26 00:00:00.000000000 Z
11
+ date: 2015-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: salesforce_bulk
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: bundler
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -52,34 +66,6 @@ dependencies:
52
66
  - - ">="
53
67
  - !ruby/object:Gem::Version
54
68
  version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: guard
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
- - !ruby/object:Gem::Dependency
70
- name: guard-rspec
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: '0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- version: '0'
83
69
  - !ruby/object:Gem::Dependency
84
70
  name: coveralls
85
71
  requirement: !ruby/object:Gem::Requirement