basecrm 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -14,6 +14,6 @@ Gem::Specification.new do |gem|
14
14
  gem.name = "basecrm"
15
15
  gem.require_paths = ["lib"]
16
16
  gem.version = BaseCrm::VERSION
17
- gem.add_dependency "api_client", '>=0.4.1'
17
+ gem.add_dependency "api_client", '>=0.4.2'
18
18
  end
19
19
 
@@ -1,3 +1,3 @@
1
1
  module BaseCrm
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -0,0 +1,34 @@
1
+ require "spec_helper"
2
+
3
+ describe BaseCrm::Forecasting do
4
+
5
+ subject do
6
+ BaseCrm::Forecasting.new({})
7
+ end
8
+
9
+ describe "endpoint" do
10
+
11
+ it "uses the production endpoint" do
12
+ BaseCrm::Forecasting.scope.instance_eval do
13
+ @endpoint.should == "https://sales.futuresimple.com"
14
+ end
15
+ end
16
+
17
+ end
18
+
19
+ describe ".fetch_for_deal" do
20
+ let(:scope) { mock }
21
+ let(:deal) { mock(:id => 444) }
22
+ let(:result) { mock }
23
+
24
+ it "returns the scope" do
25
+ BaseCrm::Forecasting.should_receive(:scope).and_return(scope)
26
+ scope.should_receive(:get).
27
+ with("/api/v1/deals/#{deal.id}/forecasting.json").
28
+ and_return(result)
29
+ BaseCrm::Forecasting.fetch_for_deal(deal).should == result
30
+ end
31
+ end
32
+
33
+ end
34
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: basecrm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-06 00:00:00.000000000 Z
12
+ date: 2013-06-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: api_client
@@ -18,7 +18,7 @@ dependencies:
18
18
  requirements:
19
19
  - - ! '>='
20
20
  - !ruby/object:Gem::Version
21
- version: 0.4.1
21
+ version: 0.4.2
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ! '>='
28
28
  - !ruby/object:Gem::Version
29
- version: 0.4.1
29
+ version: 0.4.2
30
30
  description: Base CRM API Client
31
31
  email:
32
32
  - marcin@futuresimple.com
@@ -62,6 +62,7 @@ files:
62
62
  - spec/base_crm/account_spec.rb
63
63
  - spec/base_crm/contact_spec.rb
64
64
  - spec/base_crm/deal_spec.rb
65
+ - spec/base_crm/forecasting_spec.rb
65
66
  - spec/base_crm/lead_spec.rb
66
67
  - spec/base_crm/note_spec.rb
67
68
  - spec/base_crm/resource_mixin_spec.rb
@@ -99,6 +100,7 @@ test_files:
99
100
  - spec/base_crm/account_spec.rb
100
101
  - spec/base_crm/contact_spec.rb
101
102
  - spec/base_crm/deal_spec.rb
103
+ - spec/base_crm/forecasting_spec.rb
102
104
  - spec/base_crm/lead_spec.rb
103
105
  - spec/base_crm/note_spec.rb
104
106
  - spec/base_crm/resource_mixin_spec.rb