lex-http 0.1.2 → 0.1.3

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: 760137febdd85bf4f4734c4d301873e0b054dbe624d95559bff7b84ac3c6fc81
4
- data.tar.gz: 90078e2a98b02549248804e905baebefb30b53b131f61425f7120e1032272b4e
3
+ metadata.gz: 35304b13241e91f930ceab1caa160140efb6738f7ee138d589ff8560be3e8155
4
+ data.tar.gz: 43f880dbcebfeff0cc2c902c570d2f5f1b6566cec19134f8c7ee66231423d6ad
5
5
  SHA512:
6
- metadata.gz: e96ef07725e187affc31b04427d9bf1337f61ca86270197397d63e83b17bb430f737c063e33f96b1a21cd68ccfef1f41c6d97f9843d68c78d70fdc7a97e1d0c4
7
- data.tar.gz: 1681051a4ce5fb7674b4f314be8dbd7a44c40b0b22408062528928f065a5f1fe3bb8992329346aaa638dd97955e462d666793985259add11b9fc89ed11e705bf
6
+ metadata.gz: 0bcd538e2d63313625b0e6eba249508ae5b01fc333b1679f5bd9f53e17f9f1f16955caa29a3898f2c51ae442902fe92851c1d425d414d0cf95c5e3008e5124bc
7
+ data.tar.gz: a586de8671fad39a27e1fc4923325f7f4b4a01a36ae299b5f47852ff2f70230453ccc6149fa8c61ad399e4f1eba29b2670fb0d71bddd01ff50093d94f8f62a33
@@ -0,0 +1,69 @@
1
+ name: RSpec
2
+ on: [push, pull_request]
3
+
4
+ jobs:
5
+ rspec:
6
+ strategy:
7
+ fail-fast: false
8
+ matrix:
9
+ os: [ubuntu-latest]
10
+ ruby: [2.7]
11
+ runs-on: ${{ matrix.os }}
12
+ steps:
13
+ - uses: actions/checkout@v2
14
+ - uses: ruby/setup-ruby@v1
15
+ with:
16
+ ruby-version: ${{ matrix.ruby }}
17
+ bundler-cache: true
18
+ - name: RSpec run
19
+ run: |
20
+ bash -c "
21
+ bundle exec rspec
22
+ [[ $? -ne 2 ]]
23
+ "
24
+ rspec-mri:
25
+ needs: rspec
26
+ strategy:
27
+ fail-fast: false
28
+ matrix:
29
+ os: [ ubuntu-latest ]
30
+ ruby: [2.5, 2.6, '3.0', head]
31
+ runs-on: ${{ matrix.os }}
32
+ steps:
33
+ - uses: actions/checkout@v2
34
+ - uses: ruby/setup-ruby@v1
35
+ with:
36
+ ruby-version: ${{ matrix.ruby }}
37
+ bundler-cache: true
38
+ - run: bundle exec rspec
39
+ rspec-jruby:
40
+ needs: rspec
41
+ strategy:
42
+ fail-fast: false
43
+ matrix:
44
+ os: [ ubuntu-latest ]
45
+ ruby: [ jruby, jruby-head]
46
+ runs-on: ${{ matrix.os }}
47
+ steps:
48
+ - uses: actions/checkout@v2
49
+ - uses: ruby/setup-ruby@v1
50
+ with:
51
+ ruby-version: ${{ matrix.ruby }}
52
+ bundler-cache: true
53
+ - run: JRUBY_OPTS="--debug" bundle exec rspec
54
+ rspec-truffleruby:
55
+ needs: rspec
56
+ strategy:
57
+ fail-fast: false
58
+ matrix:
59
+ os: [ ubuntu-latest ]
60
+ ruby: [truffleruby]
61
+ runs-on: ${{ matrix.os }}
62
+ steps:
63
+ - uses: actions/checkout@v2
64
+ - uses: ruby/setup-ruby@v1
65
+ with:
66
+ ruby-version: ${{ matrix.ruby }}
67
+ bundler-cache: true
68
+ - run: bundle exec rspec
69
+
@@ -0,0 +1,28 @@
1
+ name: Rubocop
2
+ on: [push, pull_request]
3
+ jobs:
4
+ rubocop:
5
+ strategy:
6
+ fail-fast: false
7
+ matrix:
8
+ os: [ubuntu-latest]
9
+ ruby: [2.7]
10
+ runs-on: ${{ matrix.os }}
11
+ steps:
12
+ - uses: actions/checkout@v2
13
+ - uses: ruby/setup-ruby@v1
14
+ with:
15
+ ruby-version: ${{ matrix.ruby }}
16
+ bundler-cache: true
17
+ - name: Install Rubocop
18
+ run: gem install rubocop code-scanning-rubocop
19
+ - name: Rubocop run --no-doc
20
+ run: |
21
+ bash -c "
22
+ rubocop --require code_scanning --format CodeScanning::SarifFormatter -o rubocop.sarif
23
+ [[ $? -ne 2 ]]
24
+ "
25
+ - name: Upload Sarif output
26
+ uses: github/codeql-action/upload-sarif@v1
27
+ with:
28
+ sarif_file: rubocop.sarif
data/.rubocop.yml CHANGED
@@ -6,15 +6,10 @@ Metrics/ClassLength:
6
6
  Max: 1500
7
7
  Metrics/BlockLength:
8
8
  Max: 50
9
+ Metrics/ModuleLength:
10
+ Max: 200
9
11
  Metrics/AbcSize:
10
12
  Max: 30
11
- Layout/SpaceAroundEqualsInParameterDefault:
12
- EnforcedStyle: space
13
- Style/SymbolArray:
14
- Enabled: true
15
- Layout/HashAlignment:
16
- EnforcedHashRocketStyle: table
17
- EnforcedColonStyle: table
18
13
  Style/Documentation:
19
14
  Enabled: false
20
15
  AllCops:
data/Dockerfile CHANGED
@@ -1,10 +1,9 @@
1
- FROM ruby:2.7-alpine
1
+ FROM legionio/legion:latest
2
2
  LABEL maintainer="Matthew Iverson <matthewdiverson@gmail.com>"
3
3
 
4
4
  RUN mkdir /etc/legionio
5
5
  RUN apk update && apk add build-base tzdata gcc git
6
6
 
7
7
  COPY . ./
8
- RUN gem install legionio tzinfo-data tzinfo --no-document --no-prerelease
9
8
  RUN gem install lex-http --no-document --no-prerelease
10
- CMD legionio
9
+ CMD ruby --jit $(which legionio)
data/Gemfile CHANGED
@@ -1,4 +1,10 @@
1
1
  source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in legion-extensions-http.gemspec
4
2
  gemspec
3
+
4
+ group :test do
5
+ gem 'rake'
6
+ gem 'rspec'
7
+ gem 'rspec_junit_formatter'
8
+ gem 'rubocop'
9
+ gem 'simplecov'
10
+ end
File without changes
data/docker_deploy.rb CHANGED
@@ -1,12 +1,18 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- version = Legion::Extensions::Http::VERSION
3
+ long_name = 'lex-http'
4
4
  name = 'http'
5
-
6
5
  require "./lib/legion/extensions/#{name}/version"
7
- puts "Building docker image for Legion v#{version}"
8
- system("docker build --tag legionio/lex-#{name}:v#{version} .")
9
- puts 'Pushing to hub.docker.com'
10
- system("docker push legionio/lex-#{name}:v#{version}")
11
- system("docker push legionio/lex-#{name}:latest")
12
- puts 'completed'
6
+ version = Legion::Extensions::Http::VERSION
7
+
8
+ system("gem build #{long_name}.gemspec")
9
+ system("gh release create v#{version} '#{long_name}-#{version}.gem'")
10
+ # system("gem push #{long_name}-#{version}.gem")
11
+ # system("gem push --key --host https://rubygems.pkg.github.com/LegionIO #{long_name}-#{version}.gem")
12
+ #
13
+ # puts "Building docker image for Legion v#{version}"
14
+ # system("docker build --tag legionio/lex-#{name}:v#{version} .")
15
+ # puts 'Pushing to hub.docker.com'
16
+ # system("docker push legionio/lex-#{name}:v#{version}")
17
+ # system("docker push legionio/lex-#{name}:latest")
18
+ # puts 'completed'
data/lex-http.gemspec CHANGED
@@ -7,24 +7,22 @@ Gem::Specification.new do |spec|
7
7
  spec.email = ['matthewdiverson@gmail.com']
8
8
 
9
9
  spec.summary = 'LEX HTTP'
10
- spec.description = 'Connections Legion to any HTTP source'
11
- spec.homepage = 'https://bitbucket.org/legion-io/lex-http/src'
10
+ spec.description = 'Connections LegionIO to any HTTP source'
11
+ spec.homepage = 'https://github.com/LegionIO/lex-http'
12
12
  spec.license = 'MIT'
13
13
  spec.required_ruby_version = Gem::Requirement.new('>= 2.5.0')
14
14
 
15
15
  spec.metadata['homepage_uri'] = spec.homepage
16
- spec.metadata['source_code_uri'] = 'https://bitbucket.org/legion-io/lex-http/src'
17
- spec.metadata['changelog_uri'] = 'https://bitbucket.org/legion-io/lex-http/src/master/CHANGELOG.md'
16
+ spec.metadata['source_code_uri'] = 'https://github.com/LegionIO/lex-http'
17
+ spec.metadata['documentation_uri'] = 'https://github.com/LegionIO/lex-http'
18
+ spec.metadata['changelog_uri'] = 'https://github.com/LegionIO/lex-http'
19
+ spec.metadata['bug_tracker_uri'] = 'https://github.com/LegionIO/lex-http/issues'
18
20
 
19
21
  spec.files = Dir.chdir(File.expand_path(__dir__)) do
20
22
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
21
23
  end
22
24
  spec.require_paths = ['lib']
23
25
 
24
- spec.add_development_dependency 'rake'
25
- spec.add_development_dependency 'rspec'
26
- spec.add_development_dependency 'rubocop'
27
-
28
26
  spec.add_dependency 'faraday'
29
27
  spec.add_dependency 'faraday_middleware'
30
28
  spec.add_dependency 'multi_json'
@@ -10,7 +10,7 @@ module Legion
10
10
  options: {
11
11
  open_timeout: 5,
12
12
  read_timeout: 10,
13
- timeout: 10
13
+ timeout: 10
14
14
  }
15
15
  }
16
16
  end
@@ -1,11 +1,18 @@
1
1
  require 'faraday'
2
2
  require 'faraday_middleware'
3
-
3
+ # excon 174m
4
+ # net-http-persistent 42m
5
+ # HTTPClient 131m
6
+ #
4
7
  module Legion
5
8
  module Extensions
6
9
  module Http
7
10
  module Runners
8
11
  module Http
12
+ def status(**_opts)
13
+ { test: true }
14
+ end
15
+
9
16
  def get(host:, uri: '', port: 80, **opts)
10
17
  conn = Faraday.new(host) do |c|
11
18
  c.options[:open_timeout] = settings[:options][:open_timeout]
@@ -1,7 +1,7 @@
1
1
  module Legion
2
2
  module Extensions
3
3
  module Http
4
- VERSION = '0.1.2'.freeze
4
+ VERSION = '0.1.3'.freeze
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,57 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lex-http
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esity
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-15 00:00:00.000000000 Z
11
+ date: 2021-06-13 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: rake
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: '0'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: rspec
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
- - !ruby/object:Gem::Dependency
42
- name: rubocop
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
13
  - !ruby/object:Gem::Dependency
56
14
  name: faraday
57
15
  requirement: !ruby/object:Gem::Requirement
@@ -108,36 +66,38 @@ dependencies:
108
66
  - - ">="
109
67
  - !ruby/object:Gem::Version
110
68
  version: '0'
111
- description: Connections Legion to any HTTP source
69
+ description: Connections LegionIO to any HTTP source
112
70
  email:
113
71
  - matthewdiverson@gmail.com
114
72
  executables: []
115
73
  extensions: []
116
74
  extra_rdoc_files: []
117
75
  files:
76
+ - ".github/workflows/rspec.yml"
77
+ - ".github/workflows/rubocop.yml"
118
78
  - ".gitignore"
119
79
  - ".rspec"
120
80
  - ".rubocop.yml"
121
81
  - CODE_OF_CONDUCT.md
122
82
  - Dockerfile
123
83
  - Gemfile
124
- - LICENSE.txt
84
+ - LICENSE
125
85
  - README.md
126
- - Rakefile
127
- - bitbucket-pipelines.yml
128
86
  - docker_deploy.rb
129
87
  - lex-http.gemspec
130
88
  - lib/legion/extensions/http.rb
131
89
  - lib/legion/extensions/http/runners/http.rb
132
90
  - lib/legion/extensions/http/version.rb
133
- homepage: https://bitbucket.org/legion-io/lex-http/src
91
+ homepage: https://github.com/LegionIO/lex-http
134
92
  licenses:
135
93
  - MIT
136
94
  metadata:
137
- homepage_uri: https://bitbucket.org/legion-io/lex-http/src
138
- source_code_uri: https://bitbucket.org/legion-io/lex-http/src
139
- changelog_uri: https://bitbucket.org/legion-io/lex-http/src/master/CHANGELOG.md
140
- post_install_message:
95
+ homepage_uri: https://github.com/LegionIO/lex-http
96
+ source_code_uri: https://github.com/LegionIO/lex-http
97
+ documentation_uri: https://github.com/LegionIO/lex-http
98
+ changelog_uri: https://github.com/LegionIO/lex-http
99
+ bug_tracker_uri: https://github.com/LegionIO/lex-http/issues
100
+ post_install_message:
141
101
  rdoc_options: []
142
102
  require_paths:
143
103
  - lib
@@ -152,8 +112,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
152
112
  - !ruby/object:Gem::Version
153
113
  version: '0'
154
114
  requirements: []
155
- rubygems_version: 3.1.4
156
- signing_key:
115
+ rubygems_version: 3.1.6
116
+ signing_key:
157
117
  specification_version: 4
158
118
  summary: LEX HTTP
159
119
  test_files: []
data/Rakefile DELETED
@@ -1,6 +0,0 @@
1
- require 'bundler/gem_tasks'
2
- require 'rspec/core/rake_task'
3
-
4
- RSpec::Core::RakeTask.new(:spec)
5
-
6
- task default: :spec
@@ -1,21 +0,0 @@
1
- image: ruby:2.7
2
-
3
- pipelines:
4
- tags:
5
- "v*":
6
- - step:
7
- name: Push to RubyGems
8
- deployment: RubyGems
9
- script:
10
- - gem install gem-release
11
- - (umask 077 ; echo $gem_creds | base64 --decode > ~/.gem/credentials)
12
- - gem release
13
- artifacts:
14
- - pkg/**
15
- - step:
16
- name: Push to Docker
17
- deployment: Docker
18
- script:
19
- - 'apt-get update'
20
- - 'apt-get install -y docker-ce'
21
- - './docker_deploy.rb'