bearcat 1.0.11 → 1.0.12

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4d8a3c73bcbc6e9e913519564b89db751bae85f7
4
- data.tar.gz: e8f1ac4b6bc7b5ba8fbea8c863dd0a76132c58c6
3
+ metadata.gz: 1027a63d627f656333de4d9199a8bd1cffbc7c96
4
+ data.tar.gz: 038ebd68c10ef53e115042f69212802fe73487e4
5
5
  SHA512:
6
- metadata.gz: 48d89f7d3f298907a036a6543f74db0596b1766ba8a434ba2d9043e22985e5ada93f7b800904e5c394f48ef374e014b2b1e457c19fa3c303e2f5627786be04d2
7
- data.tar.gz: a1759bfa143cb5cdde32c4b5fb0f4c8e5910f48ee84ee5061a64127b83be78396c5ca5b6aa1335d1148a2b21fe4158686f32c8812e7597034bf4b716cbdf6297
6
+ metadata.gz: 75e569132b9dea773c65092623ee5212e30ac3b77bdced081e82c8fcd07fc194fec5dfa5800e1bcdb2092d65fd1542f2ce3921d2a78e2ddee005384eec65f940
7
+ data.tar.gz: 0303057fab21396e479e6861f7bf5b73ae07f997d3392f3bdd4189646ab2ee53130d47f1131c9604ddf4f358faa1e630eaf5dcf3fbe4ec7797921c43ede130a1
@@ -24,6 +24,7 @@ module Bearcat
24
24
  require 'bearcat/client/discussions'
25
25
  require 'bearcat/client/search'
26
26
  require 'bearcat/client/quizzes'
27
+ require 'bearcat/client/assignment_groups'
27
28
 
28
29
  include Assignments
29
30
  include Accounts
@@ -47,6 +48,7 @@ module Bearcat
47
48
  include FileHelper
48
49
  include Search
49
50
  include Quizzes
51
+ include AssignmentGroups
50
52
 
51
53
 
52
54
  # Override Footrest request for ApiArray support
@@ -0,0 +1,11 @@
1
+ module Bearcat
2
+ class Client < Footrest::Client
3
+ module AssignmentGroups
4
+
5
+ def list_assignment_groups(course, params={})
6
+ get("/api/v1/courses/#{course}/assignment_groups", params)
7
+ end
8
+
9
+ end
10
+ end
11
+ end
@@ -1,3 +1,3 @@
1
1
  module Bearcat
2
- VERSION = '1.0.11' unless defined?(Bearcat::VERSION)
2
+ VERSION = '1.0.12' unless defined?(Bearcat::VERSION)
3
3
  end
@@ -0,0 +1,17 @@
1
+ require 'helper'
2
+
3
+ describe Bearcat::Client::AssignmentGroups do
4
+ before do
5
+ @client = Bearcat::Client.new(prefix: "http://canvas.instructure.com", token: "test_token")
6
+ end
7
+
8
+ it "returns all assignment groups for a course" do
9
+ stub_get(@client, "/api/v1/courses/1/assignment_groups").to_return(json_response("assignment_groups.json"))
10
+ assignment_groups = @client.list_assignment_groups(1)
11
+ assignment_groups.count.should == 2
12
+ assignment_groups.first["group_weight"].should == 500
13
+ assignment_groups.first["id"].should == 2
14
+ assignment_groups.first["name"].should == 'Quizzes'
15
+ end
16
+
17
+ end
@@ -0,0 +1,16 @@
1
+ [
2
+ {
3
+ "group_weight": 500,
4
+ "id": 2,
5
+ "name": "Quizzes",
6
+ "position": 2,
7
+ "rules": {}
8
+ },
9
+ {
10
+ "group_weight": 500,
11
+ "id": 3,
12
+ "name": "Assignments",
13
+ "position": 3,
14
+ "rules": {}
15
+ }
16
+ ]
metadata CHANGED
@@ -1,97 +1,97 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bearcat
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.11
4
+ version: 1.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Mills, Jake Sorce
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-17 00:00:00.000000000 Z
11
+ date: 2015-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: 1.0.0
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: 1.0.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ~>
46
46
  - !ruby/object:Gem::Version
