samwise 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +23 -0
- data/lib/samwise/client.rb +19 -3
- data/lib/samwise/protocol.rb +16 -4
- data/lib/samwise/version.rb +1 -1
- data/samwise.gemspec +1 -0
- data/spec/client_spec.rb +55 -8
- data/spec/vcr/Samwise_Client.yml +41 -221
- metadata +15 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: be663900bef4bcc5b44bb03260cf11aa8549dd08
|
4
|
+
data.tar.gz: 3942367cf33cc3b8f79eddbd24d93109570934d9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81cde93f81c2066754ad6cca18eff99207887cad3d3465802c3ab7694dae132e9b4662886eb6fe5f8bac46f27d927af22b3e116c35a2ac94ab7fe7880e23d46b
|
7
|
+
data.tar.gz: 3966567affdf93b3c369921ec5e726c279e8653735e46a5d8d2106709aa41b2f906355434f4d97f78559e711701a06d8b2aca9118ee417506c3403fc74e896bd
|
data/README.md
CHANGED
@@ -107,6 +107,29 @@ Samwise::Util.format_duns(duns: '08-011-5718')
|
|
107
107
|
- If it is 9 digits, `0000` is added to the end.
|
108
108
|
- If it is 13 digits, the number is unchanged.
|
109
109
|
|
110
|
+
### Check status in SAM.gov
|
111
|
+
|
112
|
+
There is a web form where anyone can enter a DUNS number to get its status within SAM.gov: https://www.sam.gov/sam/helpPage/SAM_Reg_Status_Help_Page.html.
|
113
|
+
|
114
|
+
This form uses an undocumented/unpublished JSON endpoint. This gem provides Ruby access to that endpoint.
|
115
|
+
|
116
|
+
This does not require an api.data.gov API key, but it will make a network call to the above URL.
|
117
|
+
|
118
|
+
The SAM.gov status web form hard codes what appears to be an API key. That key is used by default in this gem. However, you may supply your own (also tell us where you got it!).
|
119
|
+
|
120
|
+
```ruby
|
121
|
+
client = Samwise::Client.new(sam_status_key: 'optional')
|
122
|
+
client.get_sam_status(duns: '08-011-5718')
|
123
|
+
|
124
|
+
#=> {
|
125
|
+
"Message" => "Request for registration information forbidden",
|
126
|
+
"Code" => 403,
|
127
|
+
"Error" => ""
|
128
|
+
}
|
129
|
+
|
130
|
+
client.get_sam_status(duns: )
|
131
|
+
```
|
132
|
+
|
110
133
|
## Install
|
111
134
|
|
112
135
|
In your Gemfile:
|
data/lib/samwise/client.rb
CHANGED
@@ -1,10 +1,16 @@
|
|
1
1
|
require 'faraday'
|
2
2
|
require 'json'
|
3
|
+
require 'httpclient'
|
3
4
|
|
4
5
|
module Samwise
|
5
6
|
class Client
|
6
|
-
def initialize(api_key: nil)
|
7
|
-
@api_key
|
7
|
+
def initialize(api_key: nil, sam_status_key: Samwise::Protocol::SAM_STATUS_KEY)
|
8
|
+
@api_key = api_key || ENV['DATA_DOT_GOV_API_KEY']
|
9
|
+
@sam_status_key = sam_status_key || ENV['SAM_STATUS_KEY']
|
10
|
+
@conn = Faraday.new do |faraday|
|
11
|
+
faraday.adapter :httpclient
|
12
|
+
end
|
13
|
+
@client = HTTPClient.new
|
8
14
|
end
|
9
15
|
|
10
16
|
def get_duns_info(duns: nil)
|
@@ -17,11 +23,21 @@ module Samwise
|
|
17
23
|
response.status == 200
|
18
24
|
end
|
19
25
|
|
26
|
+
def get_sam_status(duns: nil)
|
27
|
+
response = lookup_sam_status(duns: duns)
|
28
|
+
JSON.parse(response.body)
|
29
|
+
end
|
30
|
+
|
20
31
|
private
|
21
32
|
|
22
33
|
def lookup_duns(duns: nil)
|
23
34
|
duns = Samwise::Util.format_duns(duns: duns)
|
24
|
-
|
35
|
+
@client.get Samwise::Protocol.duns_url(duns: duns, api_key: @api_key)
|
36
|
+
end
|
37
|
+
|
38
|
+
def lookup_sam_status(duns: nil)
|
39
|
+
duns = Samwise::Util.format_duns(duns: duns)
|
40
|
+
@client.get Samwise::Protocol.sam_status_url(duns: duns, api_key: @api_key)
|
25
41
|
end
|
26
42
|
end
|
27
43
|
end
|
data/lib/samwise/protocol.rb
CHANGED
@@ -1,10 +1,22 @@
|
|
1
1
|
module Samwise
|
2
2
|
module Protocol
|
3
|
-
|
4
|
-
|
3
|
+
SAM_API_BASE_URL = 'https://api.data.gov'
|
4
|
+
SAM_API_API_VERSION = 'v1'
|
5
|
+
SAM_STATUS_URL = 'https://www.sam.gov/samdata/registrations/trackProgress'
|
6
|
+
SAM_STATUS_KEY = '1452031543862'
|
5
7
|
|
6
|
-
def self.duns_url(duns:
|
7
|
-
|
8
|
+
def self.duns_url(duns: nil, api_key: nil)
|
9
|
+
fail Samwise::Error::ArgumentMissing, 'DUNS number is missing' if duns.nil?
|
10
|
+
fail Samwise::Error::ArgumentMissing, 'SAM.gov API key is missing' if api_key.nil?
|
11
|
+
|
12
|
+
"#{SAM_API_BASE_URL}/sam/#{SAM_API_API_VERSION}/registrations/#{duns}?api_key=#{api_key}"
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.sam_status_url(duns: nil, api_key: nil)
|
16
|
+
fail Samwise::Error::ArgumentMissing, 'DUNS number is missing' if duns.nil?
|
17
|
+
fail Samwise::Error::ArgumentMissing, 'SAM status key is missing' if api_key.nil?
|
18
|
+
|
19
|
+
"#{SAM_STATUS_URL}/?duns=#{duns}&_=#{api_key}"
|
8
20
|
end
|
9
21
|
end
|
10
22
|
end
|
data/lib/samwise/version.rb
CHANGED
data/samwise.gemspec
CHANGED
data/spec/client_spec.rb
CHANGED
@@ -6,66 +6,113 @@ describe Samwise::Client, vcr: { cassette_name: "Samwise::Client", record: :new_
|
|
6
6
|
let(:nine_duns) { '809102507' }
|
7
7
|
let(:eight_duns) { '78327018' }
|
8
8
|
let(:thirteen_duns) { '0223841150000' }
|
9
|
+
let(:not_in_sam_duns) { '08-011-5718' }
|
10
|
+
let(:valid_dunses) { [nine_duns, eight_duns, thirteen_duns] }
|
9
11
|
let(:non_existent_duns) { '0000001000000' }
|
12
|
+
let(:client) { Samwise::Client.new(api_key: api_key) }
|
13
|
+
let(:bad_dunses) do
|
14
|
+
[
|
15
|
+
'1234567890',
|
16
|
+
'12345678901',
|
17
|
+
'123456789011',
|
18
|
+
'1',
|
19
|
+
'',
|
20
|
+
'--',
|
21
|
+
'12345678901234567890'
|
22
|
+
]
|
23
|
+
end
|
24
|
+
|
25
|
+
context '#get_sam_status' do
|
26
|
+
it 'should return a Hash given a valid DUNS number' do
|
27
|
+
skip 'until SSL issues can be addressed'
|
28
|
+
valid_dunses.each do |valid_duns|
|
29
|
+
expect(client.get_sam_status(duns: valid_duns)).to be_a(Hash)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
it 'should return a Hash given a DUNS not in SAM' do
|
34
|
+
skip 'until SSL issues can be addressed'
|
35
|
+
expect(client.get_sam_status(duns: not_in_sam_duns)).to be_a(Hash)
|
36
|
+
end
|
37
|
+
|
38
|
+
it 'should raise a Samwise::Error::InvalidFormat error given an invalid DUNS number' do
|
39
|
+
bad_dunses.each do |bad_duns|
|
40
|
+
expect do
|
41
|
+
client.get_sam_status(duns: bad_duns)
|
42
|
+
end.to raise_error(Samwise::Error::InvalidFormat)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
end
|
10
47
|
|
11
48
|
context '#duns_is_in_sam?' do
|
12
49
|
it "should verify that a 9 digit DUNS number exists in sam.gov" do
|
13
|
-
client = Samwise::Client.new(api_key: api_key)
|
14
50
|
response = client.duns_is_in_sam?(duns: nine_duns)
|
15
51
|
|
16
52
|
expect(response).to be(true)
|
17
53
|
end
|
18
54
|
|
19
55
|
it "should verify that an 8 digit DUNS number exists in sam.gov" do
|
20
|
-
client = Samwise::Client.new(api_key: api_key)
|
21
56
|
response = client.duns_is_in_sam?(duns: eight_duns)
|
22
57
|
|
23
58
|
expect(response).to be(true)
|
24
59
|
end
|
25
60
|
|
26
61
|
it "should verify that a 13 digit DUNS number exists in sam.gov" do
|
27
|
-
client = Samwise::Client.new(api_key: api_key)
|
28
62
|
response = client.duns_is_in_sam?(duns: thirteen_duns)
|
29
63
|
|
30
64
|
expect(response).to be(true)
|
31
65
|
end
|
32
66
|
|
33
67
|
it "should return false given a DUNS number that is not in sam.gov" do
|
34
|
-
client = Samwise::Client.new(api_key: api_key)
|
35
68
|
response = client.duns_is_in_sam?(duns: non_existent_duns)
|
36
69
|
|
37
70
|
expect(response).to be(false)
|
38
71
|
end
|
72
|
+
|
73
|
+
it 'should raise a Samwise::Error::InvalidFormat error given an invalid DUNS number' do
|
74
|
+
bad_dunses.each do |bad_duns|
|
75
|
+
expect do
|
76
|
+
client.duns_is_in_sam?(duns: bad_duns)
|
77
|
+
end.to raise_error(Samwise::Error::InvalidFormat)
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
39
81
|
end
|
40
82
|
|
41
83
|
context '#get_duns_info' do
|
42
84
|
it "should get info for a 9 digit DUNS number" do
|
43
|
-
client = Samwise::Client.new(api_key: api_key)
|
44
85
|
response = client.get_duns_info(duns: nine_duns)
|
45
86
|
|
46
87
|
expect(response).to be_a(Hash)
|
47
88
|
end
|
48
89
|
|
49
90
|
it "should get info for an 8 digit DUNS number" do
|
50
|
-
client = Samwise::Client.new(api_key: api_key)
|
51
91
|
response = client.get_duns_info(duns: eight_duns)
|
52
92
|
|
53
93
|
expect(response).to be_a(Hash)
|
54
94
|
end
|
55
95
|
|
56
96
|
it "should get info for a 13 digit DUNS number" do
|
57
|
-
client = Samwise::Client.new(api_key: api_key)
|
58
97
|
response = client.get_duns_info(duns: thirteen_duns)
|
59
98
|
|
60
99
|
expect(response).to be_a(Hash)
|
61
100
|
end
|
62
101
|
|
63
102
|
it "should return an error given a DUNS number that is not in sam.gov" do
|
64
|
-
client = Samwise::Client.new(api_key: api_key)
|
65
103
|
response = client.get_duns_info(duns: non_existent_duns)
|
66
104
|
|
67
105
|
expect(response).to be_a(Hash)
|
68
106
|
expect(response['Error']).to eq('Not Found')
|
69
107
|
end
|
108
|
+
|
109
|
+
it 'should raise a Samwise::Error::InvalidFormat error given an invalid DUNS number' do
|
110
|
+
bad_dunses.each do |bad_duns|
|
111
|
+
expect do
|
112
|
+
client.get_duns_info(duns: bad_duns)
|
113
|
+
end.to raise_error(Samwise::Error::InvalidFormat)
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
70
117
|
end
|
71
118
|
end
|
data/spec/vcr/Samwise_Client.yml
CHANGED
@@ -1,198 +1,18 @@
|
|
1
1
|
---
|
2
2
|
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: https://api.data.gov/sam/v1/registrations/8091025070000?api_key=
|
6
|
-
body:
|
7
|
-
encoding: US-ASCII
|
8
|
-
string: ''
|
9
|
-
headers:
|
10
|
-
User-Agent:
|
11
|
-
- Faraday v0.9.2
|
12
|
-
Accept-Encoding:
|
13
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
|
-
Accept:
|
15
|
-
- "*/*"
|
16
|
-
response:
|
17
|
-
status:
|
18
|
-
code: 403
|
19
|
-
message: Forbidden
|
20
|
-
headers:
|
21
|
-
Access-Control-Allow-Origin:
|
22
|
-
- "*"
|
23
|
-
Content-Type:
|
24
|
-
- application/json
|
25
|
-
Date:
|
26
|
-
- Tue, 29 Dec 2015 22:10:13 GMT
|
27
|
-
Server:
|
28
|
-
- openresty
|
29
|
-
Vary:
|
30
|
-
- Accept-Encoding
|
31
|
-
X-Cache:
|
32
|
-
- MISS
|
33
|
-
Content-Length:
|
34
|
-
- '132'
|
35
|
-
Connection:
|
36
|
-
- keep-alive
|
37
|
-
body:
|
38
|
-
encoding: ASCII-8BIT
|
39
|
-
string: |-
|
40
|
-
{
|
41
|
-
"error": {
|
42
|
-
"code": "API_KEY_MISSING",
|
43
|
-
"message": "No api_key was supplied. Get one at https://api.data.gov"
|
44
|
-
}
|
45
|
-
}
|
46
|
-
http_version:
|
47
|
-
recorded_at: Tue, 29 Dec 2015 22:10:13 GMT
|
48
|
-
- request:
|
49
|
-
method: get
|
50
|
-
uri: https://api.data.gov/sam/v1/registrations/0783270180000?api_key=
|
51
|
-
body:
|
52
|
-
encoding: US-ASCII
|
53
|
-
string: ''
|
54
|
-
headers:
|
55
|
-
User-Agent:
|
56
|
-
- Faraday v0.9.2
|
57
|
-
Accept-Encoding:
|
58
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
59
|
-
Accept:
|
60
|
-
- "*/*"
|
61
|
-
response:
|
62
|
-
status:
|
63
|
-
code: 403
|
64
|
-
message: Forbidden
|
65
|
-
headers:
|
66
|
-
Access-Control-Allow-Origin:
|
67
|
-
- "*"
|
68
|
-
Content-Type:
|
69
|
-
- application/json
|
70
|
-
Date:
|
71
|
-
- Tue, 29 Dec 2015 22:10:13 GMT
|
72
|
-
Server:
|
73
|
-
- openresty
|
74
|
-
Vary:
|
75
|
-
- Accept-Encoding
|
76
|
-
X-Cache:
|
77
|
-
- MISS
|
78
|
-
Content-Length:
|
79
|
-
- '132'
|
80
|
-
Connection:
|
81
|
-
- keep-alive
|
82
|
-
body:
|
83
|
-
encoding: ASCII-8BIT
|
84
|
-
string: |-
|
85
|
-
{
|
86
|
-
"error": {
|
87
|
-
"code": "API_KEY_MISSING",
|
88
|
-
"message": "No api_key was supplied. Get one at https://api.data.gov"
|
89
|
-
}
|
90
|
-
}
|
91
|
-
http_version:
|
92
|
-
recorded_at: Tue, 29 Dec 2015 22:10:13 GMT
|
93
|
-
- request:
|
94
|
-
method: get
|
95
|
-
uri: https://api.data.gov/sam/v1/registrations/0223841150000?api_key=
|
96
|
-
body:
|
97
|
-
encoding: US-ASCII
|
98
|
-
string: ''
|
99
|
-
headers:
|
100
|
-
User-Agent:
|
101
|
-
- Faraday v0.9.2
|
102
|
-
Accept-Encoding:
|
103
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
104
|
-
Accept:
|
105
|
-
- "*/*"
|
106
|
-
response:
|
107
|
-
status:
|
108
|
-
code: 403
|
109
|
-
message: Forbidden
|
110
|
-
headers:
|
111
|
-
Access-Control-Allow-Origin:
|
112
|
-
- "*"
|
113
|
-
Content-Type:
|
114
|
-
- application/json
|
115
|
-
Date:
|
116
|
-
- Tue, 29 Dec 2015 22:10:13 GMT
|
117
|
-
Server:
|
118
|
-
- openresty
|
119
|
-
Vary:
|
120
|
-
- Accept-Encoding
|
121
|
-
X-Cache:
|
122
|
-
- MISS
|
123
|
-
Content-Length:
|
124
|
-
- '132'
|
125
|
-
Connection:
|
126
|
-
- keep-alive
|
127
|
-
body:
|
128
|
-
encoding: ASCII-8BIT
|
129
|
-
string: |-
|
130
|
-
{
|
131
|
-
"error": {
|
132
|
-
"code": "API_KEY_MISSING",
|
133
|
-
"message": "No api_key was supplied. Get one at https://api.data.gov"
|
134
|
-
}
|
135
|
-
}
|
136
|
-
http_version:
|
137
|
-
recorded_at: Tue, 29 Dec 2015 22:10:13 GMT
|
138
|
-
- request:
|
139
|
-
method: get
|
140
|
-
uri: https://api.data.gov/sam/v1/registrations/0000001000000?api_key=
|
141
|
-
body:
|
142
|
-
encoding: US-ASCII
|
143
|
-
string: ''
|
144
|
-
headers:
|
145
|
-
User-Agent:
|
146
|
-
- Faraday v0.9.2
|
147
|
-
Accept-Encoding:
|
148
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
149
|
-
Accept:
|
150
|
-
- "*/*"
|
151
|
-
response:
|
152
|
-
status:
|
153
|
-
code: 403
|
154
|
-
message: Forbidden
|
155
|
-
headers:
|
156
|
-
Access-Control-Allow-Origin:
|
157
|
-
- "*"
|
158
|
-
Content-Type:
|
159
|
-
- application/json
|
160
|
-
Date:
|
161
|
-
- Tue, 29 Dec 2015 22:10:13 GMT
|
162
|
-
Server:
|
163
|
-
- openresty
|
164
|
-
Vary:
|
165
|
-
- Accept-Encoding
|
166
|
-
X-Cache:
|
167
|
-
- MISS
|
168
|
-
Content-Length:
|
169
|
-
- '132'
|
170
|
-
Connection:
|
171
|
-
- keep-alive
|
172
|
-
body:
|
173
|
-
encoding: ASCII-8BIT
|
174
|
-
string: |-
|
175
|
-
{
|
176
|
-
"error": {
|
177
|
-
"code": "API_KEY_MISSING",
|
178
|
-
"message": "No api_key was supplied. Get one at https://api.data.gov"
|
179
|
-
}
|
180
|
-
}
|
181
|
-
http_version:
|
182
|
-
recorded_at: Tue, 29 Dec 2015 22:10:13 GMT
|
183
3
|
- request:
|
184
4
|
method: get
|
185
5
|
uri: https://api.data.gov/sam/v1/registrations/8091025070000?api_key=<data_dot_gov_api_key>
|
186
6
|
body:
|
187
|
-
encoding:
|
7
|
+
encoding: UTF-8
|
188
8
|
string: ''
|
189
9
|
headers:
|
190
10
|
User-Agent:
|
191
|
-
-
|
192
|
-
Accept-Encoding:
|
193
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
11
|
+
- HTTPClient/1.0 (2.7.1, ruby 2.1.5 (2014-11-13))
|
194
12
|
Accept:
|
195
13
|
- "*/*"
|
14
|
+
Date:
|
15
|
+
- Wed, 06 Jan 2016 20:01:33 GMT
|
196
16
|
response:
|
197
17
|
status:
|
198
18
|
code: 200
|
@@ -203,7 +23,7 @@ http_interactions:
|
|
203
23
|
Content-Type:
|
204
24
|
- application/json
|
205
25
|
Date:
|
206
|
-
-
|
26
|
+
- Wed, 06 Jan 2016 20:01:15 GMT
|
207
27
|
Server:
|
208
28
|
- openresty
|
209
29
|
Vary:
|
@@ -216,9 +36,9 @@ http_interactions:
|
|
216
36
|
X-Ratelimit-Limit:
|
217
37
|
- '5000'
|
218
38
|
X-Ratelimit-Remaining:
|
219
|
-
- '
|
220
|
-
|
221
|
-
-
|
39
|
+
- '4989'
|
40
|
+
Transfer-Encoding:
|
41
|
+
- chunked
|
222
42
|
Connection:
|
223
43
|
- keep-alive
|
224
44
|
body:
|
@@ -227,7 +47,7 @@ http_interactions:
|
|
227
47
|
Pebble Hill Lane","Zip":"20878","Country":"USA","City":"North Potomac","stateorProvince":"MD"},"email":"VIJAY@XFINION.COM","usPhone":"3018014897","firstName":"VIJAY"},"disasterRelief":{"type":"ANY"},"dunsPlus4":"0000","activationDate":"2015-11-27
|
228
48
|
08:50:04.0","fiscalYearEndCloseDate":"12/31","businessTypes":["QZ","XS","VW","2X","27","23","A620240406"],"pastPerformancePoc":{"lastName":"MECCIA","address":{"Line1":"600
|
229
49
|
19th St NW","Zip":"20431","Country":"USA","City":"Washington","stateorProvince":"DC"},"email":"MECCIAMJ@STATE.GOV","usPhone":"2024857820","firstName":"MICHAEL"},"registrationDate":"2008-08-17
|
230
|
-
00:00:00.0","certificationsURL":{"pdfUrl":"https://www.sam.gov/SAMPortal/filedownload?reportType=2&orgId=
|
50
|
+
00:00:00.0","certificationsURL":{"pdfUrl":"https://www.sam.gov/SAMPortal/filedownload?reportType=2&orgId=Zy7Pcr575TOozBfu0s2bViB2r%2Fqmw9Wg4JnFzpkZdsJ0HdXjYehmDrcFO9RnNaRq&pitId=xoejtS%2BtlcEa10di8z3oi0tTzy27POa44TCS3cahAyXpyvmNc6Euwh%2FQtanSvmjHs7s5dvrvXmi9%0Ayo6oUedZdg%3D%3D&requestId=oPCyK98P2qU08Ci"},"hasDelinquentFederalDebt":false,"duns":"809102507","altElectronicBusinessPoc":{"lastName":"GOSWAMI","fax":"8665667533","address":{"Line1":"14608
|
231
51
|
Pebble Hill Lnae","Zip":"20878","Country":"USA","City":"North Potomac","stateorProvince":"MD"},"email":"NILAM@XFINION.COM","usPhone":"3013286579","firstName":"NILAM"},"cage":"561R4","hasKnownExclusion":false,"publicDisplay":true,"expirationDate":"2016-11-25
|
232
52
|
18:48:10.0","altPastPerformancePoc":{"lastName":"KAUL","address":{"Line1":"1801
|
233
53
|
North Lynn Street","Zip":"22209","Country":"USA","City":"Rosslyn","stateorProvince":"VA"},"email":"KAULN@STATE.GOV","usPhone":"5713459854","firstName":"NISHA"},"status":"ACTIVE","corporateStructureCode":"2L","corporateStructureName":"Corporate
|
@@ -245,31 +65,31 @@ http_interactions:
|
|
245
65
|
Pebble Hill Lane","Zip":"20878","Country":"USA","City":"North Potomac","stateorProvince":"MD"},"email":"VIJAY@XFINION.COM","usPhone":"3018014897","firstName":"VIJAY"},"mailingAddress":{"Line1":"7800
|
246
66
|
lonesome pine ln","Zip":"20817","Country":"USA","City":"Bethesda","stateorProvince":"MD"},"purposeOfRegistration":"ALL_AWARDS"}}}'
|
247
67
|
http_version:
|
248
|
-
recorded_at:
|
68
|
+
recorded_at: Wed, 06 Jan 2016 20:01:34 GMT
|
249
69
|
- request:
|
250
70
|
method: get
|
251
71
|
uri: https://api.data.gov/sam/v1/registrations/0783270180000?api_key=<data_dot_gov_api_key>
|
252
72
|
body:
|
253
|
-
encoding:
|
73
|
+
encoding: UTF-8
|
254
74
|
string: ''
|
255
75
|
headers:
|
256
76
|
User-Agent:
|
257
|
-
-
|
258
|
-
Accept-Encoding:
|
259
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
77
|
+
- HTTPClient/1.0 (2.7.1, ruby 2.1.5 (2014-11-13))
|
260
78
|
Accept:
|
261
79
|
- "*/*"
|
80
|
+
Date:
|
81
|
+
- Wed, 06 Jan 2016 20:01:34 GMT
|
262
82
|
response:
|
263
83
|
status:
|
264
84
|
code: 200
|
265
85
|
message: OK
|
266
86
|
headers:
|
267
87
|
Age:
|
268
|
-
- '
|
88
|
+
- '0'
|
269
89
|
Content-Type:
|
270
90
|
- application/json
|
271
91
|
Date:
|
272
|
-
-
|
92
|
+
- Wed, 06 Jan 2016 20:01:15 GMT
|
273
93
|
Server:
|
274
94
|
- openresty
|
275
95
|
Vary:
|
@@ -282,9 +102,9 @@ http_interactions:
|
|
282
102
|
X-Ratelimit-Limit:
|
283
103
|
- '5000'
|
284
104
|
X-Ratelimit-Remaining:
|
285
|
-
- '
|
105
|
+
- '4988'
|
286
106
|
Content-Length:
|
287
|
-
- '
|
107
|
+
- '3299'
|
288
108
|
Connection:
|
289
109
|
- keep-alive
|
290
110
|
body:
|
@@ -293,7 +113,7 @@ http_interactions:
|
|
293
113
|
ENGINEER","fax":"9787766968","address":{"Zip4":"2799","Line1":"328 VIRGINIA
|
294
114
|
ROAD","Zip":"01742","Country":"USA","City":"CONCORD","stateorProvince":"MA"},"email":"MCR@ISLANDPEAKSOFTWARE.COM","middleInitial":"C","usPhone":"9783418385","firstName":"MARK"},"dunsPlus4":"0000","activationDate":"2015-03-29
|
295
115
|
15:45:03.0","fiscalYearEndCloseDate":"12/31","businessTypes":["LJ","VW","2X"],"registrationDate":"2011-12-27
|
296
|
-
00:00:00.0","certificationsURL":{"pdfUrl":"https://www.sam.gov/SAMPortal/filedownload?reportType=2&orgId=
|
116
|
+
00:00:00.0","certificationsURL":{"pdfUrl":"https://www.sam.gov/SAMPortal/filedownload?reportType=2&orgId=CfE3psUYW8AzBIo9heITds3s6uj94i4CpullWZgrnbXddF3C%2FdGuyS9YM7WmhMlG&pitId=0IE%2BOsh06%2BYELonwrXcthhdZyC9BxTkLT5yI0lhUz%2FmN%2BZrVPnRSXCuwxdmpz2NSnC%2BnPDNPQIgF%0AixZvwSdNnw%3D%3D&requestId=47sK8ymUj43UF54"},"pscCodes":[{"pscName":"R&D-
|
297
117
|
GENERAL SCIENCE/TECHNOLOGY: MATHEMATICAL/COMPUTER SCIENCES (BASIC RESEARCH)","pscCode":"AJ21"},{"pscName":"R&D-
|
298
118
|
GENERAL SCIENCE/TECHNOLOGY: MATHEMATICAL/COMPUTER SCIENCES (APPLIED RESEARCH/EXPLORATORY
|
299
119
|
DEVELOPMENT)","pscCode":"AJ22"},{"pscName":"R&D- GENERAL SCIENCE/TECHNOLOGY:
|
@@ -304,40 +124,40 @@ http_interactions:
|
|
304
124
|
or Limited Liability Partnership","legalBusinessName":"ISLAND PEAK SOFTWARE
|
305
125
|
LLC","congressionalDistrict":"MA 03","businessStartDate":"2011-11-30","statusMessage":"Active","lastUpdateDate":"2015-03-30
|
306
126
|
16:16:49.0","samAddress":{"Zip4":"2799","Line1":"328 VIRGINIA RD","Zip":"01742","Country":"USA","City":"CONCORD","stateorProvince":"MA"},"submissionDate":"2015-03-29
|
307
|
-
15:35:18.0","naics":[{"isPrimary":
|
308
|
-
|
309
|
-
|
127
|
+
15:35:18.0","naics":[{"isPrimary":false,"naicsCode":"541511","naicsName":"CUSTOM
|
128
|
+
COMPUTER PROGRAMMING SERVICES"},{"isPrimary":true,"naicsCode":"541712","naicsName":"RESEARCH
|
129
|
+
AND DEVELOPMENT IN THE PHYSICAL, ENGINEERING, AND LIFE SCIENCES (EXCEPT BIOTECHNOLOGY)"}],"corporateUrl":"www.islandpeaksoftware.com","altGovtBusinessPoc":{"lastName":"REYNOLDS","title":"CHIEF
|
310
130
|
ENGINEER","fax":"9783710046","address":{"Zip4":"2799","Line1":"328 VIRGINIA
|
311
131
|
ROAD","Zip":"01742","Country":"USA","City":"CONCORD","stateorProvince":"MA"},"email":"MARKCREYNOLDS@COMCAST.NET","middleInitial":"C","usPhone":"9783710046","firstName":"MARK"},"creditCardUsage":false,"countryOfIncorporation":"USA","electronicBusinessPoc":{"lastName":"REYNOLDS","title":"CHIEF
|
312
132
|
ENGINEER","fax":"9787766968","address":{"Zip4":"2799","Line1":"328 VIRGINIA
|
313
133
|
ROAD","Zip":"01742","Country":"USA","City":"CONCORD","stateorProvince":"MA"},"email":"MCR@ISLANDPEAKSOFTWARE.COM","middleInitial":"C","usPhone":"9783418385","firstName":"MARK"},"mailingAddress":{"Zip4":"2799","Line1":"328
|
314
134
|
VIRGINIA ROAD","Zip":"01742","Country":"USA","City":"CONCORD","stateorProvince":"MA"},"purposeOfRegistration":"ALL_AWARDS"}}}'
|
315
135
|
http_version:
|
316
|
-
recorded_at:
|
136
|
+
recorded_at: Wed, 06 Jan 2016 20:01:34 GMT
|
317
137
|
- request:
|
318
138
|
method: get
|
319
139
|
uri: https://api.data.gov/sam/v1/registrations/0223841150000?api_key=<data_dot_gov_api_key>
|
320
140
|
body:
|
321
|
-
encoding:
|
141
|
+
encoding: UTF-8
|
322
142
|
string: ''
|
323
143
|
headers:
|
324
144
|
User-Agent:
|
325
|
-
-
|
326
|
-
Accept-Encoding:
|
327
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
145
|
+
- HTTPClient/1.0 (2.7.1, ruby 2.1.5 (2014-11-13))
|
328
146
|
Accept:
|
329
147
|
- "*/*"
|
148
|
+
Date:
|
149
|
+
- Wed, 06 Jan 2016 20:01:34 GMT
|
330
150
|
response:
|
331
151
|
status:
|
332
152
|
code: 200
|
333
153
|
message: OK
|
334
154
|
headers:
|
335
155
|
Age:
|
336
|
-
- '
|
156
|
+
- '1'
|
337
157
|
Content-Type:
|
338
158
|
- application/json
|
339
159
|
Date:
|
340
|
-
-
|
160
|
+
- Wed, 06 Jan 2016 20:01:16 GMT
|
341
161
|
Server:
|
342
162
|
- openresty
|
343
163
|
Vary:
|
@@ -350,9 +170,9 @@ http_interactions:
|
|
350
170
|
X-Ratelimit-Limit:
|
351
171
|
- '5000'
|
352
172
|
X-Ratelimit-Remaining:
|
353
|
-
- '
|
173
|
+
- '4988'
|
354
174
|
Content-Length:
|
355
|
-
- '
|
175
|
+
- '5615'
|
356
176
|
Connection:
|
357
177
|
- keep-alive
|
358
178
|
body:
|
@@ -360,7 +180,7 @@ http_interactions:
|
|
360
180
|
string: '{"sam_data":{"registration":{"govtBusinessPoc":{"lastName":"GREMILLION","usPhoneExt":"1112","fax":"5048311901","address":{"Line2":"STE.
|
361
181
|
1600","Zip4":"3044","Line1":"111 VETERANS BLVD.","Zip":"70005","Country":"USA","City":"METAIRIE","stateorProvince":"LA"},"email":"RICK.GREMILLION@GEOCENT.COM","usPhone":"5048311900","firstName":"RICHARD"},"dunsPlus4":"0000","activationDate":"2015-08-06
|
362
182
|
09:31:21.0","fiscalYearEndCloseDate":"12/31","businessTypes":["LJ","VW","2X"],"registrationDate":"2009-09-02
|
363
|
-
00:00:00.0","certificationsURL":{"pdfUrl":"https://www.sam.gov/SAMPortal/filedownload?reportType=2&orgId=
|
183
|
+
00:00:00.0","certificationsURL":{"pdfUrl":"https://www.sam.gov/SAMPortal/filedownload?reportType=2&orgId=A%2FGzJar8p9bfsUBQbehJcLa5Xg4YWxVDtDV4tT%2B3N0nDLP2sfKFewpoROGej2Das&pitId=94DUQxnau2ECyduTU9pec1ucWn25Y%2FDgj6qQOedZqs8cX1KMQ3L8LSXLHy4xkEcv&requestId=Fe7lHI9N0YwQ850"},"pscCodes":[{"pscName":"SUPPORT-
|
364
184
|
PROFESSIONAL: PROGRAM MANAGEMENT/SUPPORT","pscCode":"R408"},{"pscName":"SUPPORT-
|
365
185
|
PROFESSIONAL: PERSONAL SERVICES CONTRACTS","pscCode":"R497"},{"pscName":"SUPPORT-
|
366
186
|
PROFESSIONAL: TECHNOLOGY SHARING/UTILIZATION","pscCode":"R415"},{"pscName":"SUPPORT-
|
@@ -403,20 +223,20 @@ http_interactions:
|
|
403
223
|
1600","Zip4":"3044","Line1":"111 VETERANS BLVD.","Zip":"70005","Country":"USA","City":"METAIRIE","stateorProvince":"LA"},"email":"CONTRACTS@GEOCENT.COM","middleInitial":"S.","usPhone":"5048311900","firstName":"CATHERINE"},"mailingAddress":{"Line2":"Suite
|
404
224
|
1600","Zip4":"3044","Line1":"111 VETERANS MEMORIAL BLVD","Zip":"70005","Country":"USA","City":"METAIRIE","stateorProvince":"LA"},"purposeOfRegistration":"ALL_AWARDS"}}}'
|
405
225
|
http_version:
|
406
|
-
recorded_at:
|
226
|
+
recorded_at: Wed, 06 Jan 2016 20:01:34 GMT
|
407
227
|
- request:
|
408
228
|
method: get
|
409
229
|
uri: https://api.data.gov/sam/v1/registrations/0000001000000?api_key=<data_dot_gov_api_key>
|
410
230
|
body:
|
411
|
-
encoding:
|
231
|
+
encoding: UTF-8
|
412
232
|
string: ''
|
413
233
|
headers:
|
414
234
|
User-Agent:
|
415
|
-
-
|
416
|
-
Accept-Encoding:
|
417
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
235
|
+
- HTTPClient/1.0 (2.7.1, ruby 2.1.5 (2014-11-13))
|
418
236
|
Accept:
|
419
237
|
- "*/*"
|
238
|
+
Date:
|
239
|
+
- Wed, 06 Jan 2016 20:01:34 GMT
|
420
240
|
response:
|
421
241
|
status:
|
422
242
|
code: 404
|
@@ -427,7 +247,7 @@ http_interactions:
|
|
427
247
|
Content-Type:
|
428
248
|
- application/json
|
429
249
|
Date:
|
430
|
-
-
|
250
|
+
- Wed, 06 Jan 2016 20:01:16 GMT
|
431
251
|
Server:
|
432
252
|
- openresty
|
433
253
|
Vary:
|
@@ -440,9 +260,9 @@ http_interactions:
|
|
440
260
|
X-Ratelimit-Limit:
|
441
261
|
- '5000'
|
442
262
|
X-Ratelimit-Remaining:
|
443
|
-
- '
|
263
|
+
- '4986'
|
444
264
|
Content-Length:
|
445
|
-
- '
|
265
|
+
- '80'
|
446
266
|
Connection:
|
447
267
|
- keep-alive
|
448
268
|
body:
|
@@ -450,5 +270,5 @@ http_interactions:
|
|
450
270
|
string: '{"Message":"The registration could not be found","Code":404,"Error":"Not
|
451
271
|
Found"}'
|
452
272
|
http_version:
|
453
|
-
recorded_at:
|
273
|
+
recorded_at: Wed, 06 Jan 2016 20:01:34 GMT
|
454
274
|
recorded_with: VCR 2.9.3
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: samwise
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alan deLevie
|
@@ -122,6 +122,20 @@ dependencies:
|
|
122
122
|
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: httpclient
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :runtime
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
125
139
|
- !ruby/object:Gem::Dependency
|
126
140
|
name: faraday
|
127
141
|
requirement: !ruby/object:Gem::Requirement
|