minato_ruby_api_client 0.2.1 → 0.2.3

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.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +23 -23
  3. data/Dockerfile +1 -1
  4. data/Gemfile +17 -17
  5. data/Gemfile.lock +402 -398
  6. data/README.md +54 -54
  7. data/Rakefile +10 -10
  8. data/compose.yml +11 -11
  9. data/lib/minato_ruby_api_client/api_client.rb +398 -389
  10. data/lib/minato_ruby_api_client/api_error.rb +16 -16
  11. data/lib/minato_ruby_api_client/configuration.rb +247 -247
  12. data/lib/minato_ruby_api_client/version.rb +3 -3
  13. data/lib/minato_ruby_api_client.rb +24 -24
  14. data/minato_ruby_api_client.gemspec +35 -35
  15. data/spec/api_client_spec.rb +42 -0
  16. data/spec/configuration_spec.rb +204 -204
  17. data/spec/minato_ruby_api_client_spec.rb +17 -17
  18. data/spec/spec_helper.rb +105 -105
  19. metadata +7 -40
  20. data/coverage/.last_run.json +0 -5
  21. data/coverage/.resultset.json +0 -1248
  22. data/coverage/.resultset.json.lock +0 -0
  23. data/coverage/assets/0.12.3/DataTables-1.10.20/images/sort_asc.png +0 -0
  24. data/coverage/assets/0.12.3/DataTables-1.10.20/images/sort_asc_disabled.png +0 -0
  25. data/coverage/assets/0.12.3/DataTables-1.10.20/images/sort_both.png +0 -0
  26. data/coverage/assets/0.12.3/DataTables-1.10.20/images/sort_desc.png +0 -0
  27. data/coverage/assets/0.12.3/DataTables-1.10.20/images/sort_desc_disabled.png +0 -0
  28. data/coverage/assets/0.12.3/application.css +0 -1
  29. data/coverage/assets/0.12.3/application.js +0 -7
  30. data/coverage/assets/0.12.3/colorbox/border.png +0 -0
  31. data/coverage/assets/0.12.3/colorbox/controls.png +0 -0
  32. data/coverage/assets/0.12.3/colorbox/loading.gif +0 -0
  33. data/coverage/assets/0.12.3/colorbox/loading_background.png +0 -0
  34. data/coverage/assets/0.12.3/favicon_green.png +0 -0
  35. data/coverage/assets/0.12.3/favicon_red.png +0 -0
  36. data/coverage/assets/0.12.3/favicon_yellow.png +0 -0
  37. data/coverage/assets/0.12.3/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  38. data/coverage/assets/0.12.3/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  39. data/coverage/assets/0.12.3/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  40. data/coverage/assets/0.12.3/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  41. data/coverage/assets/0.12.3/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  42. data/coverage/assets/0.12.3/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  43. data/coverage/assets/0.12.3/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  44. data/coverage/assets/0.12.3/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  45. data/coverage/assets/0.12.3/images/ui-icons_222222_256x240.png +0 -0
  46. data/coverage/assets/0.12.3/images/ui-icons_2e83ff_256x240.png +0 -0
  47. data/coverage/assets/0.12.3/images/ui-icons_454545_256x240.png +0 -0
  48. data/coverage/assets/0.12.3/images/ui-icons_888888_256x240.png +0 -0
  49. data/coverage/assets/0.12.3/images/ui-icons_cd0a0a_256x240.png +0 -0
  50. data/coverage/assets/0.12.3/loading.gif +0 -0
  51. data/coverage/assets/0.12.3/magnify.png +0 -0
  52. data/coverage/index.html +0 -13728
