Skip to content

Commit

Permalink
Updating lex-log for github migration
Browse files Browse the repository at this point in the history
  • Loading branch information
Esity committed Jun 13, 2021
1 parent 8a1e189 commit 36734ff
Show file tree
Hide file tree
Showing 14 changed files with 235 additions and 156 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/rspec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: RSpec
on: [push, pull_request]

jobs:
rspec:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
ruby: [2.7]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: RSpec run
run: |
bash -c "
bundle exec rspec
[[ $? -ne 2 ]]
"
rspec-mri:
needs: rspec
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
ruby: [2.5, 2.6, '3.0', head]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- run: bundle exec rspec
rspec-jruby:
needs: rspec
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
ruby: [ jruby, jruby-head]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- run: JRUBY_OPTS="--debug" bundle exec rspec
rspec-truffleruby:
needs: rspec
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
ruby: [truffleruby]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- run: bundle exec rspec

28 changes: 28 additions & 0 deletions .github/workflows/rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Rubocop
on: [push, pull_request]
jobs:
rubocop:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
ruby: [2.7]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Install Rubocop
run: gem install rubocop code-scanning-rubocop
- name: Rubocop run --no-doc
run: |
bash -c "
rubocop --require code_scanning --format CodeScanning::SarifFormatter -o rubocop.sarif
[[ $? -ne 2 ]]
"
- name: Upload Sarif output
uses: github/codeql-action/upload-sarif@v1
with:
sarif_file: rubocop.sarif
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# LEX::Log

## v0.1.4
Cleaning up things for github migration
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
FROM ruby:2.7-alpine
FROM legionio/legion:latest
LABEL maintainer="Matthew Iverson <[email protected]>"

RUN mkdir /etc/legionio
RUN apk update && apk add build-base tzdata gcc git

COPY . ./
RUN gem install legionio tzinfo-data tzinfo --no-document --no-prerelease
RUN gem install lex-log --no-document --no-prerelease
CMD legionio
CMD ruby --jit $(which legionio)
11 changes: 8 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# frozen_string_literal: true

source 'https://rubygems.org'

gemspec

group :test do
gem 'rake'
gem 'rspec'
gem 'rspec_junit_formatter'
gem 'rubocop'
gem 'simplecov'
end
104 changes: 54 additions & 50 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,74 +1,74 @@
PATH
remote: .
specs:
lex-log (0.1.2)
lex-log (0.1.4)
legion-logging

GEM
remote: https://rubygems.org/
specs:
amq-protocol (2.3.2)
ast (2.4.1)
aws-eventstream (1.1.0)
aws-sigv4 (1.2.2)
ast (2.4.2)
aws-eventstream (1.1.1)
aws-sigv4 (1.2.3)
aws-eventstream (~> 1, >= 1.0.2)
bunny (2.17.0)
bunny (2.18.0)
amq-protocol (~> 2.3, >= 2.3.1)
concurrent-ruby (1.1.7)
concurrent-ruby-ext (1.1.7)
concurrent-ruby (= 1.1.7)
connection_pool (2.2.3)
daemons (1.3.1)
sorted_set (~> 1, >= 1.0.2)
concurrent-ruby (1.1.9)
concurrent-ruby-ext (1.1.9)
concurrent-ruby (= 1.1.9)
connection_pool (2.2.5)
daemons (1.4.0)
dalli (2.7.11)
diff-lcs (1.4.4)
docile (1.3.5)
json (2.5.1)
docile (1.4.0)
json_pure (2.5.1)
legion-cache (1.1.1)
legion-cache (1.2.0)
connection_pool (>= 2.2.3)
dalli (>= 2.7)
legion-logging
legion-settings
redis (>= 4.2)
legion-crypt (0.2.3)
vault
legion-exceptions (1.1.5)
legion-json (1.1.4)
legion-crypt (1.2.0)
vault (>= 0.15.0)
legion-json (1.2.0)
json_pure
legion-exceptions (>= 1.1.5)
multi_json
legion-logging (1.1.4)
legion-logging (1.2.0)
rainbow (~> 3)
legion-settings (1.1.3)
legion-json
legion-logging
legion-transport (1.1.8)
legion-settings (1.2.0)
legion-json (>= 1.2)
legion-transport (1.2.0)
bunny (>= 2.17.0)
concurrent-ruby (>= 1.1.7)
legion-json
legionio (0.4.0)
legion-settings
legionio (1.2.0)
concurrent-ruby (>= 1.1.7)
concurrent-ruby-ext (>= 1.1.7)
daemons (>= 1.3.1)
legion-cache
legion-cache (>= 0.2.0)
legion-crypt (>= 0.2.0)
legion-exceptions
legion-json
legion-logging
legion-settings
legion-transport (>= 1.1.8)
legion-json (>= 0.2.0)
legion-logging (>= 0.2.0)
legion-settings (>= 0.2.0)
legion-transport (>= 1.1.9)
lex-node
oj (>= 3.10)
thor (>= 1)
lex-node (0.1.3)
lex-node (0.2.0)
multi_json (1.15.0)
oj (3.11.0)
oj (3.11.5)
parallel (1.20.1)
parser (3.0.0.0)
parser (3.0.1.1)
ast (~> 2.4.1)
rainbow (3.0.0)
rake (13.0.3)
redis (4.2.5)
regexp_parser (2.0.3)
rexml (3.2.4)
rbtree (0.4.4)
redis (4.3.1)
regexp_parser (2.1.1)
rexml (3.2.5)
rspec (3.10.0)
rspec-core (~> 3.10.0)
rspec-expectations (~> 3.10.0)
Expand All @@ -78,46 +78,50 @@ GEM
rspec-expectations (3.10.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.10.0)
rspec-mocks (3.10.1)
rspec-mocks (3.10.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.10.0)
rspec-support (3.10.1)
rspec-support (3.10.2)
rspec_junit_formatter (0.4.1)
rspec-core (>= 2, < 4, != 2.12.0)
rubocop (1.8.1)
rubocop (1.16.1)
parallel (~> 1.10)
parser (>= 3.0.0.0)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml
rubocop-ast (>= 1.2.0, < 2.0)
rubocop-ast (>= 1.7.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.4.0)
parser (>= 2.7.1.5)
rubocop-ast (1.7.0)
parser (>= 3.0.1.1)
ruby-progressbar (1.11.0)
simplecov (0.17.1)
set (1.0.1)
simplecov (0.21.2)
docile (~> 1.1)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.2)
thor (1.0.1)
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-html (0.12.3)
simplecov_json_formatter (0.1.3)
sorted_set (1.0.3)
rbtree
set (~> 1.0)
thor (1.1.0)
unicode-display_width (2.0.0)
vault (0.15.0)
vault (0.16.0)
aws-sigv4

