Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
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
101 changes: 101 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
version: 2.1
tagged_build_filters: &tagged_build_filters
branches:
ignore: /.*/
tags:
only: /v[0-9]+\.[0-9]+\.[0-9]+/
test_build_filters: &test_build_filters
branches:
only: /.*/
tags:
ignore: /v[0-9]+\.[0-9]+\.[0-9]+/
jobs:
test:
docker:
- image: circleci/ruby:2.6.5
steps:
- checkout
- run: bundle install
- run: rubocop -c .rubocop.yml -a
build:
docker:
- image: circleci/ruby:2.6.5
steps:
- checkout
- run:
name: Check Tagged Push
command: |
PKG_VERSION=$(grep VERSION lib/version.rb | cut -d'"' -f2)
if [[ "${CIRCLE_TAG}" != "v${PKG_VERSION}" ]]; then
echo "There is mismatch:"
echo " TAG_VERSION: ${CIRCLE_TAG}"
echo " PKG_VERSION: v${PKG_VERSION}"
exit 1
fi
- run: gem build logdna.gemspec
- persist_to_workspace:
root: .
paths:
- ./logdna-*.gem
release:
docker:
- image: circleci/golang:1.12
steps:
- attach_workspace:
at: .
- run: go get -u github.com/tcnksm/ghr
- run:
name: Create a Release
command: |
ghr \
-n "LogDNA Ruby Logger ${CIRCLE_TAG}" \
-t ${GITHUB_TOKEN} \
-u ${CIRCLE_PROJECT_USERNAME} \
-r ${CIRCLE_PROJECT_REPONAME} \
-draft ${CIRCLE_TAG} ${CIRCLE_WORKING_DIRECTORY}
- persist_to_workspace:
root: .
paths:
- ./logdna-*.gem
approve:
machine: true
steps:
- attach_workspace:
at: .
- persist_to_workspace:
root: .
paths:
- ./logdna-*.gem
publish:
docker:
- image: circleci/ruby:2.6.5
steps:
- attach_workspace:
at: .
- run: gem push logdna-*.gem -k ${RUBYGEMS_API_KEY}
workflows:
update:
jobs:
- test:
filters: *tagged_build_filters
- build:
requires:
- test
filters: *tagged_build_filters
- release:
requires:
- build
filters: *tagged_build_filters
- approve:
type: approval
requires:
- release
filters: *tagged_build_filters
- publish:
requires:
- approve
filters: *tagged_build_filters
test:
jobs:
- test:
filters: *test_build_filters
2 changes: 0 additions & 2 deletions .rspec

This file was deleted.

8 changes: 4 additions & 4 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ Style/CollectionMethods:
# inject seems more common in the community.
reduce: "inject"

Style/UnneededInterpolation:
Enabled: flase
Style/RedundantInterpolation:
Enabled: false

Style/RescueStandardError:
Enabled: flase
Enabled: false

# Either allow this style or don't. Marking it as safe with parenthesis
# is silly. Let's try to live without them for now.
Expand All @@ -83,7 +83,7 @@ Style/SignalException:
# Suppressing exceptions can be perfectly fine, and be it to avoid to
# explicitly type nil into the rescue since that's what you want to return,
# or suppressing LoadError for optional dependencies
Lint/HandleExceptions:
Lint/SuppressedException:
Enabled: false

# { ... } for multi-line blocks is okay, follow Weirichs rule instead:
Expand Down
1 change: 0 additions & 1 deletion .ruby-version

This file was deleted.

10 changes: 5 additions & 5 deletions LICENSE.txt → LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2016 edwin-lai
Copyright (c) 2019 LogDNA

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -9,13 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
6 changes: 0 additions & 6 deletions Rakefile

This file was deleted.

15 changes: 3 additions & 12 deletions logdna.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,17 @@ require 'logdna/version'
Gem::Specification.new do |spec|
spec.name = 'logdna'
spec.version = LogDNA::VERSION
spec.authors = 'Gun Woo Choi, Derek Zhou'
spec.authors = 'Gun Woo Choi, Derek Zhou, Vilya Levitskiy, Muaz Siddiqui'
spec.email = 'support@logdna.com'

spec.summary = 'LogDNA Ruby logger'
spec.homepage = 'https://github.com/logdna/ruby'
spec.license = 'MIT'

spec.files = `git ls-files -z`.split("\x0").reject do |f|
f.match(%r{^(test|spec|features)/})
end
spec.files = Dir.glob("{lib}/**/*.rb") + %w(LICENSE README.md)
spec.bindir = 'exe'
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ['lib']

spec.add_runtime_dependency 'concurrent-ruby', '~> 1.0'
spec.add_runtime_dependency 'require_all', '~> 1.4'
spec.add_runtime_dependency 'json', '~> 2.0'

spec.add_development_dependency 'bundler', '~> 1.13'
spec.add_development_dependency 'rake', '~> 10.5'
spec.add_development_dependency 'rspec', '~> 3.5'
spec.add_development_dependency 'webmock', '~> 2.3'
spec.add_development_dependency 'rubocop', '~> 0.78'
end
56 changes: 0 additions & 56 deletions test.rb

This file was deleted.