lhc 13.1.0 → 13.2.0

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: 98300a9c64d910094f32a96b4428c71aa4d1d8927e1dc9e4b939c1119e28333c
4
- data.tar.gz: 7cb93bf8911d06c5fbd015b36b2ccc62c3ff211a1e70a2aa10dfd8fe447be878
3
+ metadata.gz: b7e042d800751c9fceb6d4f3e01513a1a849a3e00fb8bf7e0987bf1df73b5a45
4
+ data.tar.gz: 6fa4a578f6003a9ef46ca27ed81766ef2c4dbd07ad231d4201624274b7255153
5
5
  SHA512:
6
- metadata.gz: 24d10469629a7bb4942bd2a77fabc74910a98179e5998fef6e502fa88e25d583274becd33897f4f509ed97e3e9a3ed2d246145ac9a0908ae3b367d4d0f00ca9d
7
- data.tar.gz: c22f9044dbc3a2052c3487eb014f04e86791017da1b3d438d6c9e48e63d30bf4bf5e19663854f3b1a2ba675ad240da84e3c528a0ca25037759a3576109275657
6
+ metadata.gz: 80b0d65063c77912df0cf07bc8f25acbb083af34186248689131283cb07e90f9bc2677973b96170d0eeba788b7bcde19ce0f3efddefe349501e33b3825f39b53
7
+ data.tar.gz: 2f0b273133f8fe5311eeaa4c46d11170430c58099c8599f855e303659f299fbab0ababbc5091999a0fc7c433a7eccdd80fbc343e5cac267aeae3aab7595bbdcb
@@ -0,0 +1,27 @@
1
+ name: Rubocop
2
+
3
+ on: push
4
+
5
+ jobs:
6
+ rubocop:
7
+ runs-on: ubuntu-latest
8
+
9
+ steps:
10
+ - uses: actions/checkout@v2
11
+ - uses: actions/setup-ruby@v1
12
+ with:
13
+ ruby-version: 2.7.2
14
+ - name: Cache Ruby Gems
15
+ uses: actions/cache@v2
16
+ with:
17
+ path: /.tmp/vendor/bundle
18
+ key: ${{ runner.os }}-gems-latest-${{ hashFiles('**/Gemfile.lock') }}
19
+ restore-keys: |
20
+ ${{ runner.os }}-gems-latest-
21
+ - name: Bundle Install
22
+ run: |
23
+ bundle config path /.tmp/vendor/bundle
24
+ bundle install --jobs 4 --retry 3
25
+ - name: Run Rubocop
26
+ run: |
27
+ bundle exec rubocop
@@ -0,0 +1,27 @@
1
+ name: Test
2
+
3
+ on: push
4
+
5
+ jobs:
6
+ rspec:
7
+ runs-on: ubuntu-latest
8
+
9
+ steps:
10
+ - uses: actions/checkout@v2
11
+ - uses: actions/setup-ruby@v1
12
+ with:
13
+ ruby-version: 2.7.2
14
+ - name: Cache Ruby Gems
15
+ uses: actions/cache@v2
16
+ with:
17
+ path: /.tmp/vendor/bundle
18
+ key: ${{ runner.os }}-gems-latest-${{ hashFiles('**/Gemfile.lock') }}
19
+ restore-keys: |
20
+ ${{ runner.os }}-gems-latest-
21
+ - name: Bundle Install
22
+ run: |
23
+ bundle config path /.tmp/vendor/bundle
24
+ bundle install --jobs 4 --retry 3
25
+ - name: Run Tests
26
+ run: |
27
+ bundle exec rspec
data/.rubocop.yml CHANGED
@@ -5,6 +5,9 @@ inherit_from:
5
5
 
6
6
  AllCops:
7
7
  TargetRubyVersion: 2.3
8
+ Exclude:
9
+ - vendor/**
10
+ - vendor/**/.*
8
11
 
9
12
  Lint/IneffectiveAccessModifier:
10
13
  Enabled: false
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- ruby-2.6.5
1
+ ruby-2.7.2
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  begin
2
4
  require 'bundler/setup'
3
5
  rescue LoadError
@@ -17,9 +19,7 @@ end
17
19
  begin
18
20
  require 'rspec/core/rake_task'
19
21
  RSpec::Core::RakeTask.new(:spec)
20
- task :default => :spec
21
- rescue LoadError
22
- # no rspec available
22
+ task default: :spec
23
23
  end
24
24
 
