spartacus 0.2.7 → 0.2.8
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/.gitignore +1 -0
- data/Gemfile +1 -0
- data/Gemfile.lock +60 -0
- data/README.md +1 -1
- data/lib/client/base_client.rb +7 -1
- data/lib/client/checkpoints.rb +34 -14
- data/lib/client/class_factory.rb +1 -2
- data/lib/client/mentors.rb +43 -0
- data/lib/client/notifications.rb +10 -0
- data/lib/client/roadmaps.rb +60 -0
- data/lib/client/users.rb +4 -2
- data/lib/spartacus.rb +11 -3
- data/spartacus.gemspec +11 -10
- data/spec/cassettes/alumni_stories.yml +19 -13
- data/spec/cassettes/checkpoints.yml +15 -365
- data/spec/client/alumni_stories_spec.rb +2 -1
- data/spec/vcr/alumni_stories.yml +1 -0
- data/spec/vcr/checkpoints.yml +1 -0
- data/spec/vcr/roadmap_sections.yml +1 -0
- metadata +41 -19
- data/spec/cassettes/roadmap_sections.yml +0 -119
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 000e1256af791dc2cf13eaca029e23d8e6f0edf2
|
4
|
+
data.tar.gz: 37295517f5a5557bcfcd8697e2b2b5e2e0d7e97f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ed718df70275330f72160572cd9961acd9c159034fe4f52c210e0c8e53872b4c613b4de17929ef4c6edc8c142e3a3649b3c904a594bc8f67cb5d77cf4cfb7bb
|
7
|
+
data.tar.gz: fff05b9bad21c5c98e5c66ebfb7b48d8fe5c3414c870a3cb240b8176dcf95f36c028e2ba8f17bab90cc8933f62960925c7a45fa9d8611af7580639ec696bbed9
|
data/.gitignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
*.env
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,8 +1,68 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
spartacus (0.2.7)
|
5
|
+
activesupport (~> 4.2.6)
|
6
|
+
dotenv (~> 2.1.1)
|
7
|
+
httparty (~> 0.13.7)
|
8
|
+
json (~> 1.8.3)
|
9
|
+
|
1
10
|
GEM
|
2
11
|
remote: https://rubygems.org/
|
3
12
|
specs:
|
13
|
+
activesupport (4.2.6)
|
14
|
+
i18n (~> 0.7)
|
15
|
+
json (~> 1.7, >= 1.7.7)
|
16
|
+
minitest (~> 5.1)
|
17
|
+
thread_safe (~> 0.3, >= 0.3.4)
|
18
|
+
tzinfo (~> 1.1)
|
19
|
+
addressable (2.4.0)
|
20
|
+
crack (0.4.3)
|
21
|
+
safe_yaml (~> 1.0.0)
|
22
|
+
diff-lcs (1.2.5)
|
23
|
+
dotenv (2.1.1)
|
24
|
+
hashdiff (0.3.0)
|
25
|
+
httparty (0.13.7)
|
26
|
+
json (~> 1.8)
|
27
|
+
multi_xml (>= 0.5.2)
|
28
|
+
i18n (0.7.0)
|
29
|
+
json (1.8.3)
|
30
|
+
minitest (5.9.0)
|
31
|
+
multi_xml (0.5.5)
|
32
|
+
rake (11.1.2)
|
33
|
+
rspec (3.4.0)
|
34
|
+
rspec-core (~> 3.4.0)
|
35
|
+
rspec-expectations (~> 3.4.0)
|
36
|
+
rspec-mocks (~> 3.4.0)
|
37
|
+
rspec-core (3.4.4)
|
38
|
+
rspec-support (~> 3.4.0)
|
39
|
+
rspec-expectations (3.4.0)
|
40
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
41
|
+
rspec-support (~> 3.4.0)
|
42
|
+
rspec-mocks (3.4.1)
|
43
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
44
|
+
rspec-support (~> 3.4.0)
|
45
|
+
rspec-support (3.4.1)
|
46
|
+
safe_yaml (1.0.4)
|
47
|
+
thread_safe (0.3.5)
|
48
|
+
tzinfo (1.2.2)
|
49
|
+
thread_safe (~> 0.1)
|
50
|
+
vcr (3.0.3)
|
51
|
+
webmock (2.0.3)
|
52
|
+
addressable (>= 2.3.6)
|
53
|
+
crack (>= 0.3.2)
|
54
|
+
hashdiff
|
4
55
|
|
5
56
|
PLATFORMS
|
6
57
|
ruby
|
7
58
|
|
8
59
|
DEPENDENCIES
|
60
|
+
bundler (~> 1.12.5)
|
61
|
+
rake (~> 11.1.2)
|
62
|
+
rspec (~> 3.4)
|
63
|
+
spartacus!
|
64
|
+
vcr (~> 3.0.3)
|
65
|
+
webmock (~> 2.0.3)
|
66
|
+
|
67
|
+
BUNDLED WITH
|
68
|
+
1.12.5
|
data/README.md
CHANGED
data/lib/client/base_client.rb
CHANGED
@@ -13,7 +13,13 @@ module BaseClient
|
|
13
13
|
# This needs a better name
|
14
14
|
def convert_response(response, name)
|
15
15
|
if success?(response.code)
|
16
|
-
|
16
|
+
body = response.body.is_a?(String) ? JSON.parse(response.body) : response.body
|
17
|
+
|
18
|
+
if body.is_a?(Array)
|
19
|
+
body.map {|hash| ClassFactory.build_response_object(hash, name)}
|
20
|
+
else
|
21
|
+
ClassFactory.build_response_object(body, name)
|
22
|
+
end
|
17
23
|
else
|
18
24
|
return response
|
19
25
|
end
|
data/lib/client/checkpoints.rb
CHANGED
@@ -7,7 +7,7 @@ module Checkpoints
|
|
7
7
|
# @param id [Integer] A roadmap section id.
|
8
8
|
# @return [Checkpoint] The checkpoint.
|
9
9
|
# @example Get a checkpoint
|
10
|
-
# Spartacus#get_checkpoint(1
|
10
|
+
# Spartacus#get_checkpoint(1)
|
11
11
|
def get_checkpoint(id)
|
12
12
|
url = "#{@api_base_path}/checkpoints/#{id}"
|
13
13
|
|
@@ -45,18 +45,38 @@ module Checkpoints
|
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
48
|
-
#
|
49
|
-
# #
|
50
|
-
# # @param id [Integer] A checkpoint id.
|
51
|
-
# # @return [Checkpoint] The deleted checkpoint.
|
52
|
-
# # @example Delete a checkpoint
|
53
|
-
# # Spartacus#delete_checkpoint(1, {name: 'Real Cool Checkpoint'})
|
54
|
-
# def delete_checkpoint(id)
|
55
|
-
# url = "#{@api_base_path}/checkpoints/#{id}"
|
48
|
+
# Create multiple checkpoints in a single request
|
56
49
|
#
|
57
|
-
#
|
58
|
-
#
|
59
|
-
#
|
60
|
-
#
|
61
|
-
#
|
50
|
+
# @param roadmap_section_id [Integer] id for roadmap section the checkpoints belong to.
|
51
|
+
# @return [Array] Array of the created checkpoints.
|
52
|
+
# @example Create multiple checkpoints
|
53
|
+
# Spartacus#batch_create_checkpoints(
|
54
|
+
# 163,
|
55
|
+
# [
|
56
|
+
# {
|
57
|
+
# ids: [],
|
58
|
+
# name: 'Sample checkpoint 1',
|
59
|
+
# summary: 'Message from Tamriel',
|
60
|
+
# body: 'Listen to the Nine',
|
61
|
+
# position: 1
|
62
|
+
# },
|
63
|
+
# ...
|
64
|
+
# ]
|
65
|
+
# )
|
66
|
+
|
67
|
+
def batch_create_checkpoints(roadmap_section_id=nil, checkpoints=[])
|
68
|
+
url = "#{@api_base_path}/checkpoints/batch_create"
|
69
|
+
|
70
|
+
handle_timeouts do
|
71
|
+
response = self.class.post(
|
72
|
+
url,
|
73
|
+
headers: auth_header,
|
74
|
+
body: {
|
75
|
+
roadmap_section_id: roadmap_section_id,
|
76
|
+
checkpoints: checkpoints
|
77
|
+
}
|
78
|
+
)
|
79
|
+
convert_response(response, "checkpoints")
|
80
|
+
end
|
81
|
+
end
|
62
82
|
end
|
data/lib/client/class_factory.rb
CHANGED
@@ -2,8 +2,7 @@ require 'json'
|
|
2
2
|
require 'active_support/inflector'
|
3
3
|
|
4
4
|
module ClassFactory
|
5
|
-
def ClassFactory.build_response_object(
|
6
|
-
response_hash = JSON.parse(json_string)
|
5
|
+
def ClassFactory.build_response_object(response_hash, name)
|
7
6
|
if Object.const_defined?(name.camelize)
|
8
7
|
name.camelize.constantize.new(response_hash)
|
9
8
|
else
|
@@ -0,0 +1,43 @@
|
|
1
|
+
module Mentors
|
2
|
+
def mentors
|
3
|
+
url = "#{@api_base_path}/mentors/"
|
4
|
+
handle_timeouts do
|
5
|
+
response = self.class.get(url, headers: auth_header)
|
6
|
+
convert_response(response, "user")
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
def mentor_paychecks(id)
|
11
|
+
url = "#{@api_base_path}/mentors/#{id}/paychecks/"
|
12
|
+
handle_timeouts do
|
13
|
+
response = self.class.get(url, headers: auth_header)
|
14
|
+
convert_response(response, "paychecks")
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
def mentor_assssments(id)
|
19
|
+
url = "#{@api_base_path}/mentors/#{id}/assessments/"
|
20
|
+
handle_timeouts do
|
21
|
+
response = self.class.get(url, headers: auth_header)
|
22
|
+
convert_response(response, "assessments")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
def mark_mentor_assessment_read(id, assessment_id)
|
27
|
+
url = "#{@api_base_path}/mentors/#{id}/mark_assessment_read/"
|
28
|
+
handle_timeouts do
|
29
|
+
response = self.class.get(url, headers: auth_header, assessment_id: assessment_id)
|
30
|
+
convert_response(response, "assessments")
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def mentor_students(id)
|
35
|
+
url = "#{@api_base_path}/mentors/#{id}/students/"
|
36
|
+
handle_timeouts do
|
37
|
+
response = self.class.get(url, headers: auth_header)
|
38
|
+
response = HTTParty::Response.new(response.request, response, response.parsed_response, { body: response["data"] })
|
39
|
+
|
40
|
+
convert_response(response, "user")
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
require_relative 'base_client'
|
2
|
+
|
3
|
+
module Roadmaps
|
4
|
+
include BaseClient
|
5
|
+
|
6
|
+
# Get a roadmap
|
7
|
+
#
|
8
|
+
# @param id [Integer] A roadmap id.
|
9
|
+
# @return [Roadmap] The roadmap.
|
10
|
+
# @example Get a roadmap
|
11
|
+
# Spartacus#get_roadmap(1)
|
12
|
+
def get_roadmap(id)
|
13
|
+
url = "#{@api_base_path}/roadmaps/#{id}"
|
14
|
+
|
15
|
+
handle_timeouts do
|
16
|
+
response = self.class.get(url, headers: auth_header)
|
17
|
+
convert_response(response, "roadmap")
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
# Get a roadmap's sections
|
22
|
+
#
|
23
|
+
# @param id [Integer] A roadmap id.
|
24
|
+
# @return [HTTParty::Response] The roadmap's sections.
|
25
|
+
# @example Get a roadmap's sections
|
26
|
+
# Spartacus#get_roadmap(1)
|
27
|
+
def get_sections_for_roadmap(id)
|
28
|
+
url = "#{@api_base_path}/roadmaps/#{id}/sections"
|
29
|
+
|
30
|
+
handle_timeouts do
|
31
|
+
response = self.class.get(url, headers: auth_header)
|
32
|
+
convert_response(response, "section")
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
# Update a roadmap
|
37
|
+
#
|
38
|
+
# @param id [Integer] A roadmap id.
|
39
|
+
# @param options [Hash] A customizable set of options.
|
40
|
+
# @option options [String] :name Roadmap name.
|
41
|
+
# @option options [String] :display_name Roadmap display.
|
42
|
+
# @option options [Integer] :version Roadmap version.
|
43
|
+
# @option options [Integer] :projects Number of roadmap projects
|
44
|
+
# @return [Roadmap] The updated roadmap
|
45
|
+
# @example Update a roadmap
|
46
|
+
# Spartacus#update_roadmap(129, {name: 'Real Cool Roadmap'})
|
47
|
+
def update_roadmap(id, options={})
|
48
|
+
whitelist = ['name', 'display_name', 'version', 'projects']
|
49
|
+
|
50
|
+
options = convert_keys(options)
|
51
|
+
roadmap_params = whitelist_params(options, whitelist)
|
52
|
+
url = "#{@api_base_path}/roadmaps/#{id}"
|
53
|
+
|
54
|
+
handle_timeouts do
|
55
|
+
response = self.class.put(url, headers: auth_header,
|
56
|
+
body: { roadmap: roadmap_params })
|
57
|
+
convert_response(response, "roadmap")
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
data/lib/client/users.rb
CHANGED
@@ -11,7 +11,8 @@ module Users
|
|
11
11
|
def get_users
|
12
12
|
url = "#{@api_base_path}/users"
|
13
13
|
handle_timeouts do
|
14
|
-
self.class.get(url, headers: auth_header)
|
14
|
+
response = self.class.get(url, headers: auth_header)
|
15
|
+
convert_response(response, "user")
|
15
16
|
end
|
16
17
|
end
|
17
18
|
|
@@ -65,7 +66,8 @@ module Users
|
|
65
66
|
def get_availability(id)
|
66
67
|
url = "#{@api_base_path}/users/#{id}/availability"
|
67
68
|
handle_timeouts do
|
68
|
-
self.class.get(url, headers: auth_header)
|
69
|
+
response = self.class.get(url, headers: auth_header)
|
70
|
+
convert_response(response, "availability")
|
69
71
|
end
|
70
72
|
end
|
71
73
|
|
data/lib/spartacus.rb
CHANGED
@@ -1,23 +1,31 @@
|
|
1
1
|
require 'httparty'
|
2
2
|
require 'json'
|
3
|
+
require 'dotenv'
|
4
|
+
Dotenv.load
|
3
5
|
|
4
6
|
require_relative 'client/alumni_stories'
|
5
7
|
require_relative 'client/checkpoints'
|
6
8
|
require_relative 'client/course_subjects'
|
9
|
+
require_relative 'client/mentors'
|
10
|
+
require_relative 'client/notifications'
|
7
11
|
require_relative 'client/resources'
|
8
12
|
require_relative 'client/roadmap_sections'
|
13
|
+
require_relative 'client/roadmaps'
|
9
14
|
require_relative 'client/users'
|
10
15
|
|
11
16
|
Dir[File.dirname(__FILE__) + '/client/*.rb'].each {|file| require file }
|
12
17
|
|
13
18
|
class Spartacus
|
14
19
|
include HTTParty
|
15
|
-
include Checkpoints
|
16
|
-
include Users
|
17
|
-
include RoadmapSections
|
18
20
|
include AlumniStories
|
21
|
+
include Checkpoints
|
19
22
|
include CourseSubjects
|
20
23
|
include Resources
|
24
|
+
include RoadmapSections
|
25
|
+
include Roadmaps
|
26
|
+
include Users
|
27
|
+
include Mentors
|
28
|
+
include Notifications
|
21
29
|
|
22
30
|
def initialize(email, password, api_base_path="https://www.bloc.io/api/v1")
|
23
31
|
@api_base_path = api_base_path
|
data/spartacus.gemspec
CHANGED
@@ -1,23 +1,24 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'spartacus'
|
3
|
-
s.version = '0.2.
|
3
|
+
s.version = '0.2.8'
|
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)/})
|
7
7
|
s.require_paths = ["lib"]
|
8
8
|
s.date = '2015-09-25'
|
9
|
-
s.summary = 'A client for the Bloc
|
9
|
+
s.summary = 'A client for the Bloc API'
|
10
10
|
s.description = 'A client for the Bloc API'
|
11
|
-
s.authors = ['Ben Neely']
|
11
|
+
s.authors = ['Ben Neely', 'Joe Lipper']
|
12
12
|
s.email = 'ben@bloc.to'
|
13
13
|
s.homepage = 'http://rubygems.org/gems/spartacus'
|
14
14
|
s.license = 'MIT'
|
15
15
|
s.add_runtime_dependency 'httparty', '~>0.13.7'
|
16
|
-
s.add_runtime_dependency 'activesupport', '~>4.2'
|
17
|
-
s.add_runtime_dependency 'json', '~>1.8'
|
18
|
-
s.
|
19
|
-
s.add_development_dependency '
|
20
|
-
s.add_development_dependency '
|
21
|
-
s.add_development_dependency '
|
22
|
-
s.add_development_dependency '
|
16
|
+
s.add_runtime_dependency 'activesupport', '~>4.2.6'
|
17
|
+
s.add_runtime_dependency 'json', '~>1.8.3'
|
18
|
+
s.add_runtime_dependency 'dotenv', '~>2.1.1'
|
19
|
+
s.add_development_dependency 'bundler', '~>1.12.5'
|
20
|
+
s.add_development_dependency 'rspec', '~> 3.4'
|
21
|
+
s.add_development_dependency 'rake', '~>11.1.2'
|
22
|
+
s.add_development_dependency 'vcr', '~>3.0.3'
|
23
|
+
s.add_development_dependency 'webmock', '~>2.0.3'
|
23
24
|
end
|
@@ -2,16 +2,24 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: put
|
5
|
-
uri:
|
5
|
+
uri: https://www.bloc.io/api/v1/alum_stories/2/update_sort_order
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
8
|
string: direction=down
|
9
9
|
headers: {}
|
10
10
|
response:
|
11
11
|
status:
|
12
|
-
code:
|
13
|
-
message:
|
12
|
+
code: 404
|
13
|
+
message: Not Found
|
14
14
|
headers:
|
15
|
+
Server:
|
16
|
+
- Cowboy
|
17
|
+
Date:
|
18
|
+
- Wed, 01 Jun 2016 20:23:55 GMT
|
19
|
+
Connection:
|
20
|
+
- keep-alive
|
21
|
+
Strict-Transport-Security:
|
22
|
+
- max-age=31536000
|
15
23
|
X-Frame-Options:
|
16
24
|
- SAMEORIGIN
|
17
25
|
X-Xss-Protection:
|
@@ -20,23 +28,21 @@ http_interactions:
|
|
20
28
|
- nosniff
|
21
29
|
Content-Type:
|
22
30
|
- application/json; charset=utf-8
|
23
|
-
Etag:
|
24
|
-
- '"7363e85fe9edee6f053a4b319588c086"'
|
25
31
|
Cache-Control:
|
26
|
-
-
|
27
|
-
X-Meta-Request-Version:
|
28
|
-
- 0.3.4
|
32
|
+
- no-cache
|
29
33
|
X-Request-Id:
|
30
|
-
-
|
34
|
+
- 71864a48-dba0-4b93-8e54-075fdce50009
|
31
35
|
X-Runtime:
|
32
|
-
- '0.
|
36
|
+
- '0.103312'
|
33
37
|
Vary:
|
34
38
|
- Accept-Encoding
|
35
39
|
Transfer-Encoding:
|
36
40
|
- chunked
|
41
|
+
Via:
|
42
|
+
- 1.1 vegur
|
37
43
|
body:
|
38
44
|
encoding: UTF-8
|
39
|
-
string: '{"
|
45
|
+
string: '{"message":"Resource not found"}'
|
40
46
|
http_version:
|
41
|
-
recorded_at:
|
42
|
-
recorded_with: VCR
|
47
|
+
recorded_at: Wed, 01 Jun 2016 20:23:56 GMT
|
48
|
+
recorded_with: VCR 3.0.3
|
@@ -2,365 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri:
|
6
|
-
body:
|
7
|
-
encoding: US-ASCII
|
8
|
-
string: ''
|
9
|
-
headers: {}
|
10
|
-
response:
|
11
|
-
status:
|
12
|
-
code: 200
|
13
|
-
message: OK
|
14
|
-
headers:
|
15
|
-
X-Frame-Options:
|
16
|
-
- SAMEORIGIN
|
17
|
-
X-Xss-Protection:
|
18
|
-
- 1; mode=block
|
19
|
-
X-Content-Type-Options:
|
20
|
-
- nosniff
|
21
|
-
Content-Type:
|
22
|
-
- application/json; charset=utf-8
|
23
|
-
Etag:
|
24
|
-
- '"67ef082b2c11d7439fda872589a3235b"'
|
25
|
-
Cache-Control:
|
26
|
-
- max-age=0, private, must-revalidate
|
27
|
-
X-Meta-Request-Version:
|
28
|
-
- 0.3.4
|
29
|
-
X-Request-Id:
|
30
|
-
- 17cee9da-faed-4c74-b9fb-7c16b08c74b5
|
31
|
-
X-Runtime:
|
32
|
-
- '0.280414'
|
33
|
-
Vary:
|
34
|
-
- Accept-Encoding
|
35
|
-
Transfer-Encoding:
|
36
|
-
- chunked
|
37
|
-
body:
|
38
|
-
encoding: UTF-8
|
39
|
-
string: '{"id":1,"name":"Command Line","body":"As a programmer, you''ll spend
|
40
|
-
a lot of your time on the command line in your terminal. The commands you
|
41
|
-
use will depend on your operating system. If you use OS X or Linux, you''ll
|
42
|
-
be entering Unix commands. If you use Windows, you''ll be entering MS-DOS
|
43
|
-
commands. Proficiency with Unix and MS-DOS commands in a terminal contributes
|
44
|
-
to proficiency in programming, so it''s important to practice these. This
|
45
|
-
screencast leads you through some basic commands.\r\n\r\n\u003ccenter\u003e\r\n\u003cvideo
|
46
|
-
width=\"853\" height=\"505\" controls\u003e \u003csource src=\"https://bloc-global-assets.s3.amazonaws.com/screencasts/Command%20Line.mp4\"
|
47
|
-
type=\"video/mp4\"\u003e \r\n\u003c/video\u003e\r\n\u003c/center\u003e\r\n\r\n###
|
48
|
-
Snippets from the Screencast\r\n\r\n### OS X\r\n\r\n```bash\r\n# Working with
|
49
|
-
directories: (OS X)\r\n\r\n$ pwd #=\u003e print working directory\r\n$
|
50
|
-
ls #=\u003e list all subdirectories in the current directory\r\n$
|
51
|
-
ls -l #=\u003e more details on our listed directories\r\n$ mkdir code #=\u003e
|
52
|
-
make a directory named code\r\n$ cd code #=\u003e change directories to
|
53
|
-
code\r\n$ pwd #=\u003e validate that you are now in the code directory\r\n$
|
54
|
-
cd .. #=\u003e move up one level in the directory chain\r\n$ cd code #=\u003e
|
55
|
-
change back to the code directory\r\n$ open . #=\u003e open the finder
|
56
|
-
window for the current directory\r\n$ man mkdir #=\u003e open the manual
|
57
|
-
for the mkdir command\r\n$ q #=\u003e exit out of the manual\r\n```\r\n\r\n```bash\r\n#
|
58
|
-
man mkdir output (OS X)\r\n\r\nNAME\r\n mkdir -- make directories\r\n\r\nSYNOPSIS\r\n mkdir
|
59
|
-
[-pv] [-m mode] directory_name ...\r\n\r\nDESCRIPTION\r\n The mkdir utility
|
60
|
-
creates the directories named as operands, in the order specified, using mode
|
61
|
-
rwxrwxrwx (0777)...\r\n```\r\n\r\n```bash\r\n# Working with files: (OS X)\r\n\r\n$
|
62
|
-
touch snippets.rb #=\u003e create a new file in the
|
63
|
-
code directory, named snippets.rb\r\n$ ls -l #=\u003e
|
64
|
-
validate that snippets.rb was created\r\n$ cat snippets.rb #=\u003e
|
65
|
-
view snippets.rb contents\r\n$ echo hello world #=\u003e
|
66
|
-
print something\r\n$ echo puts \\\"hello world\\\" \u003e snippets.rb #=\u003e
|
67
|
-
add puts hello\r\n$ cat snippets.rb #=\u003e view
|
68
|
-
snippets.rb contents\r\n$ cp snippets.rb hello.rb #=\u003e
|
69
|
-
make a copy of snippets, named hello\r\n$ mv hello.rb helloworld.rb #=\u003e
|
70
|
-
rename hello to helloworld\r\n$ rm helloworld.rb #=\u003e
|
71
|
-
delete helloworld\r\n$ ls -l #=\u003e view
|
72
|
-
the contents of the code directory\r\n$ grep hello snippets.rb #=\u003e
|
73
|
-
search the snippets file for the hello string\r\n$ cd .. #=\u003e
|
74
|
-
move up one level\r\n$ grep -r e code #=\u003e search
|
75
|
-
the code directory for any file that has an \"e\" in it\r\n```\r\n\r\n```\r\n#
|
76
|
-
Recursive option for working with directories\r\n\r\n$ mkdir temp #=\u003e
|
77
|
-
make a temp directory\r\n$ cp temp temp2 #=\u003e try to make a copy
|
78
|
-
of temp, named temp2 (won''t work)\r\n$ rm temp #=\u003e try to
|
79
|
-
delete temp (won''t work)\r\n$ cp -r temp temp2 #=\u003e make a copy of
|
80
|
-
temp, named temp2 (recursively)\r\n$ rm -r temp2 #=\u003e delete temp2
|
81
|
-
(recursively)\r\n$ ls -l #=\u003e view the contents of the temp
|
82
|
-
directory\r\n```\r\n\r\n### Windows\r\n\r\n```\r\n# Working with directories:
|
83
|
-
(Windows)\r\n\r\n$ cd #=\u003e prints working directory (or chdir)\r\n$
|
84
|
-
dir /b #=\u003e show all subdirectories in the current directory (just
|
85
|
-
directory name)\r\n$ dir #=\u003e more details on our listed directories
|
86
|
-
(/p seperates into pages)\r\n$ md code #=\u003e make a directory named
|
87
|
-
code (or mkdir)\r\n$ cd code #=\u003e change directories to code\r\n$
|
88
|
-
cd #=\u003e validate that you are now in the code directory\r\n$
|
89
|
-
cd .. #=\u003e move up one level in the directory chain\r\n$ cd code #=\u003e
|
90
|
-
change back to the code directory\r\n$ start . #=\u003e starts a windows
|
91
|
-
explorer window for the current directory\r\n$ help md #=\u003e get help
|
92
|
-
info for the mkdir command (or mkdir)\r\n```\r\n\r\n```\r\n# help md (Windows)\r\n\r\nNAME\r\n md
|
93
|
-
-- make directories\r\n\r\nCreates a directory.\r\n\r\nMKDIR [drive:]path\r\nMD
|
94
|
-
[drive:]path\r\n```\r\n\r\n```\r\n# Working with files: (Windows)\r\n\r\n$
|
95
|
-
cd. \u003e snippets.rb #=\u003e create a new file in
|
96
|
-
the code directory, named snippets.rb\r\n$ dir #=\u003e
|
97
|
-
validate that snippets.rb was created\r\n$ type snippets.rb #=\u003e
|
98
|
-
display snippets.rb contents\r\n$ echo hello world #=\u003e
|
99
|
-
print something\r\n$ echo puts \\\"hello world\\\" \u003e snippets.rb #=\u003e
|
100
|
-
add puts hello\r\n$ type snippets.rb #=\u003e display
|
101
|
-
snippets.rb contents\r\n$ copy snippets.rb hello.rb #=\u003e
|
102
|
-
make a copy of snippets, named hello\r\n$ rename hello.rb helloworld.rb #=\u003e
|
103
|
-
rename hello to helloworld\r\n$ del helloworld.rb #=\u003e
|
104
|
-
delete helloworld\r\n$ dir #=\u003e view
|
105
|
-
the contents of the code directory\r\n$ find \"hello\" snippets.rb #=\u003e
|
106
|
-
search the snippets file for the hello string\r\n$ findstr /s /i e code #=\u003e
|
107
|
-
search the current directory for any file that has an \"e\" in it\r\n```\r\n\r\n```\r\n#
|
108
|
-
Recursive option for working with directories (Windows)\r\n\r\n$ md temp #=\u003e
|
109
|
-
make a temp directory\r\n$ xcopy temp temp2 #=\u003e try to make a copy
|
110
|
-
of temp, named temp2 (won''t work b/c temp is empty)\r\n$ xcopy /e temp temp2 #=\u003e
|
111
|
-
make an empty copy of temp, named temp2\r\n$ dir #=\u003e
|
112
|
-
validate that temp2 was created\r\n$ rd temp2 #=\u003e remove
|
113
|
-
temp2 directory\r\n$ cd temp #=\u003e change to the temp directory\r\n$
|
114
|
-
cd. \u003e test.txt #=\u003e create a test file in the temp directory,
|
115
|
-
named test.txt\r\n$ cd .. #=\u003e move up one level\r\n$ xcopy
|
116
|
-
temp temp2 #=\u003e make a copy of temp, named temp2 (works because it''s
|
117
|
-
not empty)\r\n$ dir #=\u003e validate that temp2 was created\r\n$
|
118
|
-
rd temp2 #=\u003e try to delete temp (won''t work because temp2
|
119
|
-
is not empty)\r\n$ rd temp2 /s #=\u003e delete temp2 (recursively)\r\n$
|
120
|
-
dir #=\u003e view the contents of the directory\r\n```\r\n\r\n###
|
121
|
-
Resources\r\n* [Zed Shaw](http://zedshaw.com/#/start) writes a series of programming
|
122
|
-
ebooks. His [Command Line - Learn Code the Hard Way](http://cli.learncodethehardway.org/)
|
123
|
-
is a great resource for strengthening your CLI skills.\r\n* This is a [comprehensive
|
124
|
-
index of OS X terminal commands](http://ss64.com/osx/).\r\n* This is a [comprehensive
|
125
|
-
index of Windows terminal commands](http://ss64.com/nt/).\r\n* This [Basic
|
126
|
-
Unix Tutorial](http://snap.nlc.dcccd.edu/learn/idaho/unixindex.html) was created
|
127
|
-
by Idaho State University, and serves as a nice reference guide.\r\n* Here''s
|
128
|
-
some [more detail on grep](http://www.panix.com/~elflord/unix/grep.html).
|
129
|
-
Once you get proficient with grep options, you''ll find it much faster than
|
130
|
-
searching in your GUI.","parent_id":9,"created_at":"2012-11-25T22:55:59.365-05:00","updated_at":"2015-05-13T13:20:03.314-04:00","assignment":"Create
|
131
|
-
your own code directory, similar to the one in the screencast. Create files
|
132
|
-
for some of the Ruby exercises you completed. Name your files in accordance
|
133
|
-
with the exercise, and use a `.rb` extension. To seed the content of the files,
|
134
|
-
you can open them outside of the terminal and paste the code in. Once you
|
135
|
-
have a code directory filled with a handful of `.rb` files, try copying them,
|
136
|
-
renaming them and searching them. Make sure to experiment with different options
|
137
|
-
for each command as well. When you have a better feel for the command line,
|
138
|
-
delete all of the copies you made, leaving only the original `.rb` files you
|
139
|
-
created.\r\n\r\nAfter you''ve completed the tasks above, copy your entire
|
140
|
-
terminal session text and send it to your mentor. (If you already have a Github
|
141
|
-
account, you can paste it in a new Gist and send the link to your mentor.
|
142
|
-
If you don''t have a Github account, we''ll create one in the next checkpoint.)","summary":null,"points":1,"project_name":"","roadmap_id":1,"active":true,"job_prep":false,"version":[0,0],"body_file_path":"","uuid":"337340a0-cc2c-43bd-86c1-d8387487d58c","ref":"337340a0-cc2c-43bd-86c1-d8387487d58c|0","retroactive_optional_date":null}'
|
143
|
-
http_version:
|
144
|
-
recorded_at: Thu, 08 Oct 2015 05:13:00 GMT
|
145
|
-
- request:
|
146
|
-
method: get
|
147
|
-
uri: http://localhost:3000/api/v1/checkpoints/-1
|
148
|
-
body:
|
149
|
-
encoding: US-ASCII
|
150
|
-
string: ''
|
151
|
-
headers: {}
|
152
|
-
response:
|
153
|
-
status:
|
154
|
-
code: 404
|
155
|
-
message: Not Found
|
156
|
-
headers:
|
157
|
-
X-Frame-Options:
|
158
|
-
- SAMEORIGIN
|
159
|
-
X-Xss-Protection:
|
160
|
-
- 1; mode=block
|
161
|
-
X-Content-Type-Options:
|
162
|
-
- nosniff
|
163
|
-
Content-Type:
|
164
|
-
- application/json; charset=utf-8
|
165
|
-
Cache-Control:
|
166
|
-
- no-cache
|
167
|
-
X-Meta-Request-Version:
|
168
|
-
- 0.3.4
|
169
|
-
X-Request-Id:
|
170
|
-
- d3e429eb-5105-4ade-93d1-65b1836893c7
|
171
|
-
X-Runtime:
|
172
|
-
- '0.225733'
|
173
|
-
Vary:
|
174
|
-
- Accept-Encoding
|
175
|
-
Transfer-Encoding:
|
176
|
-
- chunked
|
177
|
-
body:
|
178
|
-
encoding: UTF-8
|
179
|
-
string: '{"message":"Resource not found"}'
|
180
|
-
http_version:
|
181
|
-
recorded_at: Thu, 08 Oct 2015 05:13:00 GMT
|
182
|
-
- request:
|
183
|
-
method: put
|
184
|
-
uri: http://localhost:3000/api/v1/checkpoints/2
|
185
|
-
body:
|
186
|
-
encoding: UTF-8
|
187
|
-
string: checkpoint[name]=My%20Checkpoint
|
188
|
-
headers: {}
|
189
|
-
response:
|
190
|
-
status:
|
191
|
-
code: 200
|
192
|
-
message: OK
|
193
|
-
headers:
|
194
|
-
X-Frame-Options:
|
195
|
-
- SAMEORIGIN
|
196
|
-
X-Xss-Protection:
|
197
|
-
- 1; mode=block
|
198
|
-
X-Content-Type-Options:
|
199
|
-
- nosniff
|
200
|
-
Content-Type:
|
201
|
-
- application/json; charset=utf-8
|
202
|
-
Etag:
|
203
|
-
- '"f4e8bab8402f056716ba3f174d6db83c"'
|
204
|
-
Cache-Control:
|
205
|
-
- max-age=0, private, must-revalidate
|
206
|
-
X-Meta-Request-Version:
|
207
|
-
- 0.3.4
|
208
|
-
X-Request-Id:
|
209
|
-
- f66b4590-0498-402e-b409-fb944b3ddf00
|
210
|
-
X-Runtime:
|
211
|
-
- '0.239184'
|
212
|
-
Vary:
|
213
|
-
- Accept-Encoding
|
214
|
-
Transfer-Encoding:
|
215
|
-
- chunked
|
216
|
-
body:
|
217
|
-
encoding: UTF-8
|
218
|
-
string: '{"id":2,"name":"My Checkpoint","body":"Before you build an application,
|
219
|
-
you must have an idea of what it should look like and how it will be interpreted
|
220
|
-
by users. Developers often use **wireframes** to illustrate their application
|
221
|
-
before they start coding. When drafting a wireframe, think about the primary
|
222
|
-
purpose of your application. Why should it exist? How will it make someone''s
|
223
|
-
life better? Wireframes **should not** be complicated. They should be highly
|
224
|
-
general, but still provide a context for the application throughout development.\r\n\r\nThere
|
225
|
-
are dozens of wireframing tools, but pencil and paper is our preference. It
|
226
|
-
is often tempting to incorporate all of the features that your application
|
227
|
-
could have in a wireframe. Don''t get distracted though, and err on the side
|
228
|
-
of simplicity. Reduce the number of pages and features that your site must
|
229
|
-
have to the absolute minimum. You''ll know when you''ve reached the minimally
|
230
|
-
viable product, (aka MVP), because if you were to remove one more thing, the
|
231
|
-
product would cease to make sense. \r\n \r\n### Resources\r\n* [The Boxing
|
232
|
-
Glove Technique](http://www.90percentofeverything.com/2008/01/02/the-boxing-glove-wireframing-technique/)
|
233
|
-
is an interesting method to help keep your wireframes simple.\r\n* Learn how
|
234
|
-
[37signals does HTML Prototyping](http://blog.handcraft.com/2010/07/how-37signals-does-html-prototyping/).\r\n*
|
235
|
-
If you want to use a tool to build wireframes [Balsamiq](http://www.balsamiq.com/products/mockups)
|
236
|
-
has a free trial license. It''s a nice wireframing tool, but remember that
|
237
|
-
pencil and paper are perfectly fine. ","parent_id":43,"created_at":"2012-11-25T22:55:59.504-05:00","updated_at":"2015-10-08T01:09:05.231-04:00","assignment":"Draft
|
238
|
-
a wireframe for your Blog application. Create the individual pages, as well
|
239
|
-
as the user flow. To illustrate user flow, create a diagram that describes
|
240
|
-
how a user goes through the different pages of your application. When you
|
241
|
-
think you have a good wireframe drafted, push it to Github.\r\n\r\nWe can''t
|
242
|
-
stress this enough: **err on the side of simplicity**. The goal is to get
|
243
|
-
an idea of all the pages you''ll need to make a useful app, and how they work
|
244
|
-
together.","summary":null,"points":1,"project_name":"","roadmap_id":1,"active":true,"job_prep":false,"version":[0,0],"body_file_path":"","uuid":"479dbf5e-6d01-44e9-bd77-655a0fabaf48","ref":"479dbf5e-6d01-44e9-bd77-655a0fabaf48|0","retroactive_optional_date":null}'
|
245
|
-
http_version:
|
246
|
-
recorded_at: Thu, 08 Oct 2015 05:13:01 GMT
|
247
|
-
- request:
|
248
|
-
method: put
|
249
|
-
uri: http://localhost:3000/api/v1/checkpoints/3
|
250
|
-
body:
|
251
|
-
encoding: UTF-8
|
252
|
-
string: checkpoint[name]=My%20Checkpoint&checkpoint[summary]=Great%20Summary&checkpoint[body]=Really%20great%20checkpoint&checkpoint[assignment]=Do%20the%20work%20well&checkpoint[points]=5
|
253
|
-
headers: {}
|
254
|
-
response:
|
255
|
-
status:
|
256
|
-
code: 200
|
257
|
-
message: OK
|
258
|
-
headers:
|
259
|
-
X-Frame-Options:
|
260
|
-
- SAMEORIGIN
|
261
|
-
X-Xss-Protection:
|
262
|
-
- 1; mode=block
|
263
|
-
X-Content-Type-Options:
|
264
|
-
- nosniff
|
265
|
-
Content-Type:
|
266
|
-
- application/json; charset=utf-8
|
267
|
-
Etag:
|
268
|
-
- '"dd9b8cb21292c772e8df299d6f72545f"'
|
269
|
-
Cache-Control:
|
270
|
-
- max-age=0, private, must-revalidate
|
271
|
-
X-Meta-Request-Version:
|
272
|
-
- 0.3.4
|
273
|
-
X-Request-Id:
|
274
|
-
- f678ea37-741c-4086-9deb-2bc4cea62ac9
|
275
|
-
X-Runtime:
|
276
|
-
- '0.406227'
|
277
|
-
Vary:
|
278
|
-
- Accept-Encoding
|
279
|
-
Transfer-Encoding:
|
280
|
-
- chunked
|
281
|
-
body:
|
282
|
-
encoding: UTF-8
|
283
|
-
string: '{"id":3,"name":"My Checkpoint","body":"Really great checkpoint","parent_id":7,"created_at":"2012-11-25T22:55:59.522-05:00","updated_at":"2015-10-08T01:09:05.852-04:00","assignment":"Do
|
284
|
-
the work well","summary":"Great Summary","points":5,"project_name":"","roadmap_id":1,"active":true,"job_prep":false,"version":[0,0],"body_file_path":"","uuid":"cdaa8f1f-f165-48ad-997b-b3c875c22a2b","ref":"cdaa8f1f-f165-48ad-997b-b3c875c22a2b|0","retroactive_optional_date":null}'
|
285
|
-
http_version:
|
286
|
-
recorded_at: Thu, 08 Oct 2015 05:13:02 GMT
|
287
|
-
- request:
|
288
|
-
method: put
|
289
|
-
uri: http://localhost:3000/api/v1/checkpoints/-1
|
290
|
-
body:
|
291
|
-
encoding: UTF-8
|
292
|
-
string: checkpoint[name]=My%20Checkpoint
|
293
|
-
headers: {}
|
294
|
-
response:
|
295
|
-
status:
|
296
|
-
code: 404
|
297
|
-
message: Not Found
|
298
|
-
headers:
|
299
|
-
X-Frame-Options:
|
300
|
-
- SAMEORIGIN
|
301
|
-
X-Xss-Protection:
|
302
|
-
- 1; mode=block
|
303
|
-
X-Content-Type-Options:
|
304
|
-
- nosniff
|
305
|
-
Content-Type:
|
306
|
-
- application/json; charset=utf-8
|
307
|
-
Cache-Control:
|
308
|
-
- no-cache
|
309
|
-
X-Meta-Request-Version:
|
310
|
-
- 0.3.4
|
311
|
-
X-Request-Id:
|
312
|
-
- d8027568-9e19-4a24-91db-ec556ddd7853
|
313
|
-
X-Runtime:
|
314
|
-
- '0.232196'
|
315
|
-
Vary:
|
316
|
-
- Accept-Encoding
|
317
|
-
Transfer-Encoding:
|
318
|
-
- chunked
|
319
|
-
body:
|
320
|
-
encoding: UTF-8
|
321
|
-
string: '{"message":"Resource not found"}'
|
322
|
-
http_version:
|
323
|
-
recorded_at: Thu, 08 Oct 2015 05:13:02 GMT
|
324
|
-
- request:
|
325
|
-
method: delete
|
326
|
-
uri: http://localhost:3000/api/v1/checkpoints/1
|
327
|
-
body:
|
328
|
-
encoding: US-ASCII
|
329
|
-
string: ''
|
330
|
-
headers: {}
|
331
|
-
response:
|
332
|
-
status:
|
333
|
-
code: 404
|
334
|
-
message: Not Found
|
335
|
-
headers:
|
336
|
-
X-Frame-Options:
|
337
|
-
- SAMEORIGIN
|
338
|
-
X-Xss-Protection:
|
339
|
-
- 1; mode=block
|
340
|
-
X-Content-Type-Options:
|
341
|
-
- nosniff
|
342
|
-
Content-Type:
|
343
|
-
- application/json; charset=utf-8
|
344
|
-
Cache-Control:
|
345
|
-
- no-cache
|
346
|
-
X-Meta-Request-Version:
|
347
|
-
- 0.3.4
|
348
|
-
X-Request-Id:
|
349
|
-
- e0372469-f709-496f-a344-39930f602ed4
|
350
|
-
X-Runtime:
|
351
|
-
- '0.255790'
|
352
|
-
Vary:
|
353
|
-
- Accept-Encoding
|
354
|
-
Transfer-Encoding:
|
355
|
-
- chunked
|
356
|
-
body:
|
357
|
-
encoding: UTF-8
|
358
|
-
string: '{"message":"Resource not found"}'
|
359
|
-
http_version:
|
360
|
-
recorded_at: Thu, 08 Oct 2015 05:13:03 GMT
|
361
|
-
- request:
|
362
|
-
method: delete
|
363
|
-
uri: http://localhost:3000/api/v1/checkpoints/-1
|
5
|
+
uri: https://www.bloc.io/api/v1/checkpoints/-1
|
364
6
|
body:
|
365
7
|
encoding: US-ASCII
|
366
8
|
string: ''
|
@@ -370,6 +12,14 @@ http_interactions:
|
|
370
12
|
code: 404
|
371
13
|
message: Not Found
|
372
14
|
headers:
|
15
|
+
Server:
|
16
|
+
- Cowboy
|
17
|
+
Date:
|
18
|
+
- Wed, 01 Jun 2016 20:23:57 GMT
|
19
|
+
Connection:
|
20
|
+
- keep-alive
|
21
|
+
Strict-Transport-Security:
|
22
|
+
- max-age=31536000
|
373
23
|
X-Frame-Options:
|
374
24
|
- SAMEORIGIN
|
375
25
|
X-Xss-Protection:
|
@@ -380,19 +30,19 @@ http_interactions:
|
|
380
30
|
- application/json; charset=utf-8
|
381
31
|
Cache-Control:
|
382
32
|
- no-cache
|
383
|
-
X-Meta-Request-Version:
|
384
|
-
- 0.3.4
|
385
33
|
X-Request-Id:
|
386
|
-
-
|
34
|
+
- 00aa9553-aea0-4381-ab52-6b5adee0c9dc
|
387
35
|
X-Runtime:
|
388
|
-
- '0.
|
36
|
+
- '0.116499'
|
389
37
|
Vary:
|
390
38
|
- Accept-Encoding
|
391
39
|
Transfer-Encoding:
|
392
40
|
- chunked
|
41
|
+
Via:
|
42
|
+
- 1.1 vegur
|
393
43
|
body:
|
394
44
|
encoding: UTF-8
|
395
45
|
string: '{"message":"Resource not found"}'
|
396
46
|
http_version:
|
397
|
-
recorded_at:
|
398
|
-
recorded_with: VCR
|
47
|
+
recorded_at: Wed, 01 Jun 2016 20:23:57 GMT
|
48
|
+
recorded_with: VCR 3.0.3
|
@@ -2,7 +2,8 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe AlumniStories do
|
4
4
|
before do
|
5
|
-
|
5
|
+
stub_request(:any, "http://localhost:3000")
|
6
|
+
@client = Spartacus.new(ENV['BLOCUSER'], ENV['BLOCPASS'])
|
6
7
|
end
|
7
8
|
|
8
9
|
describe '#update_alum_story_sort_order' do
|
@@ -0,0 +1 @@
|
|
1
|
+
--- !ruby/object:ThreadSafe::Hash {}
|
@@ -0,0 +1 @@
|
|
1
|
+
--- !ruby/object:ThreadSafe::Hash {}
|
@@ -0,0 +1 @@
|
|
1
|
+
--- !ruby/object:ThreadSafe::Hash {}
|
metadata
CHANGED
@@ -1,10 +1,11 @@
|
|
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.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Neely
|
8
|
+
- Joe Lipper
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
@@ -30,104 +31,119 @@ dependencies:
|
|
30
31
|
requirements:
|
31
32
|
- - "~>"
|
32
33
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
34
|
+
version: 4.2.6
|
34
35
|
type: :runtime
|
35
36
|
prerelease: false
|
36
37
|
version_requirements: !ruby/object:Gem::Requirement
|
37
38
|
requirements:
|
38
39
|
- - "~>"
|
39
40
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
41
|
+
version: 4.2.6
|
41
42
|
- !ruby/object:Gem::Dependency
|
42
43
|
name: json
|
43
44
|
requirement: !ruby/object:Gem::Requirement
|
44
45
|
requirements:
|
45
46
|
- - "~>"
|
46
47
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
48
|
+
version: 1.8.3
|
48
49
|
type: :runtime
|
49
50
|
prerelease: false
|
50
51
|
version_requirements: !ruby/object:Gem::Requirement
|
51
52
|
requirements:
|
52
53
|
- - "~>"
|
53
54
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
55
|
+
version: 1.8.3
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
name: dotenv
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - "~>"
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: 2.1.1
|
63
|
+
type: :runtime
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - "~>"
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: 2.1.1
|
55
70
|
- !ruby/object:Gem::Dependency
|
56
71
|
name: bundler
|
57
72
|
requirement: !ruby/object:Gem::Requirement
|
58
73
|
requirements:
|
59
74
|
- - "~>"
|
60
75
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
76
|
+
version: 1.12.5
|
62
77
|
type: :development
|
63
78
|
prerelease: false
|
64
79
|
version_requirements: !ruby/object:Gem::Requirement
|
65
80
|
requirements:
|
66
81
|
- - "~>"
|
67
82
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
83
|
+
version: 1.12.5
|
69
84
|
- !ruby/object:Gem::Dependency
|
70
85
|
name: rspec
|
71
86
|
requirement: !ruby/object:Gem::Requirement
|
72
87
|
requirements:
|
73
88
|
- - "~>"
|
74
89
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
90
|
+
version: '3.4'
|
76
91
|
type: :development
|
77
92
|
prerelease: false
|
78
93
|
version_requirements: !ruby/object:Gem::Requirement
|
79
94
|
requirements:
|
80
95
|
- - "~>"
|
81
96
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
97
|
+
version: '3.4'
|
83
98
|
- !ruby/object:Gem::Dependency
|
84
99
|
name: rake
|
85
100
|
requirement: !ruby/object:Gem::Requirement
|
86
101
|
requirements:
|
87
102
|
- - "~>"
|
88
103
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
104
|
+
version: 11.1.2
|
90
105
|
type: :development
|
91
106
|
prerelease: false
|
92
107
|
version_requirements: !ruby/object:Gem::Requirement
|
93
108
|
requirements:
|
94
109
|
- - "~>"
|
95
110
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
111
|
+
version: 11.1.2
|
97
112
|
- !ruby/object:Gem::Dependency
|
98
113
|
name: vcr
|
99
114
|
requirement: !ruby/object:Gem::Requirement
|
100
115
|
requirements:
|
101
116
|
- - "~>"
|
102
117
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
118
|
+
version: 3.0.3
|
104
119
|
type: :development
|
105
120
|
prerelease: false
|
106
121
|
version_requirements: !ruby/object:Gem::Requirement
|
107
122
|
requirements:
|
108
123
|
- - "~>"
|
109
124
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
125
|
+
version: 3.0.3
|
111
126
|
- !ruby/object:Gem::Dependency
|
112
127
|
name: webmock
|
113
128
|
requirement: !ruby/object:Gem::Requirement
|
114
129
|
requirements:
|
115
130
|
- - "~>"
|
116
131
|
- !ruby/object:Gem::Version
|
117
|
-
version:
|
132
|
+
version: 2.0.3
|
118
133
|
type: :development
|
119
134
|
prerelease: false
|
120
135
|
version_requirements: !ruby/object:Gem::Requirement
|
121
136
|
requirements:
|
122
137
|
- - "~>"
|
123
138
|
- !ruby/object:Gem::Version
|
124
|
-
version:
|
139
|
+
version: 2.0.3
|
125
140
|
description: A client for the Bloc API
|
126
141
|
email: ben@bloc.to
|
127
142
|
executables: []
|
128
143
|
extensions: []
|
129
144
|
extra_rdoc_files: []
|
130
145
|
files:
|
146
|
+
- ".gitignore"
|
131
147
|
- Gemfile
|
132
148
|
- Gemfile.lock
|
133
149
|
- LICENSE
|
@@ -139,21 +155,26 @@ files:
|
|
139
155
|
- lib/client/checkpoints.rb
|
140
156
|
- lib/client/class_factory.rb
|
141
157
|
- lib/client/course_subjects.rb
|
158
|
+
- lib/client/mentors.rb
|
159
|
+
- lib/client/notifications.rb
|
142
160
|
- lib/client/resources.rb
|
143
161
|
- lib/client/roadmap_sections.rb
|
162
|
+
- lib/client/roadmaps.rb
|
144
163
|
- lib/client/users.rb
|
145
164
|
- lib/spartacus.rb
|
146
165
|
- spartacus.gemspec
|
147
166
|
- spec/.keep
|
148
167
|
- spec/cassettes/alumni_stories.yml
|
149
168
|
- spec/cassettes/checkpoints.yml
|
150
|
-
- spec/cassettes/roadmap_sections.yml
|
151
169
|
- spec/client/alumni_stories_spec.rb
|
152
170
|
- spec/client/checkpoints_spec.rb
|
153
171
|
- spec/client/roadmap_sections_spec.rb
|
154
172
|
- spec/client/users_spec.rb
|
155
173
|
- spec/spartacus_spec.rb
|
156
174
|
- spec/spec_helper.rb
|
175
|
+
- spec/vcr/alumni_stories.yml
|
176
|
+
- spec/vcr/checkpoints.yml
|
177
|
+
- spec/vcr/roadmap_sections.yml
|
157
178
|
homepage: http://rubygems.org/gems/spartacus
|
158
179
|
licenses:
|
159
180
|
- MIT
|
@@ -177,16 +198,17 @@ rubyforge_project:
|
|
177
198
|
rubygems_version: 2.4.8
|
178
199
|
signing_key:
|
179
200
|
specification_version: 4
|
180
|
-
summary: A client for the Bloc
|
201
|
+
summary: A client for the Bloc API
|
181
202
|
test_files:
|
182
203
|
- spec/.keep
|
183
204
|
- spec/cassettes/alumni_stories.yml
|
184
205
|
- spec/cassettes/checkpoints.yml
|
185
|
-
- spec/cassettes/roadmap_sections.yml
|
186
206
|
- spec/client/alumni_stories_spec.rb
|
187
207
|
- spec/client/checkpoints_spec.rb
|
188
208
|
- spec/client/roadmap_sections_spec.rb
|
189
209
|
- spec/client/users_spec.rb
|
190
210
|
- spec/spartacus_spec.rb
|
191
211
|
- spec/spec_helper.rb
|
192
|
-
|
212
|
+
- spec/vcr/alumni_stories.yml
|
213
|
+
- spec/vcr/checkpoints.yml
|
214
|
+
- spec/vcr/roadmap_sections.yml
|
@@ -1,119 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: post
|
5
|
-
uri: http://localhost:3000/api/v1/roadmap_sections/1/create_checkpoint
|
6
|
-
body:
|
7
|
-
encoding: UTF-8
|
8
|
-
string: checkpoint[name]=My%20Checkpoint
|
9
|
-
headers: {}
|
10
|
-
response:
|
11
|
-
status:
|
12
|
-
code: 200
|
13
|
-
message: OK
|
14
|
-
headers:
|
15
|
-
X-Frame-Options:
|
16
|
-
- SAMEORIGIN
|
17
|
-
X-Xss-Protection:
|
18
|
-
- 1; mode=block
|
19
|
-
X-Content-Type-Options:
|
20
|
-
- nosniff
|
21
|
-
Content-Type:
|
22
|
-
- application/json; charset=utf-8
|
23
|
-
Etag:
|
24
|
-
- '"7ea5d04b30b7bb36a3a6eecdc4748c92"'
|
25
|
-
Cache-Control:
|
26
|
-
- max-age=0, private, must-revalidate
|
27
|
-
X-Meta-Request-Version:
|
28
|
-
- 0.3.4
|
29
|
-
X-Request-Id:
|
30
|
-
- 95473b53-16b6-444d-ab1f-c841a87bf644
|
31
|
-
X-Runtime:
|
32
|
-
- '0.434640'
|
33
|
-
Vary:
|
34
|
-
- Accept-Encoding
|
35
|
-
Transfer-Encoding:
|
36
|
-
- chunked
|
37
|
-
body:
|
38
|
-
encoding: UTF-8
|
39
|
-
string: '{"id":1788,"name":"My Checkpoint","body":null,"parent_id":null,"created_at":"2015-10-08T06:08:57.035Z","updated_at":"2015-10-08T06:08:57.035Z","assignment":null,"summary":null,"points":1,"project_name":"","roadmap_id":null,"active":true,"job_prep":false,"version":[0,0],"body_file_path":"","uuid":"1ad02a6d-6a54-4a75-947a-3c41be3d7b6d","ref":"1ad02a6d-6a54-4a75-947a-3c41be3d7b6d|0","retroactive_optional_date":null}'
|
40
|
-
http_version:
|
41
|
-
recorded_at: Thu, 08 Oct 2015 06:08:57 GMT
|
42
|
-
- request:
|
43
|
-
method: post
|
44
|
-
uri: http://localhost:3000/api/v1/roadmap_sections/-1/create_checkpoint
|
45
|
-
body:
|
46
|
-
encoding: UTF-8
|
47
|
-
string: ''
|
48
|
-
headers: {}
|
49
|
-
response:
|
50
|
-
status:
|
51
|
-
code: 404
|
52
|
-
message: Not Found
|
53
|
-
headers:
|
54
|
-
X-Frame-Options:
|
55
|
-
- SAMEORIGIN
|
56
|
-
X-Xss-Protection:
|
57
|
-
- 1; mode=block
|
58
|
-
X-Content-Type-Options:
|
59
|
-
- nosniff
|
60
|
-
Content-Type:
|
61
|
-
- application/json; charset=utf-8
|
62
|
-
Cache-Control:
|
63
|
-
- no-cache
|
64
|
-
X-Meta-Request-Version:
|
65
|
-
- 0.3.4
|
66
|
-
X-Request-Id:
|
67
|
-
- 2606a433-5680-4d52-baea-6677273a52cc
|
68
|
-
X-Runtime:
|
69
|
-
- '0.226633'
|
70
|
-
Vary:
|
71
|
-
- Accept-Encoding
|
72
|
-
Transfer-Encoding:
|
73
|
-
- chunked
|
74
|
-
body:
|
75
|
-
encoding: UTF-8
|
76
|
-
string: '{"message":"Resource not found"}'
|
77
|
-
http_version:
|
78
|
-
recorded_at: Thu, 08 Oct 2015 06:08:58 GMT
|
79
|
-
- request:
|
80
|
-
method: post
|
81
|
-
uri: http://localhost:3000/api/v1/roadmap_sections/2/create_checkpoint
|
82
|
-
body:
|
83
|
-
encoding: UTF-8
|
84
|
-
string: checkpoint[name]=My%20Checkpoint&checkpoint[summary]=Great%20Summary&checkpoint[body]=Really%20great%20checkpoint&checkpoint[assignment]=Do%20the%20work%20well&checkpoint[points]=5
|
85
|
-
headers: {}
|
86
|
-
response:
|
87
|
-
status:
|
88
|
-
code: 200
|
89
|
-
message: OK
|
90
|
-
headers:
|
91
|
-
X-Frame-Options:
|
92
|
-
- SAMEORIGIN
|
93
|
-
X-Xss-Protection:
|
94
|
-
- 1; mode=block
|
95
|
-
X-Content-Type-Options:
|
96
|
-
- nosniff
|
97
|
-
Content-Type:
|
98
|
-
- application/json; charset=utf-8
|
99
|
-
Etag:
|
100
|
-
- '"6940afdc3e4fec332723ab58c1d8fdf3"'
|
101
|
-
Cache-Control:
|
102
|
-
- max-age=0, private, must-revalidate
|
103
|
-
X-Meta-Request-Version:
|
104
|
-
- 0.3.4
|
105
|
-
X-Request-Id:
|
106
|
-
- b3fee978-de98-443f-bcb1-3def6fcaa61d
|
107
|
-
X-Runtime:
|
108
|
-
- '0.545259'
|
109
|
-
Vary:
|
110
|
-
- Accept-Encoding
|
111
|
-
Transfer-Encoding:
|
112
|
-
- chunked
|
113
|
-
body:
|
114
|
-
encoding: UTF-8
|
115
|
-
string: '{"id":1789,"name":"My Checkpoint","body":"Really great checkpoint","parent_id":null,"created_at":"2015-10-08T06:09:24.783Z","updated_at":"2015-10-08T06:09:24.783Z","assignment":"Do
|
116
|
-
the work well","summary":"Great Summary","points":5,"project_name":"","roadmap_id":null,"active":true,"job_prep":false,"version":[0,0],"body_file_path":"","uuid":"c9b685eb-626a-43ea-80d7-e1b36df4d248","ref":"c9b685eb-626a-43ea-80d7-e1b36df4d248|0","retroactive_optional_date":null}'
|
117
|
-
http_version:
|
118
|
-
recorded_at: Thu, 08 Oct 2015 06:09:25 GMT
|
119
|
-
recorded_with: VCR 2.9.3
|