quandl_client 2.4.6 → 2.4.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/UPGRADE.md +5 -0
- data/lib/quandl/client.rb +10 -0
- data/lib/quandl/client/base.rb +10 -0
- data/lib/quandl/client/base/model.rb +1 -1
- data/lib/quandl/client/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 63746d1a5911c0123f53e0c8374249252ec885e0
|
4
|
+
data.tar.gz: 47bd1b09afd032baa38067c34cd4404d96ac52bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 276cb82cd3f6269187b55ec918405a0e0c82f21be1ea33ca1eaf293e1086fa94f0a2ff890026fa1ca6589a7dcfa0ab328aa2bb7f8d1dcdb7229b10cff491c09a
|
7
|
+
data.tar.gz: 9dbe1625f4d9fa8847a8d5e59dcd2fdead945cf2e06ec3a7def4dca23c88799d3f8bbee8acf884eb8d97d48a5b4ee9eda209f6cd6fcd15622d9fbc4d8aa7a1e4
|
data/UPGRADE.md
CHANGED
data/lib/quandl/client.rb
CHANGED
@@ -19,6 +19,16 @@ require 'quandl/client/models/user'
|
|
19
19
|
module Quandl
|
20
20
|
module Client
|
21
21
|
|
22
|
+
attr_accessor :request_source, :request_version
|
23
|
+
|
24
|
+
def request_source
|
25
|
+
@request_source ||= "quandl_client"
|
26
|
+
end
|
27
|
+
|
28
|
+
def request_version
|
29
|
+
@request_version ||= Quandl::Client::VERSION
|
30
|
+
end
|
31
|
+
|
22
32
|
def self.use(url)
|
23
33
|
Quandl::Client::Base.use(url)
|
24
34
|
end
|
data/lib/quandl/client/base.rb
CHANGED
@@ -29,6 +29,7 @@ class Quandl::Client::Base
|
|
29
29
|
def her_api
|
30
30
|
Her::API.new.setup url: url_with_version do |c|
|
31
31
|
c.use TokenAuthentication
|
32
|
+
c.use TrackRequestSource
|
32
33
|
c.use Faraday::Request::UrlEncoded
|
33
34
|
c.use Quandl::Client::Middleware::ParseJSON
|
34
35
|
c.use Faraday::Adapter::NetHttp
|
@@ -75,6 +76,15 @@ class Quandl::Client::Base
|
|
75
76
|
end
|
76
77
|
end
|
77
78
|
|
79
|
+
class TrackRequestSource < Faraday::Middleware
|
80
|
+
def call(env)
|
81
|
+
env[:body] ||= {}
|
82
|
+
env[:body][:request_source] = Quandl::Client.request_source
|
83
|
+
env[:body][:request_version] = Quandl::Client.request_version
|
84
|
+
@app.call(env)
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
78
88
|
end
|
79
89
|
|
80
90
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: quandl_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.4.
|
4
|
+
version: 2.4.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Blake Hilscher
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-01-
|
11
|
+
date: 2014-01-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|