pactas_itero 0.7.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/.codeclimate.yml +15 -0
  3. data/.rubocop.yml +765 -0
  4. data/CHANGELOG.md +15 -0
  5. data/Gemfile +2 -0
  6. data/Rakefile +3 -0
  7. data/lib/pactas_itero/api/contracts.rb +7 -0
  8. data/lib/pactas_itero/api/customers.rb +2 -0
  9. data/lib/pactas_itero/api/invoices.rb +2 -0
  10. data/lib/pactas_itero/api/oauth.rb +2 -0
  11. data/lib/pactas_itero/api/orders.rb +2 -0
  12. data/lib/pactas_itero/api/rated_items.rb +11 -2
  13. data/lib/pactas_itero/api.rb +2 -0
  14. data/lib/pactas_itero/client.rb +11 -9
  15. data/lib/pactas_itero/configurable.rb +8 -6
  16. data/lib/pactas_itero/default.rb +7 -5
  17. data/lib/pactas_itero/error.rb +39 -35
  18. data/lib/pactas_itero/ext/hash/camelize_keys.rb +6 -3
  19. data/lib/pactas_itero/response/raise_error.rb +3 -1
  20. data/lib/pactas_itero/version.rb +3 -1
  21. data/lib/pactas_itero.rb +3 -1
  22. metadata +11 -83
  23. data/Gemfile.lock +0 -112
  24. data/bin/setup +0 -7
  25. data/pactas_itero.gemspec +0 -37
  26. data/spec/fixtures/bearer_token.json +0 -5
  27. data/spec/fixtures/commit_order_response.json +0 -50
  28. data/spec/fixtures/contract.json +0 -46
  29. data/spec/fixtures/contract_cancellation_preview_response.json +0 -73
  30. data/spec/fixtures/contract_changes.json +0 -22
  31. data/spec/fixtures/contract_termination_response.json +0 -79
  32. data/spec/fixtures/contracts.json +0 -48
  33. data/spec/fixtures/create_order_response.json +0 -17
  34. data/spec/fixtures/create_rated_item.json +0 -8
  35. data/spec/fixtures/customer.json +0 -23
  36. data/spec/fixtures/customers.json +0 -40
  37. data/spec/fixtures/invoice.json +0 -22
  38. data/spec/fixtures/invoice_download.pdf +0 -0
  39. data/spec/fixtures/invoices.json +0 -46
  40. data/spec/fixtures/order.json +0 -15
  41. data/spec/fixtures/payment_transaction.json +0 -37
  42. data/spec/fixtures/rated_items.json +0 -12
  43. data/spec/fixtures/self_service_token.json +0 -6
  44. data/spec/pactas_itero/api/contracts_spec.rb +0 -193
  45. data/spec/pactas_itero/api/customers_spec.rb +0 -231
  46. data/spec/pactas_itero/api/invoices_spec.rb +0 -103
  47. data/spec/pactas_itero/api/oauth_spec.rb +0 -44
  48. data/spec/pactas_itero/api/orders_spec.rb +0 -102
  49. data/spec/pactas_itero/api/payment_transactions_spec.rb +0 -66
  50. data/spec/pactas_itero/api/rated_items_spec.rb +0 -113
  51. data/spec/pactas_itero/client_spec.rb +0 -312
  52. data/spec/pactas_itero_spec.rb +0 -37
  53. data/spec/spec_helper.rb +0 -100
  54. data/yarn-error.log +0 -43
