Skip to content

Commit

Permalink
Github Migration
Browse files Browse the repository at this point in the history
  • Loading branch information
Esity committed Jun 13, 2021
1 parent 8ad2c48 commit ed9b1cc
Show file tree
Hide file tree
Showing 14 changed files with 158 additions and 118 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/rspec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
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-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
8 changes: 1 addition & 7 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,12 @@ Metrics/BlockLength:
Max: 50
Metrics/AbcSize:
Max: 30
Layout/SpaceAroundEqualsInParameterDefault:
EnforcedStyle: space
Style/SymbolArray:
Enabled: true
Layout/HashAlignment:
EnforcedHashRocketStyle: table
EnforcedColonStyle: table
Style/Documentation:
Enabled: false
AllCops:
TargetRubyVersion: 2.5
NewCops: enable
SuggestExtensions: false
Style/FrozenStringLiteralComment:
Enabled: false
Naming/FileName:
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# LEX::Redis

## v0.1.1
Bumping version for GitHub migration
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM legionio/legion:latest
LABEL maintainer="Matthew Iverson <[email protected]>"

RUN gem install lex-redis --no-document --no-prerelease
CMD ruby --jit $(which legionio)
9 changes: 8 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
source 'https://rubygems.org'

gemspec

group :test do
gem 'rake'
gem 'rspec'
gem 'rspec_junit_formatter'
gem 'rubocop'
gem 'simplecov'
end
52 changes: 31 additions & 21 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,52 +7,62 @@ PATH
GEM
remote: https://rubygems.org/
specs:
ast (2.4.1)
ast (2.4.2)
diff-lcs (1.4.4)
parallel (1.19.2)
parser (2.7.2.0)
docile (1.4.0)
parallel (1.20.1)
parser (3.0.1.1)
ast (~> 2.4.1)
rainbow (3.0.0)
rake (13.0.1)
redis (4.2.2)
regexp_parser (1.8.2)
rexml (3.2.4)
rake (13.0.3)
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)
rspec-mocks (~> 3.10.0)
rspec-core (3.10.0)
rspec-core (3.10.1)
rspec-support (~> 3.10.0)
rspec-expectations (3.10.0)
rspec-expectations (3.10.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.10.0)
rspec-mocks (3.10.0)
rspec-mocks (3.10.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.10.0)
rspec-support (3.10.0)
rubocop (1.1.0)
rspec-support (3.10.2)
rspec_junit_formatter (0.4.1)
rspec-core (>= 2, < 4, != 2.12.0)
rubocop (1.16.1)
parallel (~> 1.10)
parser (>= 2.7.1.5)
parser (>= 3.0.0.0)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8)
regexp_parser (>= 1.8, < 3.0)
rexml
rubocop-ast (>= 1.0.1)
rubocop-ast (>= 1.7.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 2.0)
rubocop-ast (1.1.0)
parser (>= 2.7.1.5)
ruby-progressbar (1.10.1)
unicode-display_width (1.7.0)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.7.0)
parser (>= 3.0.1.1)
ruby-progressbar (1.11.0)
simplecov (0.21.2)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-html (0.12.3)
simplecov_json_formatter (0.1.3)
unicode-display_width (2.0.0)

PLATFORMS
ruby

DEPENDENCIES
bundler (>= 2)
lex-redis!
rake
rspec
rspec_junit_formatter
rubocop
simplecov

BUNDLED WITH
2.1.4
File renamed without changes.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Legion::Extensions::Redis

Connections Legion to Redis
Connects LegionIO to Redis
6 changes: 0 additions & 6 deletions Rakefile

This file was deleted.

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

This file was deleted.

19 changes: 19 additions & 0 deletions docker_deploy.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env ruby

long_name = 'lex-redis'
name = 'redis'
require "./lib/legion/extensions/#{name}/version"
version = Legion::Extensions::Redis::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} .")
system("docker build --tag legionio/lex-#{name}:latest .")
puts 'Pushing to hub.docker.com'
system("docker push legionio/lex-#{name}:v#{version}")
system("docker push legionio/lex-#{name}:latest")
puts 'completed'
18 changes: 6 additions & 12 deletions lex-redis.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,19 @@ Gem::Specification.new do |spec|
spec.email = ['[email protected]']

spec.summary = 'LEX::redis'
spec.description = 'LEX::redis'
spec.homepage = 'https://bitbucket.org/legion-io/lex-redis'
spec.description = 'Connects LegionIO to Redis Servers'
spec.homepage = 'https://github.com/LegionIO/lex-redis'
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-redis'
spec.metadata['documentation_uri'] = 'https://legionio.atlassian.net/wiki/spaces/LEX/pages/614891585'
spec.metadata['changelog_uri'] = 'https://legionio.atlassian.net/wiki/spaces/LEX/pages/612270191'
spec.metadata['bug_tracker_uri'] = 'https://bitbucket.org/legion-io/lex-redis/issues'
spec.metadata['source_code_uri'] = 'https://github.com/LegionIO/lex-redis'
spec.metadata['documentation_uri'] = 'https://github.com/LegionIO/lex-redis'
spec.metadata['changelog_uri'] = 'https://github.com/LegionIO/lex-redis'
spec.metadata['bug_tracker_uri'] = 'https://github.com/LegionIO/lex-redis/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_development_dependency 'bundler', '>= 2'
spec.add_development_dependency 'rake'
spec.add_development_dependency 'rspec'
spec.add_development_dependency 'rubocop'

spec.add_dependency 'redis'
end
2 changes: 1 addition & 1 deletion lib/legion/extensions/redis/version.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module Legion
module Extensions
module Redis
VERSION = '0.1.0'.freeze
VERSION = '0.1.1'.freeze
end
end
end

0 comments on commit ed9b1cc

Please sign in to comment.