pipeline_deals 0.4.0 → 0.5.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.
- checksums.yaml +5 -5
 - data/Gemfile +1 -2
 - data/README.md +9 -0
 - data/lib/pipeline_deals.rb +1 -2
 - data/lib/pipeline_deals/resource.rb +12 -9
 - data/lib/pipeline_deals/version.rb +1 -1
 - data/pipeline_deals.gemspec +1 -1
 - data/spec/pipeline_deals_spec.rb +7 -0
 - metadata +7 -7
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 2 
     | 
    
         
            +
            SHA256:
         
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 4e3668e48aa7d14802ea8c0bd28cf84d4e37fc6a8d128a7e95f951daf25ca349
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 0c4a080f89a15e825f2d2448a68b48ef9d2fadbc6ade8b06a8052b3c95d7bc68
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 122043bbf8e6174e84c84c34f87e3ed8c338dc62e6a52f29dd70365fbc338b32090e0f15f9c16d15174da330f004e1c772493e0e40790b1b9adfa636da1b7864
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 395e67ff5d10cdee9664cc86bc67fe13239dbec2635f57fff8b3259861b2b18c8910fe39d4c9555c37671c9299850163b10181fb5ed87a3c7110b7847d699bf9
         
     | 
    
        data/Gemfile
    CHANGED
    
    
    
        data/README.md
    CHANGED
    
    | 
         @@ -26,6 +26,15 @@ PipelineDeals.configure do |config| 
     | 
|
| 
       26 
26 
     | 
    
         
             
            end
         
     | 
| 
       27 
27 
     | 
    
         
             
            ```
         
     | 
| 
       28 
28 
     | 
    
         | 
| 
      
 29 
     | 
    
         
            +
            If you have an app_key, register this along with your api key:
         
     | 
| 
      
 30 
     | 
    
         
            +
             
     | 
| 
      
 31 
     | 
    
         
            +
            ```ruby
         
     | 
| 
      
 32 
     | 
    
         
            +
            PipelineDeals.configure do |config|
         
     | 
| 
      
 33 
     | 
    
         
            +
              config.api_key = 'abcd1234'
         
     | 
| 
      
 34 
     | 
    
         
            +
              config.app_key = 'xxxxxxxxxxxxx'
         
     | 
| 
      
 35 
     | 
    
         
            +
            end
         
     | 
| 
      
 36 
     | 
    
         
            +
            ```
         
     | 
| 
      
 37 
     | 
    
         
            +
             
     | 
| 
       29 
38 
     | 
    
         
             
            ## Getting a single deal, person, or company:
         
     | 
| 
       30 
39 
     | 
    
         | 
| 
       31 
40 
     | 
    
         
             
            ```ruby
         
     | 
    
        data/lib/pipeline_deals.rb
    CHANGED
    
    | 
         @@ -8,7 +8,7 @@ Dir[File.dirname(__FILE__) + '/resources/*.rb'].each {|file| p "requring #{file} 
     | 
|
| 
       8 
8 
     | 
    
         | 
| 
       9 
9 
     | 
    
         
             
            module PipelineDeals
         
     | 
| 
       10 
10 
     | 
    
         
             
              class << self
         
     | 
| 
       11 
     | 
    
         
            -
                attr_accessor : 
     | 
| 
      
 11 
     | 
    
         
            +
                attr_accessor :account_key, :api_key, :app_key, :app_version
         
     | 
| 
       12 
12 
     | 
    
         | 
| 
       13 
13 
     | 
    
         
             
                def site
         
     | 
| 
       14 
14 
     | 
    
         
             
                  PipelineDeals::Resource.site
         
     | 
| 
         @@ -17,7 +17,6 @@ module PipelineDeals 
     | 
|
| 
       17 
17 
     | 
    
         
             
                def site=(site)
         
     | 
| 
       18 
18 
     | 
    
         
             
                  PipelineDeals::Resource.site = site
         
     | 
| 
       19 
19 
     | 
    
         
             
                end
         
     | 
| 
       20 
     | 
    
         
            -
             
     | 
| 
       21 
20 
     | 
    
         
             
              end
         
     | 
| 
       22 
21 
     | 
    
         | 
| 
       23 
22 
     | 
    
         
             
              def self.configure
         
     | 
| 
         @@ -1,8 +1,17 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            module PipelineDeals
         
     | 
| 
       2 
2 
     | 
    
         
             
              class Resource < ActiveResource::Base
         
     | 
| 
       3 
     | 
    
         
            -
                self.site = "https://api.pipelinedeals.com"
         
     | 
| 
       4 
     | 
    
         
            -
                self.prefix = "/api/v3/"
         
     | 
| 
       5 
3 
     | 
    
         
             
                self.collection_parser = PipelineDeals::Collection
         
     | 
| 
      
 4 
     | 
    
         
            +
                self.include_root_in_json = true
         
     | 
| 
      
 5 
     | 
    
         
            +
                self.prefix = "/api/v3/"
         
     | 
| 
      
 6 
     | 
    
         
            +
                self.site = "https://api.pipelinedeals.com"
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
                def self.add_keys(hash)
         
     | 
| 
      
 9 
     | 
    
         
            +
                  hash[:api_key] = PipelineDeals.api_key unless PipelineDeals.account_key
         
     | 
| 
      
 10 
     | 
    
         
            +
                  hash[:account_key] = PipelineDeals.account_key if PipelineDeals.account_key
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
                  hash[:app_key] = PipelineDeals.app_key if PipelineDeals.app_key
         
     | 
| 
      
 13 
     | 
    
         
            +
                  hash[:app_version] = PipelineDeals.app_version if PipelineDeals.app_version
         
     | 
| 
      
 14 
     | 
    
         
            +
                end
         
     | 
| 
       6 
15 
     | 
    
         | 
| 
       7 
16 
     | 
    
         
             
                def self.find(*arguments)
         
     | 
| 
       8 
17 
     | 
    
         
             
                  scope = arguments.slice!(0)
         
     | 
| 
         @@ -15,14 +24,8 @@ module PipelineDeals 
     | 
|
| 
       15 
24 
     | 
    
         | 
| 
       16 
25 
     | 
    
         
             
                def save
         
     | 
| 
       17 
26 
     | 
    
         
             
                  PipelineDeals::Resource.add_keys(prefix_options)
         
     | 
| 
       18 
     | 
    
         
            -
                  self.include_root_in_json = true
         
     | 
| 
       19 
     | 
    
         
            -
                  super
         
     | 
| 
       20 
     | 
    
         
            -
                end
         
     | 
| 
       21 
27 
     | 
    
         | 
| 
       22 
     | 
    
         
            -
             
     | 
| 
       23 
     | 
    
         
            -
                  hash[:app_key] = PipelineDeals.app_key if PipelineDeals.app_key
         
     | 
| 
       24 
     | 
    
         
            -
                  hash[:app_version] = PipelineDeals.app_version if PipelineDeals.app_version
         
     | 
| 
       25 
     | 
    
         
            -
                  hash[:api_key] = PipelineDeals.api_key
         
     | 
| 
      
 28 
     | 
    
         
            +
                  super
         
     | 
| 
       26 
29 
     | 
    
         
             
                end
         
     | 
| 
       27 
30 
     | 
    
         
             
              end
         
     | 
| 
       28 
31 
     | 
    
         
             
            end
         
     | 
    
        data/pipeline_deals.gemspec
    CHANGED
    
    | 
         @@ -17,7 +17,7 @@ Gem::Specification.new do |gem| 
     | 
|
| 
       17 
17 
     | 
    
         
             
              gem.test_files    = gem.files.grep(%r{^(test|spec|features)/})
         
     | 
| 
       18 
18 
     | 
    
         
             
              gem.require_paths = ["lib"]
         
     | 
| 
       19 
19 
     | 
    
         | 
| 
       20 
     | 
    
         
            -
              gem.add_dependency('activeresource' 
     | 
| 
      
 20 
     | 
    
         
            +
              gem.add_dependency('activeresource')
         
     | 
| 
       21 
21 
     | 
    
         | 
| 
       22 
22 
     | 
    
         
             
              gem.add_development_dependency('rspec')
         
     | 
| 
       23 
23 
     | 
    
         
             
              gem.add_development_dependency('webmock')
         
     | 
    
        data/spec/pipeline_deals_spec.rb
    CHANGED
    
    | 
         @@ -2,14 +2,21 @@ require 'spec_helper' 
     | 
|
| 
       2 
2 
     | 
    
         | 
| 
       3 
3 
     | 
    
         
             
            describe PipelineDeals do
         
     | 
| 
       4 
4 
     | 
    
         
             
              describe '#configure' do
         
     | 
| 
      
 5 
     | 
    
         
            +
                it 'honors account_key=' do
         
     | 
| 
      
 6 
     | 
    
         
            +
                  PipelineDeals.configure {|c| c.account_key = 'xyz' }
         
     | 
| 
      
 7 
     | 
    
         
            +
                  expect(PipelineDeals.account_key).to eq 'xyz'
         
     | 
| 
      
 8 
     | 
    
         
            +
                end
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
       5 
10 
     | 
    
         
             
                it 'honors api_key=' do
         
     | 
| 
       6 
11 
     | 
    
         
             
                  PipelineDeals.configure {|c| c.api_key = 'xyz' }
         
     | 
| 
       7 
12 
     | 
    
         
             
                  expect(PipelineDeals.api_key).to eq 'xyz'
         
     | 
| 
       8 
13 
     | 
    
         
             
                end
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
       9 
15 
     | 
    
         
             
                it 'honors app_key=' do
         
     | 
| 
       10 
16 
     | 
    
         
             
                  PipelineDeals.configure {|c| c.app_key = 'xyz' }
         
     | 
| 
       11 
17 
     | 
    
         
             
                  expect(PipelineDeals.app_key).to eq 'xyz'
         
     | 
| 
       12 
18 
     | 
    
         
             
                end
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
       13 
20 
     | 
    
         
             
                it 'honors site=' do
         
     | 
| 
       14 
21 
     | 
    
         
             
                  PipelineDeals.configure {|c| c.site = 'http://localhost:3000' }
         
     | 
| 
       15 
22 
     | 
    
         
             
                  expect(PipelineDeals::Resource.site.to_s).to eq 'http://localhost:3000'
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,29 +1,29 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: pipeline_deals
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.5.0
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Grant Ammons
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date:  
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2019-07-19 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: activeresource
         
     | 
| 
       15 
15 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       16 
16 
     | 
    
         
             
                requirements:
         
     | 
| 
       17 
     | 
    
         
            -
                - -  
     | 
| 
      
 17 
     | 
    
         
            +
                - - ">="
         
     | 
| 
       18 
18 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       19 
     | 
    
         
            -
                    version:  
     | 
| 
      
 19 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
       20 
20 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       21 
21 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       22 
22 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       23 
23 
     | 
    
         
             
                requirements:
         
     | 
| 
       24 
     | 
    
         
            -
                - -  
     | 
| 
      
 24 
     | 
    
         
            +
                - - ">="
         
     | 
| 
       25 
25 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       26 
     | 
    
         
            -
                    version:  
     | 
| 
      
 26 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
       27 
27 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       28 
28 
     | 
    
         
             
              name: rspec
         
     | 
| 
       29 
29 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
         @@ -180,7 +180,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       180 
180 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       181 
181 
     | 
    
         
             
            requirements: []
         
     | 
| 
       182 
182 
     | 
    
         
             
            rubyforge_project: 
         
     | 
| 
       183 
     | 
    
         
            -
            rubygems_version: 2. 
     | 
| 
      
 183 
     | 
    
         
            +
            rubygems_version: 2.7.7
         
     | 
| 
       184 
184 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       185 
185 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       186 
186 
     | 
    
         
             
            summary: The pipeline_deals gem is a nice ruby wrapper around the PipelineDeals API.
         
     |