spartacus 0.2.1 → 0.2.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 90bb0dbabef307a49a1010469534055ff3ead29c
4
- data.tar.gz: fff09572b1f81f16dab79b9d089d2822875cf914
3
+ metadata.gz: 3d82d4054fc362cd3424dd7e8b11f93c49f53784
4
+ data.tar.gz: 80ed221d733539482a3a6ffa98e00c50dbb43cb5
5
5
  SHA512:
6
- metadata.gz: 7ff3045656886497b2fa617e3d6a8ae344ad7ed1d93f4e3fbfaa5851fefbdb5d6751413b0ddf5cddf70671fda9493e7da36a1902c3a0a5a77489d77ff75eb6a7
7
- data.tar.gz: 8f720cd415e36b8565df486da1db7b64342c82cd246369d15595cc9c1ede40b2e2f172d579fb4de05b0a91fce2e1cdc28d7522c5339f2fcea49fdbbb86200b05
6
+ metadata.gz: 4c4cfb7845038386351feae29156e369766fe2e0c72ac73c94744c615eeb675652b5ffd1e7cf8d0ccb6a9f427cfa216fd9873aa13f93bf95b4e2f8bd9c559a76
7
+ data.tar.gz: 98ebfc836c4cf24df5d1b882b81d40f8272559c8b775c36a5d4a602bbafa9048d73950c50a9638aa3fdc046f4a165d9d05697e1c4d5e35d625bf38a8cd6f0fa2
data/Gemfile.lock CHANGED
@@ -6,6 +6,3 @@ PLATFORMS
6
6
  ruby
7
7
 
8
8
  DEPENDENCIES
9
-
10
- BUNDLED WITH
11
- 1.10.6
data/README.md CHANGED
@@ -15,7 +15,7 @@ gem install spartacus
15
15
  ... or add to your Gemfile
16
16
 
17
17
  ```ruby
18
- gem "spartacus", "~> 0.2.1"
18
+ gem "spartacus", "~> 0.2.2"
19
19
  ```
20
20
 
21
21
  ## Usage
data/foo.rb ADDED
@@ -0,0 +1,11 @@
1
+ require_relative 'lib/spartacus'
2
+
3
+ sc = Spartacus.new("ben@bloc.io", "6EjixAvNg2oRTJ", "https://www.bloc.io/api/v1")
4
+ # puts sc.update_password(537104, "chinese1")
5
+ puts sc.update_checkpoint(129, {"body" => "my awesome checkpoint!!!!!!!!!!!!!!!", "name" => "DDDDDDDDDD"})
6
+ # checkpoint = sc.create_checkpoint(1, {name: "Super great awesome checkpoint", "body" => "WOOOOOOOHHH!!!!!H"})
7
+ # puts checkpoint
8
+ # puts sc.update_user(sc.get_me.id, {name: "Ben INTERNETS"})
9
+ # puts checkpoint.name
10
+ # puts sc.update_alum_story_sort_order(10)
11
+ # puts sc.delete_checkpoint(1788)
@@ -19,7 +19,7 @@ module AlumniStories
19
19
  handle_timeouts do
20
20
  response = self.class.post(url,
21
21
  headers: auth_header,
22
- query: { direction: direction })
22
+ body: { direction: direction })
23
23
  convert_response(response, "alumni_story")
24
24
  end
25
25
  else
@@ -40,7 +40,7 @@ module Checkpoints
40
40
 
41
41
  handle_timeouts do
42
42
  response = self.class.put(url, headers: auth_header,
43
- query: { checkpoint: checkpoint_params })
43
+ body: { checkpoint: checkpoint_params })
44
44
  convert_response(response, "checkpoint")
45
45
  end
46
46
  end
@@ -23,7 +23,7 @@ module RoadmapSections
23
23
  handle_timeouts do
24
24
  response = self.class.post(url,
25
25
  headers: auth_header,
26
- query: { checkpoint: checkpoint_params })
26
+ body: { checkpoint: checkpoint_params })
27
27
  convert_response(response, "checkpoint")
28
28
  end
29
29
  end
data/lib/client/users.rb CHANGED
@@ -116,7 +116,7 @@ module Users
116
116
  url = "#{@api_base_path}/users/#{id}/update_password"
117
117
  handle_timeouts do
118
118
  response = self.class.put(url, headers: auth_header,
119
- query: { user: { password: password,
119
+ body: { user: { password: password,
120
120
  confirmation: password } })
121
121
  convert_response(response, "user")
122
122
 
@@ -185,7 +185,7 @@ module Users
185
185
 
186
186
  handle_timeouts do
187
187
  response = self.class.put(url, headers: auth_header,
188
- query: { user: user_params })
188
+ body: { user: user_params })
189
189
  convert_response(response, "User")
190
190
  end
191
191
  end
@@ -210,7 +210,7 @@ module Users
210
210
 
211
211
  handle_timeouts do
212
212
  response = self.class.put(url, headers: auth_header,
213
- query: { user_data: user_data_params })
213
+ body: { user_data: user_data_params })
214
214
  convert_response(response, "UserData")
215
215
  end
216
216
  end
data/lib/spartacus.rb CHANGED
@@ -1,10 +1,10 @@
1
1
  require 'httparty'
2
2
  require 'json'
3
3
 
4
- require 'client/alumni_stories'
5
- require 'client/checkpoints'
6
- require 'client/roadmap_sections'
7
- require 'client/users'
4
+ require_relative 'client/alumni_stories'
5
+ require_relative 'client/checkpoints'
6
+ require_relative 'client/roadmap_sections'
7
+ require_relative 'client/users'
8
8
 
9
9
  Dir[File.dirname(__FILE__) + '/client/*.rb'].each {|file| require file }
10
10
 
@@ -19,7 +19,7 @@ class Spartacus
19
19
  @api_base_path = api_base_path
20
20
  url = "#{@api_base_path}/sessions"
21
21
 
22
- response = self.class.post(url, query: { email: email, password: password })
22
+ response = self.class.post(url, body: { email: email, password: password })
23
23
 
24
24
  if success?(response.code)
25
25
  response_hash = JSON.parse(response.body)
data/spartacus.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'spartacus'
3
- s.version = '0.2.1'
3
+ s.version = '0.2.2'
4
4
  s.files = `git ls-files`.split($\)
5
5
  s.executables = s.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
6
6
  s.test_files = s.files.grep(%r{^(test|spec|features)/})
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.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Neely
@@ -105,6 +105,7 @@ files:
105
105
  - LICENSE
106
106
  - README.md
107
107
  - Rakefile
108
+ - foo.rb
108
109
  - lib/client/alumni_stories.rb
109
110
  - lib/client/base_client.rb
110
111
  - lib/client/checkpoints.rb
@@ -134,10 +135,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
134
135
  version: '0'
135
136
  requirements: []
136
137
  rubyforge_project:
137
- rubygems_version: 2.4.8
138
+ rubygems_version: 2.4.6
138
139
  signing_key:
139
140
  specification_version: 4
140
141
  summary: A client for the Bloc AP
141
142
  test_files:
142
143
  - spec/.keep
143
- has_rdoc: