bridge_api 0.1.33 → 0.1.34

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: f33df639a81471fedb5d8c5cfae0666827bbf4bd
4
- data.tar.gz: db34d0fcb1339b47aaedc0a6710eb594595bcf59
3
+ metadata.gz: f7f7fcc7455da9e499a9871e101189b7ea3b0c23
4
+ data.tar.gz: 750551323fc36f2bcf00e5e598669a08fbc5e3c3
5
5
  SHA512:
6
- metadata.gz: c60cd5d7b332e8e58ba933a58feef4d30724b73236437b3a8a6f94e5ca95c71b888115b72a87aef2618c6cbaf701b24983214b557b5cc106fb64ee21cb9a554c
7
- data.tar.gz: 5ae7b1a28a4062fca52ac2432719aead21fce48f05550fd7a7c29f1a9110bd02f1b6bf3e2281f28ed0723b91c63bbd560e5538aecebbcc4677ece8984c201c3a
6
+ metadata.gz: 433c03fcac14ac9d7bbbc57ed8529e692eeac165c4ec4b3eddedb0c13131a173b8b4cf69df4687b411efb9a44dd5465b233bfe6180358ef1ef8165a8a9156430
7
+ data.tar.gz: 7b89243ad24cc1a64ca94ba6417ff71fb6d017b0c077ceaa9f0c868de92500ddc77b81d1c77899c181465b59665dad9c5c48984d3f872074af8be15643b9cb09
@@ -26,9 +26,9 @@ GEM
26
26
  multipart-post (>= 1.2, < 3)
27
27
  faraday_middleware (0.9.2)
28
28
  faraday (>= 0.7.4, < 0.10)
29
- footrest (0.5.1)
29
+ footrest (0.5.3)
30
30
  activesupport (>= 3.0.0)
31
- faraday (~> 0.9.0)
31
+ faraday (>= 0.9.0, < 1)
32
32
  link_header (>= 0.0.7)
33
33
  hashdiff (0.3.7)
34
34
  i18n (1.0.1)
@@ -82,4 +82,4 @@ DEPENDENCIES
82
82
  webmock (~> 1.22.6)
83
83
 
84
84
  BUNDLED WITH
85
- 1.16.1
85
+ 1.16.3
@@ -32,6 +32,10 @@ module BridgeAPI
32
32
  def update_sub_account_lti_config(sub_account_id, lti_tool_id, params = {})
33
33
  put("#{API_PATH}#{SUPPORT_PATH}#{SUB_ACCOUNT_PATH}/#{sub_account_id}#{LTI_TOOLS_PATH}/#{lti_tool_id}", params)
34
34
  end
35
+
36
+ def create_sub_account_lti_config(sub_account_id, params = {})
37
+ post("#{API_PATH}#{SUPPORT_PATH}#{SUB_ACCOUNT_PATH}/#{sub_account_id}#{LTI_TOOLS_PATH}", params)
38
+ end
35
39
  end
36
40
  end
37
41
  end
@@ -1,3 +1,3 @@
1
1
  module BridgeAPI
2
- VERSION = '0.1.33'.freeze unless defined?(BridgeAPI::VERSION)
2
+ VERSION = '0.1.34'.freeze unless defined?(BridgeAPI::VERSION)
3
3
  end
@@ -33,4 +33,10 @@ describe BridgeAPI::Client::SubAccount do
33
33
  response = @client.update_sub_account_lti_config(2, 15, params)
34
34
  expect(response.body['lti_tool']['id']).to(eq '20')
35
35
  end
36
+
37
+ it 'should create new lti config' do
38
+ params = {lti_tool: {consumer_key: "SomeKey", shared_secret: SecureRandom.hex(16)}}
39
+ response = @client.create_sub_account_lti_config(2,params)
40
+ expect(response.status).to(eq 201)
41
+ end
36
42
  end
@@ -0,0 +1,12 @@
1
+ {"sub_account_id":"5",
2
+ "lti_tools":
3
+ [
4
+ {
5
+ "id":"24",
6
+ "name":"YoYo",
7
+ "tool_enabled":false,
8
+ "created_at":"2018-07-25T11:15:18.313-06:00",
9
+ "updated_at":"2018-07-25T11:15:18.313-06:00"
10
+ }
11
+ ]
12
+ }
@@ -196,6 +196,10 @@ class FakeBridge < Sinatra::Base
196
196
  get_json_data 200, 'sub_account_lti_config_update.json'
197
197
  end
198
198
 
199
+ post %r{/api/support/sub_accounts/\d+/lti_tools} do
200
+ get_json_data 201, 'sub_account_new_lti_config.json'
201
+ end
202
+
199
203
  # Accounts
200
204
  put %r{/api/support/accounts} do
201
205
  get_json_data 200, 'accounts.json'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bridge_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.33
4
+ version: 0.1.34
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jay Shaffer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-20 00:00:00.000000000 Z
11
+ date: 2018-07-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -246,6 +246,7 @@ files:
246
246
  - spec/fixtures/roles.json
247
247
  - spec/fixtures/sub_account_lti_config.json
248
248
  - spec/fixtures/sub_account_lti_config_update.json
249
+ - spec/fixtures/sub_account_new_lti_config.json
249
250
  - spec/fixtures/sub_accounts.json
250
251
  - spec/fixtures/user.json
251
252
  - spec/fixtures/user_roles_add.json
@@ -313,10 +314,10 @@ test_files:
313
314
  - spec/fixtures/roles.json
314
315
  - spec/fixtures/sub_account_lti_config.json
315
316
  - spec/fixtures/sub_account_lti_config_update.json
317
+ - spec/fixtures/sub_account_new_lti_config.json
316
318
  - spec/fixtures/sub_accounts.json
317
319
  - spec/fixtures/user.json
318
320
  - spec/fixtures/user_roles_add.json
319
321
  - spec/fixtures/users.json
320
322
  - spec/support/fake_bridge.rb
321
323
  - spec/test_helper.rb
322
- has_rdoc: