activeresource-google_spreadsheets 0.1.7 → 0.2.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: 2c5bcdb99d1d9f0f957e277e28b1ad099c29fd8e
4
- data.tar.gz: 0a95a492fa7435a2c50e0b10ed041c07e9f1a351
3
+ metadata.gz: b995e5457991666c29e03f231f6380215ecf66ed
4
+ data.tar.gz: 47788f07574dd25d260d70a085358d3ac5ae324b
5
5
  SHA512:
6
- metadata.gz: da3e9aaa716cc7a9a40f1f9955f0d539679e60b7980f37ac8db00fe41be2860bd2aa7eddd41d8e9d381cf7fd80083da0d735a0d8ffa545ff7fd0ea2796057f93
7
- data.tar.gz: c84889b8eae583ac50d6b1d5e8390bdbbcf8a01308302bb9b0624ba27aef59dee017892aa2af093f48ca54b72104d4d0df0474f8b87edf14733e4501a116e42f
6
+ metadata.gz: 199f57e9fea57908b1f0bdbbcdb3aeb91577dc008b478cb52c1e28c97003fdc5cace92dfab95a4704b50fccfb4d2c9d87baef1969e0f5ff6627808de49a8ee6a
7
+ data.tar.gz: 51cdfbdb99e66806b4952556538e384cd98c5d4107fa55e7d32680d44f11708852367e989aecd8d09793d70cad9ca230635087ae7b7ba43e49cb62dc38c449a4
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_dependency 'activeresource', '~> 4.0.0'
21
+ spec.add_dependency 'activeresource', '~> 4.1.0'
22
22
  spec.add_dependency 'activesupport'
23
23
  spec.add_dependency 'google-api-client', '~> 0.8.6'
24
24
 
@@ -4,10 +4,10 @@ module GoogleSpreadsheets
4
4
  self.format = GDataFormat.new
5
5
 
6
6
  class << self
7
- # Avoid dup & freeze
7
+ # Avoid dup & freeze because of possible replacing with OAuth access token
8
8
  def password
9
- if defined?(@password)
10
- @password
9
+ if _password_defined?
10
+ _password
11
11
  elsif superclass != Object && superclass.password
12
12
  superclass.password
13
13
  end
@@ -34,15 +34,19 @@ module GoogleSpreadsheets
34
34
  end
35
35
  end
36
36
 
37
+ # Use GoogleSpreadsheets::Connection instead of ActiveResource::Connection
37
38
  def connection(refresh = false)
38
- if defined?(@connection) || self == Base
39
- @connection = Connection.new(site, format) if refresh || @connection.nil?
40
- @connection.proxy = proxy if proxy
41
- @connection.user = user if user
42
- @connection.password = password if password
43
- @connection.auth_type = auth_type if auth_type
44
- @connection.timeout = timeout if timeout
45
- @connection
39
+ if _connection_defined? || self == GoogleSpreadsheets::Base
40
+ self._connection = GoogleSpreadsheets::Connection.new(site, format) if refresh || _connection.nil?
41
+ _connection.proxy = proxy if proxy
42
+ _connection.user = user if user
43
+ _connection.password = password if password
44
+ _connection.auth_type = auth_type if auth_type
45
+ _connection.timeout = timeout if timeout
46
+ _connection.open_timeout = open_timeout if open_timeout
47
+ _connection.read_timeout = read_timeout if read_timeout
48
+ _connection.ssl_options = ssl_options if ssl_options
49
+ _connection
46
50
  else
47
51
  superclass.connection
48
52
  end
@@ -10,7 +10,7 @@ module GoogleSpreadsheets
10
10
  { :namespaces => { 'gsx' => 'http://schemas.google.com/spreadsheets/2006/extended' } })
11
11
  end
12
12
  end
13
- @connection = nil # avoid using base class's connection.
13
+ self._connection = nil # avoid using base class's connection.
14
14
  self.prefix = '/:document_id/:worksheet_id/:visibility/:projection/'
15
15
  self.format = Format.new
16
16
  def self.collection_name; 'list' end
@@ -1,6 +1,6 @@
1
1
  module GoogleSpreadsheets
2
2
  class Spreadsheet < Base
3
- @connection = nil # avoid using base class's connection.
3
+ self._connection = nil # avoid using base class's connection.
4
4
  self.prefix = '/private/full/'
5
5
  def self.collection_name; 'spreadsheets' end
6
6
  end
@@ -1,3 +1,3 @@
1
1
  module GoogleSpreadsheets
2
- VERSION = "0.1.7"
2
+ VERSION = "0.2.0"
3
3
  end
@@ -12,7 +12,7 @@ module GoogleSpreadsheets
12
12
  e['colCount'] = e['colCount'].to_i if e.has_key?('colCount')
13
13
  end
14
14
  end
15
- @connection = nil # avoid using base class's connection.
15
+ self._connection = nil # avoid using base class's connection.
16
16
  self.prefix = '/:document_id/:visibility/:projection/'
17
17
  self.format = Format.new
18
18
  def self.collection_name; 'worksheets' end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeresource-google_spreadsheets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chihiro Ito
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-04-08 00:00:00.000000000 Z
12
+ date: 2017-05-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activeresource
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: 4.0.0
20
+ version: 4.1.0
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - "~>"
26
26
  - !ruby/object:Gem::Version
27
- version: 4.0.0
27
+ version: 4.1.0
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: activesupport
30
30
  requirement: !ruby/object:Gem::Requirement
@@ -140,4 +140,3 @@ signing_key:
140
140
  specification_version: 4
141
141
  summary: Google Spreadsheets accessor with ActiveResource
142
142
  test_files: []
143
- has_rdoc: