spartacus 0.0.4 → 0.0.5
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.
- checksums.yaml +4 -4
- data/lib/spartacus.rb +3 -8
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7403f709943a6153909555995c888b979ee18fc8
|
4
|
+
data.tar.gz: 2ae5a23b3f23c9689ba0c701337147852d837b9e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b46ce32c6ff319efee1da42be21688014d76b2e299e30c436e16c584d38e71419092d8d1d157d71c345139f6a850264e9ada5693b89680df472f11c09f1ec27
|
7
|
+
data.tar.gz: 6c9446cabea72a8c31b5e91daaa2ca2694e00647deba0dfefa6c2ac431153d5dae8a31aa783c512ad243864fc9e0a81f7944ec0ed6675c87a9e831a2650eb064
|
data/lib/spartacus.rb
CHANGED
@@ -3,14 +3,9 @@ require 'httparty'
|
|
3
3
|
class Spartacus
|
4
4
|
include HTTParty
|
5
5
|
|
6
|
-
def initialize(api_jwt)
|
6
|
+
def initialize(api_jwt, api_base_path="https://www.bloc.io/api/v1")
|
7
7
|
@api_jwt = api_jwt
|
8
|
-
|
9
|
-
|
10
|
-
# Set Base API Path
|
11
|
-
# @return [String] The base api path
|
12
|
-
def base_path
|
13
|
-
"http://localhost:3000/api/v1"
|
8
|
+
@api_base_path = api_base_path
|
14
9
|
end
|
15
10
|
|
16
11
|
# Handle API timouts
|
@@ -38,7 +33,7 @@ class Spartacus
|
|
38
33
|
def update_checkpoint(id, options={})
|
39
34
|
accepted_params = ['name', 'summary', 'body', 'assignment', 'points', 'body_and_assignment']
|
40
35
|
checkpoint_params = options.select {|k, v| accepted_params.include?(k) }
|
41
|
-
update_checkpoint_url = "#{
|
36
|
+
update_checkpoint_url = "#{api_base_path}/checkpoints/#{id}"
|
42
37
|
|
43
38
|
handle_timeouts do
|
44
39
|
self.class.put(update_checkpoint_url,
|