sourcing 0.0.1 → 0.0.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ab9a75453888871e9d48d6e23b53f179ef1afa62
4
- data.tar.gz: a2e4c94e99d201e8bd37b2361f28a771836a26d8
3
+ metadata.gz: 6862b095153e5a7a326dee18bcaa0807ccefffa1
4
+ data.tar.gz: 58bdde4da5fd9719957eab8cfb34336a6d489d67
5
5
  SHA512:
6
- metadata.gz: c43d0e73057210ba330135a41b4251a0d2c90ad9ab931c72b73cd92b652869fc2d10977010c286823aa67fb8dbc3c77cd3691202058c3f344b372d39b2301301
7
- data.tar.gz: e129d17912d1e833d4c61bab1ea9ded017e3d0d6f787bbea5da6d105996ebf3a33f41f5667c466c3359c92b764d8de8189504f109f0880f974f2cdc7977162d0
6
+ metadata.gz: a3d574051d2f900b75c6f11c0144cf97d235037bd28351e0363143751408b750cc4e6dcd6648f8641e1ee182f00e26d9bb11d48bcf91d08935a9543150ffbd95
7
+ data.tar.gz: 3071d1b59cc0ad2421a96a8ec5e9f1c84ffcc7d321221c2f983b7a75daef84d5083130f498386d370e5bfaf7865a3bf255480714e1f31b09e4f3ef4df26a48c5
data/README.md CHANGED
@@ -20,7 +20,7 @@ Or install it yourself as:
20
20
 
21
21
  First authorize requests by setting the API key found on your [account's settings page](https://sourcing.io/profile).
22
22
 
23
- Sourcing.key = ENV['SOURCING_KEY']
23
+ Sourcing.api_key = ENV['SOURCING_KEY']
24
24
 
25
25
  Then you can lookup people by email address:
26
26
 
data/examples/email.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  require 'sourcing'
2
2
  require 'pp'
3
3
 
4
- Sourcing.key = ENV['SOURCING_KEY']
4
+ Sourcing.api_key = ENV['SOURCING_KEY']
5
5
 
6
6
  pp Sourcing::Person[email: 'info@eribium.org']
data/lib/sourcing.rb CHANGED
@@ -2,13 +2,17 @@ require 'nestful'
2
2
  require 'sourcing/version'
3
3
 
4
4
  module Sourcing
5
- def self.key=(value)
5
+ def self.api_key=(value)
6
6
  Base.options = {
7
7
  :auth_type => :bearer,
8
8
  :password => value
9
9
  }
10
10
  end
11
11
 
12
+ def self.key=(value)
13
+ self.api_key = value
14
+ end
15
+
12
16
  class Base < Nestful::Resource
13
17
  endpoint 'https://api.sourcing.io'
14
18
  end
@@ -9,7 +9,7 @@ module Sourcing
9
9
 
10
10
  params = options.delete(:params) || {}
11
11
 
12
- if key = options.delete(:key)
12
+ if key = options.delete(:api_key)
13
13
  params[:authorization] = key
14
14
  end
15
15
 
@@ -1,3 +1,3 @@
1
1
  module Sourcing
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sourcing
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex MacCaw
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-24 00:00:00.000000000 Z
11
+ date: 2013-10-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler