-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from smortex/gem
Modernize the project root
- Loading branch information
Showing
11 changed files
with
270 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "bundler" # See documentation for possible values | ||
directory: "/" # Location of package manifests | ||
schedule: | ||
interval: "daily" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: '2.7' | ||
bundler-cache: true | ||
- name: Run rubocop | ||
run: bundle exec rubocop | ||
#test: | ||
# needs: lint | ||
# runs-on: ubuntu-latest | ||
# strategy: | ||
# matrix: | ||
# ruby-version: | ||
# - 2.6 | ||
# - 2.7 | ||
# - 3.0 | ||
# - 3.1 | ||
# steps: | ||
# - uses: actions/checkout@v3 | ||
# - name: Setup Ruby | ||
# uses: ruby/setup-ruby@v1 | ||
# with: | ||
# ruby-version: ${{ matrix.ruby-version }} | ||
# bundler-cache: true | ||
# - name: Run the test suite | ||
# run: bundle exec rspec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# For most projects, this workflow file will not need changing; you simply need | ||
# to commit it to your repository. | ||
# | ||
# You may wish to alter this file to override the set of languages analyzed, | ||
# or to provide custom queries or build logic. | ||
# | ||
# ******** NOTE ******** | ||
# We have attempted to detect the languages in your repository. Please check | ||
# the `language` matrix defined below to confirm you have the correct set of | ||
# supported CodeQL languages. | ||
# | ||
name: "CodeQL" | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: [ "main" ] | ||
schedule: | ||
- cron: '27 16 * * 6' | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: [ 'ruby' ] | ||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] | ||
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
# Initializes the CodeQL tools for scanning. | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v2 | ||
with: | ||
languages: ${{ matrix.language }} | ||
# If you wish to specify custom queries, you can do so here or in a config file. | ||
# By default, queries listed here will override any specified in a config file. | ||
# Prefix the list here with "+" to use these queries and those in the config file. | ||
|
||
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs | ||
# queries: security-extended,security-and-quality | ||
|
||
|
||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java). | ||
# If this step fails, then you should remove it and run the build manually (see below) | ||
- name: Autobuild | ||
uses: github/codeql-action/autobuild@v2 | ||
|
||
# ℹ️ Command-line programs to run using the OS shell. | ||
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun | ||
|
||
# If the Autobuild fails above, remove it and uncomment the following three lines. | ||
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. | ||
|
||
# - run: | | ||
# echo "Run, Build Application using script" | ||
# ./location_of_script_within_repo/buildscript.sh | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
Gemfile.lock | ||
pkg/ | ||
._* | ||
*~ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
require: | ||
- rubocop-rake | ||
- rubocop-rspec | ||
AllCops: | ||
Exclude: | ||
- lib/riemann/tools/*_parser.tab.rb | ||
- vendor/bundle/**/* | ||
Gemspec/RequiredRubyVersion: | ||
Enabled: false | ||
Layout/HashAlignment: | ||
EnforcedHashRocketStyle: table | ||
Layout/LineLength: | ||
Enabled: false | ||
Metrics/AbcSize: | ||
Enabled: false | ||
Metrics/BlockLength: | ||
Enabled: false | ||
Metrics/ClassLength: | ||
Enabled: false | ||
Metrics/CyclomaticComplexity: | ||
Enabled: false | ||
Metrics/MethodLength: | ||
Enabled: false | ||
Metrics/ParameterLists: | ||
Enabled: false | ||
Metrics/PerceivedComplexity: | ||
Enabled: false | ||
Naming/MethodParameterName: | ||
AllowedNames: | ||
- az # availability zone | ||
- id | ||
- lb # load balancer | ||
Style/Documentation: | ||
Enabled: false | ||
Style/HashSyntax: | ||
EnforcedShorthandSyntax: never | ||
Style/TrailingCommaInArguments: | ||
EnforcedStyleForMultiline: consistent_comma | ||
Style/TrailingCommaInArrayLiteral: | ||
EnforcedStyleForMultiline: consistent_comma | ||
Style/TrailingCommaInHashLiteral: | ||
EnforcedStyleForMultiline: consistent_comma |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# frozen_string_literal: true | ||
|
||
source 'https://rubygems.org' | ||
|
||
# Specify your gem's dependencies in riemann-postgresql.gemspec | ||
gemspec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'riemann/tools/postgresql/version' | ||
require 'bundler/gem_tasks' | ||
require 'github_changelog_generator/task' | ||
|
||
GitHubChangelogGenerator::RakeTask.new :changelog do |config| | ||
config.user = 'riemann' | ||
config.project = 'riemann-postgresql' | ||
config.exclude_labels = ['skip-changelog'] | ||
config.future_release = "v#{Riemann::Tools::Postgresql::VERSION}" | ||
end |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# frozen_string_literal: true | ||
|
||
module Riemann | ||
module Tools | ||
class Postgresql | ||
VERSION = '0.1.1' | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# frozen_string_literal: true | ||
|
||
require_relative 'lib/riemann/tools/postgresql/version' | ||
|
||
Gem::Specification.new do |spec| | ||
spec.name = 'riemann-postgresql' | ||
spec.version = Riemann::Tools::Postgresql::VERSION | ||
spec.authors = ['Pradeep Chhetri'] | ||
spec.email = ['[email protected]'] | ||
|
||
spec.summary = 'PostgreSQL Riemann Client' | ||
spec.homepage = 'https://github.com/riemann/riemann-postgresql' | ||
spec.license = 'MIT' | ||
spec.required_ruby_version = Gem::Requirement.new('>= 2.6.0') | ||
|
||
spec.metadata['allowed_push_host'] = 'https://rubygems.org/' | ||
|
||
spec.metadata['homepage_uri'] = spec.homepage | ||
spec.metadata['source_code_uri'] = spec.homepage | ||
spec.metadata['changelog_uri'] = spec.homepage | ||
|
||
# Specify which files should be added to the gem when it is released. | ||
# The `git ls-files -z` loads the files in the RubyGem that have been added into git. | ||
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.bindir = 'bin' | ||
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) } | ||
spec.require_paths = ['lib'] | ||
|
||
spec.add_runtime_dependency 'pg', '>= 0.17.1' | ||
spec.add_runtime_dependency 'riemann-tools', '>= 0.2.1' | ||
|
||
spec.add_development_dependency 'github_changelog_generator' | ||
spec.add_development_dependency 'rake' | ||
spec.add_development_dependency 'rspec' | ||
spec.add_development_dependency 'rubocop' | ||
spec.add_development_dependency 'rubocop-rake' | ||
spec.add_development_dependency 'rubocop-rspec' | ||
end |