kosapi_client 0.5.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +22 -0
  3. data/README.md +89 -0
  4. data/kosapi_client.gemspec +38 -0
  5. data/lib/kosapi_client/api_client.rb +1 -0
  6. data/lib/kosapi_client/entity/division.rb +13 -0
  7. data/lib/kosapi_client/entity/exam.rb +3 -1
  8. data/lib/kosapi_client/entity/id.rb +0 -1
  9. data/lib/kosapi_client/entity/parallel.rb +0 -1
  10. data/lib/kosapi_client/entity.rb +1 -0
  11. data/lib/kosapi_client/oauth2_http_adapter.rb +9 -4
  12. data/lib/kosapi_client/request_builder.rb +0 -1
  13. data/lib/kosapi_client/resource/course_events_builder.rb +1 -1
  14. data/lib/kosapi_client/resource/courses_builder.rb +7 -0
  15. data/lib/kosapi_client/resource/exams_builder.rb +1 -1
  16. data/lib/kosapi_client/resource/parallels_builder.rb +0 -1
  17. data/lib/kosapi_client/version.rb +1 -1
  18. metadata +25 -99
  19. data/bin/console +0 -15
  20. data/bin/setup +0 -23
  21. data/spec/integration/course_events_spec.rb +0 -13
  22. data/spec/integration/courses_spec.rb +0 -28
  23. data/spec/integration/exams_spec.rb +0 -20
  24. data/spec/integration/parallels_spec.rb +0 -68
  25. data/spec/kosapi_client/api_client_spec.rb +0 -22
  26. data/spec/kosapi_client/configuration_spec.rb +0 -30
  27. data/spec/kosapi_client/entity/base_entity_spec.rb +0 -20
  28. data/spec/kosapi_client/entity/base_person_spec.rb +0 -19
  29. data/spec/kosapi_client/entity/boolean_spec.rb +0 -23
  30. data/spec/kosapi_client/entity/course_event_spec.rb +0 -30
  31. data/spec/kosapi_client/entity/data_mappings_spec.rb +0 -154
  32. data/spec/kosapi_client/entity/enum_spec.rb +0 -20
  33. data/spec/kosapi_client/entity/id_spec.rb +0 -13
  34. data/spec/kosapi_client/entity/link_spec.rb +0 -89
  35. data/spec/kosapi_client/entity/ml_string_spec.rb +0 -52
  36. data/spec/kosapi_client/entity/parallel_spec.rb +0 -18
  37. data/spec/kosapi_client/entity/result_page_spec.rb +0 -42
  38. data/spec/kosapi_client/entity/teacher_timetable_slot_spec.rb +0 -19
  39. data/spec/kosapi_client/entity/timetable_slot_spec.rb +0 -22
  40. data/spec/kosapi_client/hash_utils_spec.rb +0 -20
  41. data/spec/kosapi_client/http_client_spec.rb +0 -30
  42. data/spec/kosapi_client/kosapi_client_spec.rb +0 -57
  43. data/spec/kosapi_client/kosapi_response_spec.rb +0 -96
  44. data/spec/kosapi_client/oauth2_http_adapter_spec.rb +0 -25
  45. data/spec/kosapi_client/request_builder_delegator_spec.rb +0 -72
  46. data/spec/kosapi_client/request_builder_spec.rb +0 -80
  47. data/spec/kosapi_client/resource/courses_builder_spec.rb +0 -20
  48. data/spec/kosapi_client/resource/parallels_builder_spec.rb +0 -49
  49. data/spec/kosapi_client/resource_mapper_spec.rb +0 -33
  50. data/spec/kosapi_client/response_converter_spec.rb +0 -58
  51. data/spec/kosapi_client/response_links_spec.rb +0 -52
  52. data/spec/kosapi_client/response_preprocessor_spec.rb +0 -51
  53. data/spec/kosapi_client/url_builder_spec.rb +0 -44
  54. data/spec/spec_helper.rb +0 -40
  55. data/spec/support/client_helpers.rb +0 -11
  56. data/spec/support/helpers.rb +0 -7
  57. data/spec/support/shared_examples_for_fluent_api.rb +0 -7
data/spec/spec_helper.rb DELETED
@@ -1,40 +0,0 @@
1
- require 'dotenv'
2
- Dotenv.load
3
-
4
- if ENV['CODECLIMATE_REPO_TOKEN']
5
- require 'simplecov'
6
- SimpleCov.start
7
- end
8
-
9
- if ENV['TRAVIS']
10
- require 'coveralls'
11
- Coveralls.wear!
12
- end
13
-
14
- require 'rspec/given'
15
- require 'kosapi_client'
16
-
17
- Dir['./spec/support/**/*.rb'].sort.each { |f| require f }
18
-
19
- RSpec.configure do |config|
20
- #config.treat_symbols_as_metadata_keys_with_true_values = true
21
- config.extend Helpers
22
- config.include ClientHelpers
23
- end
24
-
25
- require 'vcr'
26
-
27
- VCR.configure do |c|
28
- c.configure_rspec_metadata!
29
- c.hook_into :faraday
30
- c.default_cassette_options = {
31
- #serialize_with: :json,
32
- # TODO: Track down UTF-8 issue and remove
33
- #preserve_exact_body_bytes: true,
34
- #decode_compressed_response: true,
35
- record: ENV['TRAVIS'] ? :none : :once
36
- }
37
- c.cassette_library_dir = 'spec/cassettes'
38
- end
39
-
40
- VCR.turn_off! ignore_cassettes: true if ENV['TRAVIS']
@@ -1,11 +0,0 @@
1
- module ClientHelpers
2
-
3
- def create_kosapi_client
4
- credentials = {
5
- client_id: ENV['KOSAPI_OAUTH_CLIENT_ID'],
6
- client_secret: ENV['KOSAPI_OAUTH_CLIENT_SECRET']
7
- }
8
- KOSapiClient.new(credentials)
9
- end
10
-
11
- end
@@ -1,7 +0,0 @@
1
- module Helpers
2
-
3
- def method_name(name=description)
4
- name[1..-1].to_sym
5
- end
6
-
7
- end
@@ -1,7 +0,0 @@
1
- shared_examples_for 'fluent api command' do |method, *args|
2
-
3
- it 'returns self' do
4
- expect(builder.send(method, *args)).to be builder
5
- end
6
-
7
- end