PLATFORMS
ruby

DEPENDENCIES
bundler (>= 2)
legionio
lex-log!
rake
rspec
rspec_junit_formatter
rubocop
simplecov (< 0.18.0)
simplecov

BUNDLED WITH
2.1.4
File renamed without changes.
8 changes: 0 additions & 8 deletions Rakefile

This file was deleted.

21 changes: 0 additions & 21 deletions bitbucket-pipelines.yml

This file was deleted.

7 changes: 6 additions & 1 deletion docker_deploy.rb
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
#!/usr/bin/env ruby

long_name = 'lex-log'
name = 'log'
require "./lib/legion/extensions/#{name}/version"
version = Legion::Extensions::Log::VERSION

system("gem build #{long_name}.gemspec")
system("gh release create v#{version} '#{long_name}-#{version}.gem'")
system("gem push #{long_name}-#{version}.gem")
system("gem push --key github --host https://rubygems.pkg.github.com/LegionIO #{long_name}-#{version}.gem")

puts "Building docker image for Legion v#{version}"
system("docker build --tag legionio/lex-#{name}:v#{version} .")
puts 'Pushing to hub.docker.com'
system("docker push legionio/lex-#{name}:v#{version}")
system("docker tag legionio/lex-#{name}:v#{version} legionio/lex-#{name}:latest")
system("docker push legionio/lex-#{name}:latest")
puts 'completed'
20 changes: 7 additions & 13 deletions lex-log.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,22 @@ Gem::Specification.new do |spec|
spec.email = ['[email protected]']

spec.summary = 'Used to generate logs within the Legion framework'
spec.description = 'It logs things'
spec.homepage = 'https://bitbucket.org/legion-io/lex-log'
spec.description = 'A LegionIO Extension to log to STDOUT and to files in an async fashion'
spec.homepage = 'https://github.com/LegionIO/lex-log'
spec.license = 'MIT'
spec.required_ruby_version = Gem::Requirement.new('>= 2.5.0')

spec.metadata['homepage_uri'] = spec.homepage
spec.metadata['source_code_uri'] = 'https://bitbucket.org/legion-io/lex-log/src'
spec.metadata['documentation_uri'] = 'https://legionio.atlassian.net/wiki/spaces/LEX/pages/11993089'
spec.metadata['changelog_uri'] = 'https://legionio.atlassian.net/wiki/spaces/LEX/pages/12156929'
spec.metadata['bug_tracker_uri'] = 'https://bitbucket.org/legion-io/lex-log/issues'
spec.metadata['source_code_uri'] = 'https://github.com/LegionIO/lex-logsrc'
spec.metadata['documentation_uri'] = 'https://github.com/LegionIO/lex-log'
spec.metadata['changelog_uri'] = 'https://github.com/LegionIO/lex-log'
spec.metadata['bug_tracker_uri'] = 'https://github.com/LegionIO/lex-log/issues'

spec.files = Dir.chdir(File.expand_path(__dir__)) do
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
end
spec.require_paths = ['lib']
spec.add_dependency 'legion-logging'

spec.add_development_dependency 'legionio'
spec.add_development_dependency 'rake'
spec.add_development_dependency 'rspec'
spec.add_development_dependency 'rspec_junit_formatter'
spec.add_development_dependency 'rubocop'
spec.add_development_dependency 'simplecov', '< 0.18.0'

spec.add_dependency 'legion-logging'
end
Loading

0 comments on commit 36734ff

Please sign in to comment.