boxr 0.6.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f372e70fa452b62c0c46bb5e8d4e7bb3d43d7f6c
4
- data.tar.gz: 9b314c9dcf61db5c92d721ac8d2fbe7f1c2f40d2
3
+ metadata.gz: c0c27f80c271f3f13e8b2fb13946467f136b1955
4
+ data.tar.gz: 1ad858f6831a877a0f03dccf822941a4d6a91bb3
5
5
  SHA512:
6
- metadata.gz: c6f21f76dec7a9b6a7b56a39b3eb6416296ce966c260d918420635809f4b83c605f43e2bd3952107e15cd7fea6905fa65c3ce192c1035d19600c588b58f2531c
7
- data.tar.gz: d8c96b6cc61d2f9ecc05ac49e58b583fd3988d2be293b13290b679d42973774b6343f184ba4a78e655eb2118919cb9c6f4b3dab70cefadb95fe6423d53138236
6
+ metadata.gz: c62b62f3fd96d3a71edc34c636f7df4b1280ab91af52a4f899d7cde3250b3c9cafd0dc31e1b3ecee1cdf05e4f7a564cc4cb23961b2a355cd9f3729afe16b7924
7
+ data.tar.gz: 7d6fd3a95d20051270074956ed1379ade4bc2fbd999b58033056bf7967e5a5c59cb790d502094af23b9a55dc7a0f8a0c7ae1923059fd1d4c0f072c21ceba457d
@@ -38,4 +38,23 @@ module Boxr
38
38
 
39
39
  #The root folder in Box is always identified by 0
40
40
  ROOT = 0
41
+
42
+ #HTTPClient is high-performance, thread-safe, and supports persistent HTTPS connections
43
+ #http://bibwild.wordpress.com/2012/04/30/ruby-http-performance-shootout-redux/
44
+ BOX_CLIENT = HTTPClient.new
45
+ BOX_CLIENT.send_timeout = 3600 #one hour; needed for lengthy uploads
46
+ BOX_CLIENT.agent_name = "Boxr/#{Boxr::VERSION}"
47
+ BOX_CLIENT.transparent_gzip_decompression = true
48
+
49
+ def self.turn_on_debugging(device=STDOUT)
50
+ BOX_CLIENT.debug_dev = device
51
+ BOX_CLIENT.transparent_gzip_decompression = false
52
+ nil
53
+ end
54
+
55
+ def self.turn_off_debugging
56
+ BOX_CLIENT.debug_dev = nil
57
+ BOX_CLIENT.transparent_gzip_decompression = true
58
+ nil
59
+ end
41
60
  end
@@ -49,25 +49,7 @@ module Boxr
49
49
 
50
50
  GROUP_FIELDS = [:type, :id, :name, :created_at, :modified_at]
51
51
  GROUP_FIELDS_QUERY = GROUP_FIELDS.join(',')
52
-
53
- #Read this to see why the httpclient gem was chosen: http://bibwild.wordpress.com/2012/04/30/ruby-http-performance-shootout-redux/
54
- #All instances of Boxr::Client will use this one class instance of HTTPClient; that way persistent HTTPS connections work.
55
- #Plus, httpclient is thread-safe so we can use the same class instance with multiple instances of Boxr::Client
56
- BOX_CLIENT = HTTPClient.new
57
- BOX_CLIENT.send_timeout = 3600 #one hour; needed for lengthy uploads
58
- BOX_CLIENT.transparent_gzip_decompression = true
59
-
60
- def self.turn_on_debugging(device=STDOUT)
61
- BOX_CLIENT.debug_dev = device
62
- BOX_CLIENT.transparent_gzip_decompression = false
63
- nil
64
- end
65
-
66
- def self.turn_off_debugging
67
- BOX_CLIENT.debug_dev = nil
68
- BOX_CLIENT.transparent_gzip_decompression = true
69
- nil
70
- end
52
+
71
53
 
72
54
  def initialize(access_token, refresh_token: nil, box_client_id: ENV['BOX_CLIENT_ID'], box_client_secret: ENV['BOX_CLIENT_SECRET'],
73
55
  identifier: nil, as_user_id: nil, &token_refresh_listener)
@@ -1,3 +1,3 @@
1
1
  module Boxr
2
- VERSION = "0.6.0"
2
+ VERSION = "0.7.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: boxr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chad Burnette
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-22 00:00:00.000000000 Z
11
+ date: 2015-01-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler