lhc 10.1.6 → 10.1.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a6225544d4f712dfd0c519b300384e6bd20c540ce392aa1c364beb8f6e218b2e
4
- data.tar.gz: 4c996805b4d98ae6a1ed3c0e3dc954f837e41e37c169f534188c63d730effb44
3
+ metadata.gz: fe73de18018f898266e7bd978cdf55a2e38a6f3bc8d623ba54aff8d0692e050d
4
+ data.tar.gz: 3f224a4bf08673247ca7b0c844d5fac704bb6187f7ff4151a91533d9c422cca9
5
5
  SHA512:
6
- metadata.gz: dd27913da6bab192c7116e4c82f9954acb5a850ac16a3a927c14e7fc0cbe1ec13e36728ea60dac20cf57c0f3dca08fff8e3eb279ce74fbc68f4ad832d648b3b0
7
- data.tar.gz: 9ad55fda56b0c3aebede3d6f1ff5035ac1c9d39ac6a1d70633d795dd2a931201c848e505aca8c73183a447537d086710c2a639fcad793e9beba250aef5ba1e7f
6
+ metadata.gz: eedbda34d438ce8581e711e2c9f6d4cad9f3c5e188ff42ece46e1cf4f8904b3eab0047d11c61ed731ad15606e2e9dca6487458037d6adceb9ef28f120df66b9e
7
+ data.tar.gz: 705e45b749faa35fe6bb6b0a71512808cb8507b21c21bd19da36ba8df5d14ca4c550cebba6014fdfb22e92fca77a6fbab4b7be33e0905993b539f5ae7b15b94d
@@ -29,7 +29,7 @@ Gem::Specification.new do |s|
29
29
  s.add_development_dependency 'geminabox'
30
30
  s.add_development_dependency 'prometheus-client', '~> 0.7.1'
31
31
  s.add_development_dependency 'pry'
32
- s.add_development_dependency 'rails', '~> 4.2'
32
+ s.add_development_dependency 'rails', '>= 4.2'
33
33
  s.add_development_dependency 'rspec-rails', '>= 3.0.0'
34
34
  s.add_development_dependency 'rubocop', '~> 0.57.1'
35
35
  s.add_development_dependency 'rubocop-rspec', '~> 1.26.0'
@@ -12,9 +12,11 @@ module LHC::Formats
12
12
  def format_options(options)
13
13
  options[:headers] ||= {}
14
14
  no_content_type_header!(options)
15
- options[:headers]['Content-Type'] = 'application/json; charset=utf-8'
16
15
  no_accept_header!(options)
17
- options[:headers]['Accept'] = 'application/json; charset=utf-8'
16
+
17
+ options[:headers]['Content-Type'] = 'application/json; charset=utf-8'
18
+ options[:headers]['Accept'] = 'application/json,application/vnd.api+json'
19
+ options[:headers]['Accept-Charset'] = 'utf-8'
18
20
  options
19
21
  end
20
22
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LHC
4
- VERSION ||= '10.1.6'
4
+ VERSION ||= '10.1.7'
5
5
  end
@@ -4,9 +4,13 @@ require 'rails_helper'
4
4
 
5
5
  describe LHC do
6
6
  context 'formats' do
7
- it 'adds Content-Type and Accept Headers to the request' do
7
+ it 'adds Content-Type, Accept and Accept-Charset Headers to the request' do
8
8
  stub_request(:get, "http://local.ch/")
9
- .with(headers: { 'Accept' => 'application/json; charset=utf-8', 'Content-Type' => 'application/json; charset=utf-8' })
9
+ .with(headers: {
10
+ 'Accept' => 'application/json,application/vnd.api+json',
11
+ 'Content-Type' => 'application/json; charset=utf-8',
12
+ 'Accept-Charset' => 'utf-8'
13
+ })
10
14
  .to_return(body: {}.to_json)
11
15
  LHC.json.get('http://local.ch')
12
16
  end
@@ -6,7 +6,11 @@ describe LHC do
6
6
  context 'data accessor (hash with indifferent access)' do
7
7
  before(:each) do
8
8
  stub_request(:get, "http://local.ch/")
9
- .with(headers: { 'Accept' => 'application/json; charset=utf-8', 'Content-Type' => 'application/json; charset=utf-8' })
9
+ .with(headers: {
10
+ 'Accept' => 'application/json,application/vnd.api+json',
11
+ 'Content-Type' => 'application/json; charset=utf-8',
12
+ 'Accept-Charset' => 'utf-8'
13
+ })
10
14
  .to_return(body: { 'MyProp' => 'MyValue' }.to_json)
11
15
  end
12
16
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lhc
3
3
  version: !ruby/object:Gem::Version
4
- version: 10.1.6
4
+ version: 10.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - https://github.com/local-ch/lhc/contributors
@@ -98,14 +98,14 @@ dependencies:
98
98
  name: rails
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - "~>"
101
+ - - ">="
102
102
  - !ruby/object:Gem::Version
103
103
  version: '4.2'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - "~>"
108
+ - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '4.2'
111
111
  - !ruby/object:Gem::Dependency