sp_client 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- MTgxYjA0OWFiZGJmMmU1MzYyZjdjODhkMGY1NzVhYWMxNTgyNGI0Mw==
5
- data.tar.gz: !binary |-
6
- ZTljMDhkN2MwMDE1ODA1OTIyNzQzNzg4YzJmYjlkOTc0ZmYzMzY4OQ==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- YjkzYjcxZDliMWM2NDg5NWIyMDgwYWYzZTRjOTc2YjcyYzNhMWU4NmU2MGMx
10
- ZmRmYWRhMmRkM2JjZDRhYmE4NTM2ODVhZTY4MTQ0YzA0MTI5NDM1YTg5MjRh
11
- Zjg4OTAwODlmNzgyYjYwNjljMDY2ODBmYWMwMTVlNWRiM2ZiNDQ=
12
- data.tar.gz: !binary |-
13
- ODExMjQ1NGI1ZDg3YjIyZjk3ODNmMzdkMzA0YjJkNzM0NzVjNmQ3N2EwOTI4
14
- N2NhMTFhMDFkNTNiYjcwYTdiZjUwMmIzZmEwZjA5YjY3NTc1ODYyYTlhMzhk
15
- ZWZhYzFjNjA0ODUzMTg2Mzk1Yzc5M2M5NmJlYjk1Y2Y0Mzc2NGM=
2
+ SHA1:
3
+ metadata.gz: 520d380a7e8b44cf6f8543d716faafa2aeb473b3
4
+ data.tar.gz: de5342656ab03cdc0403a8d0ad25784960f58a79
5
+ SHA512:
6
+ metadata.gz: 384180e92f7420d96192f1a35431cfa300c7c3f02c8be6e20ed6abbfaee88271ef01290e532f84bef51f4cdd72a521d9d6c7edf94959b6cdc658ac174f95adc9
7
+ data.tar.gz: 792e95a970adb5c1f71e069ed3a7ddf77887a1587c1381f6ad72c67cb1780f8ad3f1500226315de8425c24c7daa31a4866b81d6450f0a261ea5e3ba73c1dc047
@@ -33,19 +33,23 @@ module SummerProject
33
33
  url = SummerProject.base_url
34
34
  url += '/' unless url.last == '/'
35
35
  url += path
36
- case method
37
- when :post
38
- RestClient.post(url, params, authorization: "Bearer #{SummerProject.access_token}", :timeout => -1) { |response, request, result, &block|
39
- handle_response(response, request, result)
40
- }
41
- when :put
42
- RestClient.put(url, params, authorization: "Bearer #{SummerProject.access_token}", :timeout => -1) { |response, request, result, &block|
43
- handle_response(response, request, result)
44
- }
45
- else
46
- RestClient::Request.execute(:method => method, :url => url, :headers => {params: params, authorization: "Bearer #{SummerProject.access_token}"}, :timeout => -1) { |response, request, result, &block|
47
- handle_response(response, request, result)
48
- }
36
+ begin
37
+ case method
38
+ when :post
39
+ RestClient.post(url, params, authorization: "Bearer #{SummerProject.access_token}", :timeout => -1) { |response, request, result, &block|
40
+ handle_response(response, request, result)
41
+ }
42
+ when :put
43
+ RestClient.put(url, params, authorization: "Bearer #{SummerProject.access_token}", :timeout => -1) { |response, request, result, &block|
44
+ handle_response(response, request, result)
45
+ }
46
+ else
47
+ RestClient::Request.execute(:method => method, :url => url, :headers => {params: params, authorization: "Bearer #{SummerProject.access_token}"}, :timeout => -1) { |response, request, result, &block|
48
+ handle_response(response, request, result)
49
+ }
50
+ end
51
+ rescue
52
+ raise "SP Client: An error occured while requesting #{url}."
49
53
  end
50
54
  end
51
55
 
@@ -1,4 +1,4 @@
1
1
  module SummerProject
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
4
4
 
@@ -14,7 +14,7 @@ module SummerProject
14
14
  end
15
15
 
16
16
  def base_url
17
- @base_url ||= "https://sp.campuscrusadeforchrist.com/"
17
+ @base_url ||= "https://smapp.cru.org/api/v1"
18
18
  end
19
19
 
20
20
  end
metadata CHANGED
@@ -1,69 +1,69 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sp_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kenneth John Balgos
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-14 00:00:00.000000000 Z
11
+ date: 2015-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: 1.6.7
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: 1.6.7
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: oj
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: 2.1.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: 2.1.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: activesupport
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ! '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ! '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: retryable-rb
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: 1.1.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ~>
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: 1.1.0
69
69
  description: This gem wraps an API for the Summer Project.
@@ -73,7 +73,7 @@ executables: []
73
73
  extensions: []
74
74
  extra_rdoc_files: []
75
75
  files:
76
- - .gitignore
76
+ - ".gitignore"
77
77
  - Gemfile
78
78
  - LICENSE
79
79
  - README.md
@@ -94,18 +94,19 @@ require_paths:
94
94
  - lib
95
95
  required_ruby_version: !ruby/object:Gem::Requirement
96
96
  requirements:
97
- - - ! '>='
97
+ - - ">="
98
98
  - !ruby/object:Gem::Version
99
99
  version: '0'
100
100
  required_rubygems_version: !ruby/object:Gem::Requirement
101
101
  requirements:
102
- - - ! '>='
102
+ - - ">="
103
103
  - !ruby/object:Gem::Version
104
104
  version: '0'
105
105
  requirements: []
106
106
  rubyforge_project:
107
- rubygems_version: 2.0.3
107
+ rubygems_version: 2.2.2
108
108
  signing_key:
109
109
  specification_version: 4
110
110
  summary: Push and pull data from the Summer Project
111
111
  test_files: []
112
+ has_rdoc: