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 +4 -4
- data/Gemfile.lock +0 -3
- data/README.md +1 -1
- data/foo.rb +11 -0
- data/lib/client/alumni_stories.rb +1 -1
- data/lib/client/checkpoints.rb +1 -1
- data/lib/client/roadmap_sections.rb +1 -1
- data/lib/client/users.rb +3 -3
- data/lib/spartacus.rb +5 -5
- data/spartacus.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d82d4054fc362cd3424dd7e8b11f93c49f53784
|
4
|
+
data.tar.gz: 80ed221d733539482a3a6ffa98e00c50dbb43cb5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c4cfb7845038386351feae29156e369766fe2e0c72ac73c94744c615eeb675652b5ffd1e7cf8d0ccb6a9f427cfa216fd9873aa13f93bf95b4e2f8bd9c559a76
|
7
|
+
data.tar.gz: 98ebfc836c4cf24df5d1b882b81d40f8272559c8b775c36a5d4a602bbafa9048d73950c50a9638aa3fdc046f4a165d9d05697e1c4d5e35d625bf38a8cd6f0fa2
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
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)
|
data/lib/client/checkpoints.rb
CHANGED
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
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,
|
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
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.
|
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.
|
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:
|