lhc 3.4.0 → 3.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.localch.yml +190 -0
  3. data/.rubocop.yml +10 -0
  4. data/cider-ci.yml +2 -1
  5. data/cider-ci/jobs/rspec.yml +48 -0
  6. data/cider-ci/jobs/rubocop.yml +55 -0
  7. data/cider-ci/scripts/bundle.yml +2 -0
  8. data/cider-ci/scripts/github_comment.yml +6 -0
  9. data/cider-ci/scripts/rspec.yml +4 -0
  10. data/cider-ci/scripts/rubocop.yml +5 -0
  11. data/cider-ci/scripts/ruby-version.yml +2 -0
  12. data/cider-ci/scripts/tmp-cache.yml +2 -0
  13. data/lhc.gemspec +2 -1
  14. data/lib/lhc.rb +1 -1
  15. data/lib/lhc/concerns/lhc/basic_methods.rb +4 -6
  16. data/lib/lhc/concerns/lhc/formats.rb +0 -2
  17. data/lib/lhc/endpoint.rb +8 -6
  18. data/lib/lhc/error.rb +3 -1
  19. data/lib/lhc/errors/parser_error.rb +4 -0
  20. data/lib/lhc/formats/json.rb +18 -4
  21. data/lib/lhc/interceptor.rb +2 -0
  22. data/lib/lhc/interceptor_processor.rb +1 -1
  23. data/lib/lhc/request.rb +12 -10
  24. data/lib/lhc/response.rb +3 -9
  25. data/lib/lhc/version.rb +1 -1
  26. data/non_rails_spec/request/request_spec.rb +2 -2
  27. data/spec/basic_methods/delete_spec.rb +4 -6
  28. data/spec/basic_methods/get_spec.rb +3 -6
  29. data/spec/basic_methods/post_spec.rb +7 -9
  30. data/spec/basic_methods/put_spec.rb +7 -9
  31. data/spec/basic_methods/request_spec.rb +2 -4
  32. data/spec/config/endpoints_spec.rb +13 -16
  33. data/spec/config/placeholders_spec.rb +9 -11
  34. data/spec/dummy/bin/rails +1 -1
  35. data/spec/dummy/config.ru +1 -1
  36. data/spec/dummy/config/initializers/cookies_serializer.rb +1 -1
  37. data/spec/endpoint/compile_spec.rb +3 -5
  38. data/spec/endpoint/match_spec.rb +10 -12
  39. data/spec/endpoint/placeholders_spec.rb +1 -3
  40. data/spec/endpoint/remove_interpolated_params_spec.rb +2 -3
  41. data/spec/endpoint/values_as_params_spec.rb +2 -4
  42. data/spec/error/find_spec.rb +37 -39
  43. data/spec/error/response_spec.rb +0 -2
  44. data/spec/error/timeout_spec.rb +1 -3
  45. data/spec/interceptors/after_request_spec.rb +2 -4
  46. data/spec/interceptors/after_response_spec.rb +3 -5
  47. data/spec/interceptors/before_request_spec.rb +2 -4
  48. data/spec/interceptors/before_response_spec.rb +2 -4
  49. data/spec/interceptors/default_interceptors_spec.rb +3 -5
  50. data/spec/interceptors/define_spec.rb +4 -6
  51. data/spec/interceptors/response_competition_spec.rb +6 -7
  52. data/spec/interceptors/return_response_spec.rb +8 -11
  53. data/spec/request/encoding_spec.rb +1 -4
  54. data/spec/request/error_handling_spec.rb +13 -2
  55. data/spec/request/headers_spec.rb +1 -2
  56. data/spec/request/option_dup_spec.rb +2 -3
  57. data/spec/request/parallel_requests_spec.rb +2 -2
  58. data/spec/request/url_patterns_spec.rb +4 -5
  59. data/spec/response/body_spec.rb +2 -4
  60. data/spec/response/code_spec.rb +2 -4
  61. data/spec/response/data_spec.rb +2 -4
  62. data/spec/response/effective_url_spec.rb +1 -3
  63. data/spec/response/headers_spec.rb +2 -4
  64. data/spec/response/options_spec.rb +2 -4
  65. data/spec/response/success_spec.rb +2 -3
  66. data/spec/response/time_spec.rb +3 -5
  67. data/spec/spec_helper.rb +1 -1
  68. data/spec/support/reset_config.rb +0 -2
  69. data/spec/timeouts/no_signal_spec.rb +1 -3
  70. data/spec/timeouts/timings_spec.rb +27 -33
  71. metadata +27 -4
  72. data/cider-ci/contexts/rspec.yml +0 -19
  73. data/cider-ci/jobs/tests.yml +0 -27
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lhc
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.0
4
+ version: 3.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - local.ch
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-21 00:00:00.000000000 Z
11
+ date: 2016-02-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -108,6 +108,20 @@ dependencies:
108
108
  - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: ciderizer
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
111
125
  description: Rails gem wrapping typhoeus and providing additional features (like interceptors)
112
126
  email:
113
127
  - ws-operations@local.ch
@@ -116,12 +130,20 @@ extensions: []
116
130
  extra_rdoc_files: []
117
131
  files:
118
132
  - ".gitignore"
133
+ - ".rubocop.localch.yml"
134
+ - ".rubocop.yml"
119
135
  - Gemfile
120
136
  - README.md
121
137
  - Rakefile
122
138
  - cider-ci.yml
123
- - cider-ci/contexts/rspec.yml
124
- - cider-ci/jobs/tests.yml
139
+ - cider-ci/jobs/rspec.yml
140
+ - cider-ci/jobs/rubocop.yml
141
+ - cider-ci/scripts/bundle.yml
142
+ - cider-ci/scripts/github_comment.yml
143
+ - cider-ci/scripts/rspec.yml
144
+ - cider-ci/scripts/rubocop.yml
145
+ - cider-ci/scripts/ruby-version.yml
146
+ - cider-ci/scripts/tmp-cache.yml
125
147
  - docs/configuration.md
126
148
  - docs/exceptions.md
127
149
  - docs/interceptors.md
@@ -135,6 +157,7 @@ files:
135
157
  - lib/lhc/endpoint.rb
136
158
  - lib/lhc/error.rb
137
159
  - lib/lhc/errors/client_error.rb
160
+ - lib/lhc/errors/parser_error.rb
138
161
  - lib/lhc/errors/server_error.rb
139
162
  - lib/lhc/errors/timeout.rb
140
163
  - lib/lhc/errors/unknown_error.rb
@@ -1,19 +0,0 @@
1
- subcontexts:
2
-
3
- - name: 'All rspec tests'
4
-
5
- task-defaults:
6
-
7
- environment-variables:
8
- RAILS_ENV: test
9
-
10
- scripts:
11
-
12
- test:
13
-
14
- body: |
15
- #!/usr/bin/env bash
16
- bundle exec rspec $CIDER_CI_TASK_FILE
17
-
18
- _cider-ci_generate-tasks:
19
- include-match: spec/.*_spec.rb
@@ -1,27 +0,0 @@
1
- tests:
2
-
3
- name: 'Tests'
4
-
5
- run-on:
6
- - type: branch
7
- include-match: ^.*$
8
-
9
- context:
10
-
11
- _cider-ci_include:
12
- - cider-ci/contexts/rspec.yml
13
-
14
- task-defaults:
15
-
16
- scripts:
17
-
18
- bundle:
19
- body: sed 's/^source.*/source "http\:\/\/52.29.7.59:9292"/g' Gemfile > Gemfile.tmp ; mv Gemfile.tmp Gemfile && bundle install
20
-
21
- ruby-version:
22
- body: ruby --version
23
-
24
- test:
25
- start-when:
26
- - script: bundle
27
- - script: ruby-version