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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/spartacus.rb +3 -8
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9a3e152e89d0daf585b053ed95eaa76ee2fd0d72
4
- data.tar.gz: 97bdc1bf2c8320705c291020efe8c19041712d55
3
+ metadata.gz: 7403f709943a6153909555995c888b979ee18fc8
4
+ data.tar.gz: 2ae5a23b3f23c9689ba0c701337147852d837b9e
5
5
  SHA512:
6
- metadata.gz: c52e99f20d95cb2e2bd9b6bd999951d79e2b2974dae1af62a977b75b3b65a25088428c9f2e2325fd739f7dcee5141a94740413aba1655a7f77f4127a91967a1f
7
- data.tar.gz: 6841cbbc1bb6f0d1e58443402dcdc116d148274e7aec38b68725eb6d1a6d5b4c8df480202a41b522acd57f3b9e0b85609c906f0c7b524e79936a12d0b599a049
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
- end
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 = "#{base_path}/checkpoints/#{id}"
36
+ update_checkpoint_url = "#{api_base_path}/checkpoints/#{id}"
42
37
 
43
38
  handle_timeouts do
44
39
  self.class.put(update_checkpoint_url,
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spartacus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Neely