Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SideCI Demo Pull Request #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions sideci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
linter:
rubocop:
root_dir: 'sideci_demo'
2 changes: 2 additions & 0 deletions sideci_demo/.rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
AllCops:
TargetRubyVersion: 2.4
1 change: 1 addition & 0 deletions sideci_demo/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
gem 'rubocop', '0.50.0'
28 changes: 28 additions & 0 deletions sideci_demo/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
GEM
specs:
ast (2.3.0)
parallel (1.12.0)
parser (2.4.0.0)
ast (~> 2.2)
powerpack (0.1.1)
rainbow (2.2.2)
rake
rake (12.1.0)
rubocop (0.50.0)
parallel (~> 1.10)
parser (>= 2.3.3.1, < 3.0)
powerpack (~> 0.1)
rainbow (>= 2.2.2, < 3.0)
ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.0, >= 1.0.1)
ruby-progressbar (1.8.1)
unicode-display_width (1.3.0)

PLATFORMS
ruby

DEPENDENCIES
rubocop (= 0.50.0)

BUNDLED WITH
1.15.4
30 changes: 30 additions & 0 deletions sideci_demo/rubocop_demo.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# frozen_string_literal: true

# GitHub Repository
class Repository
attr_reader :client

def initialize(owner, name)
@owner = owner
@name = name
@client = Github.new
end

def releases
repository&.releases.map(&:name)
end

def active_branch
repository.branches.max { |a, b| a.updated_at <=> b.updated_at }
end

private

def repository
client.repository full_name
end

def full_name
"#{owner}/#{name}"
end
end
1 change: 1 addition & 0 deletions sideci_demo/test/test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
puts "tests"