25
25
  Bundler::GemHelper.install_tasks
data/lib/lhc/request.rb CHANGED
@@ -91,7 +91,7 @@ class LHC::Request
91
91
 
92
92
  def encode_url(url)
93
93
  return url if url.nil?
94
- URI.escape(url)
94
+ Addressable::URI.escape(url)
95
95
  end
96
96
 
97
97
  def typhoeusize(options)
data/lib/lhc/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LHC
4
- VERSION ||= '13.1.0'
4
+ VERSION ||= '13.2.0'
5
5
  end
@@ -6,7 +6,7 @@ describe LHC do
6
6
  include ActionDispatch::TestProcess
7
7
 
8
8
  context 'multipart' do
9
- let(:file) { fixture_file_upload(Tempfile.new, 'image/jpeg') }
9
+ let(:file) { Rack::Test::UploadedFile.new(Tempfile.new) }
10
10
  let(:body) { { size: 2231 }.to_json }
11
11
  let(:location) { 'http://local.ch/uploads/image.jpg' }
12
12
 
@@ -6,7 +6,7 @@ describe LHC do
6
6
  include ActionDispatch::TestProcess
7
7
 
8
8
  context 'plain' do
9
- let(:file) { fixture_file_upload(Tempfile.new, 'image/jpeg') }
9
+ let(:file) { Rack::Test::UploadedFile.new(Tempfile.new) }
10
10
 
11
11
  it 'leaves plains requests unformatted' do
12
12
  stub_request(:post, 'http://local.ch/')
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: 13.1.0
4
+ version: 13.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - https://github.com/local-ch/lhc/contributors
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-01 00:00:00.000000000 Z
11
+ date: 2021-04-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -202,6 +202,8 @@ executables: []
202
202
  extensions: []
203
203
  extra_rdoc_files: []
204
204
  files:
205
+ - ".github/workflows/rubocop.yml"
206
+ - ".github/workflows/test.yml"
205
207
  - ".gitignore"
206
208
  - ".rubocop.localch.yml"
207
209
  - ".rubocop.yml"
@@ -212,17 +214,6 @@ files:
212
214
  - LICENSE
213
215
  - README.md
214
216
  - Rakefile
215
- - cider-ci.yml
216
- - cider-ci/bin/bundle
217
- - cider-ci/bin/ruby_install
218
- - cider-ci/bin/ruby_version
219
- - cider-ci/jobs/rspec-activesupport-5.yml
220
- - cider-ci/jobs/rspec-activesupport-6.yml
221
- - cider-ci/jobs/rubocop.yml
222
- - cider-ci/task_components/bundle.yml
223
- - cider-ci/task_components/rspec.yml
224
- - cider-ci/task_components/rubocop.yml
225
- - cider-ci/task_components/ruby.yml
226
217
  - friday.yml
227
218
  - lhc.gemspec
228
219
  - lib/core_ext/hash/deep_transform_values.rb
@@ -403,7 +394,7 @@ homepage: https://github.com/local-ch/lhc
403
394
  licenses:
404
395
  - GPL-3.0
405
396
  metadata: {}
406
- post_install_message:
397
+ post_install_message:
407
398
  rdoc_options: []
408
399
  require_paths:
409
400
  - lib
@@ -419,8 +410,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
419
410
  version: '0'
420
411
  requirements:
421
412
  - Ruby >= 2.0.0
422
- rubygems_version: 3.0.6
423
- signing_key:
413
+ rubygems_version: 3.1.4
414
+ signing_key:
424
415
  specification_version: 4
425
416
  summary: Advanced HTTP Client for Ruby, fueled with interceptors
426
417
  test_files:
