g5_reps_client 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/.gitignore +14 -0
- data/.rspec +2 -0
- data/Gemfile +5 -0
- data/LICENSE.txt +22 -0
- data/README.md +31 -0
- data/Rakefile +2 -0
- data/g5_reps_client.gemspec +28 -0
- data/lib/g5_reps_client/client.rb +24 -0
- data/lib/g5_reps_client/requests/get_communities_request.rb +11 -0
- data/lib/g5_reps_client/requests/get_pick_lists_request.rb +12 -0
- data/lib/g5_reps_client/requests/save_lead_request.rb +29 -0
- data/lib/g5_reps_client/soap_adapters/savon_adapter.rb +21 -0
- data/lib/g5_reps_client/version.rb +3 -0
- data/lib/g5_reps_client.rb +21 -0
- data/spec/client_spec.rb +52 -0
- data/spec/requests/get_communities_request_spec.rb +19 -0
- data/spec/requests/get_pick_lists_request_spec.rb +18 -0
- data/spec/requests/save_lead_request_spec.rb +89 -0
- data/spec/spec_helper.rb +104 -0
- metadata +167 -0
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
MzhiOGE2NDNlNDYyMWI3MjdiN2ZiODFmYmRiOGY2ZWJmNzBhMjMxNw==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
NzY3NmViYjY1ODIyYmZhYjgwMDAyOGNmNmE3ZTcyMzZmM2E1NGRkMg==
|
7
|
+
SHA512:
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
YTMxMWE2OGIwODc0ZWQxYThjYzliYzBhNGUxODBiZDU3NjUzNzViNGM0YTU0
|
10
|
+
OTg3MzNmNWYyNzk1MDM2N2QyNzNjYzJiNmYzODEyZmU0NzM5OWQ1ODRmYjc0
|
11
|
+
MTQyNDU0ZjU1ZTgyZDI2ZDBhYWEyOWVkNDdkYmQwZDc5NGFhZTM=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
M2JhMWFlZTY4YmU0NjhlMzY2NTM4ZTdmMTYwNWI3OGM3MTkwNmNmZGMzODM2
|
14
|
+
ZGE0ZjQxZTQzNGU5NWU1MDE0ZWRkYjQyODI1MTI3NDk4MDI0MzVjYzQ3MGQ2
|
15
|
+
YjQyZjkxYmUzZWQwYTJkZDRmZjYzYjEzMDliNTBkYTQ0MTA2NjU=
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2015 Matt Bishop
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# G5RepsClient
|
2
|
+
|
3
|
+
TODO: Write a gem description
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'g5_reps_client'
|
11
|
+
```
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle
|
16
|
+
|
17
|
+
Or install it yourself as:
|
18
|
+
|
19
|
+
$ gem install g5_reps_client
|
20
|
+
|
21
|
+
## Usage
|
22
|
+
|
23
|
+
TODO: Write usage instructions here
|
24
|
+
|
25
|
+
## Contributing
|
26
|
+
|
27
|
+
1. Fork it ( https://github.com/[my-github-username]/g5_reps_client/fork )
|
28
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
29
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
30
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
31
|
+
5. Create a new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'g5_reps_client/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "g5_reps_client"
|
8
|
+
spec.version = G5RepsClient::VERSION
|
9
|
+
spec.authors = ["Matt Bishop"]
|
10
|
+
spec.email = ["matt.bishop@getg5.com"]
|
11
|
+
spec.summary = %q{Connect to reps}
|
12
|
+
spec.description = %q{Ride Eternal in Valhalla - Shiny and Chrome}
|
13
|
+
spec.homepage = ""
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_dependency "activemodel"
|
22
|
+
spec.add_dependency "activesupport"
|
23
|
+
spec.add_development_dependency "bundler", "~> 1.7"
|
24
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
25
|
+
spec.add_dependency "savon", "~> 2.0"
|
26
|
+
spec.add_development_dependency "gemfury_helpers"
|
27
|
+
spec.add_development_dependency "rspec"
|
28
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module G5RepsClient
|
2
|
+
class Client
|
3
|
+
|
4
|
+
|
5
|
+
def initialize(key, wsdl)
|
6
|
+
@key = key
|
7
|
+
@wsdl = wsdl
|
8
|
+
end
|
9
|
+
|
10
|
+
def get_communities
|
11
|
+
request = GetCommunitiesRequest.execute(@key, @wsdl)
|
12
|
+
end
|
13
|
+
|
14
|
+
def get_pick_lists(community_id)
|
15
|
+
request = GetPickListsRequest.execute(@key, @wsdl, "#{community_id}")
|
16
|
+
end
|
17
|
+
|
18
|
+
def save_lead(community_id, lead)
|
19
|
+
request = SaveLeadRequest.execute(@key, @wsdl, "#{community_id}", lead)
|
20
|
+
end
|
21
|
+
|
22
|
+
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
module G5RepsClient
|
2
|
+
class GetPickListsRequest
|
3
|
+
|
4
|
+
|
5
|
+
def self.execute(enterprise_key, wsdl, community_id)
|
6
|
+
message = { enterprise_key: "#{enterprise_key}", community_id: "#{community_id}"}
|
7
|
+
SavonAdapter.call(:get_pick_lists, message, wsdl)
|
8
|
+
end
|
9
|
+
|
10
|
+
end
|
11
|
+
|
12
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module G5RepsClient
|
2
|
+
class SaveLeadRequest
|
3
|
+
|
4
|
+
def self.execute(enterprise_key, wsdl, community_id, lead)
|
5
|
+
message = { enterprise_key: "#{enterprise_key}",
|
6
|
+
community_id: "#{community_id}",
|
7
|
+
new_contact: camelcase_keys(lead),
|
8
|
+
new_prospect: camelcase_keys(create_prospect(lead))
|
9
|
+
}
|
10
|
+
|
11
|
+
SavonAdapter.call(:save_lead, message, wsdl)
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.camelcase_keys(lead )
|
15
|
+
converted_lead = [{}]
|
16
|
+
lead.keys.each do |k|
|
17
|
+
key = k.to_s.split('_').collect(&:capitalize).join
|
18
|
+
converted_lead.first.merge!("#{key}" => "#{lead[k]}")
|
19
|
+
end
|
20
|
+
converted_lead
|
21
|
+
end
|
22
|
+
|
23
|
+
def self.create_prospect(lead)
|
24
|
+
lead.except(:relationship_to_prospect_id, :source_id)
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
28
|
+
|
29
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module G5RepsClient
|
2
|
+
class SavonAdapter
|
3
|
+
|
4
|
+
|
5
|
+
def self.call(action, opts={}, wsdl)
|
6
|
+
client(wsdl).call(action, message: opts)
|
7
|
+
end
|
8
|
+
|
9
|
+
def self.client(wsdl_endpoint)
|
10
|
+
client = Savon.client do
|
11
|
+
wsdl "#{wsdl_endpoint}"
|
12
|
+
|
13
|
+
# If you want to debug the soap request, uncomment the next line and set logging to true
|
14
|
+
|
15
|
+
# pretty_print_xml true
|
16
|
+
log false
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require "g5_reps_client/version"
|
2
|
+
require "g5_reps_client/client"
|
3
|
+
require "g5_reps_client/requests/get_communities_request"
|
4
|
+
require "g5_reps_client/requests/get_pick_lists_request"
|
5
|
+
require "g5_reps_client/requests/save_lead_request"
|
6
|
+
require "g5_reps_client/soap_adapters/savon_adapter"
|
7
|
+
require "savon"
|
8
|
+
|
9
|
+
module G5RepsClient
|
10
|
+
|
11
|
+
SENSITIVE_FIELDS = [
|
12
|
+
"address1",
|
13
|
+
"email",
|
14
|
+
"phone"
|
15
|
+
]
|
16
|
+
|
17
|
+
def self.new(key, wsdl)
|
18
|
+
client = G5RepsClient::Client.new(key, wsdl)
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
data/spec/client_spec.rb
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
module G5RepsClient
|
3
|
+
describe Client do
|
4
|
+
|
5
|
+
let(:lead) do
|
6
|
+
{prefix: "Mr.",
|
7
|
+
first_name: "G5Test",
|
8
|
+
last_name: "Testing",
|
9
|
+
suffix: "Jr.",
|
10
|
+
address1: "22 Test Drive",
|
11
|
+
city: "Bend",
|
12
|
+
state: "OR",
|
13
|
+
zip_code: "97702",
|
14
|
+
phone: "5413334444",
|
15
|
+
email: "G5Test@test.com",
|
16
|
+
relationship_to_prospect_id: "2",
|
17
|
+
source_id: 77}
|
18
|
+
end
|
19
|
+
|
20
|
+
let(:client) {G5RepsClient::Client.new("shinyandchrome", "http://test.com?wsdl")}
|
21
|
+
|
22
|
+
|
23
|
+
describe "initialize" do
|
24
|
+
it "assigns" do
|
25
|
+
client.instance_variable_get(:@key).should eq("shinyandchrome")
|
26
|
+
client.instance_variable_get(:@wsdl).should eq("http://test.com?wsdl")
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
describe "get_communities" do
|
31
|
+
it "makes a Get Communities Request" do
|
32
|
+
expect(GetCommunitiesRequest).to receive(:execute).with("shinyandchrome", "http://test.com?wsdl")
|
33
|
+
client.get_communities
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
describe "get_pick_lists" do
|
38
|
+
it "makes a Get PickLists Request" do
|
39
|
+
expect(GetPickListsRequest).to receive(:execute).with("shinyandchrome", "http://test.com?wsdl", "5")
|
40
|
+
client.get_pick_lists("5")
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
describe "save_lead" do
|
45
|
+
it "makes a Save Lead Request" do
|
46
|
+
expect(SaveLeadRequest).to receive(:execute).with("shinyandchrome", "http://test.com?wsdl", "5", lead)
|
47
|
+
client.save_lead("5", lead)
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module G5RepsClient
|
4
|
+
describe GetCommunitiesRequest do
|
5
|
+
|
6
|
+
describe 'execute' do
|
7
|
+
|
8
|
+
it "calls the SavonAdapter" do
|
9
|
+
expect(SavonAdapter).to receive(:call).with(:get_communities,
|
10
|
+
message = { enterprise_key: "ShinyAndChrome"},
|
11
|
+
"http://test.com?wsdl")
|
12
|
+
|
13
|
+
GetCommunitiesRequest.execute("ShinyAndChrome", "http://test.com?wsdl")
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module G5RepsClient
|
4
|
+
describe GetPickListsRequest do
|
5
|
+
|
6
|
+
describe 'execute' do
|
7
|
+
it "calls the SavonAdapter" do
|
8
|
+
expect(SavonAdapter).to receive(:call).with(:get_pick_lists,
|
9
|
+
message = { enterprise_key: "ShinyAndChrome",
|
10
|
+
community_id: "5"},
|
11
|
+
"http://test.com?wsdl")
|
12
|
+
|
13
|
+
GetPickListsRequest.execute("ShinyAndChrome", "http://test.com?wsdl", "5")
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,89 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module G5RepsClient
|
4
|
+
describe SaveLeadRequest do
|
5
|
+
|
6
|
+
let(:lead) do
|
7
|
+
{prefix: "Mr.",
|
8
|
+
first_name: "G5Test",
|
9
|
+
last_name: "Testing",
|
10
|
+
suffix: "Jr.",
|
11
|
+
address1: "22 Test Drive",
|
12
|
+
city: "Bend",
|
13
|
+
state: "OR",
|
14
|
+
zip_code: "97702",
|
15
|
+
phone: "5413334444",
|
16
|
+
email: "G5Test@test.com",
|
17
|
+
relationship_to_prospect_id: "2",
|
18
|
+
source_id: 77}
|
19
|
+
end
|
20
|
+
|
21
|
+
describe 'execute' do
|
22
|
+
|
23
|
+
it "calls the SavonAdapter" do
|
24
|
+
expect(SavonAdapter).to receive(:call).with(:save_lead,
|
25
|
+
message = { enterprise_key: "ShinyAndChrome",
|
26
|
+
community_id: "5",
|
27
|
+
new_contact: [{"Prefix" => "Mr.",
|
28
|
+
"FirstName" => "G5Test",
|
29
|
+
"LastName" => "Testing",
|
30
|
+
"Suffix" => "Jr.",
|
31
|
+
"Address1" => "22 Test Drive",
|
32
|
+
"City" => "Bend",
|
33
|
+
"State" => "OR",
|
34
|
+
"ZipCode" => "97702",
|
35
|
+
"Phone" => "5413334444",
|
36
|
+
"Email" => "G5Test@test.com",
|
37
|
+
"RelationshipToProspectId" => "2",
|
38
|
+
"SourceId" => "77"}],
|
39
|
+
new_prospect: [{"Prefix" => "Mr.",
|
40
|
+
"FirstName" => "G5Test",
|
41
|
+
"LastName" => "Testing",
|
42
|
+
"Suffix" => "Jr.",
|
43
|
+
"Address1" => "22 Test Drive",
|
44
|
+
"City" => "Bend",
|
45
|
+
"State" => "OR",
|
46
|
+
"ZipCode" => "97702",
|
47
|
+
"Phone" => "5413334444",
|
48
|
+
"Email" => "G5Test@test.com"}]},
|
49
|
+
"http://test.com?wsdl")
|
50
|
+
|
51
|
+
|
52
|
+
SaveLeadRequest.execute("ShinyAndChrome", "http://test.com?wsdl", "5", lead)
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
describe 'camelcase_keys' do
|
57
|
+
it "Camel cases keys, wraps the hash in array brackets, and stringifies the hash for reps friendliness" do
|
58
|
+
SaveLeadRequest.camelcase_keys(lead).should eq([{"Prefix" => "Mr.",
|
59
|
+
"FirstName" => "G5Test",
|
60
|
+
"LastName" => "Testing",
|
61
|
+
"Suffix" => "Jr.",
|
62
|
+
"Address1" => "22 Test Drive",
|
63
|
+
"City" => "Bend",
|
64
|
+
"State" => "OR",
|
65
|
+
"ZipCode" => "97702",
|
66
|
+
"Phone" => "5413334444",
|
67
|
+
"Email" => "G5Test@test.com",
|
68
|
+
"RelationshipToProspectId" => "2",
|
69
|
+
"SourceId" => "77"}])
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
describe 'create_prospect' do
|
74
|
+
it "removes key value pairs from the hash" do
|
75
|
+
SaveLeadRequest.create_prospect(lead).should eq({prefix: "Mr.",
|
76
|
+
first_name: "G5Test",
|
77
|
+
last_name: "Testing",
|
78
|
+
suffix: "Jr.",
|
79
|
+
address1: "22 Test Drive",
|
80
|
+
city: "Bend",
|
81
|
+
state: "OR",
|
82
|
+
zip_code: "97702",
|
83
|
+
phone: "5413334444",
|
84
|
+
email: "G5Test@test.com"})
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
end
|
89
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,104 @@
|
|
1
|
+
require 'g5_reps_client'
|
2
|
+
require 'pry'
|
3
|
+
require 'rspec'
|
4
|
+
require 'active_support/core_ext/hash/indifferent_access'
|
5
|
+
require 'active_support/all'
|
6
|
+
|
7
|
+
|
8
|
+
# This file was generated by the `rspec --init` command. Conventionally, all
|
9
|
+
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
10
|
+
# The generated `.rspec` file contains `--require spec_helper` which will cause
|
11
|
+
# this file to always be loaded, without a need to explicitly require it in any
|
12
|
+
# files.
|
13
|
+
#
|
14
|
+
# Given that it is always loaded, you are encouraged to keep this file as
|
15
|
+
# light-weight as possible. Requiring heavyweight dependencies from this file
|
16
|
+
# will add to the boot time of your test suite on EVERY test run, even for an
|
17
|
+
# individual file that may not need all of that loaded. Instead, consider making
|
18
|
+
# a separate helper file that requires the additional dependencies and performs
|
19
|
+
# the additional setup, and require it from the spec files that actually need
|
20
|
+
# it.
|
21
|
+
#
|
22
|
+
# The `.rspec` file also contains a few flags that are not defaults but that
|
23
|
+
# users commonly want.
|
24
|
+
#
|
25
|
+
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
26
|
+
RSpec.configure do |config|
|
27
|
+
# config.include Virtus::Matchers
|
28
|
+
# rspec-expectations config goes here. You can use an alternate
|
29
|
+
# assertion/expectation library such as wrong or the stdlib/minitest
|
30
|
+
# assertions if you prefer.
|
31
|
+
config.expect_with :rspec do |expectations|
|
32
|
+
# This option will default to `true` in RSpec 4. It makes the `description`
|
33
|
+
# and `failure_message` of custom matchers include text for helper methods
|
34
|
+
# defined using `chain`, e.g.:
|
35
|
+
# be_bigger_than(2).and_smaller_than(4).description
|
36
|
+
# # => "be bigger than 2 and smaller than 4"
|
37
|
+
# ...rather than:
|
38
|
+
# # => "be bigger than 2"
|
39
|
+
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
40
|
+
end
|
41
|
+
|
42
|
+
# rspec-mocks config goes here. You can use an alternate test double
|
43
|
+
# library (such as bogus or mocha) by changing the `mock_with` option here.
|
44
|
+
config.mock_with :rspec do |mocks|
|
45
|
+
# Prevents you from mocking or stubbing a method that does not exist on
|
46
|
+
# a real object. This is generally recommended, and will default to
|
47
|
+
# `true` in RSpec 4.
|
48
|
+
mocks.verify_partial_doubles = true
|
49
|
+
end
|
50
|
+
|
51
|
+
# The settings below are suggested to provide a good initial experience
|
52
|
+
# with RSpec, but feel free to customize to your heart's content.
|
53
|
+
=begin
|
54
|
+
# These two settings work together to allow you to limit a spec run
|
55
|
+
# to individual examples or groups you care about by tagging them with
|
56
|
+
# `:focus` metadata. When nothing is tagged with `:focus`, all examples
|
57
|
+
# get run.
|
58
|
+
config.filter_run :focus
|
59
|
+
config.run_all_when_everything_filtered = true
|
60
|
+
|
61
|
+
# Allows RSpec to persist some state between runs in order to support
|
62
|
+
# the `--only-failures` and `--next-failure` CLI options. We recommend
|
63
|
+
# you configure your source control system to ignore this file.
|
64
|
+
config.example_status_persistence_file_path = "spec/examples.txt"
|
65
|
+
|
66
|
+
# Limits the available syntax to the non-monkey patched syntax that is
|
67
|
+
# recommended. For more details, see:
|
68
|
+
# - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
|
69
|
+
# - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
|
70
|
+
# - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching
|
71
|
+
config.disable_monkey_patching!
|
72
|
+
|
73
|
+
# This setting enables warnings. It's recommended, but in some cases may
|
74
|
+
# be too noisy due to issues in dependencies.
|
75
|
+
config.warnings = true
|
76
|
+
|
77
|
+
# Many RSpec users commonly either run the entire suite or an individual
|
78
|
+
# file, and it's useful to allow more verbose output when running an
|
79
|
+
# individual spec file.
|
80
|
+
if config.files_to_run.one?
|
81
|
+
# Use the documentation formatter for detailed output,
|
82
|
+
# unless a formatter has already been configured
|
83
|
+
# (e.g. via a command-line flag).
|
84
|
+
config.default_formatter = 'doc'
|
85
|
+
end
|
86
|
+
|
87
|
+
# Print the 10 slowest examples and example groups at the
|
88
|
+
# end of the spec run, to help surface which specs are running
|
89
|
+
# particularly slow.
|
90
|
+
config.profile_examples = 10
|
91
|
+
|
92
|
+
# Run specs in random order to surface order dependencies. If you find an
|
93
|
+
# order dependency and want to debug it, you can fix the order by providing
|
94
|
+
# the seed, which is printed after each run.
|
95
|
+
# --seed 1234
|
96
|
+
config.order = :random
|
97
|
+
|
98
|
+
# Seed global randomization in this process using the `--seed` CLI option.
|
99
|
+
# Setting this allows you to use `--seed` to deterministically reproduce
|
100
|
+
# test failures related to randomization by passing the same `--seed` value
|
101
|
+
# as the one that triggered the failure.
|
102
|
+
Kernel.srand config.seed
|
103
|
+
=end
|
104
|
+
end
|
metadata
ADDED
@@ -0,0 +1,167 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: g5_reps_client
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.4
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Matt Bishop
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-12-08 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activemodel
|
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'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: activesupport
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ! '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ! '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ~>
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.7'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.7'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '10.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ~>
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '10.0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: savon
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ~>
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '2.0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ~>
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '2.0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: gemfury_helpers
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ! '>='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ! '>='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rspec
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ! '>='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ! '>='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
description: Ride Eternal in Valhalla - Shiny and Chrome
|
112
|
+
email:
|
113
|
+
- matt.bishop@getg5.com
|
114
|
+
executables: []
|
115
|
+
extensions: []
|
116
|
+
extra_rdoc_files: []
|
117
|
+
files:
|
118
|
+
- .gitignore
|
119
|
+
- .rspec
|
120
|
+
- Gemfile
|
121
|
+
- LICENSE.txt
|
122
|
+
- README.md
|
123
|
+
- Rakefile
|
124
|
+
- g5_reps_client.gemspec
|
125
|
+
- lib/g5_reps_client.rb
|
126
|
+
- lib/g5_reps_client/client.rb
|
127
|
+
- lib/g5_reps_client/requests/get_communities_request.rb
|
128
|
+
- lib/g5_reps_client/requests/get_pick_lists_request.rb
|
129
|
+
- lib/g5_reps_client/requests/save_lead_request.rb
|
130
|
+
- lib/g5_reps_client/soap_adapters/savon_adapter.rb
|
131
|
+
- lib/g5_reps_client/version.rb
|
132
|
+
- spec/client_spec.rb
|
133
|
+
- spec/requests/get_communities_request_spec.rb
|
134
|
+
- spec/requests/get_pick_lists_request_spec.rb
|
135
|
+
- spec/requests/save_lead_request_spec.rb
|
136
|
+
- spec/spec_helper.rb
|
137
|
+
homepage: ''
|
138
|
+
licenses:
|
139
|
+
- MIT
|
140
|
+
metadata: {}
|
141
|
+
post_install_message:
|
142
|
+
rdoc_options: []
|
143
|
+
require_paths:
|
144
|
+
- lib
|
145
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
146
|
+
requirements:
|
147
|
+
- - ! '>='
|
148
|
+
- !ruby/object:Gem::Version
|
149
|
+
version: '0'
|
150
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
151
|
+
requirements:
|
152
|
+
- - ! '>='
|
153
|
+
- !ruby/object:Gem::Version
|
154
|
+
version: '0'
|
155
|
+
requirements: []
|
156
|
+
rubyforge_project:
|
157
|
+
rubygems_version: 2.2.2
|
158
|
+
signing_key:
|
159
|
+
specification_version: 4
|
160
|
+
summary: Connect to reps
|
161
|
+
test_files:
|
162
|
+
- spec/client_spec.rb
|
163
|
+
- spec/requests/get_communities_request_spec.rb
|
164
|
+
- spec/requests/get_pick_lists_request_spec.rb
|
165
|
+
- spec/requests/save_lead_request_spec.rb
|
166
|
+
- spec/spec_helper.rb
|
167
|
+
has_rdoc:
|