data/README.md CHANGED
@@ -1,54 +1,54 @@
1
- # Minato Ruby Api Client
2
-
3
- The Minato ruby HTTP Client.
4
-
5
- ## Installation
6
-
7
- ### Install via command gem
8
-
9
- gem install minato_ruby_api_client
10
-
11
-
12
- ### Install via Gemfile
13
-
14
- gem 'minato_ruby_api_client'
15
-
16
- ### Install from Git
17
-
18
- gem 'minato_ruby_api_client', git: 'https://gitlab.com/ferreri/minato/minato-ruby-api-client.git', ref: 'v0.2.1', glob: '*.gemspec'
19
-
20
- ## Getting Started
21
-
22
- Please follow the [installation](#installation) procedure and then run the following code:
23
-
24
- ```ruby
25
- # Load the gem
26
- require 'minato_ruby_api_client'
27
-
28
- # Setup authorization via config
29
- MinatoRubyApiClient.configure do |config|
30
- # Configure API key
31
- config.api_key['Your-Subscription-Key'] = 'YOUR API KEY'
32
- # Configure base path
33
- config.base_path = 'YOUR BASE PATH'
34
- end
35
-
36
- client = MinatoRubyApiClient::ApiClient.default
37
-
38
- # All available options
39
- opts = {
40
- header_params: { 'Source' => 'Your Source' },
41
- query_params: {}, # When does not have value you can ommit the option
42
- form_params: {},
43
- body: { email: 'test@email' },
44
- auth_names: 'apikey',
45
- return_type: 'Object' # To return a generic hash you must use 'Object', for other types see examples.
46
- }
47
- # dispatch request
48
- data, status, headers = client.api_call(:post, '/v1/accounts', opts)
49
-
50
- # data => 'Response body'
51
- # status => 'Response status'
52
- # headers => 'Response headers'
53
-
54
- ```
1
+ # Minato Ruby Api Client
2
+
3
+ The Minato ruby HTTP Client.
4
+
5
+ ## Installation
6
+
7
+ ### Install via command gem
8
+
9
+ gem install minato_ruby_api_client
10
+
11
+
12
+ ### Install via Gemfile
13
+
14
+ gem 'minato_ruby_api_client'
15
+
16
+ ### Install from Git
17
+
18
+ gem 'minato_ruby_api_client', git: 'https://gitlab.com/ferreri/minato/minato-ruby-api-client.git', ref: 'v0.2.3', glob: '*.gemspec'
19
+
20
+ ## Getting Started
21
+
22
+ Please follow the [installation](#installation) procedure and then run the following code:
23
+
24
+ ```ruby
25
+ # Load the gem
26
+ require 'minato_ruby_api_client'
27
+
28
+ # Setup authorization via config
29
+ MinatoRubyApiClient.configure do |config|
30
+ # Configure API key
31
+ config.api_key['Your-Subscription-Key'] = 'YOUR API KEY'
32
+ # Configure base path
33
+ config.base_path = 'YOUR BASE PATH'
34
+ end
35
+
36
+ client = MinatoRubyApiClient::ApiClient.default
37
+
38
+ # All available options
39
+ opts = {
40
+ header_params: { 'Source' => 'Your Source' },
41
+ query_params: {}, # When does not have value you can ommit the option
42
+ form_params: {},
43
+ body: { email: 'test@email' },
44
+ auth_names: 'apikey',
45
+ return_type: 'Object' # To return a generic hash you must use 'Object', for other types see examples.
46
+ }
47
+ # dispatch request
48
+ data, status, headers = client.api_call(:post, '/v1/accounts', opts)
49
+
50
+ # data => 'Response body'
51
+ # status => 'Response status'
52
+ # headers => 'Response headers'
53
+
54
+ ```
data/Rakefile CHANGED
@@ -1,10 +1,10 @@
1
- require "bundler/gem_tasks"
2
-
3
- begin
4
- require 'rspec/core/rake_task'
5
-
6
- RSpec::Core::RakeTask.new(:spec)
7
- task default: :spec
8
- rescue LoadError
9
- # no rspec available
10
- end
1
+ require "bundler/gem_tasks"
2
+
3
+ begin
4
+ require 'rspec/core/rake_task'
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+ task default: :spec
8
+ rescue LoadError
9
+ # no rspec available
10
+ end
data/compose.yml CHANGED
@@ -1,11 +1,11 @@
1
- services:
2
- minato-ruby-api-client:
3
- environment:
4
- GITLAB_AUTH_TOKEN: ${GITLAB_AUTH_TOKEN}
5
- build: .
6
- volumes:
7
- - .:/usr/src/api
8
- - bundle:/home/rails/.bundle
9
-
10
- volumes:
11
- bundle:
1
+ services:
2
+ minato-ruby-api-client:
3
+ environment:
4
+ GITLAB_AUTH_TOKEN: ${GITLAB_AUTH_TOKEN}
5
+ build: .
6
+ volumes:
7
+ - .:/usr/src/api
8
+ - bundle:/home/rails/.bundle
9
+
10
+ volumes:
11
+ bundle: