bridge_api 0.3.8 → 0.3.9
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/.github/workflows/ci.yml +2 -2
- data/Dockerfile +1 -1
- data/Gemfile.lock +99 -58
- data/bridge_api.gemspec +6 -7
- data/lib/bridge_api/client.rb +3 -0
- data/lib/bridge_api/version.rb +1 -1
- data/spec/bridge_api/client_spec.rb +2 -1
- data/spec/support/fake_bridge.rb +42 -42
- metadata +16 -45
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b414f24840c62114760b385f7005b4f0c58c86173a915c4e6ae1e3511018a9bd
|
|
4
|
+
data.tar.gz: 247b70b98d1e6c8bcd885a48e204a47370ce7b62171c174b9c7a59d1761f29db
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ead63c01be4f706a06a178f37a05118822338ec30e9f681654a84ecf54095c4d4679c7f71056ff77dbfbbd1bf2bb7176b81e9c8fe582ab4d33754e47353371ce
|
|
7
|
+
data.tar.gz: 0fd20b8978df53227b88b0da6b6ea998ef6a3f20f2d0eea4ce260c9e408314809b15bb56a425b4cee6f5a9b623608d037e0d50e410d91e0cba123d6d8f7e14de
|
data/.github/workflows/ci.yml
CHANGED
|
@@ -10,10 +10,10 @@ jobs:
|
|
|
10
10
|
- name: Setup Ruby # Step 2 (we gave the name 'Setup Ruby' to this step)
|
|
11
11
|
uses: ruby/setup-ruby@v1
|
|
12
12
|
with:
|
|
13
|
-
ruby-version:
|
|
13
|
+
ruby-version: '3.4'
|
|
14
14
|
- name: Install bundle and gems # Step 4
|
|
15
15
|
run: |
|
|
16
|
-
gem install bundler -v '2.
|
|
16
|
+
gem install bundler -v '2.6.9'
|
|
17
17
|
bundle install --jobs 4 --retry 3
|
|
18
18
|
- name: Run tests # Step 6
|
|
19
19
|
run: COVERAGE=true bundle exec rspec
|
data/Dockerfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
bridge_api (0.
|
|
4
|
+
bridge_api (0.3.9)
|
|
5
5
|
faraday (~> 0.17.3)
|
|
6
6
|
faraday_middleware (>= 0.12.2)
|
|
7
7
|
footrest (>= 0.5.1)
|
|
@@ -10,83 +10,124 @@ PATH
|
|
|
10
10
|
GEM
|
|
11
11
|
remote: https://rubygems.org/
|
|
12
12
|
specs:
|
|
13
|
-
activesupport (
|
|
14
|
-
|
|
13
|
+
activesupport (8.1.3.1)
|
|
14
|
+
base64
|
|
15
|
+
bigdecimal
|
|
16
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
17
|
+
connection_pool (>= 2.2.5)
|
|
18
|
+
drb
|
|
15
19
|
i18n (>= 1.6, < 2)
|
|
20
|
+
json
|
|
21
|
+
logger (>= 1.4.2)
|
|
16
22
|
minitest (>= 5.1)
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
securerandom (>= 0.3)
|
|
24
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
|
25
|
+
uri (>= 0.13.1)
|
|
26
|
+
addressable (2.9.0)
|
|
27
|
+
public_suffix (>= 2.0.2, < 8.0)
|
|
28
|
+
base64 (0.3.0)
|
|
29
|
+
bigdecimal (4.1.3)
|
|
30
|
+
byebug (13.0.0)
|
|
31
|
+
reline (>= 0.6.0)
|
|
32
|
+
coderay (1.1.3)
|
|
33
|
+
concurrent-ruby (1.3.8)
|
|
34
|
+
connection_pool (3.0.2)
|
|
35
|
+
crack (1.0.1)
|
|
36
|
+
bigdecimal
|
|
37
|
+
rexml
|
|
38
|
+
diff-lcs (1.6.2)
|
|
39
|
+
drb (2.2.3)
|
|
40
|
+
faraday (0.17.6)
|
|
27
41
|
multipart-post (>= 1.2, < 3)
|
|
28
42
|
faraday_middleware (0.14.0)
|
|
29
43
|
faraday (>= 0.7.4, < 1.0)
|
|
30
|
-
footrest (0.5.
|
|
44
|
+
footrest (0.5.8)
|
|
31
45
|
activesupport (>= 3.0.0)
|
|
32
|
-
faraday (>= 0.9.0, <
|
|
46
|
+
faraday (>= 0.9.0, < 2)
|
|
33
47
|
link_header (>= 0.0.7)
|
|
34
|
-
hashdiff (
|
|
35
|
-
i18n (1.
|
|
48
|
+
hashdiff (1.2.1)
|
|
49
|
+
i18n (1.15.2)
|
|
36
50
|
concurrent-ruby (~> 1.0)
|
|
51
|
+
io-console (0.9.4)
|
|
52
|
+
json (3.0.2)
|
|
37
53
|
link_header (0.0.8)
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
54
|
+
logger (1.7.0)
|
|
55
|
+
method_source (1.1.0)
|
|
56
|
+
minitest (6.0.6)
|
|
57
|
+
drb (~> 2.0)
|
|
58
|
+
prism (~> 1.5)
|
|
59
|
+
mock_redis (0.55.0)
|
|
60
|
+
redis (~> 5)
|
|
61
|
+
multipart-post (2.4.1)
|
|
62
|
+
mustermann (3.1.1)
|
|
43
63
|
paul_walker (0.1.2)
|
|
44
64
|
redis (>= 4.0)
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
65
|
+
prism (1.9.0)
|
|
66
|
+
pry (0.16.0)
|
|
67
|
+
coderay (~> 1.1)
|
|
68
|
+
method_source (~> 1.0)
|
|
69
|
+
reline (>= 0.6.0)
|
|
70
|
+
public_suffix (7.0.5)
|
|
71
|
+
rack (3.2.7)
|
|
72
|
+
rack-protection (4.2.1)
|
|
73
|
+
base64 (>= 0.1.0)
|
|
74
|
+
logger (>= 1.6.0)
|
|
75
|
+
rack (>= 3.0.0, < 4)
|
|
76
|
+
rack-session (2.1.2)
|
|
77
|
+
base64 (>= 0.1.0)
|
|
78
|
+
rack (>= 3.0.0)
|
|
79
|
+
rake (13.4.2)
|
|
80
|
+
redis (5.4.1)
|
|
81
|
+
redis-client (>= 0.22.0)
|
|
82
|
+
redis-client (0.30.1)
|
|
83
|
+
connection_pool
|
|
84
|
+
reline (0.7.0)
|
|
85
|
+
io-console (~> 0.5)
|
|
86
|
+
rexml (3.4.4)
|
|
87
|
+
rspec (3.13.2)
|
|
88
|
+
rspec-core (~> 3.13.0)
|
|
89
|
+
rspec-expectations (~> 3.13.0)
|
|
90
|
+
rspec-mocks (~> 3.13.0)
|
|
91
|
+
rspec-core (3.13.6)
|
|
92
|
+
rspec-support (~> 3.13.0)
|
|
93
|
+
rspec-expectations (3.13.5)
|
|
94
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
95
|
+
rspec-support (~> 3.13.0)
|
|
96
|
+
rspec-mocks (3.13.8)
|
|
97
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
98
|
+
rspec-support (~> 3.13.0)
|
|
99
|
+
rspec-support (3.13.7)
|
|
100
|
+
securerandom (0.4.1)
|
|
101
|
+
sinatra (4.2.1)
|
|
102
|
+
logger (>= 1.6.0)
|
|
103
|
+
mustermann (~> 3.0)
|
|
104
|
+
rack (>= 3.0.0, < 4)
|
|
105
|
+
rack-protection (= 4.2.1)
|
|
106
|
+
rack-session (>= 2.0.0, < 3)
|
|
107
|
+
tilt (~> 2.0)
|
|
108
|
+
tilt (2.9.0)
|
|
109
|
+
tzinfo (2.0.6)
|
|
70
110
|
concurrent-ruby (~> 1.0)
|
|
71
|
-
|
|
72
|
-
|
|
111
|
+
uri (1.1.1)
|
|
112
|
+
webmock (3.26.4)
|
|
113
|
+
addressable (>= 2.8.0)
|
|
73
114
|
crack (>= 0.3.2)
|
|
74
|
-
hashdiff
|
|
115
|
+
hashdiff (>= 0.4.0, < 2.0.0)
|
|
75
116
|
|
|
76
117
|
PLATFORMS
|
|
118
|
+
arm64-darwin-25
|
|
77
119
|
ruby
|
|
78
120
|
|
|
79
121
|
DEPENDENCIES
|
|
80
122
|
bridge_api!
|
|
81
|
-
|
|
82
|
-
byebug (~> 8.2.2)
|
|
123
|
+
byebug (>= 11.1)
|
|
83
124
|
mock_redis
|
|
84
125
|
pry (~> 0)
|
|
85
|
-
rake (~> 0)
|
|
86
|
-
rspec (~>
|
|
87
|
-
sinatra (~>
|
|
88
|
-
tilt (~>
|
|
89
|
-
webmock (~>
|
|
126
|
+
rake (~> 13.0)
|
|
127
|
+
rspec (~> 3.13)
|
|
128
|
+
sinatra (~> 4.2)
|
|
129
|
+
tilt (~> 2.0)
|
|
130
|
+
webmock (~> 3.0)
|
|
90
131
|
|
|
91
132
|
BUNDLED WITH
|
|
92
|
-
|
|
133
|
+
2.6.9
|
data/bridge_api.gemspec
CHANGED
|
@@ -18,14 +18,13 @@ Gem::Specification.new do |gem|
|
|
|
18
18
|
gem.require_paths = ['lib']
|
|
19
19
|
gem.version = BridgeAPI::VERSION
|
|
20
20
|
|
|
21
|
-
gem.add_development_dependency '
|
|
22
|
-
gem.add_development_dependency 'byebug', '~> 8.2.2'
|
|
21
|
+
gem.add_development_dependency 'byebug', '>= 11.1'
|
|
23
22
|
gem.add_development_dependency 'pry', '~> 0'
|
|
24
|
-
gem.add_development_dependency 'rake', '~> 0'
|
|
25
|
-
gem.add_development_dependency 'rspec', '~>
|
|
26
|
-
gem.add_development_dependency 'sinatra', '~>
|
|
27
|
-
gem.add_development_dependency 'tilt', '
|
|
28
|
-
gem.add_development_dependency 'webmock', '~>
|
|
23
|
+
gem.add_development_dependency 'rake', '~> 13.0'
|
|
24
|
+
gem.add_development_dependency 'rspec', '~> 3.13'
|
|
25
|
+
gem.add_development_dependency 'sinatra', '~> 4.2'
|
|
26
|
+
gem.add_development_dependency 'tilt', '~> 2.0'
|
|
27
|
+
gem.add_development_dependency 'webmock', '~> 3.0'
|
|
29
28
|
gem.add_development_dependency 'mock_redis'
|
|
30
29
|
|
|
31
30
|
gem.add_dependency 'faraday', '~> 0.17.3'
|
data/lib/bridge_api/client.rb
CHANGED
data/lib/bridge_api/version.rb
CHANGED
|
@@ -88,7 +88,8 @@ describe BridgeAPI::Client do
|
|
|
88
88
|
client = BridgeAPI::Client.new(config)
|
|
89
89
|
expect(client.get_next_key(keys.keys, 'key1')).to eq('key2')
|
|
90
90
|
expect(client.get_next_key(keys.keys, 'key2')).to eq('key1')
|
|
91
|
-
|
|
91
|
+
# No rate limit data and no current key in the pool falls back to a random pool key
|
|
92
|
+
expect(keys.keys).to include(client.get_next_key(keys.keys, 'non-existent-key'))
|
|
92
93
|
end
|
|
93
94
|
end
|
|
94
95
|
|
data/spec/support/fake_bridge.rb
CHANGED
|
@@ -6,43 +6,43 @@ require 'tilt'
|
|
|
6
6
|
class FakeBridge < Sinatra::Base
|
|
7
7
|
## Clone Objects
|
|
8
8
|
|
|
9
|
-
post %r{/api/admin/clone_objects
|
|
9
|
+
post %r{/api/admin/clone_objects} do
|
|
10
10
|
get_json_data 200, 'clone_objects.json'
|
|
11
11
|
end
|
|
12
12
|
|
|
13
|
-
get %r{/api/admin/clone_objects/\d
|
|
13
|
+
get %r{/api/admin/clone_objects/\d+} do
|
|
14
14
|
get_json_data 200, 'clone_objects.json'
|
|
15
15
|
end
|
|
16
16
|
|
|
17
17
|
## Course Templates
|
|
18
18
|
|
|
19
|
-
get %r{/api/author/course_templates
|
|
19
|
+
get %r{/api/author/course_templates} do
|
|
20
20
|
get_json_data 200, 'courses.json'
|
|
21
21
|
end
|
|
22
22
|
|
|
23
|
-
get %r{/api/author/course_templates/\d
|
|
23
|
+
get %r{/api/author/course_templates/\d+} do
|
|
24
24
|
get_json_data 200, 'course.json'
|
|
25
25
|
end
|
|
26
26
|
|
|
27
|
-
post %r{/api/author/course_templates
|
|
27
|
+
post %r{/api/author/course_templates} do
|
|
28
28
|
get_json_data 200, 'course.json'
|
|
29
29
|
end
|
|
30
30
|
|
|
31
|
-
post %r{/api/author/course_templates/\d+/publish
|
|
31
|
+
post %r{/api/author/course_templates/\d+/publish} do
|
|
32
32
|
get_json_data 200, 'course.json'
|
|
33
33
|
end
|
|
34
34
|
|
|
35
|
-
put %r{/api/author/course_templates/\d
|
|
35
|
+
put %r{/api/author/course_templates/\d+} do
|
|
36
36
|
get_json_data 200, 'course.json'
|
|
37
37
|
end
|
|
38
38
|
|
|
39
|
-
delete %r{/api/author/course_templates/\d
|
|
39
|
+
delete %r{/api/author/course_templates/\d+} do
|
|
40
40
|
get_json_data 204, nil
|
|
41
41
|
end
|
|
42
42
|
|
|
43
43
|
## Programs
|
|
44
44
|
|
|
45
|
-
get %r{/api/author/programs
|
|
45
|
+
get %r{/api/author/programs.*} do
|
|
46
46
|
get_json_data 200, 'programs.json'
|
|
47
47
|
end
|
|
48
48
|
|
|
@@ -64,30 +64,30 @@ class FakeBridge < Sinatra::Base
|
|
|
64
64
|
get_json_data 204, nil
|
|
65
65
|
end
|
|
66
66
|
|
|
67
|
-
delete %r{/api/author/programs/\d+/learners} do
|
|
67
|
+
delete %r{/api/author/programs/\d+/learners(?:/\d+)?} do
|
|
68
68
|
get_json_data 204, nil
|
|
69
69
|
end
|
|
70
70
|
|
|
71
71
|
## Users
|
|
72
72
|
|
|
73
|
-
get %r{/api/author/users
|
|
74
|
-
response.headers['x-rate-limit-remaining'] = 29
|
|
73
|
+
get %r{/api/author/users} do
|
|
74
|
+
response.headers['x-rate-limit-remaining'] = '29'
|
|
75
75
|
get_json_data 200, 'users.json'
|
|
76
76
|
end
|
|
77
77
|
|
|
78
|
-
get %r{/api/author/users/\d
|
|
78
|
+
get %r{/api/author/users/\d+} do
|
|
79
79
|
get_json_data 200, 'user.json'
|
|
80
80
|
end
|
|
81
81
|
|
|
82
|
-
put %r{/api/author/users/\d
|
|
82
|
+
put %r{/api/author/users/\d+} do
|
|
83
83
|
get_json_data 200, 'user.json'
|
|
84
84
|
end
|
|
85
85
|
|
|
86
|
-
post %r{/api/admin/users
|
|
86
|
+
post %r{/api/admin/users} do
|
|
87
87
|
get_json_data 200, 'user.json'
|
|
88
88
|
end
|
|
89
89
|
|
|
90
|
-
delete %r{/api/admin/users/\d
|
|
90
|
+
delete %r{/api/admin/users/\d+} do
|
|
91
91
|
get_json_data 204, nil
|
|
92
92
|
end
|
|
93
93
|
|
|
@@ -96,33 +96,33 @@ class FakeBridge < Sinatra::Base
|
|
|
96
96
|
end
|
|
97
97
|
|
|
98
98
|
## Managers
|
|
99
|
-
get %r{/api/author/managers
|
|
99
|
+
get %r{/api/author/managers} do
|
|
100
100
|
get_json_data 200, 'managers.json'
|
|
101
101
|
end
|
|
102
102
|
|
|
103
|
-
get %r{/api/author/managers/\d+/direct_reports
|
|
103
|
+
get %r{/api/author/managers/\d+/direct_reports} do
|
|
104
104
|
get_json_data 200, 'direct_reports.json'
|
|
105
105
|
end
|
|
106
106
|
|
|
107
107
|
## Enrollments
|
|
108
108
|
|
|
109
|
-
post %r{/api/author/course_templates/\d+/enrollments
|
|
109
|
+
post %r{/api/author/course_templates/\d+/enrollments} do
|
|
110
110
|
get_json_data 204, nil
|
|
111
111
|
end
|
|
112
112
|
|
|
113
|
-
get %r{/api/author/course_templates/\d+/enrollments
|
|
113
|
+
get %r{/api/author/course_templates/\d+/enrollments} do
|
|
114
114
|
get_json_data 200, 'enrollments.json'
|
|
115
115
|
end
|
|
116
116
|
|
|
117
|
-
delete %r{/api/author/enrollments
|
|
117
|
+
delete %r{/api/author/enrollments.*} do
|
|
118
118
|
get_json_data 204, nil
|
|
119
119
|
end
|
|
120
120
|
|
|
121
|
-
put %r{/api/author/enrollments
|
|
121
|
+
put %r{/api/author/enrollments.*} do
|
|
122
122
|
get_json_data 200, 'enrollment.json'
|
|
123
123
|
end
|
|
124
124
|
|
|
125
|
-
post %r{/api/author/enrollments/\d+/due_date
|
|
125
|
+
post %r{/api/author/enrollments/\d+/due_date} do
|
|
126
126
|
get_json_data 200, 'enrollment.json'
|
|
127
127
|
end
|
|
128
128
|
|
|
@@ -130,7 +130,7 @@ class FakeBridge < Sinatra::Base
|
|
|
130
130
|
get_json_data 204, 'enrollment.json'
|
|
131
131
|
end
|
|
132
132
|
|
|
133
|
-
get %r{/api/author/learners/\d+/learner_enrollments
|
|
133
|
+
get %r{/api/author/learners/\d+/learner_enrollments} do
|
|
134
134
|
get_json_data 200, 'learner_enrollments.json'
|
|
135
135
|
end
|
|
136
136
|
|
|
@@ -140,11 +140,11 @@ class FakeBridge < Sinatra::Base
|
|
|
140
140
|
get_json_data 200, 'custom_fields.json'
|
|
141
141
|
end
|
|
142
142
|
|
|
143
|
-
get %r{/api/author/custom_fields/\d
|
|
143
|
+
get %r{/api/author/custom_fields/\d+} do
|
|
144
144
|
get_json_data 200, 'custom_fields.json'
|
|
145
145
|
end
|
|
146
146
|
|
|
147
|
-
put %r{/api/author/custom_fields/\d
|
|
147
|
+
put %r{/api/author/custom_fields/\d+} do
|
|
148
148
|
get_json_data 200, 'custom_fields.json'
|
|
149
149
|
end
|
|
150
150
|
|
|
@@ -152,7 +152,7 @@ class FakeBridge < Sinatra::Base
|
|
|
152
152
|
get_json_data 200, 'custom_fields.json'
|
|
153
153
|
end
|
|
154
154
|
|
|
155
|
-
delete %r{/api/author/custom_fields/\d
|
|
155
|
+
delete %r{/api/author/custom_fields/\d+} do
|
|
156
156
|
get_json_data 204, nil
|
|
157
157
|
end
|
|
158
158
|
|
|
@@ -176,21 +176,21 @@ class FakeBridge < Sinatra::Base
|
|
|
176
176
|
get_json_data 201, 'group.json'
|
|
177
177
|
end
|
|
178
178
|
|
|
179
|
-
put %r{/api/author/groups/\d
|
|
179
|
+
put %r{/api/author/groups/\d+} do
|
|
180
180
|
get_json_data 200, 'group.json'
|
|
181
181
|
end
|
|
182
182
|
|
|
183
183
|
# Learner Items
|
|
184
|
-
get %r{/api/author/learners/\d+/learner_items
|
|
184
|
+
get %r{/api/author/learners/\d+/learner_items} do
|
|
185
185
|
get_json_data 200, 'learner_items.json'
|
|
186
186
|
end
|
|
187
187
|
|
|
188
188
|
# Live Courses
|
|
189
|
-
get %r{/api/author/live_courses
|
|
189
|
+
get %r{/api/author/live_courses} do
|
|
190
190
|
get_json_data 200, 'live_courses.json'
|
|
191
191
|
end
|
|
192
192
|
|
|
193
|
-
get %r{/api/author/live_courses/\d
|
|
193
|
+
get %r{/api/author/live_courses/\d+} do
|
|
194
194
|
get_json_data 200, 'live_course.json'
|
|
195
195
|
end
|
|
196
196
|
|
|
@@ -200,7 +200,7 @@ class FakeBridge < Sinatra::Base
|
|
|
200
200
|
end
|
|
201
201
|
|
|
202
202
|
# Web Conference
|
|
203
|
-
get %r{/api/author/web_conference
|
|
203
|
+
get %r{/api/author/web_conference} do
|
|
204
204
|
get_json_data 200, 'default_web_conference.json'
|
|
205
205
|
end
|
|
206
206
|
|
|
@@ -225,24 +225,24 @@ class FakeBridge < Sinatra::Base
|
|
|
225
225
|
get_json_data 204, 'live_course_sessions.json'
|
|
226
226
|
end
|
|
227
227
|
|
|
228
|
-
put %r{/api/author/live_courses/\d+/sessions} do
|
|
228
|
+
put %r{/api/author/live_courses/\d+/sessions(?:/\d+(?:/web_conference)?)?} do
|
|
229
229
|
get_json_data 200, 'live_course_sessions.json'
|
|
230
230
|
end
|
|
231
231
|
|
|
232
232
|
# Sub Accounts
|
|
233
|
-
post %r{/api/admin/sub_accounts
|
|
233
|
+
post %r{/api/admin/sub_accounts} do
|
|
234
234
|
get_json_data 200, 'sub_accounts.json'
|
|
235
235
|
end
|
|
236
236
|
|
|
237
|
-
get %r{/api/admin/sub_accounts
|
|
237
|
+
get %r{/api/admin/sub_accounts} do
|
|
238
238
|
get_json_data 200, 'sub_accounts.json'
|
|
239
239
|
end
|
|
240
240
|
|
|
241
|
-
get %r{/api/admin/sub_accounts/\d
|
|
241
|
+
get %r{/api/admin/sub_accounts/\d+} do
|
|
242
242
|
get_json_data 200, 'sub_accounts.json'
|
|
243
243
|
end
|
|
244
244
|
|
|
245
|
-
put %r{/api/admin/sub_accounts
|
|
245
|
+
put %r{/api/admin/sub_accounts} do
|
|
246
246
|
get_json_data 200, 'sub_accounts.json'
|
|
247
247
|
end
|
|
248
248
|
|
|
@@ -275,12 +275,12 @@ class FakeBridge < Sinatra::Base
|
|
|
275
275
|
end
|
|
276
276
|
|
|
277
277
|
# Accounts
|
|
278
|
-
put %r{/api/support/accounts} do
|
|
278
|
+
put %r{/api/support/accounts(?:/\d+)?} do
|
|
279
279
|
get_json_data 200, 'accounts.json'
|
|
280
280
|
end
|
|
281
281
|
|
|
282
282
|
# Roles
|
|
283
|
-
get %r{/api/author/roles} do
|
|
283
|
+
get %r{/api/author/roles(?:/\d+)?} do
|
|
284
284
|
get_json_data 200, 'roles.json'
|
|
285
285
|
end
|
|
286
286
|
|
|
@@ -288,11 +288,11 @@ class FakeBridge < Sinatra::Base
|
|
|
288
288
|
get_json_data 200, 'roles.json'
|
|
289
289
|
end
|
|
290
290
|
|
|
291
|
-
put %r{/api/admin/users/\d+/roles} do
|
|
291
|
+
put %r{/api/admin/users/\d+/roles(?:/batch)?} do
|
|
292
292
|
get_json_data 200, 'user_roles_add.json'
|
|
293
293
|
end
|
|
294
294
|
|
|
295
|
-
delete %r{/api/author/roles} do
|
|
295
|
+
delete %r{/api/author/roles(?:/\d+)?} do
|
|
296
296
|
get_json_data 204, 'roles.json'
|
|
297
297
|
end
|
|
298
298
|
|
|
@@ -301,7 +301,7 @@ class FakeBridge < Sinatra::Base
|
|
|
301
301
|
get_json_data 204, 'affiliations.json'
|
|
302
302
|
end
|
|
303
303
|
|
|
304
|
-
put %r{/api/author/affiliated_sub_accounts} do
|
|
304
|
+
put %r{/api/author/affiliated_sub_accounts(?:/share_batch)?} do
|
|
305
305
|
get_json_data 204, 'affiliations.json'
|
|
306
306
|
end
|
|
307
307
|
|
metadata
CHANGED
|
@@ -1,49 +1,28 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bridge_api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.9
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jay Shaffer
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
|
-
name:
|
|
13
|
+
name: byebug
|
|
15
14
|
requirement: !ruby/object:Gem::Requirement
|
|
16
15
|
requirements:
|
|
17
|
-
- - "~>"
|
|
18
|
-
- !ruby/object:Gem::Version
|
|
19
|
-
version: '1.0'
|
|
20
16
|
- - ">="
|
|
21
17
|
- !ruby/object:Gem::Version
|
|
22
|
-
version: 1
|
|
18
|
+
version: '11.1'
|
|
23
19
|
type: :development
|
|
24
20
|
prerelease: false
|
|
25
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
26
22
|
requirements:
|
|
27
|
-
- - "~>"
|
|
28
|
-
- !ruby/object:Gem::Version
|
|
29
|
-
version: '1.0'
|
|
30
23
|
- - ">="
|
|
31
24
|
- !ruby/object:Gem::Version
|
|
32
|
-
version: 1
|
|
33
|
-
- !ruby/object:Gem::Dependency
|
|
34
|
-
name: byebug
|
|
35
|
-
requirement: !ruby/object:Gem::Requirement
|
|
36
|
-
requirements:
|
|
37
|
-
- - "~>"
|
|
38
|
-
- !ruby/object:Gem::Version
|
|
39
|
-
version: 8.2.2
|
|
40
|
-
type: :development
|
|
41
|
-
prerelease: false
|
|
42
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
43
|
-
requirements:
|
|
44
|
-
- - "~>"
|
|
45
|
-
- !ruby/object:Gem::Version
|
|
46
|
-
version: 8.2.2
|
|
25
|
+
version: '11.1'
|
|
47
26
|
- !ruby/object:Gem::Dependency
|
|
48
27
|
name: pry
|
|
49
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -64,76 +43,70 @@ dependencies:
|
|
|
64
43
|
requirements:
|
|
65
44
|
- - "~>"
|
|
66
45
|
- !ruby/object:Gem::Version
|
|
67
|
-
version: '0'
|
|
46
|
+
version: '13.0'
|
|
68
47
|
type: :development
|
|
69
48
|
prerelease: false
|
|
70
49
|
version_requirements: !ruby/object:Gem::Requirement
|
|
71
50
|
requirements:
|
|
72
51
|
- - "~>"
|
|
73
52
|
- !ruby/object:Gem::Version
|
|
74
|
-
version: '0'
|
|
53
|
+
version: '13.0'
|
|
75
54
|
- !ruby/object:Gem::Dependency
|
|
76
55
|
name: rspec
|
|
77
56
|
requirement: !ruby/object:Gem::Requirement
|
|
78
57
|
requirements:
|
|
79
58
|
- - "~>"
|
|
80
59
|
- !ruby/object:Gem::Version
|
|
81
|
-
version: '
|
|
60
|
+
version: '3.13'
|
|
82
61
|
type: :development
|
|
83
62
|
prerelease: false
|
|
84
63
|
version_requirements: !ruby/object:Gem::Requirement
|
|
85
64
|
requirements:
|
|
86
65
|
- - "~>"
|
|
87
66
|
- !ruby/object:Gem::Version
|
|
88
|
-
version: '
|
|
67
|
+
version: '3.13'
|
|
89
68
|
- !ruby/object:Gem::Dependency
|
|
90
69
|
name: sinatra
|
|
91
70
|
requirement: !ruby/object:Gem::Requirement
|
|
92
71
|
requirements:
|
|
93
72
|
- - "~>"
|
|
94
73
|
- !ruby/object:Gem::Version
|
|
95
|
-
version: '
|
|
74
|
+
version: '4.2'
|
|
96
75
|
type: :development
|
|
97
76
|
prerelease: false
|
|
98
77
|
version_requirements: !ruby/object:Gem::Requirement
|
|
99
78
|
requirements:
|
|
100
79
|
- - "~>"
|
|
101
80
|
- !ruby/object:Gem::Version
|
|
102
|
-
version: '
|
|
81
|
+
version: '4.2'
|
|
103
82
|
- !ruby/object:Gem::Dependency
|
|
104
83
|
name: tilt
|
|
105
84
|
requirement: !ruby/object:Gem::Requirement
|
|
106
85
|
requirements:
|
|
107
|
-
- - ">="
|
|
108
|
-
- !ruby/object:Gem::Version
|
|
109
|
-
version: 1.3.4
|
|
110
86
|
- - "~>"
|
|
111
87
|
- !ruby/object:Gem::Version
|
|
112
|
-
version: '
|
|
88
|
+
version: '2.0'
|
|
113
89
|
type: :development
|
|
114
90
|
prerelease: false
|
|
115
91
|
version_requirements: !ruby/object:Gem::Requirement
|
|
116
92
|
requirements:
|
|
117
|
-
- - ">="
|
|
118
|
-
- !ruby/object:Gem::Version
|
|
119
|
-
version: 1.3.4
|
|
120
93
|
- - "~>"
|
|
121
94
|
- !ruby/object:Gem::Version
|
|
122
|
-
version: '
|
|
95
|
+
version: '2.0'
|
|
123
96
|
- !ruby/object:Gem::Dependency
|
|
124
97
|
name: webmock
|
|
125
98
|
requirement: !ruby/object:Gem::Requirement
|
|
126
99
|
requirements:
|
|
127
100
|
- - "~>"
|
|
128
101
|
- !ruby/object:Gem::Version
|
|
129
|
-
version:
|
|
102
|
+
version: '3.0'
|
|
130
103
|
type: :development
|
|
131
104
|
prerelease: false
|
|
132
105
|
version_requirements: !ruby/object:Gem::Requirement
|
|
133
106
|
requirements:
|
|
134
107
|
- - "~>"
|
|
135
108
|
- !ruby/object:Gem::Version
|
|
136
|
-
version:
|
|
109
|
+
version: '3.0'
|
|
137
110
|
- !ruby/object:Gem::Dependency
|
|
138
111
|
name: mock_redis
|
|
139
112
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -303,7 +276,6 @@ homepage: https://getbridge.com
|
|
|
303
276
|
licenses:
|
|
304
277
|
- MIT
|
|
305
278
|
metadata: {}
|
|
306
|
-
post_install_message:
|
|
307
279
|
rdoc_options: []
|
|
308
280
|
require_paths:
|
|
309
281
|
- lib
|
|
@@ -318,8 +290,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
318
290
|
- !ruby/object:Gem::Version
|
|
319
291
|
version: '0'
|
|
320
292
|
requirements: []
|
|
321
|
-
rubygems_version: 3.
|
|
322
|
-
signing_key:
|
|
293
|
+
rubygems_version: 3.6.9
|
|
323
294
|
specification_version: 4
|
|
324
295
|
summary: Bridge API
|
|
325
296
|
test_files:
|