Skip to content

Commit

Permalink
Merge branch 'main' into fix_rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
tungleduyxyz committed Jan 6, 2024
2 parents bf7ac55 + b9d4a15 commit 9796c95
Show file tree
Hide file tree
Showing 16 changed files with 215 additions and 14 deletions.
20 changes: 20 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
## How to contribute to Kill Bill

**Do not open up a GitHub issue before reaching out to our [Mailing-List](https://groups.google.com/forum/#!forum/killbilling-users)**. GitHub issues are primarily intended for tracking bug reports and fixes by the core team.

#### **Did you find a bug?**

In your [Mailing-List](https://groups.google.com/forum/#!forum/killbilling-users) post, specify:

* Step by step description on how to reproduce the issue
* [Account data and system dump](http://docs.killbill.io/0.19/debugging.html#_seeking_help) via KPM of an affected account

#### **Do you intend to add a new feature or change an existing one?**

Do not open an issue or pull request on GitHub until you have collected positive feedback about the change on the [Mailing-List](https://groups.google.com/forum/#!forum/killbilling-users).

When submitting code, make sure to add [new tests](http://docs.killbill.io/0.19/development.html#_navigating_the_kill_bill_codebase).

#### **Do you want to contribute to the Kill Bill documentation?**

Open a pull request on GitHub in the [killbill-docs](https://github.com/killbill/killbill-docs) repository.
3 changes: 3 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# These are supported funding model platforms

github: [killbill]
29 changes: 29 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: "CodeQL"

on:
- push
- workflow_dispatch

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'javascript', 'ruby' ]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
- name: Autobuild
uses: github/codeql-action/autobuild@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
46 changes: 46 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: release

on:
workflow_dispatch:
inputs:
target_version:
description: 'Target version: next [major|minor|patch|pre|release] or a given version number [x.x.x]'
required: true
default: 'patch'

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup git user
env:
BUILD_USER: ${{ secrets.BUILD_USER }}
BUILD_TOKEN: ${{ secrets.BUILD_TOKEN }}
run: |
git config --global user.email "contact@killbill.io"
git config --global user.name "Kill Bill core team"
git config --global url."https://${BUILD_USER}:${BUILD_TOKEN}@github.com/".insteadOf "git@github.com:"
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2.2'
- name: Download Ruby dependencies
run: |
bundle install
- name: Tag repository
run: |
bundle exec gem bump -c -p -t -v ${{ github.event.inputs.target_version }}
- name: Release Gem
env:
RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
run: |
mkdir -p ~/.gem
cat << EOF > ~/.gem/credentials
---
:rubygems_api_key: ${RUBYGEMS_API_KEY}
EOF
chmod 0600 ~/.gem/credentials
bundle install
bundle exec gem release
rm -f ~/.gem/credentials
20 changes: 20 additions & 0 deletions .github/workflows/rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: RuboCop

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2.2
- name: Install gems
run: |
bundle config path vendor/bundle
bundle config set without 'default doc job cable storage ujs test db'
bundle install --jobs 4 --retry 3
- name: Run RuboCop
run: bundle exec rubocop --parallel
52 changes: 52 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
inherit_mode:
merge:
- Exclude

AllCops:
Exclude:
- 'test/dummy/**/*'
NewCops: enable
SuggestExtensions: false

Gemspec/RequiredRubyVersion:
Enabled: false

Layout/LineLength:
Enabled: false

# Alternative?
Gemspec/RubyVersionGlobalsUsage:
Enabled: false

Metrics/AbcSize:
Enabled: false

Metrics/BlockLength:
Enabled: false

Metrics/BlockNesting:
Enabled: false

Metrics/ClassLength:
Enabled: false

Metrics/CyclomaticComplexity:
Enabled: false

Metrics/MethodLength:
Enabled: false

Metrics/ModuleLength:
Enabled: false

Metrics/ParameterLists:
Enabled: false

Metrics/PerceivedComplexity:
Enabled: false

Style/Documentation:
Enabled: false

Style/EmptyElse:
EnforcedStyle: empty
9 changes: 8 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
source "https://rubygems.org"
# frozen_string_literal: true

source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

# Specify your gem's dependencies in killbill-assets-ui.gemspec.
gemspec

group :development do
gem 'gem-release'
gem 'rubocop'
end
6 changes: 4 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
require "bundler/setup"
# frozen_string_literal: true

require "bundler/gem_tasks"
require 'bundler/setup'

require 'bundler/gem_tasks'
6 changes: 6 additions & 0 deletions app/assets/javascripts/assets/jquery-ui.min.js

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions app/assets/stylesheets/assets/jquery-ui.min.css

Large diffs are not rendered by default.

13 changes: 8 additions & 5 deletions assets.gemspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
require_relative "lib/assets/version"
# frozen_string_literal: true

require_relative 'lib/assets/version'

Gem::Specification.new do |s|
s.name = "killbill-assets-ui"
s.name = 'killbill-assets-ui'
s.version = Assets::VERSION
s.authors = 'Kill Bill core team'
s.email = 'killbilling-users@googlegroups.com'
Expand All @@ -11,11 +13,12 @@ Gem::Specification.new do |s|
s.license = 'MIT'

s.files = Dir.chdir(File.expand_path(__dir__)) do
Dir["{app,config,db,lib}/**/*", "MIT-LICENSE", "Rakefile", "README.md"]
Dir['{app,config,db,lib}/**/*', 'MIT-LICENSE', 'Rakefile', 'README.md']
end

s.add_dependency "rails", ">= 7.0"
s.add_dependency 'bootstrap-datepicker-rails'
s.add_dependency 'font-awesome-rails'
s.add_dependency 'jquery-rails', '~> 4.5.1'
s.add_dependency 'bootstrap-datepicker-rails'
s.add_dependency 'rails', '>= 7.0'
s.metadata['rubygems_mfa_required'] = 'true'
end
8 changes: 5 additions & 3 deletions bin/test
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env ruby
$: << File.expand_path("../test", __dir__)
# frozen_string_literal: true

require "bundler/setup"
require "rails/plugin/test"
$LOAD_PATH << File.expand_path('../test', __dir__)

require 'bundler/setup'
require 'rails/plugin/test'
1 change: 1 addition & 0 deletions lib/assets/engine.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require 'font-awesome-rails'
require 'jquery-rails'
require 'bootstrap-datepicker-rails'
Expand Down
2 changes: 1 addition & 1 deletion lib/assets/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Assets
VERSION = "0.1.0"
VERSION = '0.1.1'
end
6 changes: 4 additions & 2 deletions lib/killbill_assets_ui.rb
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
require "assets/version"
require "assets/engine"
# frozen_string_literal: true

require 'assets/version'
require 'assets/engine'
1 change: 1 addition & 0 deletions lib/tasks/killbill/assets/ui_tasks.rake
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
# desc "Explaining what the task does"
# task :killbill_assets_ui do
# # Task goes here
Expand Down

0 comments on commit 9796c95

Please sign in to comment.