bearcat 1.3.15 → 1.3.16

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: 62ee5978b5b344dfaeec99115c8913c2abef1d6f
4
- data.tar.gz: 166ebeb7e51ed597976ddac3378261fb25223e22
3
+ metadata.gz: 689a6edee0315764b3c6c1cf4972937389baec64
4
+ data.tar.gz: 805e11b32b7406d97cff59f65c1e32918caebc4b
5
5
  SHA512:
6
- metadata.gz: 057ed1ab7c80b35acb38ca763321e1286fc59a8130fb9f7f571ead65971e94bf9e3c22d711aa7e6c3e7e694ccb203250bf3a7c2489566bd9c7aad3b23cf84556
7
- data.tar.gz: 219fe7075d3ab29c0fa7bdca518e9c7258bb6795571b73b5349bdf1a323d8b39c07c110101f3f7c8c95874137820be6faec5067369541c3d734e3d8df154cdf3
6
+ metadata.gz: f3da53687175d20eab3fe600520cf6f9c3297073808aa26ef6815c41000462114f05db7527b1208305de6d320e203a248755d713e0e22930d25ec4f03f6d4a01
7
+ data.tar.gz: a033af35ce0181e9a329ed0104082dd9e7a27ad5a204819ea8a284b8baf11d665124288374cbd6478d1f65e0d79bd9ec0cbded4fb4d81e246f3851d6cf333ba3
@@ -10,6 +10,10 @@ module Bearcat
10
10
  get("/api/v1/accounts/#{account}")
11
11
  end
12
12
 
13
+ def list_sub_accounts(account, params = {})
14
+ get("api/v1/accounts/#{account}/sub_accounts", params)
15
+ end
16
+
13
17
  def terms(account, params = {})
14
18
  get("/api/v1/accounts/#{account}/terms", params)
15
19
  end
@@ -1,3 +1,3 @@
1
1
  module Bearcat
2
- VERSION = '1.3.15' unless defined?(Bearcat::VERSION)
2
+ VERSION = '1.3.16' unless defined?(Bearcat::VERSION)
3
3
  end
@@ -20,6 +20,14 @@ describe Bearcat::Client::Accounts do
20
20
  account_admins.last['role'].should == 'Custom Admin'
21
21
  end
22
22
 
23
+ it 'returns a list of all sub-accounts' do
24
+ stub_get(@client, "/api/v1/accounts/1/sub_accounts").to_return(json_response("account_sub_accounts.json"))
25
+ account_sub_accounts = @client.list_sub_accounts(1)
26
+ account_sub_accounts.count.should == 1
27
+ account_sub_accounts.first['id'].should == 2
28
+ account_sub_accounts.first['name'].should == "Manually-Created Courses"
29
+ end
30
+
23
31
  it "returns a single account" do
24
32
  stub_get(@client, "/api/v1/accounts/1").to_return(json_response("single_account.json"))
25
33
  account = @client.account(1)
@@ -0,0 +1,17 @@
1
+ [
2
+ {
3
+ "id": 2,
4
+ "name": "Manually-Created Courses",
5
+ "workflow_state": "active",
6
+ "parent_account_id": 1,
7
+ "root_account_id": 1,
8
+ "uuid": "rd7NGVGl7f7913DzKCxFUKh17qMTQRZEJ0k4WW3R",
9
+ "default_storage_quota_mb": "5000",
10
+ "default_user_storage_quota_mb": "50",
11
+ "default_group_storage_quota_mb": "50",
12
+ "default_time_zone": "America/Denver",
13
+ "sis_account_id": null,
14
+ "sis_import_id": null,
15
+ "integration_id": null
16
+ }
17
+ ]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bearcat
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.15
4
+ version: 1.3.16
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: 2017-06-08 00:00:00.000000000 Z
11
+ date: 2017-08-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -188,6 +188,7 @@ files:
188
188
  - spec/fixtures/account_reports_start_result.json
189
189
  - spec/fixtures/account_roles.json
190
190
  - spec/fixtures/account_sis_imports.json
191
+ - spec/fixtures/account_sub_accounts.json
191
192
  - spec/fixtures/account_user.json
192
193
  - spec/fixtures/account_users.json
193
194
  - spec/fixtures/accounts.json
@@ -317,7 +318,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
317
318
  version: '0'
318
319
  requirements: []
319
320
  rubyforge_project:
320
- rubygems_version: 2.4.8
321
+ rubygems_version: 2.4.5.1
321
322
  signing_key:
322
323
  specification_version: 4
323
324
  summary: Canvas API
@@ -370,6 +371,7 @@ test_files:
370
371
  - spec/fixtures/account_reports_start_result.json
371
372
  - spec/fixtures/account_roles.json
372
373
  - spec/fixtures/account_sis_imports.json
374
+ - spec/fixtures/account_sub_accounts.json
373
375
  - spec/fixtures/account_user.json
374
376
  - spec/fixtures/account_users.json
375
377
  - spec/fixtures/accounts.json
@@ -480,3 +482,4 @@ test_files:
480
482
  - spec/fixtures/user_page_views.json
481
483
  - spec/fixtures/user_profile.json
482
484
  - spec/helper.rb
485
+ has_rdoc: