clio_client 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -8,7 +8,7 @@ module ClioClient
8
8
  module Http
9
9
 
10
10
  def base_uri(path, params = {})
11
- uri = URI.parse(self.class.base_scope_url)
11
+ uri = URI.parse(self.base_scope_url)
12
12
  uri.path = path
13
13
  uri.query = URI.encode_www_form(params) if params.any?
14
14
  uri
@@ -1,26 +1,19 @@
1
1
  module ClioClient
2
2
 
3
3
  class Session
4
-
5
- class << self
6
-
7
- attr_accessor :base_scope_url
8
-
9
- end
10
-
11
- self.base_scope_url = "https://app.goclio.com"
4
+ BASE_SCOPE_URL = "https://app.goclio.com"
12
5
 
13
6
  include Http
14
7
  include Authorization
15
8
 
16
- attr_accessor :access_token, :client_id, :client_secret
17
- attr_accessor :end_points
9
+ attr_accessor :access_token, :client_id, :client_secret, :end_points, :base_scope_url
18
10
 
19
11
  def initialize(credentials = {})
20
12
  self.access_token = credentials[:access_token]
21
13
  self.client_id = credentials[:client_id]
22
14
  self.client_secret = credentials[:client_secret]
23
15
  self.end_points = {}
16
+ self.base_scope_url = credentials[:base_scope_url] || BASE_SCOPE_URL
24
17
  end
25
18
 
26
19
  { activities: ClioClient::Api::Activity,
@@ -45,11 +38,11 @@ module ClioClient
45
38
  timeline_events: ClioClient::Api::TimelineEvent,
46
39
  timer: ClioClient::Api::Timer,
47
40
  users: ClioClient::Api::User
48
- }.each_pair do |method, klass|
41
+ }.each_pair do |method, klass|
49
42
  define_method method do
50
43
  end_points[method] ||= klass.new(self)
51
44
  end
52
- end
45
+ end
53
46
 
54
47
  def document_versions(document_id)
55
48
  end_points[:document_versions] ||= {}
@@ -1,3 +1,3 @@
1
1
  module ClioClient
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,83 +1,94 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clio_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Kyle d'Oliveira
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2015-01-10 00:00:00.000000000 Z
12
+ date: 2015-01-14 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: bundler
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
- - - "~>"
19
+ - - ~>
18
20
  - !ruby/object:Gem::Version
19
21
  version: '1.3'
20
22
  type: :development
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
- - - "~>"
27
+ - - ~>
25
28
  - !ruby/object:Gem::Version
26
29
  version: '1.3'
27
30
  - !ruby/object:Gem::Dependency
28
31
  name: rake
29
32
  requirement: !ruby/object:Gem::Requirement
33
+ none: false
30
34
  requirements:
31
- - - ">="
35
+ - - ! '>='
32
36
  - !ruby/object:Gem::Version
33
37
  version: '0'
34
38
  type: :development
35
39
  prerelease: false
36
40
  version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
37
42
  requirements:
38
- - - ">="
43
+ - - ! '>='
39
44
  - !ruby/object:Gem::Version
40
45
  version: '0'
41
46
  - !ruby/object:Gem::Dependency
42
47
  name: byebug
43
48
  requirement: !ruby/object:Gem::Requirement
49
+ none: false
44
50
  requirements:
45
- - - ">="
51
+ - - ! '>='
46
52
  - !ruby/object:Gem::Version
47
53
  version: '0'
48
54
  type: :development
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
51
58
  requirements:
52
- - - ">="
59
+ - - ! '>='
53
60
  - !ruby/object:Gem::Version
54
61
  version: '0'
55
62
  - !ruby/object:Gem::Dependency
56
63
  name: awesome_print
57
64
  requirement: !ruby/object:Gem::Requirement
65
+ none: false
58
66
  requirements:
59
- - - ">="
67
+ - - ! '>='
60
68
  - !ruby/object:Gem::Version
61
69
  version: '0'
62
70
  type: :development
63
71
  prerelease: false
64
72
  version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
65
74
  requirements:
66
- - - ">="
75
+ - - ! '>='
67
76
  - !ruby/object:Gem::Version
68
77
  version: '0'
69
78
  - !ruby/object:Gem::Dependency
70
79
  name: rspec
71
80
  requirement: !ruby/object:Gem::Requirement
81
+ none: false
72
82
  requirements:
73
- - - ">="
83
+ - - ! '>='
74
84
  - !ruby/object:Gem::Version
75
85
  version: '0'
76
86
  type: :development
77
87
  prerelease: false
78
88
  version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
79
90
  requirements:
80
- - - ">="
91
+ - - ! '>='
81
92
  - !ruby/object:Gem::Version
82
93
  version: '0'
83
94
  description: Api client for Clio
@@ -87,7 +98,7 @@ executables: []
87
98
  extensions: []
88
99
  extra_rdoc_files: []
89
100
  files:
90
- - ".gitignore"
101
+ - .gitignore
91
102
  - Gemfile
92
103
  - LICENSE.txt
93
104
  - README.md
@@ -218,26 +229,27 @@ files:
218
229
  homepage: ''
219
230
  licenses:
220
231
  - MIT
221
- metadata: {}
222
232
  post_install_message:
223
233
  rdoc_options: []
224
234
  require_paths:
225
235
  - lib
226
236
  required_ruby_version: !ruby/object:Gem::Requirement
237
+ none: false
227
238
  requirements:
228
- - - ">="
239
+ - - ! '>='
229
240
  - !ruby/object:Gem::Version
230
241
  version: '0'
231
242
  required_rubygems_version: !ruby/object:Gem::Requirement
243
+ none: false
232
244
  requirements:
233
- - - ">="
245
+ - - ! '>='
234
246
  - !ruby/object:Gem::Version
235
247
  version: '0'
236
248
  requirements: []
237
249
  rubyforge_project:
238
- rubygems_version: 2.2.2
250
+ rubygems_version: 1.8.23
239
251
  signing_key:
240
- specification_version: 4
252
+ specification_version: 3
241
253
  summary: A simple ruby library to interact with Clio's Api
242
254
  test_files:
243
255
  - spec/api/crudable_spec.rb
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: 52b654ee74c6caae0a4e88fcadffbb111bfa681b
4
- data.tar.gz: 9821def72ce3ab42d433c8faecffa37a54c6be74
5
- SHA512:
6
- metadata.gz: b7490a3c3a855ac27e8004e690715ebd6c3b110864b5db2fb4e348a79bbebaaed0f8c09c732c0fed5b9765c08ead61ea805175ddcbb0ae8830c9d161b78b9bdd
7
- data.tar.gz: 627a5254ea6817fa28ec1b1511a36ac80474d11391ca82b6958bbf5ca0406a141f61379773674f4607ab6c2c58f9e39b162b976eceb9d378401b31123569e2e0