47
47
  version: '2.6'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ~>
53
53
  - !ruby/object:Gem::Version
54
54
  version: '2.6'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: webmock
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - '>='
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
66
+ - - '>='
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: pry
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ">="
73
+ - - '>='
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ">="
80
+ - - '>='
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: footrest
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ">="
87
+ - - '>='
88
88
  - !ruby/object:Gem::Version
89
89
  version: 0.2.2
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ">="
94
+ - - '>='
95
95
  - !ruby/object:Gem::Version
96
96
  version: 0.2.2
97
97
  description: Ruby interface for interacting with the canvas API
@@ -108,6 +108,7 @@ files:
108
108
  - lib/bearcat/client.rb
109
109
  - lib/bearcat/client/account_reports.rb
110
110
  - lib/bearcat/client/accounts.rb
111
+ - lib/bearcat/client/assignment_groups.rb
111
112
  - lib/bearcat/client/assignments.rb
112
113
  - lib/bearcat/client/calendar_events.rb
113
114
  - lib/bearcat/client/canvas_files.rb
@@ -131,6 +132,7 @@ files:
131
132
  - lib/bearcat/client/users.rb
132
133
  - lib/bearcat/version.rb
133
134
  - spec/bearcat/client/accounts_spec.rb
135
+ - spec/bearcat/client/assignment_groups_spec.rb
134
136
  - spec/bearcat/client/assignments_spec.rb
135
137
  - spec/bearcat/client/calendar_events_spec.rb
136
138
  - spec/bearcat/client/canvas_files_spec.rb
@@ -160,6 +162,7 @@ files:
160
162
  - spec/fixtures/account_users.json
161
163
  - spec/fixtures/add_custom_user_data.json
162
164
  - spec/fixtures/add_user.json
165
+ - spec/fixtures/assignment_groups.json
163
166
  - spec/fixtures/assignment_section_override.json
164
167
  - spec/fixtures/assignments.json
165
168
  - spec/fixtures/bearcat.jpg
@@ -233,22 +236,23 @@ require_paths:
233
236
  - lib
234
237
  required_ruby_version: !ruby/object:Gem::Requirement
235
238
  requirements:
236
- - - ">="
239
+ - - '>='
237
240
  - !ruby/object:Gem::Version
238
241
  version: '0'
239
242
  required_rubygems_version: !ruby/object:Gem::Requirement
240
243
  requirements:
241
- - - ">="
244
+ - - '>='
242
245
  - !ruby/object:Gem::Version
243
246
  version: '0'
244
247
  requirements: []
245
248
  rubyforge_project:
246
- rubygems_version: 2.2.2
249
+ rubygems_version: 2.4.5
247
250
  signing_key:
248
251
  specification_version: 4
249
252
  summary: Canvas API
250
253
  test_files:
251
254
  - spec/bearcat/client/accounts_spec.rb
255
+ - spec/bearcat/client/assignment_groups_spec.rb
252
256
  - spec/bearcat/client/assignments_spec.rb
253
257
  - spec/bearcat/client/calendar_events_spec.rb
254
258
  - spec/bearcat/client/canvas_files_spec.rb
@@ -278,6 +282,7 @@ test_files:
278
282
  - spec/fixtures/account_users.json
279
283
  - spec/fixtures/add_custom_user_data.json
280
284
  - spec/fixtures/add_user.json
285
+ - spec/fixtures/assignment_groups.json
281
286
  - spec/fixtures/assignment_section_override.json
282
287
  - spec/fixtures/assignments.json
283
288
  - spec/fixtures/bearcat.jpg