data/cider-ci.yml DELETED
@@ -1,5 +0,0 @@
1
- jobs:
2
- include:
3
- - cider-ci/jobs/rspec-activesupport-5.yml
4
- - cider-ci/jobs/rspec-activesupport-6.yml
5
- - cider-ci/jobs/rubocop.yml
data/cider-ci/bin/bundle DELETED
@@ -1,51 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -eux
3
-
4
- export PATH=~/.rubies/$RUBY/bin:$PATH
5
- rm -f .bundle/config
6
-
7
- if [ ! -f ~/.rubies/$RUBY/bin/bundle ]; then
8
- gem install bundler
9
- fi
10
-
11
- # install bundler v. 1.17.3 in order to be able to run the tests with
12
- # ACTIVESUPPORT=4 because rails (= 4.2.0) depends on bundler (< 2.0, >= 1.3.0)
13
- gem install bundler:1.17.3
14
-
15
- sed "s/^source 'https:\/\/rubygems\.intra\.local\.ch'*/source 'http\:\/\/52.29.7.59:9292'/g" Gemfile > Gemfile.tmp
16
- mv Gemfile.tmp Gemfile
17
-
18
- DIGEST=$(git ls-tree HEAD --\
19
- cider-ci.yml cider-ci Gemfile.lock \
20
- | openssl dgst -sha1 | cut -d ' ' -f 2)
21
-
22
- if [ ! -z ${ACTIVESUPPORT:-} ]; then
23
- DIGEST=$(echo "$DIGEST $ACTIVESUPPORT")
24
- fi
25
-
26
- DIGEST=$(echo "$DIGEST $PATH" \
27
- | openssl dgst -sha1 | cut -d ' ' -f 2)
28
-
29
- echo "DIGEST"
30
- echo "${DIGEST}"
31
-
32
- CACHE_SIGNATURE_FILE="/tmp/bundle_cache_signature_${DIGEST}"
33
-
34
- if [ ! -f $CACHE_SIGNATURE_FILE ] ; then
35
- if [ ! -z ${ACTIVESUPPORT:-} ]; then
36
- if [ ! -z ${BUNDLER:-} ]; then
37
- echo "BUNDLE_GEMFILE=Gemfile.activesupport$ACTIVESUPPORT bundle $BUNDLER install"
38
- BUNDLE_GEMFILE=Gemfile.activesupport$ACTIVESUPPORT bundle $BUNDLER install
39
- else
40
- echo "BUNDLE_GEMFILE=Gemfile.activesupport$ACTIVESUPPORT bundle install"
41
- BUNDLE_GEMFILE=Gemfile.activesupport$ACTIVESUPPORT bundle install
42
- fi
43
- else
44
- echo "bundle install"
45
- bundle $BUNDLER install
46
- fi
47
- touch $CACHE_SIGNATURE_FILE
48
- fi
49
-
50
- echo "bundle install"
51
- bundle $BUNDLER install
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -eux
3
-
4
- export PATH=~/.rubies/$RUBY/bin:$PATH
5
-
6
- if [ ! -d ~/.rubies/$RUBY ]; then
7
- ruby-install --no-install-deps $RUBY
8
- fi
@@ -1,25 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -eux
3
-
4
- if [ -f ./.ruby-version ]; then
5
- echo ".ruby-version file found"
6
- fi
7
-
8
- if [ ! -f ./.ruby-version ]; then
9
- echo ".ruby-version file not found"
10
- exit 1
11
- fi
12
-
13
- IFS='-' read -ra EXPLODED_RUBY <<< "$RUBY"
14
-
15
- if [ "${#EXPLODED_RUBY[@]}" == "1" ]; then
16
- echo 'No engine/version separator "-" found in .ruby-version file.'
17
- exit 1
18
- fi
19
-
20
- if [ "${#EXPLODED_RUBY[@]}" != "1" ] && [ "${#EXPLODED_RUBY[@]}" != "2" ]; then
21
- echo "Unknown format of .ruby-version file"
22
- exit 1
23
- fi
24
-
25
- echo $RUBY
@@ -1,27 +0,0 @@
1
- rspec-active-support-v5:
2
- name: 'rspec with ActiveSupport v5'
3
-
4
- run_when:
5
- 'some HEAD has been updated':
6
- type: branch
7
- include_match: ^.*$
8
-
9
- context:
10
-
11
- script_defaults:
12
- template_environment_variables: true
13
-
14
- task_defaults:
15
- environment_variables:
16
- ACTIVESUPPORT: '5'
17
-
18
- max_trials: 2
19
- dispatch_storm_delay_duration: 1 Seconds
20
- include:
21
- - cider-ci/task_components/ruby.yml
22
- - cider-ci/task_components/bundle.yml
23
- - cider-ci/task_components/rspec.yml
24
-
25
- tasks:
26
- all-rspec:
27
- name: All rspec tests, using ActiveSupport v5
@@ -1,28 +0,0 @@
1
- rspec-active-support-v6:
2
- name: 'rspec with ActiveSupport v6'
3
-
4
- run_when:
5
- 'some HEAD has been updated':
6
- type: branch
7
- include_match: ^.*$
8
-
9
- context:
10
-
11
- script_defaults:
12
- template_environment_variables: true
13
-
14
- task_defaults:
15
- environment_variables:
16
- ACTIVESUPPORT: '6'
17
- RUBY: 'ruby-2.6.3'
18
-
19
- max_trials: 2
20
- dispatch_storm_delay_duration: 1 Seconds
21
- include:
22
- - cider-ci/task_components/ruby.yml
23
- - cider-ci/task_components/bundle.yml
24
- - cider-ci/task_components/rspec.yml
25
-
26
- tasks:
27
- all-rspec:
28
- name: All rspec tests, using ActiveSupport v6
@@ -1,18 +0,0 @@
1
- rubocop:
2
- name: 'Rubocop'
3
-
4
- run_when:
5
- 'some HEAD has been updated':
6
- type: branch
7
- include_match: ^.*$
8
-
9
- context:
10
-
11
- tasks:
12
-
13
- rubocop:
14
-
15
- include:
16
- - cider-ci/task_components/ruby.yml
17
- - cider-ci/task_components/bundle.yml
18
- - cider-ci/task_components/rubocop.yml
@@ -1,22 +0,0 @@
1
- traits:
2
- ruby-install: true
3
- Bash: true
4
-
5
- trial_attachments:
6
- gemfile:
7
- include_match: Gemfile
8
- content_type: text/plain
9
-
10
- environment_variables:
11
- BUNDLER: '_1.17.3_'
12
-
13
- scripts:
14
-
15
- bundle:
16
- exclusive_executor_resource: ruby-install_{{$RUBY}}
17
- timeout: 20 Minutes
18
- body: cider-ci/bin/bundle
19
- start_when:
20
- 'ruby installed':
21
- script_key: ruby-install
22
-
@@ -1,36 +0,0 @@
1
- ports:
2
- CAPYBARA_PORT:
3
- min: 8000
4
- max: 8999
5
- PHANTOMJS_PORT:
6
- min: 44600
7
- max: 44999
8
-
9
- environment_variables:
10
- RUBY:
11
- read_and_replace_with: .ruby-version
12
- RAILS_ENV: 'test'
13
-
14
- scripts:
15
- rspec:
16
- body: |
17
- #!/usr/bin/env bash
18
- set -eux
19
- mkdir -p tmp/cache
20
- export PATH=~/.rubies/$RUBY/bin:$PATH
21
- if [ ! -z ${ACTIVESUPPORT:-} ]; then BUNDLE_GEMFILE=Gemfile.activesupport$ACTIVESUPPORT bundle $BUNDLER exec rspec; else bundle exec rspec; fi
22
-
23
- start_when:
24
- 'bundled':
25
- script_key: bundle
26
-
27
- trial_attachments:
28
- logs:
29
- include_match: log\/.*\.log$
30
- content_type: text/plain
31
- image-screenshots:
32
- include_match: tmp\/capybara\/.*\.png$
33
- content_type: image/png
34
- html-screenshots:
35
- include_match: tmp\/capybara\/.*\.html$
36
- content_type: text/html
@@ -1,29 +0,0 @@
1
- trial_attachments:
2
- logs:
3
- include_match: tmp\/checkstyle.json$
4
- content_type: application/json
5
-
6
- tree_attachments:
7
- logs:
8
- include_match: tmp\/checkstyle.json$
9
- content_type: application/json
10
-
11
- environment_variables:
12
- RUBY:
13
- read_and_replace_with: .ruby-version
14
- RESULT_PATH: 'tmp/checkstyle.json'
15
-
16
- max_trials: 1
17
-
18
- scripts:
19
- rubocop:
20
- start_when:
21
- 'bundled':
22
- script_key: bundle
23
- body: |
24
- #!/usr/bin/env bash
25
- set -eux
26
- mkdir -p tmp/cache
27
- export PATH=~/.rubies/$RUBY/bin:$PATH
28
- bundle exec rubocop --config .rubocop.yml \
29
- --format json --out $RESULT_PATH --format progress
@@ -1,15 +0,0 @@
1
- environment_variables:
2
- RUBY:
3
- read_and_replace_with: .ruby-version
4
-
5
- scripts:
6
- ruby-version:
7
- body: cider-ci/bin/ruby_version
8
- ruby-install:
9
- exclusive_executor_resource: ruby-install_{{$RUBY}}
10
- timeout: 20 Minutes
11
- body: cider-ci/bin/ruby_install
12
- start_when:
13
- 'ruby version checked':
14
- script_key: ruby-version
15
-