td-client 0.8.48 → 0.8.49

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.
data/ChangeLog CHANGED
@@ -1,9 +1,16 @@
1
+ == 2012-05-06 version 0.8.49
2
+
3
+ * Add User-Agent header
4
+ * VERSION constant moved to under TreasureData::Client
5
+
6
+
1
7
  == 2012-04-22 version 0.8.48
2
8
 
3
9
  * create_schedule now takes :type option
4
10
  * Fix wrong error messages
5
11
  * Ues 'api-import' instead of 'api' on data import
6
12
 
13
+
7
14
  == 2012-04-09 version 0.8.47
8
15
 
9
16
  * Fix HTTP proxy handlig issue which is overwritten with ENV['HTTP_PROXY']
@@ -1,3 +1,4 @@
1
+ require 'td/client/version'
1
2
 
2
3
  module TreasureData
3
4
 
@@ -28,6 +29,8 @@ class API
28
29
  require 'time'
29
30
 
30
31
  @apikey = apikey
32
+ @user_agent = "TD-Client-Ruby: #{TreasureData::Client::VERSION}"
33
+ @user_agent = "#{opts[:user_agent]}; " + @user_agent if opts.has_key?(:user_agent)
31
34
 
32
35
  endpoint = opts[:endpoint] || ENV['TD_API_SERVER'] || DEFAULT_ENDPOINT
33
36
  uri = URI.parse(endpoint)
@@ -1422,6 +1425,7 @@ class API
1422
1425
  header['Authorization'] = "TD1 #{apikey}"
1423
1426
  end
1424
1427
  header['Date'] = Time.now.rfc2822
1428
+ header['User-Agent'] = @user_agent
1425
1429
 
1426
1430
  return http, header
1427
1431
  end
@@ -1,5 +1,5 @@
1
1
  module TreasureData
2
-
3
- VERSION = '0.8.48'
4
-
2
+ class Client
3
+ VERSION = '0.8.49'
4
+ end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: td-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.48
4
+ version: 0.8.49
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-23 00:00:00.000000000 Z
12
+ date: 2013-05-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: msgpack