restforce 0.0.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of restforce might be problematic. Click here for more details.

Files changed (69) hide show
  1. data/.gitignore +17 -0
  2. data/.rspec +1 -0
  3. data/.travis.yml +5 -0
  4. data/Gemfile +4 -0
  5. data/LICENSE +22 -0
  6. data/README.md +161 -0
  7. data/Rakefile +10 -0
  8. data/lib/restforce.rb +18 -0
  9. data/lib/restforce/client.rb +287 -0
  10. data/lib/restforce/collection.rb +23 -0
  11. data/lib/restforce/config.rb +68 -0
  12. data/lib/restforce/mash.rb +61 -0
  13. data/lib/restforce/middleware.rb +30 -0
  14. data/lib/restforce/middleware/authentication.rb +32 -0
  15. data/lib/restforce/middleware/authentication/oauth.rb +22 -0
  16. data/lib/restforce/middleware/authentication/password.rb +27 -0
  17. data/lib/restforce/middleware/authorization.rb +19 -0
  18. data/lib/restforce/middleware/instance_url.rb +27 -0
  19. data/lib/restforce/middleware/mashify.rb +18 -0
  20. data/lib/restforce/middleware/raise_error.rb +18 -0
  21. data/lib/restforce/sobject.rb +41 -0
  22. data/lib/restforce/version.rb +3 -0
  23. data/restforce.gemspec +28 -0
  24. data/spec/fixtures/auth_error_response.json +1 -0
  25. data/spec/fixtures/auth_success_response.json +1 -0
  26. data/spec/fixtures/expired_session_response.json +1 -0
  27. data/spec/fixtures/reauth_success_response.json +1 -0
  28. data/spec/fixtures/refresh_error_response.json +1 -0
  29. data/spec/fixtures/refresh_success_response.json +7 -0
  30. data/spec/fixtures/services_data_success_response.json +12 -0
  31. data/spec/fixtures/sobject/create_success_response.json +5 -0
  32. data/spec/fixtures/sobject/delete_error_response.json +1 -0
  33. data/spec/fixtures/sobject/describe_sobjects_success_response.json +31 -0
  34. data/spec/fixtures/sobject/list_sobjects_success_response.json +31 -0
  35. data/spec/fixtures/sobject/org_query_response.json +11 -0
  36. data/spec/fixtures/sobject/query_aggregate_success_response.json +23 -0
  37. data/spec/fixtures/sobject/query_empty_response.json +5 -0
  38. data/spec/fixtures/sobject/query_error_response.json +4 -0
  39. data/spec/fixtures/sobject/query_paginated_first_page_response.json +12 -0
  40. data/spec/fixtures/sobject/query_paginated_last_page_response.json +11 -0
  41. data/spec/fixtures/sobject/query_success_response.json +36 -0
  42. data/spec/fixtures/sobject/recent_success_response.json +18 -0
  43. data/spec/fixtures/sobject/search_error_response.json +4 -0
  44. data/spec/fixtures/sobject/search_success_response.json +16 -0
  45. data/spec/fixtures/sobject/sobject_describe_error_response.json +4 -0
  46. data/spec/fixtures/sobject/sobject_describe_success_response.json +1304 -0
  47. data/spec/fixtures/sobject/sobject_find_error_response.json +4 -0
  48. data/spec/fixtures/sobject/sobject_find_success_response.json +29 -0
  49. data/spec/fixtures/sobject/upsert_created_success_response.json +2 -0
  50. data/spec/fixtures/sobject/upsert_error_response.json +1 -0
  51. data/spec/fixtures/sobject/upsert_multiple_error_response.json +1 -0
  52. data/spec/fixtures/sobject/upsert_updated_success_response.json +0 -0
  53. data/spec/fixtures/sobject/write_error_response.json +6 -0
  54. data/spec/lib/client_spec.rb +214 -0
  55. data/spec/lib/collection_spec.rb +50 -0
  56. data/spec/lib/config_spec.rb +70 -0
  57. data/spec/lib/middleware/authentication/oauth_spec.rb +30 -0
  58. data/spec/lib/middleware/authentication/password_spec.rb +37 -0
  59. data/spec/lib/middleware/authentication_spec.rb +67 -0
  60. data/spec/lib/middleware/authorization_spec.rb +17 -0
  61. data/spec/lib/middleware/instance_url_spec.rb +48 -0
  62. data/spec/lib/middleware/mashify_spec.rb +28 -0
  63. data/spec/lib/middleware/raise_error_spec.rb +27 -0
  64. data/spec/lib/sobject_spec.rb +93 -0
  65. data/spec/spec_helper.rb +17 -0
  66. data/spec/support/basic_client.rb +35 -0
  67. data/spec/support/fixture_helpers.rb +20 -0
  68. data/spec/support/middleware.rb +33 -0
  69. metadata +257 -0
