restforce 4.0.0 → 5.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +9 -9
  3. data/.github/ISSUE_TEMPLATE/unhandled-salesforce-error.md +17 -0
  4. data/.rubocop.yml +4 -3
  5. data/.rubocop_todo.yml +2 -2
  6. data/CHANGELOG.md +36 -0
  7. data/CONTRIBUTING.md +1 -1
  8. data/Gemfile +1 -1
  9. data/README.md +71 -33
  10. data/UPGRADING.md +38 -0
  11. data/lib/restforce.rb +11 -13
  12. data/lib/restforce/collection.rb +5 -0
  13. data/lib/restforce/concerns/api.rb +1 -1
  14. data/lib/restforce/concerns/authentication.rb +10 -0
  15. data/lib/restforce/concerns/base.rb +2 -0
  16. data/lib/restforce/concerns/caching.rb +7 -0
  17. data/lib/restforce/concerns/connection.rb +3 -3
  18. data/lib/restforce/concerns/streaming.rb +22 -7
  19. data/lib/restforce/config.rb +6 -0
  20. data/lib/restforce/error_code.rb +406 -0
  21. data/lib/restforce/file_part.rb +24 -0
  22. data/lib/restforce/mash.rb +1 -1
  23. data/lib/restforce/middleware/authentication.rb +7 -3
  24. data/lib/restforce/middleware/authentication/jwt_bearer.rb +38 -0
  25. data/lib/restforce/middleware/caching.rb +1 -1
  26. data/lib/restforce/middleware/instance_url.rb +1 -1
  27. data/lib/restforce/middleware/raise_error.rb +3 -4
  28. data/lib/restforce/version.rb +1 -1
  29. data/restforce.gemspec +14 -14
  30. data/spec/fixtures/test_private.key +27 -0
  31. data/spec/integration/abstract_client_spec.rb +18 -6
  32. data/spec/spec_helper.rb +14 -1
  33. data/spec/support/fixture_helpers.rb +1 -3
  34. data/spec/unit/collection_spec.rb +18 -0
  35. data/spec/unit/concerns/api_spec.rb +1 -1
  36. data/spec/unit/concerns/authentication_spec.rb +35 -0
  37. data/spec/unit/concerns/caching_spec.rb +26 -0
  38. data/spec/unit/concerns/connection_spec.rb +2 -2
  39. data/spec/unit/concerns/streaming_spec.rb +58 -30
  40. data/spec/unit/error_code_spec.rb +61 -0
  41. data/spec/unit/mash_spec.rb +5 -0
  42. data/spec/unit/middleware/authentication/jwt_bearer_spec.rb +62 -0
  43. data/spec/unit/middleware/authentication_spec.rb +27 -4
  44. data/spec/unit/middleware/raise_error_spec.rb +19 -10
  45. data/spec/unit/signed_request_spec.rb +1 -1
  46. data/spec/unit/sobject_spec.rb +2 -5
  47. metadata +41 -31
  48. data/lib/restforce/upload_io.rb +0 -9
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'faraday/upload_io'
4
-
5
- module Restforce
6
- UploadIO = Faraday::UploadIO
7
- end
8
-
9
- require 'restforce/patches/parts' unless Parts::Part.method(:new).arity.abs == 4