capital-iq 0.0.1
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 +15 -0
- data/Gemfile +16 -0
- data/Gemfile.lock +106 -0
- data/Guardfile +5 -0
- data/LICENSE.txt +20 -0
- data/README.rdoc +34 -0
- data/Rakefile +49 -0
- data/VERSION +1 -0
- data/capital-iq.gemspec +87 -0
- data/lib/capital-iq.rb +8 -0
- data/lib/capital-iq/api-error.rb +4 -0
- data/lib/capital-iq/base.rb +72 -0
- data/lib/capital-iq/request.rb +14 -0
- data/lib/capital-iq/transaction.rb +8 -0
- data/spec/capital-iq_spec.rb +7 -0
- data/spec/request_spec.rb +7 -0
- data/spec/responses/capiq_ibm.json +0 -0
- data/spec/spec_helper.rb +22 -0
- metadata +216 -0
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
NWFlMDdkYzAzOTVmNDI0Y2VhOTM2NWNiMzZhMWQ5NjMzMDEzZjUxNw==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
Yjc1Y2MxNjQ4ZjM5YjViOGIxYjY2MTM5NTU2N2ZmMDI1OTYxMGZjMw==
|
7
|
+
SHA512:
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
ZTBiNzMwMzg3NDgwZDcxNWUyMTExODAwODUwODQyZmM4MzA2ZjgxMzQzYzIw
|
10
|
+
ODE2MzZjM2Q0NjM4ZTIzNTMyZDdlOWU5ZjE0MzBlMzE3NGQ2ZjVkZTY4OGI0
|
11
|
+
ZmQ5NzQ5ZGRlYjU3MmY5NjEwOWE2MjY0NTBhNTlkZDE1MThjNzE=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
YTFmZDM0MTdjZGJjMjFkYTg5NTExMDc5NDA5Mzc3Mzg2ZWQxNjFhZDk5NmYw
|
14
|
+
MjhlYWQyODc5MmY0NTZiMGU4MjRlMTEzYWNkNmEwZDc4ZDVlNzEwZTllMjI0
|
15
|
+
NjI3OWY4MjEyNTQwNjRjYmM3Mjk3OGM1ZjE0MzBlNTdhMWFkNzY=
|
data/Gemfile
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
source "http://rubygems.org"
|
2
|
+
|
3
|
+
group :development do
|
4
|
+
gem "rspec", "~> 2.8.0"
|
5
|
+
gem "rdoc", "~> 3.12"
|
6
|
+
gem "bundler"
|
7
|
+
gem "jeweler", "~> 1.8.3"
|
8
|
+
gem 'guard'
|
9
|
+
gem 'guard-rspec'
|
10
|
+
gem 'webmock'
|
11
|
+
gem 'vcr'
|
12
|
+
end
|
13
|
+
|
14
|
+
gem 'httparty'
|
15
|
+
gem 'json'
|
16
|
+
gem 'hashie'
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,106 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
addressable (2.3.6)
|
5
|
+
builder (3.2.2)
|
6
|
+
celluloid (0.15.2)
|
7
|
+
timers (~> 1.1.0)
|
8
|
+
coderay (1.1.0)
|
9
|
+
crack (0.4.2)
|
10
|
+
safe_yaml (~> 1.0.0)
|
11
|
+
diff-lcs (1.1.3)
|
12
|
+
faraday (0.8.9)
|
13
|
+
multipart-post (~> 1.2.0)
|
14
|
+
ffi (1.9.3)
|
15
|
+
formatador (0.2.5)
|
16
|
+
git (1.2.8)
|
17
|
+
github_api (0.10.1)
|
18
|
+
addressable
|
19
|
+
faraday (~> 0.8.1)
|
20
|
+
hashie (>= 1.2)
|
21
|
+
multi_json (~> 1.4)
|
22
|
+
nokogiri (~> 1.5.2)
|
23
|
+
oauth2
|
24
|
+
guard (2.6.1)
|
25
|
+
formatador (>= 0.2.4)
|
26
|
+
listen (~> 2.7)
|
27
|
+
lumberjack (~> 1.0)
|
28
|
+
pry (>= 0.9.12)
|
29
|
+
thor (>= 0.18.1)
|
30
|
+
guard-rspec (1.2.1)
|
31
|
+
guard (>= 1.1)
|
32
|
+
hashie (3.3.1)
|
33
|
+
highline (1.6.21)
|
34
|
+
httparty (0.13.1)
|
35
|
+
json (~> 1.8)
|
36
|
+
multi_xml (>= 0.5.2)
|
37
|
+
jeweler (1.8.8)
|
38
|
+
builder
|
39
|
+
bundler (~> 1.0)
|
40
|
+
git (>= 1.2.5)
|
41
|
+
github_api (= 0.10.1)
|
42
|
+
highline (>= 1.6.15)
|
43
|
+
nokogiri (= 1.5.10)
|
44
|
+
rake
|
45
|
+
rdoc
|
46
|
+
json (1.8.1)
|
47
|
+
jwt (1.0.0)
|
48
|
+
listen (2.7.5)
|
49
|
+
celluloid (>= 0.15.2)
|
50
|
+
rb-fsevent (>= 0.9.3)
|
51
|
+
rb-inotify (>= 0.9)
|
52
|
+
lumberjack (1.0.5)
|
53
|
+
method_source (0.8.2)
|
54
|
+
multi_json (1.10.1)
|
55
|
+
multi_xml (0.5.5)
|
56
|
+
multipart-post (1.2.0)
|
57
|
+
nokogiri (1.5.10)
|
58
|
+
oauth2 (1.0.0)
|
59
|
+
faraday (>= 0.8, < 0.10)
|
60
|
+
jwt (~> 1.0)
|
61
|
+
multi_json (~> 1.3)
|
62
|
+
multi_xml (~> 0.5)
|
63
|
+
rack (~> 1.2)
|
64
|
+
pry (0.9.12.6)
|
65
|
+
coderay (~> 1.0)
|
66
|
+
method_source (~> 0.8)
|
67
|
+
slop (~> 3.4)
|
68
|
+
rack (1.5.2)
|
69
|
+
rake (10.3.2)
|
70
|
+
rb-fsevent (0.9.4)
|
71
|
+
rb-inotify (0.9.4)
|
72
|
+
ffi (>= 0.5.0)
|
73
|
+
rdoc (3.12.2)
|
74
|
+
json (~> 1.4)
|
75
|
+
rspec (2.8.0)
|
76
|
+
rspec-core (~> 2.8.0)
|
77
|
+
rspec-expectations (~> 2.8.0)
|
78
|
+
rspec-mocks (~> 2.8.0)
|
79
|
+
rspec-core (2.8.0)
|
80
|
+
rspec-expectations (2.8.0)
|
81
|
+
diff-lcs (~> 1.1.2)
|
82
|
+
rspec-mocks (2.8.0)
|
83
|
+
safe_yaml (1.0.1)
|
84
|
+
slop (3.5.0)
|
85
|
+
thor (0.19.1)
|
86
|
+
timers (1.1.0)
|
87
|
+
vcr (2.9.3)
|
88
|
+
webmock (1.17.4)
|
89
|
+
addressable (>= 2.2.7)
|
90
|
+
crack (>= 0.3.2)
|
91
|
+
|
92
|
+
PLATFORMS
|
93
|
+
ruby
|
94
|
+
|
95
|
+
DEPENDENCIES
|
96
|
+
bundler
|
97
|
+
guard
|
98
|
+
guard-rspec
|
99
|
+
hashie
|
100
|
+
httparty
|
101
|
+
jeweler (~> 1.8.3)
|
102
|
+
json
|
103
|
+
rdoc (~> 3.12)
|
104
|
+
rspec (~> 2.8.0)
|
105
|
+
vcr
|
106
|
+
webmock
|
data/Guardfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2014 Ian Morgan
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
= capital-iq
|
2
|
+
|
3
|
+
Ruby API wrapper to Capital IQ API.
|
4
|
+
|
5
|
+
== Usage
|
6
|
+
|
7
|
+
client = CapitalIQ::Base.new('user@host.com', 'sfd98j429ds')
|
8
|
+
=> #<CapitalIQ::Base:0x007fd81d41ac38 @auth={:username=>"user@host.com", :password=>"sfd98j429ds"}>
|
9
|
+
|
10
|
+
client.quick_match('exitround')
|
11
|
+
=> "IQ231729634"
|
12
|
+
|
13
|
+
client.gdsp_request('IQ231729634', 'IQ_CITY')
|
14
|
+
=> "San Francisco"
|
15
|
+
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
|
20
|
+
== Contributing to capital-iq
|
21
|
+
|
22
|
+
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
|
23
|
+
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
|
24
|
+
* Fork the project.
|
25
|
+
* Start a feature/bugfix branch.
|
26
|
+
* Commit and push until you are happy with your contribution.
|
27
|
+
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
28
|
+
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
29
|
+
|
30
|
+
== Copyright
|
31
|
+
|
32
|
+
Copyright (c) 2014 Exitround. See LICENSE.txt for
|
33
|
+
further details.
|
34
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
require 'bundler'
|
5
|
+
begin
|
6
|
+
Bundler.setup(:default, :development)
|
7
|
+
rescue Bundler::BundlerError => e
|
8
|
+
$stderr.puts e.message
|
9
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
10
|
+
exit e.status_code
|
11
|
+
end
|
12
|
+
require 'rake'
|
13
|
+
|
14
|
+
require 'jeweler'
|
15
|
+
Jeweler::Tasks.new do |gem|
|
16
|
+
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
17
|
+
gem.name = "capital-iq"
|
18
|
+
gem.homepage = "http://github.com/seeingidog/capital-iq"
|
19
|
+
gem.license = "MIT"
|
20
|
+
gem.summary = %Q{Ruby wrapper for the CapIQ API}
|
21
|
+
gem.description = %Q{Ruby wrapper for the CapIQ API}
|
22
|
+
gem.email = "ian@ruby-code.com"
|
23
|
+
gem.authors = ["Ian Morgan"]
|
24
|
+
# dependencies defined in Gemfile
|
25
|
+
end
|
26
|
+
Jeweler::RubygemsDotOrgTasks.new
|
27
|
+
|
28
|
+
require 'rspec/core'
|
29
|
+
require 'rspec/core/rake_task'
|
30
|
+
RSpec::Core::RakeTask.new(:spec) do |spec|
|
31
|
+
spec.pattern = FileList['spec/**/*_spec.rb']
|
32
|
+
end
|
33
|
+
|
34
|
+
RSpec::Core::RakeTask.new(:rcov) do |spec|
|
35
|
+
spec.pattern = 'spec/**/*_spec.rb'
|
36
|
+
spec.rcov = true
|
37
|
+
end
|
38
|
+
|
39
|
+
task :default => :spec
|
40
|
+
|
41
|
+
require 'rdoc/task'
|
42
|
+
Rake::RDocTask.new do |rdoc|
|
43
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
44
|
+
|
45
|
+
rdoc.rdoc_dir = 'rdoc'
|
46
|
+
rdoc.title = "capital-iq #{version}"
|
47
|
+
rdoc.rdoc_files.include('README*')
|
48
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
49
|
+
end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.0.1
|
data/capital-iq.gemspec
ADDED
@@ -0,0 +1,87 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
# stub: capital-iq 0.0.1 ruby lib
|
6
|
+
|
7
|
+
Gem::Specification.new do |s|
|
8
|
+
s.name = "capital-iq"
|
9
|
+
s.version = "0.0.1"
|
10
|
+
|
11
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
|
+
s.authors = ["Ian Morgan"]
|
13
|
+
s.date = "2014-09-26"
|
14
|
+
s.description = "Ruby wrapper for the CapIQ API"
|
15
|
+
s.email = "ian@ruby-code.com"
|
16
|
+
s.extra_rdoc_files = [
|
17
|
+
"LICENSE.txt",
|
18
|
+
"README.rdoc"
|
19
|
+
]
|
20
|
+
s.files = [
|
21
|
+
"Gemfile",
|
22
|
+
"Gemfile.lock",
|
23
|
+
"Guardfile",
|
24
|
+
"LICENSE.txt",
|
25
|
+
"README.rdoc",
|
26
|
+
"Rakefile",
|
27
|
+
"VERSION",
|
28
|
+
"capital-iq.gemspec",
|
29
|
+
"lib/capital-iq.rb",
|
30
|
+
"lib/capital-iq/api-error.rb",
|
31
|
+
"lib/capital-iq/base.rb",
|
32
|
+
"lib/capital-iq/request.rb",
|
33
|
+
"lib/capital-iq/transaction.rb",
|
34
|
+
"spec/capital-iq_spec.rb",
|
35
|
+
"spec/request_spec.rb",
|
36
|
+
"spec/responses/capiq_ibm.json",
|
37
|
+
"spec/spec_helper.rb"
|
38
|
+
]
|
39
|
+
s.homepage = "http://github.com/seeingidog/capital-iq"
|
40
|
+
s.licenses = ["MIT"]
|
41
|
+
s.require_paths = ["lib"]
|
42
|
+
s.rubygems_version = "2.1.11"
|
43
|
+
s.summary = "Ruby wrapper for the CapIQ API"
|
44
|
+
|
45
|
+
if s.respond_to? :specification_version then
|
46
|
+
s.specification_version = 4
|
47
|
+
|
48
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
49
|
+
s.add_runtime_dependency(%q<httparty>, [">= 0"])
|
50
|
+
s.add_runtime_dependency(%q<json>, [">= 0"])
|
51
|
+
s.add_runtime_dependency(%q<hashie>, [">= 0"])
|
52
|
+
s.add_development_dependency(%q<rspec>, ["~> 2.8.0"])
|
53
|
+
s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
|
54
|
+
s.add_development_dependency(%q<bundler>, [">= 0"])
|
55
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.8.3"])
|
56
|
+
s.add_development_dependency(%q<guard>, [">= 0"])
|
57
|
+
s.add_development_dependency(%q<guard-rspec>, [">= 0"])
|
58
|
+
s.add_development_dependency(%q<webmock>, [">= 0"])
|
59
|
+
s.add_development_dependency(%q<vcr>, [">= 0"])
|
60
|
+
else
|
61
|
+
s.add_dependency(%q<httparty>, [">= 0"])
|
62
|
+
s.add_dependency(%q<json>, [">= 0"])
|
63
|
+
s.add_dependency(%q<hashie>, [">= 0"])
|
64
|
+
s.add_dependency(%q<rspec>, ["~> 2.8.0"])
|
65
|
+
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
66
|
+
s.add_dependency(%q<bundler>, [">= 0"])
|
67
|
+
s.add_dependency(%q<jeweler>, ["~> 1.8.3"])
|
68
|
+
s.add_dependency(%q<guard>, [">= 0"])
|
69
|
+
s.add_dependency(%q<guard-rspec>, [">= 0"])
|
70
|
+
s.add_dependency(%q<webmock>, [">= 0"])
|
71
|
+
s.add_dependency(%q<vcr>, [">= 0"])
|
72
|
+
end
|
73
|
+
else
|
74
|
+
s.add_dependency(%q<httparty>, [">= 0"])
|
75
|
+
s.add_dependency(%q<json>, [">= 0"])
|
76
|
+
s.add_dependency(%q<hashie>, [">= 0"])
|
77
|
+
s.add_dependency(%q<rspec>, ["~> 2.8.0"])
|
78
|
+
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
79
|
+
s.add_dependency(%q<bundler>, [">= 0"])
|
80
|
+
s.add_dependency(%q<jeweler>, ["~> 1.8.3"])
|
81
|
+
s.add_dependency(%q<guard>, [">= 0"])
|
82
|
+
s.add_dependency(%q<guard-rspec>, [">= 0"])
|
83
|
+
s.add_dependency(%q<webmock>, [">= 0"])
|
84
|
+
s.add_dependency(%q<vcr>, [">= 0"])
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
data/lib/capital-iq.rb
ADDED
@@ -0,0 +1,72 @@
|
|
1
|
+
module CapitalIQ
|
2
|
+
class Base
|
3
|
+
include HTTParty
|
4
|
+
format :json
|
5
|
+
|
6
|
+
def initialize(username, password)
|
7
|
+
@auth = {username: username, password: password}
|
8
|
+
end
|
9
|
+
|
10
|
+
def request(function, identifier, mnemonic, properties)
|
11
|
+
request_body = Request.new(function, identifier, mnemonic, properties).request
|
12
|
+
response_data = self.class.post('https://sdk.gds.standardandpoors.com/gdssdk/rest/v2/clientservice.json', body: request_body, basic_auth: @auth, ssl_version: :SSLv3).parsed_response
|
13
|
+
response = response_data[response_data.keys.first].first
|
14
|
+
raise CapitalIQ::APIError, response['ErrMsg'] if response['ErrMsg']
|
15
|
+
response
|
16
|
+
end
|
17
|
+
|
18
|
+
def gdst_request(identifier, mnemonic)
|
19
|
+
response = request('GDST', identifier, mnemonic, {PERIODTYPE: "IQ_FQ"})
|
20
|
+
response['Rows'].first['Row'].first
|
21
|
+
end
|
22
|
+
|
23
|
+
def gdsp_request(identifier, mnemonic)
|
24
|
+
response = request('GDSP', identifier, mnemonic, nil)
|
25
|
+
response['Rows'].first['Row'].first
|
26
|
+
end
|
27
|
+
|
28
|
+
def quick_match(name)
|
29
|
+
response = request('GDSHE', name, 'IQ_COMPANY_ID_QUICK_MATCH', {startRank:"1", endRank:"5"})
|
30
|
+
response['Rows'].first['Row'].first
|
31
|
+
end
|
32
|
+
|
33
|
+
def match_and_request(name, mnemonic)
|
34
|
+
identifier = quick_match(name)
|
35
|
+
response = gdsp_request(identifier, mnemonic)
|
36
|
+
response['Rows'].first['Row'].first
|
37
|
+
end
|
38
|
+
|
39
|
+
def transaction_list(name)
|
40
|
+
acquisitions = {}
|
41
|
+
identifier = quick_match(name)
|
42
|
+
transaction_list = request('GDSHE', identifier, 'IQ_TRANSACTION_LIST_MA', {startRank:"1", endRank:"20"})
|
43
|
+
transaction_items = ['IQ_TR_TARGET_ID', 'IQ_TR_BUYER_ID', 'IQ_TR_SELLER_ID', 'IQ_TR_STATUS']
|
44
|
+
return nil if transaction_list['Rows'].first["Row"].first == 'Data Unavailable'
|
45
|
+
transaction_list['Rows'].each do |transaction|
|
46
|
+
acquisitions[transaction['Row'].first] = transaction_items.map {|transaction_item|
|
47
|
+
Hash[transaction_item, request('GDSP', transaction['Row'].first, transaction_item, nil)['Rows'].map {|a|
|
48
|
+
next if a['Row'].first == 'Data Unavailable'
|
49
|
+
if a['Row'].first.include?(',')
|
50
|
+
a['Row'].first.split(', ')
|
51
|
+
else
|
52
|
+
a['Row'].first
|
53
|
+
end
|
54
|
+
}.first
|
55
|
+
]
|
56
|
+
}.reduce({}, :merge)
|
57
|
+
end
|
58
|
+
acquisitions
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
class Transaction
|
63
|
+
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
# Multiple datapoints in request, support in request class/method
|
68
|
+
|
69
|
+
# CapIQ IDs in Org table
|
70
|
+
|
71
|
+
# Sellers in Organization table?
|
72
|
+
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module CapitalIQ
|
2
|
+
class Request
|
3
|
+
attr_reader :request
|
4
|
+
|
5
|
+
def initialize(function, identifier, mnemonic, properties)
|
6
|
+
request_hash = {inputRequests:[
|
7
|
+
{function:function, identifier: identifier, mnemonic: mnemonic}
|
8
|
+
]}
|
9
|
+
request_hash.merge!({properties: properties}) if properties
|
10
|
+
@request = "inputRequests=" + request_hash.to_json
|
11
|
+
end
|
12
|
+
|
13
|
+
end
|
14
|
+
end
|
File without changes
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
2
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
3
|
+
require 'rspec'
|
4
|
+
require 'capital-iq'
|
5
|
+
require 'webmock/rspec'
|
6
|
+
require 'vcr'
|
7
|
+
|
8
|
+
# Requires supporting files with custom matchers and macros, etc,
|
9
|
+
# in ./support/ and its subdirectories.
|
10
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
|
11
|
+
|
12
|
+
RSpec.configure do |config|
|
13
|
+
|
14
|
+
end
|
15
|
+
|
16
|
+
WebMock.disable_net_connect!
|
17
|
+
WebMock.stub_request(:post. "https://sdk.gds.standardandpoors.com/gdssdk/rest/v2/clientservice.json").to_return(:status => 200, :body => File.new(File.dirname(__FILE__) + '/responses/capiq_ibm.json'), :headers => {})
|
18
|
+
|
19
|
+
VCR.config do |c|
|
20
|
+
c.cassette_library_dir = 'spec/fixtures/dish_cassettes'
|
21
|
+
c.stub_with :webmock
|
22
|
+
end
|
metadata
ADDED
@@ -0,0 +1,216 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: capital-iq
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Ian Morgan
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-09-26 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: httparty
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ! '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ! '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: json
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ! '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ! '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: hashie
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ! '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 2.8.0
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ~>
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 2.8.0
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rdoc
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ~>
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '3.12'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ~>
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '3.12'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: bundler
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ! '>='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ! '>='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: jeweler
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ~>
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 1.8.3
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ~>
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 1.8.3
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: guard
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ! '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ! '>='
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: guard-rspec
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ! '>='
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ! '>='
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: webmock
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ! '>='
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ! '>='
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: vcr
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ! '>='
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ! '>='
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
167
|
+
description: Ruby wrapper for the CapIQ API
|
168
|
+
email: ian@ruby-code.com
|
169
|
+
executables: []
|
170
|
+
extensions: []
|
171
|
+
extra_rdoc_files:
|
172
|
+
- LICENSE.txt
|
173
|
+
- README.rdoc
|
174
|
+
files:
|
175
|
+
- Gemfile
|
176
|
+
- Gemfile.lock
|
177
|
+
- Guardfile
|
178
|
+
- LICENSE.txt
|
179
|
+
- README.rdoc
|
180
|
+
- Rakefile
|
181
|
+
- VERSION
|
182
|
+
- capital-iq.gemspec
|
183
|
+
- lib/capital-iq.rb
|
184
|
+
- lib/capital-iq/api-error.rb
|
185
|
+
- lib/capital-iq/base.rb
|
186
|
+
- lib/capital-iq/request.rb
|
187
|
+
- lib/capital-iq/transaction.rb
|
188
|
+
- spec/capital-iq_spec.rb
|
189
|
+
- spec/request_spec.rb
|
190
|
+
- spec/responses/capiq_ibm.json
|
191
|
+
- spec/spec_helper.rb
|
192
|
+
homepage: http://github.com/seeingidog/capital-iq
|
193
|
+
licenses:
|
194
|
+
- MIT
|
195
|
+
metadata: {}
|
196
|
+
post_install_message:
|
197
|
+
rdoc_options: []
|
198
|
+
require_paths:
|
199
|
+
- lib
|
200
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
201
|
+
requirements:
|
202
|
+
- - ! '>='
|
203
|
+
- !ruby/object:Gem::Version
|
204
|
+
version: '0'
|
205
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
206
|
+
requirements:
|
207
|
+
- - ! '>='
|
208
|
+
- !ruby/object:Gem::Version
|
209
|
+
version: '0'
|
210
|
+
requirements: []
|
211
|
+
rubyforge_project:
|
212
|
+
rubygems_version: 2.1.11
|
213
|
+
signing_key:
|
214
|
+
specification_version: 4
|
215
|
+
summary: Ruby wrapper for the CapIQ API
|
216
|
+
test_files: []
|