data/spec/spec_helper.rb DELETED
@@ -1,100 +0,0 @@
1
- require "simplecov"
2
-
3
- SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new(
4
- SimpleCov::Formatter::HTMLFormatter,
5
- )
6
-
7
- SimpleCov.start do
8
- add_filter "/spec/"
9
- add_filter "/vendor/bundle"
10
- # minimum_coverage(99.15)
11
- refuse_coverage_drop
12
- end
13
-
14
- require "json"
15
- require "pactas_itero"
16
- require "rspec"
17
- require "webmock/rspec"
18
-
19
- WebMock.disable_net_connect!
20
-
21
- RSpec.configure do |config|
22
- config.raise_errors_for_deprecations!
23
- # Disable should syntax
24
- # https://www.relishapp.com/rspec/rspec-expectations/docs/syntax-configuration
25
- config.expect_with :rspec do |c|
26
- c.syntax = :expect
27
- end
28
-
29
- # had to override backtrace_exclusion_patterns because of current
30
- # directory structure. once this gem has been extracted into a separate
31
- # respository this can be removed
32
- config.backtrace_exclusion_patterns = [
33
- /\/lib\d*\/ruby\//,
34
- /org\/jruby\//,
35
- /bin\//,
36
- /vendor\/bundle\/(.*)\/gems\//,
37
- /spec\/spec_helper.rb/,
38
- /lib\/rspec\/(core|expectations|matchers|mocks)/,
39
- ]
40
-
41
- config.after(:each) do
42
- PactasItero.reset!
43
- end
44
- end
45
-
46
- def fixture_path
47
- File.expand_path("fixtures", __dir__)
48
- end
49
-
50
- def fixture(file)
51
- File.new(fixture_path + "/" + file)
52
- end
53
-
54
- def pactas_api_endpoint
55
- PactasItero::Default::SANDBOX_API_ENDPOINT
56
- end
57
-
58
- def pactas_api_url(url)
59
- /^http/.match?(url) ? url : "#{pactas_api_endpoint}#{url}"
60
- end
61
-
62
- def a_delete(path)
63
- a_request(:delete, pactas_api_url(path))
64
- end
65
-
66
- def a_get(path)
67
- a_request(:get, pactas_api_url(path))
68
- end
69
-
70
- def a_post(path)
71
- a_request(:post, pactas_api_url(path))
72
- end
73
-
74
- def a_put(path)
75
- a_request(:put, pactas_api_url(path))
76
- end
77
-
78
- def stub_delete(path)
79
- stub_request(:delete, pactas_api_url(path))
80
- end
81
-
82
- def stub_get(path)
83
- stub_request(:get, pactas_api_url(path))
84
- end
85
-
86
- def stub_head(path)
87
- stub_request(:head, pactas_api_url(path))
88
- end
89
-
90
- def stub_post(path)
91
- stub_request(:post, pactas_api_url(path))
92
- end
93
-
94
- def stub_put(path)
95
- stub_request(:put, pactas_api_url(path))
96
- end
97
-
98
- def stub_patch(path)
99
- stub_request(:patch, pactas_api_url(path))
100
- end
data/yarn-error.log DELETED
@@ -1,43 +0,0 @@
1
- Arguments:
2
- /Users/martenklitzke/.nvm/versions/node/v14.18.2/bin/node /opt/homebrew/Cellar/yarn/1.22.17_2/libexec/bin/yarn.js add standard-version --dev
3
-
4
- PATH:
5
- /Users/martenklitzke/.nvm/versions/node/v14.18.2/bin:/opt/homebrew/Cellar/zplug/2.4.2/bin:/opt/homebrew/opt/python@2/libexec/bin:./node_modules/.bin:./bin:/usr/local/share/npm/bin:/bin:/Users/martenklitzke/bin:/opt/homebrew/bin:/usr/local/sbin:/opt/homebrew/var/rbenv/shims:/opt/homebrew/var/rbenv/bin:/Users/martenklitzke/.nvm/versions/node/v14.18.2/bin:/Users/martenklitzke/go/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/usr/local/MacGPG2/bin:/usr/local/opt/android-sdk/tools:/usr/local/opt/android-sdk/platform-tools:/Users/martenklitzke/Applications/bin:/usr/local/go/bin:/Users/martenklitzke/.composer/vendor/bin
6
-
7
- Yarn version:
8
- 1.22.17
9
-
10
- Node version:
11
- 14.18.2
12
-
13
- Platform:
14
- darwin arm64
15
-
16
- Trace:
17
- SyntaxError: /Users/martenklitzke/dev/billwerk/package.json: Unexpected token
18
- in JSON at position 112
19
- at JSON.parse (<anonymous>)
20
- at /opt/homebrew/Cellar/yarn/1.22.17_2/libexec/lib/cli.js:1625:59
21
- at Generator.next (<anonymous>)
22
- at step (/opt/homebrew/Cellar/yarn/1.22.17_2/libexec/lib/cli.js:310:30)
23
- at /opt/homebrew/Cellar/yarn/1.22.17_2/libexec/lib/cli.js:321:13
24
-
25
- npm manifest:
26
- {
27
- "name": "billwerk",
28
- "version": "0.6.0",
29
- "description": "Billwerk provides a client mapping for accessing
30
- the Pactas Itero API, making it easy to post your data to, and read your
31
- data from your Pactas account.",
32
- "main": "index.js",
33
- "repository": "https://github.com/shipcloud/billwerk.git",
34
- "author": "Marten Klitzke <m.klitzke@shipcloud.io>",
35
- "license": "MIT",
36
- "private": true
37
- }
38
-
39
- yarn manifest:
40
- No manifest
41
-
42
- Lockfile:
43
- No lockfile