-
Notifications
You must be signed in to change notification settings - Fork 2
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
Refactor modules into separate gems #7
Open
jmbehr
wants to merge
3
commits into
master
Choose a base branch
from
split-gems
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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,39 @@ | ||
# coding: utf-8 | ||
# frozen_string_literal: true | ||
|
||
lib = File.expand_path('lib', __dir__) | ||
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) | ||
require 'dog_collar/version' | ||
|
||
extension_files = [] | ||
Dir['dog_collar-*.gemspec'].each do |gemspec| | ||
next if gemspec == __FILE__ | ||
|
||
name = File.basename(gemspec, '.gemspec').delete_prefix('dog_collar-') | ||
extension_files << "lib/dog_collar/#{name}.rb" | ||
|
||
Dir["lib/dog_collar/contrib/#{name}/**/*.rb"].each do |file| | ||
extension_files << file | ||
end | ||
end | ||
|
||
Gem::Specification.new do |spec| | ||
spec.name = 'dog_collar-circuitry' | ||
spec.version = DogCollar::VERSION::STRING | ||
spec.required_ruby_version = ">= #{DogCollar::VERSION::MINIMUM_RUBY_VERSION}" | ||
spec.required_rubygems_version = '>= 2.0.0' | ||
spec.authors = ['James Behr'] | ||
spec.email = ['[email protected]'] | ||
spec.summary = 'DogCollar Circuitry instrumentation' | ||
spec.homepage = 'https://github.com/get-smarter/dog_collar' | ||
|
||
spec.metadata['allowed_push_host'] = 'https://rubygems.org' | ||
|
||
spec.files = `git ls-files -- lib/dog_collar`.split("\n") | ||
spec.files -= extension_files | ||
spec.test_files = `git ls-files -- spec`.split("\n") | ||
spec.require_paths = ['lib'] | ||
|
||
spec.add_dependency 'amazing_print' | ||
spec.add_dependency 'ddtrace', '~> 0.37.0' | ||
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,39 @@ | ||
# coding: utf-8 | ||
# frozen_string_literal: true | ||
|
||
lib = File.expand_path('lib', __dir__) | ||
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) | ||
require 'dog_collar/version' | ||
|
||
extension_files = [] | ||
Dir['dog_collar-*.gemspec'].each do |gemspec| | ||
next if gemspec == __FILE__ | ||
|
||
name = File.basename(gemspec, '.gemspec').delete_prefix('dog_collar-') | ||
extension_files << "lib/dog_collar/#{name}.rb" | ||
|
||
Dir["lib/dog_collar/contrib/#{name}/**/*.rb"].each do |file| | ||
extension_files << file | ||
end | ||
end | ||
|
||
Gem::Specification.new do |spec| | ||
spec.name = 'dog_collar-core' | ||
spec.version = DogCollar::VERSION::STRING | ||
spec.required_ruby_version = ">= #{DogCollar::VERSION::MINIMUM_RUBY_VERSION}" | ||
spec.required_rubygems_version = '>= 2.0.0' | ||
spec.authors = ['James Behr'] | ||
spec.email = ['[email protected]'] | ||
spec.summary = 'DogCollar core logging functionality' | ||
spec.homepage = 'https://github.com/get-smarter/dog_collar' | ||
|
||
spec.metadata['allowed_push_host'] = 'https://rubygems.org' | ||
|
||
spec.files = `git ls-files -- lib/dog_collar`.split("\n") | ||
spec.files -= extension_files | ||
spec.test_files = `git ls-files -- spec`.split("\n") | ||
spec.require_paths = ['lib'] | ||
|
||
spec.add_dependency 'amazing_print' | ||
spec.add_dependency 'ddtrace', '~> 0.37.0' | ||
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,39 @@ | ||
# coding: utf-8 | ||
# frozen_string_literal: true | ||
|
||
lib = File.expand_path('lib', __dir__) | ||
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) | ||
require 'dog_collar/version' | ||
|
||
extension_files = [] | ||
Dir['dog_collar-*.gemspec'].each do |gemspec| | ||
next if gemspec == __FILE__ | ||
|
||
name = File.basename(gemspec, '.gemspec').delete_prefix('dog_collar-') | ||
extension_files << "lib/dog_collar/#{name}.rb" | ||
|
||
Dir["lib/dog_collar/contrib/#{name}/**/*.rb"].each do |file| | ||
extension_files << file | ||
end | ||
end | ||
|
||
Gem::Specification.new do |spec| | ||
spec.name = 'dog_collar-ethon' | ||
spec.version = DogCollar::VERSION::STRING | ||
spec.required_ruby_version = ">= #{DogCollar::VERSION::MINIMUM_RUBY_VERSION}" | ||
spec.required_rubygems_version = '>= 2.0.0' | ||
spec.authors = ['James Behr'] | ||
spec.email = ['[email protected]'] | ||
spec.summary = 'DogCollar Ethon instrumentation' | ||
spec.homepage = 'https://github.com/get-smarter/dog_collar' | ||
|
||
spec.metadata['allowed_push_host'] = 'https://rubygems.org' | ||
|
||
spec.files = `git ls-files -- lib/dog_collar`.split("\n") | ||
spec.files -= extension_files | ||
spec.test_files = `git ls-files -- spec`.split("\n") | ||
spec.require_paths = ['lib'] | ||
|
||
spec.add_dependency 'amazing_print' | ||
spec.add_dependency 'ddtrace', '~> 0.37.0' | ||
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,39 @@ | ||
# coding: utf-8 | ||
# frozen_string_literal: true | ||
|
||
lib = File.expand_path('lib', __dir__) | ||
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) | ||
require 'dog_collar/version' | ||
|
||
extension_files = [] | ||
Dir['dog_collar-*.gemspec'].each do |gemspec| | ||
next if gemspec == __FILE__ | ||
|
||
name = File.basename(gemspec, '.gemspec').delete_prefix('dog_collar-') | ||
extension_files << "lib/dog_collar/#{name}.rb" | ||
|
||
Dir["lib/dog_collar/contrib/#{name}/**/*.rb"].each do |file| | ||
extension_files << file | ||
end | ||
end | ||
|
||
Gem::Specification.new do |spec| | ||
spec.name = 'dog_collar-rails' | ||
spec.version = DogCollar::VERSION::STRING | ||
spec.required_ruby_version = ">= #{DogCollar::VERSION::MINIMUM_RUBY_VERSION}" | ||
spec.required_rubygems_version = '>= 2.0.0' | ||
spec.authors = ['James Behr'] | ||
spec.email = ['[email protected]'] | ||
spec.summary = 'DogCollar Rails instrumentation' | ||
spec.homepage = 'https://github.com/get-smarter/dog_collar' | ||
|
||
spec.metadata['allowed_push_host'] = 'https://rubygems.org' | ||
|
||
spec.files = `git ls-files -- lib/dog_collar/contrib/rails`.split("\n") | ||
spec.files -= extension_files | ||
spec.test_files = `git ls-files -- spec`.split("\n") | ||
spec.require_paths = ['lib'] | ||
|
||
spec.add_dependency 'dog_collar-core', DogCollar::VERSION::STRING | ||
spec.add_dependency 'lograge' | ||
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,39 @@ | ||
# coding: utf-8 | ||
# frozen_string_literal: true | ||
|
||
lib = File.expand_path('lib', __dir__) | ||
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) | ||
require 'dog_collar/version' | ||
|
||
extension_files = [] | ||
Dir['dog_collar-*.gemspec'].each do |gemspec| | ||
next if gemspec == __FILE__ | ||
|
||
name = File.basename(gemspec, '.gemspec').delete_prefix('dog_collar-') | ||
extension_files << "lib/dog_collar/#{name}.rb" | ||
|
||
Dir["lib/dog_collar/contrib/#{name}/**/*.rb"].each do |file| | ||
extension_files << file | ||
end | ||
end | ||
|
||
Gem::Specification.new do |spec| | ||
spec.name = 'dog_collar-sidekiq' | ||
spec.version = DogCollar::VERSION::STRING | ||
spec.required_ruby_version = ">= #{DogCollar::VERSION::MINIMUM_RUBY_VERSION}" | ||
spec.required_rubygems_version = '>= 2.0.0' | ||
spec.authors = ['James Behr'] | ||
spec.email = ['[email protected]'] | ||
spec.summary = 'DogCollar Sidekiq instrumentation' | ||
spec.homepage = 'https://github.com/get-smarter/dog_collar' | ||
|
||
spec.metadata['allowed_push_host'] = 'https://rubygems.org' | ||
|
||
spec.files = `git ls-files -- lib/dog_collar`.split("\n") | ||
spec.files -= extension_files | ||
spec.test_files = `git ls-files -- spec`.split("\n") | ||
spec.require_paths = ['lib'] | ||
|
||
spec.add_dependency 'amazing_print' | ||
spec.add_dependency 'ddtrace', '~> 0.37.0' | ||
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 |
---|---|---|
|
@@ -6,16 +6,18 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) | |
require 'dog_collar/version' | ||
|
||
Gem::Specification.new do |spec| | ||
spec.name = 'dog_collar' | ||
spec.version = DogCollar::VERSION::STRING | ||
spec.name = 'dog_collar' | ||
spec.version = DogCollar::VERSION::STRING | ||
spec.required_ruby_version = ">= #{DogCollar::VERSION::MINIMUM_RUBY_VERSION}" | ||
spec.required_rubygems_version = '>= 2.0.0' | ||
spec.authors = ['James Behr'] | ||
spec.email = ['[email protected]'] | ||
spec.authors = ['James Behr'] | ||
spec.email = ['[email protected]'] | ||
|
||
spec.summary = 'Datadog wrapper' | ||
spec.summary = 'Zero-configuration structured logging and instrumentation' | ||
spec.description = <<-DESCRIPTION.gsub(/^[\s]+/, '') | ||
Wrapper around ddtrace | ||
DogCollar wraps ddtrace-rb with sensible defaults for instrumentation, as | ||
well as including a structured logger that automatically relates logs to | ||
the active trace. | ||
DESCRIPTION | ||
|
||
spec.homepage = 'https://github.com/get-smarter/dog_collar' | ||
|
@@ -24,13 +26,13 @@ Gem::Specification.new do |spec| | |
|
||
spec.metadata['allowed_push_host'] = 'https://rubygems.org' | ||
|
||
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } | ||
spec.files = ['lib/dog_collar.rb'] | ||
spec.require_paths = ['lib'] | ||
|
||
# Optional extensions | ||
spec.add_dependency 'amazing_print' | ||
spec.add_dependency 'ddtrace', '~> 0.37.0' | ||
spec.add_dependency 'lograge' | ||
Dir['dog_collar-*.gemspec'].each do |gemspec| | ||
extension = File.basename(gemspec, '.gemspec') | ||
spec.add_dependency extension, DogCollar::VERSION::STRING | ||
end | ||
|
||
# Development dependencies | ||
spec.add_development_dependency 'appraisal' | ||
|
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,14 +1,7 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'dog_collar/configuration' | ||
require 'dog_collar/logging/logger' | ||
require 'dog_collar/logging/instrumented_logger' | ||
|
||
module DogCollar | ||
extend Configuration | ||
end | ||
|
||
require 'dog_collar/contrib/sidekiq/integration' | ||
require 'dog_collar/contrib/rails/integration' | ||
require 'dog_collar/contrib/circuitry/integration' | ||
require 'dog_collar/contrib/ethon/integration' | ||
require 'dog_collar/core' | ||
require 'dog_collar/circuitry' | ||
require 'dog_collar/ethon' | ||
require 'dog_collar/rails' | ||
require 'dog_collar/sidekiq' |
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,3 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'dog_collar/contrib/circuitry/integration' |
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,10 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'ddtrace' | ||
require 'dog_collar/configuration' | ||
require 'dog_collar/logging/logger' | ||
require 'dog_collar/logging/instrumented_logger' | ||
|
||
module DogCollar | ||
extend Configuration | ||
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,3 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'dog_collar/contrib/ethon/integration' |
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,3 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'dog_collar/contrib/rails/integration' |
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,3 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'dog_collar/contrib/sidekiq/integration' |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix list of files