commonlit-clever-ruby 2.1.4 → 2.1.6.beta2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +3 -1
- data/Gemfile.lock +46 -41
- data/Makefile +1 -1
- data/README.md +943 -11
- data/clever-ruby.gemspec +3 -10
- data/commonlit-clever-ruby-2.1.6.beta1.gem +0 -0
- data/docs/AdminName.md +0 -1
- data/docs/BadRequest.md +0 -1
- data/docs/Contact.md +0 -1
- data/docs/ContactObject.md +0 -1
- data/docs/ContactResponse.md +0 -1
- data/docs/ContactsCreated.md +0 -1
- data/docs/ContactsDeleted.md +0 -1
- data/docs/ContactsResponse.md +0 -1
- data/docs/ContactsUpdated.md +0 -1
- data/docs/Course.md +0 -1
- data/docs/CourseObject.md +0 -1
- data/docs/CourseResponse.md +0 -1
- data/docs/CoursesCreated.md +0 -1
- data/docs/CoursesDeleted.md +0 -1
- data/docs/CoursesResponse.md +0 -1
- data/docs/CoursesUpdated.md +0 -1
- data/docs/Credentials.md +0 -1
- data/docs/DataApi.md +1 -69
- data/docs/District.md +0 -1
- data/docs/DistrictAdmin.md +0 -1
- data/docs/DistrictAdminObject.md +0 -1
- data/docs/DistrictAdminResponse.md +0 -1
- data/docs/DistrictAdminsResponse.md +0 -1
- data/docs/DistrictObject.md +0 -1
- data/docs/DistrictResponse.md +0 -1
- data/docs/DistrictadminsCreated.md +0 -1
- data/docs/DistrictadminsDeleted.md +0 -1
- data/docs/DistrictadminsUpdated.md +0 -1
- data/docs/DistrictsCreated.md +0 -1
- data/docs/DistrictsDeleted.md +0 -1
- data/docs/DistrictsResponse.md +0 -1
- data/docs/DistrictsUpdated.md +0 -1
- data/docs/Event.md +0 -1
- data/docs/EventResponse.md +0 -1
- data/docs/EventsApi.md +0 -3
- data/docs/EventsResponse.md +0 -1
- data/docs/InternalError.md +0 -1
- data/docs/Link.md +0 -1
- data/docs/Location.md +0 -1
- data/docs/Name.md +0 -1
- data/docs/NotFound.md +0 -1
- data/docs/Principal.md +0 -1
- data/docs/School.md +0 -1
- data/docs/SchoolAdmin.md +0 -1
- data/docs/SchoolAdminObject.md +0 -1
- data/docs/SchoolAdminResponse.md +0 -1
- data/docs/SchoolAdminsResponse.md +0 -1
- data/docs/SchoolEnrollment.md +0 -1
- data/docs/SchoolObject.md +0 -1
- data/docs/SchoolResponse.md +0 -1
- data/docs/SchooladminsCreated.md +0 -1
- data/docs/SchooladminsDeleted.md +0 -1
- data/docs/SchooladminsUpdated.md +0 -1
- data/docs/SchoolsCreated.md +0 -1
- data/docs/SchoolsDeleted.md +0 -1
- data/docs/SchoolsResponse.md +0 -1
- data/docs/SchoolsUpdated.md +0 -1
- data/docs/Section.md +0 -1
- data/docs/SectionObject.md +0 -1
- data/docs/SectionResponse.md +0 -1
- data/docs/SectionsCreated.md +0 -1
- data/docs/SectionsDeleted.md +0 -1
- data/docs/SectionsResponse.md +0 -1
- data/docs/SectionsUpdated.md +0 -1
- data/docs/Student.md +0 -1
- data/docs/StudentObject.md +0 -1
- data/docs/StudentResponse.md +0 -1
- data/docs/StudentsCreated.md +0 -1
- data/docs/StudentsDeleted.md +0 -1
- data/docs/StudentsResponse.md +0 -1
- data/docs/StudentsUpdated.md +0 -1
- data/docs/Teacher.md +0 -1
- data/docs/TeacherObject.md +0 -1
- data/docs/TeacherResponse.md +0 -1
- data/docs/TeachersCreated.md +0 -1
- data/docs/TeachersDeleted.md +0 -1
- data/docs/TeachersResponse.md +0 -1
- data/docs/TeachersUpdated.md +0 -1
- data/docs/Term.md +0 -1
- data/docs/TermObject.md +0 -1
- data/docs/TermResponse.md +0 -1
- data/docs/TermsCreated.md +0 -1
- data/docs/TermsDeleted.md +0 -1
- data/docs/TermsResponse.md +0 -1
- data/docs/TermsUpdated.md +0 -1
- data/full-v2.yml +2541 -0
- data/lib/clever-ruby/api/data_api.rb +836 -635
- data/lib/clever-ruby/api/events_api.rb +23 -18
- data/lib/clever-ruby/api_client.rb +1 -0
- data/lib/clever-ruby/api_error.rb +21 -2
- data/lib/clever-ruby/configuration.rb +3 -7
- data/lib/clever-ruby/models/admin_name.rb +44 -20
- data/lib/clever-ruby/models/bad_request.rb +40 -18
- data/lib/clever-ruby/models/contact.rb +73 -45
- data/lib/clever-ruby/models/contact_object.rb +40 -18
- data/lib/clever-ruby/models/contact_response.rb +40 -18
- data/lib/clever-ruby/models/contacts_response.rb +42 -20
- data/lib/clever-ruby/models/course.rb +48 -24
- data/lib/clever-ruby/models/course_object.rb +40 -18
- data/lib/clever-ruby/models/course_response.rb +40 -18
- data/lib/clever-ruby/models/courses_response.rb +42 -20
- data/lib/clever-ruby/models/credentials.rb +40 -18
- data/lib/clever-ruby/models/district.rb +75 -47
- data/lib/clever-ruby/models/district_admin.rb +49 -26
- data/lib/clever-ruby/models/district_admin_object.rb +40 -18
- data/lib/clever-ruby/models/district_admin_response.rb +40 -18
- data/lib/clever-ruby/models/district_admins_response.rb +42 -20
- data/lib/clever-ruby/models/district_object.rb +40 -18
- data/lib/clever-ruby/models/district_response.rb +40 -18
- data/lib/clever-ruby/models/districts_response.rb +42 -20
- data/lib/clever-ruby/models/event.rb +49 -22
- data/lib/clever-ruby/models/event_response.rb +40 -18
- data/lib/clever-ruby/models/events_response.rb +42 -20
- data/lib/clever-ruby/models/internal_error.rb +40 -18
- data/lib/clever-ruby/models/link.rb +45 -23
- data/lib/clever-ruby/models/location.rb +56 -28
- data/lib/clever-ruby/models/name.rb +47 -22
- data/lib/clever-ruby/models/not_found.rb +40 -18
- data/lib/clever-ruby/models/principal.rb +44 -20
- data/lib/clever-ruby/models/school.rb +81 -53
- data/lib/clever-ruby/models/school_admin.rb +59 -35
- data/lib/clever-ruby/models/school_admin_object.rb +40 -18
- data/lib/clever-ruby/models/school_admin_response.rb +40 -18
- data/lib/clever-ruby/models/school_admins_response.rb +42 -20
- data/lib/clever-ruby/models/school_enrollment.rb +44 -22
- data/lib/clever-ruby/models/school_object.rb +40 -18
- data/lib/clever-ruby/models/school_response.rb +40 -18
- data/lib/clever-ruby/models/schools_response.rb +42 -20
- data/lib/clever-ruby/models/section.rb +84 -55
- data/lib/clever-ruby/models/section_object.rb +40 -18
- data/lib/clever-ruby/models/section_response.rb +40 -18
- data/lib/clever-ruby/models/sections_response.rb +42 -20
- data/lib/clever-ruby/models/student.rb +121 -100
- data/lib/clever-ruby/models/student_object.rb +40 -18
- data/lib/clever-ruby/models/student_response.rb +40 -18
- data/lib/clever-ruby/models/students_response.rb +42 -20
- data/lib/clever-ruby/models/teacher.rb +69 -43
- data/lib/clever-ruby/models/teacher_object.rb +40 -18
- data/lib/clever-ruby/models/teacher_response.rb +40 -18
- data/lib/clever-ruby/models/teachers_response.rb +42 -20
- data/lib/clever-ruby/models/term.rb +51 -26
- data/lib/clever-ruby/models/term_object.rb +40 -18
- data/lib/clever-ruby/models/term_response.rb +40 -18
- data/lib/clever-ruby/models/terms_response.rb +42 -20
- data/lib/clever-ruby/version.rb +2 -3
- data/lib/clever-ruby.rb +1 -2
- data/override/README-extension.md +4 -5
- data/override/api_client.rb +1 -0
- data/override/override.sh +7 -5
- data/spec/api/data_api_spec.rb +671 -0
- data/spec/api/events_api_spec.rb +61 -0
- data/spec/api_client_spec.rb +243 -0
- data/spec/spec_helper.rb +26 -18
- metadata +34 -150
- data/commonlit-clever-ruby-2.1.3.gem +0 -0
- data/spec/events.json +0 -227
- data/tags +0 -1681
@@ -0,0 +1,61 @@
|
|
1
|
+
=begin
|
2
|
+
#Clever API
|
3
|
+
|
4
|
+
#The Clever API
|
5
|
+
|
6
|
+
OpenAPI spec version: 2.1.0
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.37
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
|
16
|
+
# Unit tests for Clever::EventsApi
|
17
|
+
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
18
|
+
# Please update as you see appropriate
|
19
|
+
describe 'EventsApi' do
|
20
|
+
before do
|
21
|
+
# run before each test
|
22
|
+
@instance = Clever::EventsApi.new
|
23
|
+
end
|
24
|
+
|
25
|
+
after do
|
26
|
+
# run after each test
|
27
|
+
end
|
28
|
+
|
29
|
+
describe 'test an instance of EventsApi' do
|
30
|
+
it 'should create an instance of EventsApi' do
|
31
|
+
expect(@instance).to be_instance_of(Clever::EventsApi)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# unit tests for get_event
|
36
|
+
# Returns the specific event
|
37
|
+
# @param id
|
38
|
+
# @param [Hash] opts the optional parameters
|
39
|
+
# @return [EventResponse]
|
40
|
+
describe 'get_event test' do
|
41
|
+
it 'should work' do
|
42
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
# unit tests for get_events
|
47
|
+
# Returns a list of events
|
48
|
+
# @param [Hash] opts the optional parameters
|
49
|
+
# @option opts [Integer] :limit
|
50
|
+
# @option opts [String] :starting_after
|
51
|
+
# @option opts [String] :ending_before
|
52
|
+
# @option opts [String] :school
|
53
|
+
# @option opts [Array<String>] :record_type
|
54
|
+
# @return [EventsResponse]
|
55
|
+
describe 'get_events test' do
|
56
|
+
it 'should work' do
|
57
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
end
|
@@ -0,0 +1,243 @@
|
|
1
|
+
=begin
|
2
|
+
#Clever API
|
3
|
+
|
4
|
+
#The Clever API
|
5
|
+
|
6
|
+
OpenAPI spec version: 2.1.0
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.37
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
|
15
|
+
describe Clever::ApiClient do
|
16
|
+
context 'initialization' do
|
17
|
+
context 'URL stuff' do
|
18
|
+
context 'host' do
|
19
|
+
it 'removes http from host' do
|
20
|
+
Clever.configure { |c| c.host = 'http://example.com' }
|
21
|
+
expect(Clever::Configuration.default.host).to eq('example.com')
|
22
|
+
end
|
23
|
+
|
24
|
+
it 'removes https from host' do
|
25
|
+
Clever.configure { |c| c.host = 'https://wookiee.com' }
|
26
|
+
expect(Clever::ApiClient.default.config.host).to eq('wookiee.com')
|
27
|
+
end
|
28
|
+
|
29
|
+
it 'removes trailing path from host' do
|
30
|
+
Clever.configure { |c| c.host = 'hobo.com/v4' }
|
31
|
+
expect(Clever::Configuration.default.host).to eq('hobo.com')
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
context 'base_path' do
|
36
|
+
it "prepends a slash to base_path" do
|
37
|
+
Clever.configure { |c| c.base_path = 'v4/dog' }
|
38
|
+
expect(Clever::Configuration.default.base_path).to eq('/v4/dog')
|
39
|
+
end
|
40
|
+
|
41
|
+
it "doesn't prepend a slash if one is already there" do
|
42
|
+
Clever.configure { |c| c.base_path = '/v4/dog' }
|
43
|
+
expect(Clever::Configuration.default.base_path).to eq('/v4/dog')
|
44
|
+
end
|
45
|
+
|
46
|
+
it "ends up as a blank string if nil" do
|
47
|
+
Clever.configure { |c| c.base_path = nil }
|
48
|
+
expect(Clever::Configuration.default.base_path).to eq('')
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
describe 'params_encoding in #build_request' do
|
55
|
+
let(:config) { Clever::Configuration.new }
|
56
|
+
let(:api_client) { Clever::ApiClient.new(config) }
|
57
|
+
|
58
|
+
it 'defaults to nil' do
|
59
|
+
expect(Clever::Configuration.default.params_encoding).to eq(nil)
|
60
|
+
expect(config.params_encoding).to eq(nil)
|
61
|
+
|
62
|
+
request = api_client.build_request(:get, '/test')
|
63
|
+
expect(request.options[:params_encoding]).to eq(nil)
|
64
|
+
end
|
65
|
+
|
66
|
+
it 'can be customized' do
|
67
|
+
config.params_encoding = :multi
|
68
|
+
request = api_client.build_request(:get, '/test')
|
69
|
+
expect(request.options[:params_encoding]).to eq(:multi)
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
describe 'timeout in #build_request' do
|
74
|
+
let(:config) { Clever::Configuration.new }
|
75
|
+
let(:api_client) { Clever::ApiClient.new(config) }
|
76
|
+
|
77
|
+
it 'defaults to 0' do
|
78
|
+
expect(Clever::Configuration.default.timeout).to eq(0)
|
79
|
+
expect(config.timeout).to eq(0)
|
80
|
+
|
81
|
+
request = api_client.build_request(:get, '/test')
|
82
|
+
expect(request.options[:timeout]).to eq(0)
|
83
|
+
end
|
84
|
+
|
85
|
+
it 'can be customized' do
|
86
|
+
config.timeout = 100
|
87
|
+
request = api_client.build_request(:get, '/test')
|
88
|
+
expect(request.options[:timeout]).to eq(100)
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
describe '#build_request' do
|
93
|
+
let(:config) { Clever::Configuration.new }
|
94
|
+
let(:api_client) { Clever::ApiClient.new(config) }
|
95
|
+
|
96
|
+
it 'does not send multipart to request' do
|
97
|
+
expect(Typhoeus::Request).to receive(:new).with(anything, hash_not_including(:multipart))
|
98
|
+
api_client.build_request(:get, '/test')
|
99
|
+
end
|
100
|
+
|
101
|
+
context 'when the content type is multipart' do
|
102
|
+
it 'sends multipart to request' do
|
103
|
+
expect(Typhoeus::Request).to receive(:new).with(anything, hash_including(headers: hash_including("Content-Type" => "multipart/form-data")))
|
104
|
+
api_client.build_request(:get, '/test', {header_params: { 'Content-Type' => 'multipart/form-data'}})
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
describe '#deserialize' do
|
110
|
+
it "handles Array<Integer>" do
|
111
|
+
api_client = Clever::ApiClient.new
|
112
|
+
headers = { 'Content-Type' => 'application/json' }
|
113
|
+
response = double('response', headers: headers, body: '[12, 34]')
|
114
|
+
data = api_client.deserialize(response, 'Array<Integer>')
|
115
|
+
expect(data).to be_instance_of(Array)
|
116
|
+
expect(data).to eq([12, 34])
|
117
|
+
end
|
118
|
+
|
119
|
+
it 'handles Array<Array<Integer>>' do
|
120
|
+
api_client = Clever::ApiClient.new
|
121
|
+
headers = { 'Content-Type' => 'application/json' }
|
122
|
+
response = double('response', headers: headers, body: '[[12, 34], [56]]')
|
123
|
+
data = api_client.deserialize(response, 'Array<Array<Integer>>')
|
124
|
+
expect(data).to be_instance_of(Array)
|
125
|
+
expect(data).to eq([[12, 34], [56]])
|
126
|
+
end
|
127
|
+
|
128
|
+
it 'handles Hash<String, String>' do
|
129
|
+
api_client = Clever::ApiClient.new
|
130
|
+
headers = { 'Content-Type' => 'application/json' }
|
131
|
+
response = double('response', headers: headers, body: '{"message": "Hello"}')
|
132
|
+
data = api_client.deserialize(response, 'Hash<String, String>')
|
133
|
+
expect(data).to be_instance_of(Hash)
|
134
|
+
expect(data).to eq(:message => 'Hello')
|
135
|
+
end
|
136
|
+
end
|
137
|
+
|
138
|
+
describe "#object_to_hash" do
|
139
|
+
it 'ignores nils and includes empty arrays' do
|
140
|
+
# uncomment below to test object_to_hash for model
|
141
|
+
# api_client = Clever::ApiClient.new
|
142
|
+
# _model = Clever::ModelName.new
|
143
|
+
# update the model attribute below
|
144
|
+
# _model.id = 1
|
145
|
+
# update the expected value (hash) below
|
146
|
+
# expected = {id: 1, name: '', tags: []}
|
147
|
+
# expect(api_client.object_to_hash(_model)).to eq(expected)
|
148
|
+
end
|
149
|
+
end
|
150
|
+
|
151
|
+
describe '#build_collection_param' do
|
152
|
+
let(:param) { ['aa', 'bb', 'cc'] }
|
153
|
+
let(:api_client) { Clever::ApiClient.new }
|
154
|
+
|
155
|
+
it 'works for csv' do
|
156
|
+
expect(api_client.build_collection_param(param, :csv)).to eq('aa,bb,cc')
|
157
|
+
end
|
158
|
+
|
159
|
+
it 'works for ssv' do
|
160
|
+
expect(api_client.build_collection_param(param, :ssv)).to eq('aa bb cc')
|
161
|
+
end
|
162
|
+
|
163
|
+
it 'works for tsv' do
|
164
|
+
expect(api_client.build_collection_param(param, :tsv)).to eq("aa\tbb\tcc")
|
165
|
+
end
|
166
|
+
|
167
|
+
it 'works for pipes' do
|
168
|
+
expect(api_client.build_collection_param(param, :pipes)).to eq('aa|bb|cc')
|
169
|
+
end
|
170
|
+
|
171
|
+
it 'works for multi' do
|
172
|
+
expect(api_client.build_collection_param(param, :multi)).to eq(['aa', 'bb', 'cc'])
|
173
|
+
end
|
174
|
+
|
175
|
+
it 'fails for invalid collection format' do
|
176
|
+
expect(proc { api_client.build_collection_param(param, :INVALID) }).to raise_error(RuntimeError, 'unknown collection format: :INVALID')
|
177
|
+
end
|
178
|
+
end
|
179
|
+
|
180
|
+
describe '#json_mime?' do
|
181
|
+
let(:api_client) { Clever::ApiClient.new }
|
182
|
+
|
183
|
+
it 'works' do
|
184
|
+
expect(api_client.json_mime?(nil)).to eq false
|
185
|
+
expect(api_client.json_mime?('')).to eq false
|
186
|
+
|
187
|
+
expect(api_client.json_mime?('application/json')).to eq true
|
188
|
+
expect(api_client.json_mime?('application/json; charset=UTF8')).to eq true
|
189
|
+
expect(api_client.json_mime?('APPLICATION/JSON')).to eq true
|
190
|
+
|
191
|
+
expect(api_client.json_mime?('application/xml')).to eq false
|
192
|
+
expect(api_client.json_mime?('text/plain')).to eq false
|
193
|
+
expect(api_client.json_mime?('application/jsonp')).to eq false
|
194
|
+
end
|
195
|
+
end
|
196
|
+
|
197
|
+
describe '#select_header_accept' do
|
198
|
+
let(:api_client) { Clever::ApiClient.new }
|
199
|
+
|
200
|
+
it 'works' do
|
201
|
+
expect(api_client.select_header_accept(nil)).to be_nil
|
202
|
+
expect(api_client.select_header_accept([])).to be_nil
|
203
|
+
|
204
|
+
expect(api_client.select_header_accept(['application/json'])).to eq('application/json')
|
205
|
+
expect(api_client.select_header_accept(['application/xml', 'application/json; charset=UTF8'])).to eq('application/json; charset=UTF8')
|
206
|
+
expect(api_client.select_header_accept(['APPLICATION/JSON', 'text/html'])).to eq('APPLICATION/JSON')
|
207
|
+
|
208
|
+
expect(api_client.select_header_accept(['application/xml'])).to eq('application/xml')
|
209
|
+
expect(api_client.select_header_accept(['text/html', 'application/xml'])).to eq('text/html,application/xml')
|
210
|
+
end
|
211
|
+
end
|
212
|
+
|
213
|
+
describe '#select_header_content_type' do
|
214
|
+
let(:api_client) { Clever::ApiClient.new }
|
215
|
+
|
216
|
+
it 'works' do
|
217
|
+
expect(api_client.select_header_content_type(nil)).to eq('application/json')
|
218
|
+
expect(api_client.select_header_content_type([])).to eq('application/json')
|
219
|
+
|
220
|
+
expect(api_client.select_header_content_type(['application/json'])).to eq('application/json')
|
221
|
+
expect(api_client.select_header_content_type(['application/xml', 'application/json; charset=UTF8'])).to eq('application/json; charset=UTF8')
|
222
|
+
expect(api_client.select_header_content_type(['APPLICATION/JSON', 'text/html'])).to eq('APPLICATION/JSON')
|
223
|
+
expect(api_client.select_header_content_type(['application/xml'])).to eq('application/xml')
|
224
|
+
expect(api_client.select_header_content_type(['text/plain', 'application/xml'])).to eq('text/plain')
|
225
|
+
end
|
226
|
+
end
|
227
|
+
|
228
|
+
describe '#sanitize_filename' do
|
229
|
+
let(:api_client) { Clever::ApiClient.new }
|
230
|
+
|
231
|
+
it 'works' do
|
232
|
+
expect(api_client.sanitize_filename('sun')).to eq('sun')
|
233
|
+
expect(api_client.sanitize_filename('sun.gif')).to eq('sun.gif')
|
234
|
+
expect(api_client.sanitize_filename('../sun.gif')).to eq('sun.gif')
|
235
|
+
expect(api_client.sanitize_filename('/var/tmp/sun.gif')).to eq('sun.gif')
|
236
|
+
expect(api_client.sanitize_filename('./sun.gif')).to eq('sun.gif')
|
237
|
+
expect(api_client.sanitize_filename('..\sun.gif')).to eq('sun.gif')
|
238
|
+
expect(api_client.sanitize_filename('\var\tmp\sun.gif')).to eq('sun.gif')
|
239
|
+
expect(api_client.sanitize_filename('c:\var\tmp\sun.gif')).to eq('sun.gif')
|
240
|
+
expect(api_client.sanitize_filename('.\sun.gif')).to eq('sun.gif')
|
241
|
+
end
|
242
|
+
end
|
243
|
+
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,4 +1,19 @@
|
|
1
|
-
|
1
|
+
=begin
|
2
|
+
#Clever API
|
3
|
+
|
4
|
+
#The Clever API
|
5
|
+
|
6
|
+
OpenAPI spec version: 2.1.0
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.37
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
# load the gem
|
14
|
+
require 'clever-ruby'
|
15
|
+
|
16
|
+
# The following was generated by the `rspec --init` command. Conventionally, all
|
2
17
|
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
3
18
|
# The generated `.rspec` file contains `--require spec_helper` which will cause
|
4
19
|
# this file to always be loaded, without a need to explicitly require it in any
|
@@ -12,10 +27,10 @@
|
|
12
27
|
# the additional setup, and require it from the spec files that actually need
|
13
28
|
# it.
|
14
29
|
#
|
30
|
+
# The `.rspec` file also contains a few flags that are not defaults but that
|
31
|
+
# users commonly want.
|
32
|
+
#
|
15
33
|
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
16
|
-
|
17
|
-
require "clever-ruby"
|
18
|
-
|
19
34
|
RSpec.configure do |config|
|
20
35
|
# rspec-expectations config goes here. You can use an alternate
|
21
36
|
# assertion/expectation library such as wrong or the stdlib/minitest
|
@@ -40,22 +55,15 @@ RSpec.configure do |config|
|
|
40
55
|
mocks.verify_partial_doubles = true
|
41
56
|
end
|
42
57
|
|
43
|
-
# This option will default to `:apply_to_host_groups` in RSpec 4 (and will
|
44
|
-
# have no way to turn it off -- the option exists only for backwards
|
45
|
-
# compatibility in RSpec 3). It causes shared context metadata to be
|
46
|
-
# inherited by the metadata hash of host groups and examples, rather than
|
47
|
-
# triggering implicit auto-inclusion in groups with matching metadata.
|
48
|
-
config.shared_context_metadata_behavior = :apply_to_host_groups
|
49
|
-
|
50
58
|
# The settings below are suggested to provide a good initial experience
|
51
59
|
# with RSpec, but feel free to customize to your heart's content.
|
52
60
|
=begin
|
53
|
-
#
|
54
|
-
# you care about by tagging them with
|
55
|
-
# is tagged with `:focus`, all examples
|
56
|
-
#
|
57
|
-
|
58
|
-
config.
|
61
|
+
# These two settings work together to allow you to limit a spec run
|
62
|
+
# to individual examples or groups you care about by tagging them with
|
63
|
+
# `:focus` metadata. When nothing is tagged with `:focus`, all examples
|
64
|
+
# get run.
|
65
|
+
config.filter_run :focus
|
66
|
+
config.run_all_when_everything_filtered = true
|
59
67
|
|
60
68
|
# Allows RSpec to persist some state between runs in order to support
|
61
69
|
# the `--only-failures` and `--next-failure` CLI options. We recommend
|
@@ -80,7 +88,7 @@ RSpec.configure do |config|
|
|
80
88
|
# Use the documentation formatter for detailed output,
|
81
89
|
# unless a formatter has already been configured
|
82
90
|
# (e.g. via a command-line flag).
|
83
|
-
config.default_formatter =
|
91
|
+
config.default_formatter = 'doc'
|
84
92
|
end
|
85
93
|
|
86
94
|
# Print the 10 slowest examples and example groups at the
|
metadata
CHANGED
@@ -1,215 +1,95 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: commonlit-clever-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.6.beta2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Swagger-Codegen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: typhoeus
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '1.0'
|
20
|
-
- - ">="
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: 1.0.1
|
23
|
-
type: :runtime
|
24
|
-
prerelease: false
|
25
|
-
version_requirements: !ruby/object:Gem::Requirement
|
26
|
-
requirements:
|
27
|
-
- - "~>"
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: '1.0'
|
30
|
-
- - ">="
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: 1.0.1
|
33
|
-
- !ruby/object:Gem::Dependency
|
34
|
-
name: json
|
35
|
-
requirement: !ruby/object:Gem::Requirement
|
36
|
-
requirements:
|
37
|
-
- - ">="
|
38
|
-
- !ruby/object:Gem::Version
|
39
|
-
version: 2.1.0
|
40
|
-
- - "~>"
|
41
|
-
- !ruby/object:Gem::Version
|
42
|
-
version: '2.1'
|
43
|
-
type: :runtime
|
44
|
-
prerelease: false
|
45
|
-
version_requirements: !ruby/object:Gem::Requirement
|
46
|
-
requirements:
|
47
|
-
- - ">="
|
48
|
-
- !ruby/object:Gem::Version
|
49
|
-
version: 2.1.0
|
50
|
-
- - "~>"
|
51
|
-
- !ruby/object:Gem::Version
|
52
|
-
version: '2.1'
|
53
13
|
- !ruby/object:Gem::Dependency
|
54
14
|
name: addressable
|
55
15
|
requirement: !ruby/object:Gem::Requirement
|
56
16
|
requirements:
|
57
|
-
- - ">="
|
58
|
-
- !ruby/object:Gem::Version
|
59
|
-
version: 2.3.0
|
60
17
|
- - "~>"
|
61
18
|
- !ruby/object:Gem::Version
|
62
19
|
version: '2.3'
|
63
|
-
type: :runtime
|
64
|
-
prerelease: false
|
65
|
-
version_requirements: !ruby/object:Gem::Requirement
|
66
|
-
requirements:
|
67
20
|
- - ">="
|
68
21
|
- !ruby/object:Gem::Version
|
69
22
|
version: 2.3.0
|
70
|
-
|
71
|
-
- !ruby/object:Gem::Version
|
72
|
-
version: '2.3'
|
73
|
-
- !ruby/object:Gem::Dependency
|
74
|
-
name: rspec
|
75
|
-
requirement: !ruby/object:Gem::Requirement
|
76
|
-
requirements:
|
77
|
-
- - ">="
|
78
|
-
- !ruby/object:Gem::Version
|
79
|
-
version: 3.6.0
|
80
|
-
- - "~>"
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '3.6'
|
83
|
-
type: :development
|
84
|
-
prerelease: false
|
85
|
-
version_requirements: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - ">="
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: 3.6.0
|
90
|
-
- - "~>"
|
91
|
-
- !ruby/object:Gem::Version
|
92
|
-
version: '3.6'
|
93
|
-
- !ruby/object:Gem::Dependency
|
94
|
-
name: vcr
|
95
|
-
requirement: !ruby/object:Gem::Requirement
|
96
|
-
requirements:
|
97
|
-
- - "~>"
|
98
|
-
- !ruby/object:Gem::Version
|
99
|
-
version: '3.0'
|
100
|
-
- - ">="
|
101
|
-
- !ruby/object:Gem::Version
|
102
|
-
version: 3.0.1
|
103
|
-
type: :development
|
104
|
-
prerelease: false
|
105
|
-
version_requirements: !ruby/object:Gem::Requirement
|
106
|
-
requirements:
|
107
|
-
- - "~>"
|
108
|
-
- !ruby/object:Gem::Version
|
109
|
-
version: '3.0'
|
110
|
-
- - ">="
|
111
|
-
- !ruby/object:Gem::Version
|
112
|
-
version: 3.0.1
|
113
|
-
- !ruby/object:Gem::Dependency
|
114
|
-
name: webmock
|
115
|
-
requirement: !ruby/object:Gem::Requirement
|
116
|
-
requirements:
|
117
|
-
- - "~>"
|
118
|
-
- !ruby/object:Gem::Version
|
119
|
-
version: '1.24'
|
120
|
-
- - ">="
|
121
|
-
- !ruby/object:Gem::Version
|
122
|
-
version: 1.24.3
|
123
|
-
type: :development
|
124
|
-
prerelease: false
|
125
|
-
version_requirements: !ruby/object:Gem::Requirement
|
126
|
-
requirements:
|
127
|
-
- - "~>"
|
128
|
-
- !ruby/object:Gem::Version
|
129
|
-
version: '1.24'
|
130
|
-
- - ">="
|
131
|
-
- !ruby/object:Gem::Version
|
132
|
-
version: 1.24.3
|
133
|
-
- !ruby/object:Gem::Dependency
|
134
|
-
name: autotest
|
135
|
-
requirement: !ruby/object:Gem::Requirement
|
136
|
-
requirements:
|
137
|
-
- - "~>"
|
138
|
-
- !ruby/object:Gem::Version
|
139
|
-
version: '4.4'
|
140
|
-
- - ">="
|
141
|
-
- !ruby/object:Gem::Version
|
142
|
-
version: 4.4.6
|
143
|
-
type: :development
|
23
|
+
type: :runtime
|
144
24
|
prerelease: false
|
145
25
|
version_requirements: !ruby/object:Gem::Requirement
|
146
26
|
requirements:
|
147
27
|
- - "~>"
|
148
28
|
- !ruby/object:Gem::Version
|
149
|
-
version: '
|
29
|
+
version: '2.3'
|
150
30
|
- - ">="
|
151
31
|
- !ruby/object:Gem::Version
|
152
|
-
version:
|
32
|
+
version: 2.3.0
|
153
33
|
- !ruby/object:Gem::Dependency
|
154
|
-
name:
|
34
|
+
name: typhoeus
|
155
35
|
requirement: !ruby/object:Gem::Requirement
|
156
36
|
requirements:
|
157
37
|
- - "~>"
|
158
38
|
- !ruby/object:Gem::Version
|
159
|
-
version: '
|
39
|
+
version: '1.0'
|
160
40
|
- - ">="
|
161
41
|
- !ruby/object:Gem::Version
|
162
|
-
version:
|
163
|
-
type: :
|
42
|
+
version: 1.0.1
|
43
|
+
type: :runtime
|
164
44
|
prerelease: false
|
165
45
|
version_requirements: !ruby/object:Gem::Requirement
|
166
46
|
requirements:
|
167
47
|
- - "~>"
|
168
48
|
- !ruby/object:Gem::Version
|
169
|
-
version: '
|
49
|
+
version: '1.0'
|
170
50
|
- - ">="
|
171
51
|
- !ruby/object:Gem::Version
|
172
|
-
version:
|
52
|
+
version: 1.0.1
|
173
53
|
- !ruby/object:Gem::Dependency
|
174
|
-
name:
|
54
|
+
name: json
|
175
55
|
requirement: !ruby/object:Gem::Requirement
|
176
56
|
requirements:
|
177
57
|
- - "~>"
|
178
58
|
- !ruby/object:Gem::Version
|
179
|
-
version: '
|
59
|
+
version: '2.1'
|
180
60
|
- - ">="
|
181
61
|
- !ruby/object:Gem::Version
|
182
|
-
version:
|
183
|
-
type: :
|
62
|
+
version: 2.1.0
|
63
|
+
type: :runtime
|
184
64
|
prerelease: false
|
185
65
|
version_requirements: !ruby/object:Gem::Requirement
|
186
66
|
requirements:
|
187
67
|
- - "~>"
|
188
68
|
- !ruby/object:Gem::Version
|
189
|
-
version: '
|
69
|
+
version: '2.1'
|
190
70
|
- - ">="
|
191
71
|
- !ruby/object:Gem::Version
|
192
|
-
version:
|
72
|
+
version: 2.1.0
|
193
73
|
- !ruby/object:Gem::Dependency
|
194
|
-
name:
|
74
|
+
name: rspec
|
195
75
|
requirement: !ruby/object:Gem::Requirement
|
196
76
|
requirements:
|
197
77
|
- - "~>"
|
198
78
|
- !ruby/object:Gem::Version
|
199
|
-
version: '
|
79
|
+
version: '3.6'
|
200
80
|
- - ">="
|
201
81
|
- !ruby/object:Gem::Version
|
202
|
-
version:
|
82
|
+
version: 3.6.0
|
203
83
|
type: :development
|
204
84
|
prerelease: false
|
205
85
|
version_requirements: !ruby/object:Gem::Requirement
|
206
86
|
requirements:
|
207
87
|
- - "~>"
|
208
88
|
- !ruby/object:Gem::Version
|
209
|
-
version: '
|
89
|
+
version: '3.6'
|
210
90
|
- - ">="
|
211
91
|
- !ruby/object:Gem::Version
|
212
|
-
version:
|
92
|
+
version: 3.6.0
|
213
93
|
description: The Clever API
|
214
94
|
email:
|
215
95
|
- ''
|
@@ -225,7 +105,7 @@ files:
|
|
225
105
|
- README.md
|
226
106
|
- Rakefile
|
227
107
|
- clever-ruby.gemspec
|
228
|
-
- commonlit-clever-ruby-2.1.
|
108
|
+
- commonlit-clever-ruby-2.1.6.beta1.gem
|
229
109
|
- docs/AdminName.md
|
230
110
|
- docs/BadRequest.md
|
231
111
|
- docs/Contact.md
|
@@ -311,6 +191,7 @@ files:
|
|
311
191
|
- docs/TermsDeleted.md
|
312
192
|
- docs/TermsResponse.md
|
313
193
|
- docs/TermsUpdated.md
|
194
|
+
- full-v2.yml
|
314
195
|
- git_push.sh
|
315
196
|
- lib/clever-ruby.rb
|
316
197
|
- lib/clever-ruby/api/data_api.rb
|
@@ -436,9 +317,10 @@ files:
|
|
436
317
|
- override/models/terms_updated.rb
|
437
318
|
- override/override.sh
|
438
319
|
- sample/sample.rb
|
439
|
-
- spec/
|
320
|
+
- spec/api/data_api_spec.rb
|
321
|
+
- spec/api/events_api_spec.rb
|
322
|
+
- spec/api_client_spec.rb
|
440
323
|
- spec/spec_helper.rb
|
441
|
-
- tags
|
442
324
|
homepage: https://github.com/swagger-api/swagger-codegen
|
443
325
|
licenses:
|
444
326
|
- Unlicense
|
@@ -451,17 +333,19 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
451
333
|
requirements:
|
452
334
|
- - ">="
|
453
335
|
- !ruby/object:Gem::Version
|
454
|
-
version: '
|
336
|
+
version: '1.9'
|
455
337
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
456
338
|
requirements:
|
457
|
-
- - "
|
339
|
+
- - ">"
|
458
340
|
- !ruby/object:Gem::Version
|
459
|
-
version:
|
341
|
+
version: 1.3.1
|
460
342
|
requirements: []
|
461
|
-
rubygems_version: 3.
|
343
|
+
rubygems_version: 3.1.6
|
462
344
|
signing_key:
|
463
345
|
specification_version: 4
|
464
346
|
summary: Clever API Ruby Gem
|
465
347
|
test_files:
|
466
|
-
- spec/
|
348
|
+
- spec/api/data_api_spec.rb
|
349
|
+
- spec/api/events_api_spec.rb
|
350
|
+
- spec/api_client_spec.rb
|
467
351
|
- spec/spec_helper.rb
|
Binary file
|