@@ -0,0 +1,67 @@
1
+ require 'spec_helper'
2
+
3
+ describe Restforce::Middleware::Authentication do
4
+ let(:app) { double('app') }
5
+ let(:env) { { } }
6
+ let(:options) { { host: 'login.salesforce.com' } }
7
+ let(:middleware) { described_class.new app, nil, options }
8
+
9
+ describe '.authenticate!' do
10
+ it 'raises an error' do
11
+ expect {
12
+ middleware.authenticate!
13
+ }.to raise_error RuntimeError, 'must subclass'
14
+ end
15
+ end
16
+
17
+ describe '.call' do
18
+ context 'when all is good' do
19
+ before do
20
+ app.should_receive(:call).once
21
+ end
22
+
23
+ it 'calls the next middlware' do
24
+ middleware.call(env)
25
+ end
26
+ end
27
+
28
+ context 'when an exception is thrown' do
29
+ before do
30
+ app.should_receive(:call).once.and_raise(Restforce::UnauthorizedError.new('something bad'))
31
+ middleware.should_receive(:authenticate!)
32
+ app.should_receive(:call).once
33
+ end
34
+
35
+ it 'attempts to authenticate' do
36
+ middleware.call(env)
37
+ end
38
+ end
39
+ end
40
+
41
+ describe '.connection' do
42
+ subject { middleware.connection }
43
+
44
+ its(:url_prefix) { should eq URI.parse('https://login.salesforce.com') }
45
+
46
+ describe '.builder' do
47
+ subject { middleware.connection.builder }
48
+
49
+ context 'with logging disabled' do
50
+ before do
51
+ Restforce.stub!(:log?).and_return(false)
52
+ end
53
+
54
+ its(:handlers) { should include FaradayMiddleware::ParseJson, Faraday::Adapter::NetHttp }
55
+ its(:handlers) { should_not include Faraday::Response::Logger }
56
+ end
57
+
58
+ context 'with logging enabled' do
59
+ before do
60
+ Restforce.stub!(:log?).and_return(true)
61
+ end
62
+
63
+ its(:handlers) { should include FaradayMiddleware::ParseJson, Faraday::Response::Logger, Faraday::Adapter::NetHttp }
64
+ end
65
+ end
66
+ end
67
+ end
@@ -0,0 +1,17 @@
1
+ require 'spec_helper'
2
+
3
+ describe Restforce::Middleware::Authorization do
4
+ let(:app) { double('app') }
5
+ let(:env) { { request_headers: {} } }
6
+ let(:options) { { oauth_token: 'token' } }
7
+ let(:middleware) { described_class.new app, nil, options }
8
+
9
+ before do
10
+ app.should_receive(:call)
11
+ middleware.call(env)
12
+ end
13
+
14
+ it 'adds the oauth token to the headers' do
15
+ env[:request_headers]['Authorization'].should eq 'OAuth token'
16
+ end
17
+ end
@@ -0,0 +1,48 @@
1
+ require 'spec_helper'
2
+
3
+ describe Restforce::Middleware::InstanceURL do
4
+ let(:app) { double('app') }
5
+ let(:client) { double('client') }
6
+ let(:options) { { :instance_url => instance_url } }
7
+ let(:middleware) { described_class.new app, client, options }
8
+
9
+ context 'when the instance url is not set' do
10
+ let(:instance_url) { nil }
11
+
12
+ it 'raises an error' do
13
+ expect {
14
+ middleware.call(nil)
15
+ }.to raise_error Restforce::UnauthorizedError
16
+ end
17
+ end
18
+
19
+ context 'when the instance url is set' do
20
+ let(:instance_url) { 'https://foo.bar' }
21
+
22
+ before do
23
+ client.stub_chain(:connection, :url_prefix).and_return URI.parse(url_prefix)
24
+ end
25
+
26
+ context 'and it does not match the connection url prefix' do
27
+ let(:url_prefix) { 'https://whiz.bang' }
28
+
29
+ it 'raises an error' do
30
+ expect {
31
+ middleware.call(nil)
32
+ }.to raise_error Restforce::InstanceURLError
33
+ end
34
+ end
35
+
36
+ context 'and it matches the connection url prefix' do
37
+ let(:url_prefix) { 'https://foo.bar' }
38
+
39
+ before do
40
+ app.should_receive(:call)
41
+ end
42
+
43
+ it 'calls tne next middleware' do
44
+ middleware.call(nil)
45
+ end
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,28 @@
1
+ require 'spec_helper'
2
+
3
+ describe Restforce::Middleware::Mashify do
4
+ let(:app) { double('app') }
5
+ let(:options) { { } }
6
+ let(:middleware) { described_class.new app, nil, options }
7
+
8
+ before do
9
+ app.should_receive(:call)
10
+ middleware.call(env)
11
+ end
12
+
13
+ context 'when the body contains a records key' do
14
+ let(:env) { { body: JSON.parse(fixture('sobject/query_success_response')) } }
15
+
16
+ it 'converts the response body into a restforce collection' do
17
+ env[:body].should be_a Restforce::Collection
18
+ end
19
+ end
20
+
21
+ context 'when the body does not contain records' do
22
+ let(:env) { { body: { 'foo' => 'bar' } } }
23
+
24
+ it 'does not touch the body' do
25
+ env[:body].foo.should eq 'bar'
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,27 @@
1
+ require 'spec_helper'
2
+
3
+ describe Restforce::Middleware::RaiseError do
4
+ let(:app) { double('app') }
5
+ let(:body) { JSON.parse(fixture('sobject/query_error_response')) }
6
+ let(:env) { { status: status, body: body } }
7
+ let(:middleware) { described_class.new app }
8
+
9
+ describe '.on_complete' do
10
+ subject { middleware.on_complete(env) }
11
+
12
+ context 'when the status code is 404' do
13
+ let(:status) { 404 }
14
+ specify { expect { subject }.to raise_error Faraday::Error::ResourceNotFound, 'INVALID_FIELD: error_message' }
15
+ end
16
+
17
+ context 'when the status code is 400' do
18
+ let(:status) { 400 }
19
+ specify { expect { subject }.to raise_error Faraday::Error::ClientError, 'INVALID_FIELD: error_message' }
20
+ end
21
+
22
+ context 'when the status code is 401' do
23
+ let(:status) { 401 }
24
+ specify { expect { subject }.to raise_error Restforce::UnauthorizedError, 'INVALID_FIELD: error_message' }
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,93 @@
1
+ require 'spec_helper'
2
+
3
+ RSpec::Matchers.define :have_client do |expected|
4
+ match do |actual|
5
+ actual.instance_variable_get(:@client) == expected
6
+ end
7
+ end
8
+
9
+ describe Restforce::SObject do
10
+ include_context 'basic client'
11
+
12
+ let(:hash) { JSON.parse(fixture('sobject/query_success_response'))['records'].first }
13
+ let(:sobject) do
14
+ described_class.new(hash, client)
15
+ end
16
+
17
+ describe '#new' do
18
+ context 'with valid options' do
19
+ subject { sobject }
20
+ it { should be_a Restforce::SObject }
21
+ its(:sobject_type) { should eq 'Whizbang' }
22
+ its(:Text_Label) { should eq 'Hi there!' }
23
+ it { should have_client client }
24
+
25
+ describe 'children' do
26
+ subject { sobject.Whizbangs__r }
27
+
28
+ it { should be_a Restforce::Collection }
29
+
30
+ describe 'each child' do
31
+ it 'should be a Restforce::SObject' do
32
+ sobject.Whizbangs__r.each { |sobject| sobject.should be_a Restforce::SObject }
33
+ end
34
+
35
+ it 'should set the client' do
36
+ sobject.Whizbangs__r.each { |sobject| sobject.should have_client client }
37
+ end
38
+ end
39
+ end
40
+
41
+ describe 'parent' do
42
+ subject { sobject.ParentWhizbang__r }
43
+
44
+ it { should be_a Restforce::SObject }
45
+ its(:sobject_type) { should eq 'Whizbang' }
46
+ its(:Name) { should eq 'Parent Whizbang' }
47
+ it { should have_client client }
48
+ end
49
+ end
50
+ end
51
+
52
+ describe '.save' do
53
+ subject { sobject.save }
54
+
55
+ context 'when an Id was not queried' do
56
+ specify { expect { subject }.to raise_error RuntimeError, 'You need to query the Id for the record first.' }
57
+ end
58
+
59
+ context 'when an Id is present' do
60
+ before do
61
+ hash.merge!(Id: '001D000000INjVe')
62
+ @request = stub_api_request 'sobjects/Whizbang/001D000000INjVe', method: :patch, body: "{\"Checkbox_Label\":false,\"Text_Label\":\"Hi there!\",\"Date_Label\":\"2010-01-01\",\"DateTime_Label\":\"2011-07-07T00:37:00.000+0000\",\"Picklist_Multiselect_Label\":\"four;six\"}"
63
+ end
64
+
65
+ after do
66
+ @request.should have_been_requested
67
+ end
68
+
69
+ specify { expect { subject }.to_not raise_error }
70
+ end
71
+ end
72
+
73
+ describe '.destroy' do
74
+ subject { sobject.destroy }
75
+
76
+ context 'when an Id was not queried' do
77
+ specify { expect { subject }.to raise_error RuntimeError, 'You need to query the Id for the record first.' }
78
+ end
79
+
80
+ context 'when an Id is present' do
81
+ before do
82
+ hash.merge!(Id: '001D000000INjVe')
83
+ @request = stub_api_request 'sobjects/Whizbang/001D000000INjVe', method: :delete
84
+ end
85
+
86
+ after do
87
+ @request.should have_been_requested
88
+ end
89
+
90
+ specify { expect { subject }.to_not raise_error }
91
+ end
92
+ end
93
+ end
@@ -0,0 +1,17 @@
1
+ require 'simplecov'
2
+ SimpleCov.start
3
+
4
+ require 'bundler/setup'
5
+ Bundler.require :default, :test
6
+
7
+ require 'webmock/rspec'
8
+
9
+ WebMock.disable_net_connect!
10
+
11
+ # Requires supporting ruby files with custom matchers and macros, etc,
12
+ # in spec/support/ and its subdirectories.
13
+ Dir[File.join(File.dirname(__FILE__), "support/**/*.rb")].each {|f| require f}
14
+
15
+ RSpec.configure do |config|
16
+ config.include FixtureHelpers
17
+ end
@@ -0,0 +1,35 @@
1
+ shared_context 'basic client' do
2
+ let(:oauth_token) { '00Dx0000000BV7z!AR8AQAxo9UfVkh8AlV0Gomt9Czx9LjHnSSpwBMmbRcgKFmxOtvxjTrKW19ye6PE3Ds1eQz3z8jr3W7_VbWmEu4Q8TVGSTHxs' }
3
+ let(:refresh_token) { 'refresh' }
4
+ let(:instance_url) { 'https://na1.salesforce.com' }
5
+ let(:username) { 'foo' }
6
+ let(:password) { 'bar' }
7
+ let(:security_token) { 'security_token' }
8
+ let(:client_id) { 'client_id' }
9
+ let(:client_secret) { 'client_secret' }
10
+
11
+ let(:base_options) do
12
+ {
13
+ :oauth_token => oauth_token,
14
+ :refresh_token => refresh_token,
15
+ :instance_url => instance_url,
16
+ :username => username,
17
+ :password => password,
18
+ :security_token => security_token,
19
+ :client_id => client_id,
20
+ :client_secret => client_secret
21
+ }
22
+ end
23
+
24
+ let(:oauth_options) do
25
+ base_options.merge(:username => nil, :password => nil, :security_token => nil)
26
+ end
27
+
28
+ let(:password_options) do
29
+ base_options.merge(:oauth_token => nil, :refresh_token => nil, :instance_url => nil)
30
+ end
31
+
32
+ let(:client_options) { base_options }
33
+
34
+ let(:client) { Restforce::Client.new client_options }
35
+ end
@@ -0,0 +1,20 @@
1
+ module FixtureHelpers
2
+
3
+ def stub_api_request(endpoint, options = {})
4
+ options = {
5
+ :method => :get,
6
+ :status => 200,
7
+ :api_version => '24.0',
8
+ :with => nil
9
+ }.merge(options)
10
+
11
+ stub = stub_request(options[:method], %r{/services/data/v#{options[:api_version]}/#{endpoint}})
12
+ stub = stub.with(:body => options[:body]) if options[:body]
13
+ stub = stub.to_return(:status => options[:status], :body => options[:with] ? fixture(options[:with]) : '')
14
+ end
15
+
16
+ def fixture(f)
17
+ File.read(File.expand_path("../../fixtures/#{f}.json", __FILE__))
18
+ end
19
+
20
+ end
@@ -0,0 +1,33 @@
1
+ shared_examples_for 'authentication middleware' do
2
+ describe '.authenticate!' do
3
+ after do
4
+ request.should have_been_requested
5
+ end
6
+
7
+ context 'when successful' do
8
+ let!(:request) { success_request }
9
+
10
+ before do
11
+ middleware.authenticate!
12
+ end
13
+
14
+ describe '@options' do
15
+ subject { options }
16
+
17
+ its([:instance_url]) { should eq 'https://na1.salesforce.com' }
18
+ its([:oauth_token]) { should eq '00Dx0000000BV7z!AR8AQAxo9UfVkh8AlV0Gomt9Czx9LjHnSSpwBMmbRcgKFmxOtvxjTrKW19ye6PE3Ds1eQz3z8jr3W7_VbWmEu4Q8TVGSTHxs' }
19
+ end
20
+ end
21
+
22
+ context 'when unsuccessful' do
23
+ let!(:request) { fail_request }
24
+
25
+ it 'raises an exception' do
26
+ expect {
27
+ middleware.authenticate!
28
+ }.to raise_error Restforce::AuthenticationError
29
+ end
30
+ end
31
+
32
+ end
33
+ end
metadata ADDED
@@ -0,0 +1,257 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: restforce
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Eric J. Holmes
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-09-03 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rake
16
+ requirement: &70254027887340 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *70254027887340
25
+ - !ruby/object:Gem::Dependency
26
+ name: faraday
27
+ requirement: &70254027886840 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ~>
31
+ - !ruby/object:Gem::Version
32
+ version: 0.8.4
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: *70254027886840
36
+ - !ruby/object:Gem::Dependency
37
+ name: faraday_middleware
38
+ requirement: &70254027886340 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ~>
42
+ - !ruby/object:Gem::Version
43
+ version: 0.8.8
44
+ type: :runtime
45
+ prerelease: false
46
+ version_requirements: *70254027886340
47
+ - !ruby/object:Gem::Dependency
48
+ name: json
49
+ requirement: &70254027885880 !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: 1.7.5
55
+ type: :runtime
56
+ prerelease: false
57
+ version_requirements: *70254027885880
58
+ - !ruby/object:Gem::Dependency
59
+ name: hashie
60
+ requirement: &70254027885420 !ruby/object:Gem::Requirement
61
+ none: false
62
+ requirements:
63
+ - - ~>
64
+ - !ruby/object:Gem::Version
65
+ version: 1.2.0
66
+ type: :runtime
67
+ prerelease: false
68
+ version_requirements: *70254027885420
69
+ - !ruby/object:Gem::Dependency
70
+ name: rspec
71
+ requirement: &70254027885040 !ruby/object:Gem::Requirement
72
+ none: false
73
+ requirements:
74
+ - - ! '>='
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: *70254027885040
80
+ - !ruby/object:Gem::Dependency
81
+ name: webmock
82
+ requirement: &70254027884580 !ruby/object:Gem::Requirement
83
+ none: false
84
+ requirements:
85
+ - - ! '>='
86
+ - !ruby/object:Gem::Version
87
+ version: '0'
88
+ type: :development
89
+ prerelease: false
90
+ version_requirements: *70254027884580
91
+ - !ruby/object:Gem::Dependency
92
+ name: mocha
93
+ requirement: &70254027884160 !ruby/object:Gem::Requirement
94
+ none: false
95
+ requirements:
96
+ - - ! '>='
97
+ - !ruby/object:Gem::Version
98
+ version: '0'
99
+ type: :development
100
+ prerelease: false
101
+ version_requirements: *70254027884160
102
+ - !ruby/object:Gem::Dependency
103
+ name: simplecov
104
+ requirement: &70254027883740 !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ type: :development
111
+ prerelease: false
112
+ version_requirements: *70254027883740
113
+ description: A lightweight ruby client for the Salesforce REST api.
114
+ email:
115
+ - eric@ejholmes.net
116
+ executables: []
117
+ extensions: []
118
+ extra_rdoc_files: []
119
+ files:
120
+ - .gitignore
121
+ - .rspec
122
+ - .travis.yml
123
+ - Gemfile
124
+ - LICENSE
125
+ - README.md
126
+ - Rakefile
127
+ - lib/restforce.rb
128
+ - lib/restforce/client.rb
129
+ - lib/restforce/collection.rb
130
+ - lib/restforce/config.rb
131
+ - lib/restforce/mash.rb
132
+ - lib/restforce/middleware.rb
133
+ - lib/restforce/middleware/authentication.rb
134
+ - lib/restforce/middleware/authentication/oauth.rb
135
+ - lib/restforce/middleware/authentication/password.rb
136
+ - lib/restforce/middleware/authorization.rb
137
+ - lib/restforce/middleware/instance_url.rb
138
+ - lib/restforce/middleware/mashify.rb
139
+ - lib/restforce/middleware/raise_error.rb
140
+ - lib/restforce/sobject.rb
141
+ - lib/restforce/version.rb
142
+ - restforce.gemspec
143
+ - spec/fixtures/auth_error_response.json
144
+ - spec/fixtures/auth_success_response.json
145
+ - spec/fixtures/expired_session_response.json
146
+ - spec/fixtures/reauth_success_response.json
147
+ - spec/fixtures/refresh_error_response.json
148
+ - spec/fixtures/refresh_success_response.json
149
+ - spec/fixtures/services_data_success_response.json
150
+ - spec/fixtures/sobject/create_success_response.json
151
+ - spec/fixtures/sobject/delete_error_response.json
152
+ - spec/fixtures/sobject/describe_sobjects_success_response.json
153
+ - spec/fixtures/sobject/list_sobjects_success_response.json
154
+ - spec/fixtures/sobject/org_query_response.json
155
+ - spec/fixtures/sobject/query_aggregate_success_response.json
156
+ - spec/fixtures/sobject/query_empty_response.json
157
+ - spec/fixtures/sobject/query_error_response.json
158
+ - spec/fixtures/sobject/query_paginated_first_page_response.json
159
+ - spec/fixtures/sobject/query_paginated_last_page_response.json
160
+ - spec/fixtures/sobject/query_success_response.json
161
+ - spec/fixtures/sobject/recent_success_response.json
162
+ - spec/fixtures/sobject/search_error_response.json
163
+ - spec/fixtures/sobject/search_success_response.json
164
+ - spec/fixtures/sobject/sobject_describe_error_response.json
165
+ - spec/fixtures/sobject/sobject_describe_success_response.json
166
+ - spec/fixtures/sobject/sobject_find_error_response.json
167
+ - spec/fixtures/sobject/sobject_find_success_response.json
168
+ - spec/fixtures/sobject/upsert_created_success_response.json
169
+ - spec/fixtures/sobject/upsert_error_response.json
170
+ - spec/fixtures/sobject/upsert_multiple_error_response.json
171
+ - spec/fixtures/sobject/upsert_updated_success_response.json
172
+ - spec/fixtures/sobject/write_error_response.json
173
+ - spec/lib/client_spec.rb
174
+ - spec/lib/collection_spec.rb
175
+ - spec/lib/config_spec.rb
176
+ - spec/lib/middleware/authentication/oauth_spec.rb
177
+ - spec/lib/middleware/authentication/password_spec.rb
178
+ - spec/lib/middleware/authentication_spec.rb
179
+ - spec/lib/middleware/authorization_spec.rb
180
+ - spec/lib/middleware/instance_url_spec.rb
181
+ - spec/lib/middleware/mashify_spec.rb
182
+ - spec/lib/middleware/raise_error_spec.rb
183
+ - spec/lib/sobject_spec.rb
184
+ - spec/spec_helper.rb
185
+ - spec/support/basic_client.rb
186
+ - spec/support/fixture_helpers.rb
187
+ - spec/support/middleware.rb
188
+ homepage: https://github.com/ejholmes/restforce
189
+ licenses: []
190
+ post_install_message:
191
+ rdoc_options: []
192
+ require_paths:
193
+ - lib
194
+ required_ruby_version: !ruby/object:Gem::Requirement
195
+ none: false
196
+ requirements:
197
+ - - ! '>='
198
+ - !ruby/object:Gem::Version
199
+ version: '0'
200
+ required_rubygems_version: !ruby/object:Gem::Requirement
201
+ none: false
202
+ requirements:
203
+ - - ! '>='
204
+ - !ruby/object:Gem::Version
205
+ version: '0'
206
+ requirements: []
207
+ rubyforge_project:
208
+ rubygems_version: 1.8.11
209
+ signing_key:
210
+ specification_version: 3
211
+ summary: A lightweight ruby client for the Salesforce REST api.
212
+ test_files:
213
+ - spec/fixtures/auth_error_response.json
214
+ - spec/fixtures/auth_success_response.json
215
+ - spec/fixtures/expired_session_response.json
216
+ - spec/fixtures/reauth_success_response.json
217
+ - spec/fixtures/refresh_error_response.json
218
+ - spec/fixtures/refresh_success_response.json
219
+ - spec/fixtures/services_data_success_response.json
220
+ - spec/fixtures/sobject/create_success_response.json
221
+ - spec/fixtures/sobject/delete_error_response.json
222
+ - spec/fixtures/sobject/describe_sobjects_success_response.json
223
+ - spec/fixtures/sobject/list_sobjects_success_response.json
224
+ - spec/fixtures/sobject/org_query_response.json
225
+ - spec/fixtures/sobject/query_aggregate_success_response.json
226
+ - spec/fixtures/sobject/query_empty_response.json
227
+ - spec/fixtures/sobject/query_error_response.json
228
+ - spec/fixtures/sobject/query_paginated_first_page_response.json
229
+ - spec/fixtures/sobject/query_paginated_last_page_response.json
230
+ - spec/fixtures/sobject/query_success_response.json
231
+ - spec/fixtures/sobject/recent_success_response.json
232
+ - spec/fixtures/sobject/search_error_response.json
233
+ - spec/fixtures/sobject/search_success_response.json
234
+ - spec/fixtures/sobject/sobject_describe_error_response.json
235
+ - spec/fixtures/sobject/sobject_describe_success_response.json
236
+ - spec/fixtures/sobject/sobject_find_error_response.json
237
+ - spec/fixtures/sobject/sobject_find_success_response.json
238
+ - spec/fixtures/sobject/upsert_created_success_response.json
239
+ - spec/fixtures/sobject/upsert_error_response.json
240
+ - spec/fixtures/sobject/upsert_multiple_error_response.json
241
+ - spec/fixtures/sobject/upsert_updated_success_response.json
242
+ - spec/fixtures/sobject/write_error_response.json
243
+ - spec/lib/client_spec.rb
244
+ - spec/lib/collection_spec.rb
245
+ - spec/lib/config_spec.rb
246
+ - spec/lib/middleware/authentication/oauth_spec.rb
247
+ - spec/lib/middleware/authentication/password_spec.rb
248
+ - spec/lib/middleware/authentication_spec.rb
249
+ - spec/lib/middleware/authorization_spec.rb
250
+ - spec/lib/middleware/instance_url_spec.rb
251
+ - spec/lib/middleware/mashify_spec.rb
252
+ - spec/lib/middleware/raise_error_spec.rb
253
+ - spec/lib/sobject_spec.rb
254
+ - spec/spec_helper.rb
255
+ - spec/support/basic_client.rb
256
+ - spec/support/fixture_helpers.rb
257
+ - spec/support/middleware.rb