-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e82f64b
commit e518170
Showing
9 changed files
with
83 additions
and
37 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 |
---|---|---|
@@ -1,9 +1,15 @@ | ||
source "https://rubygems.org" | ||
# frozen_string_literal: true | ||
|
||
source 'https://rubygems.org' | ||
|
||
gemspec | ||
|
||
gem "rake", "~> 12.0" | ||
gem "rspec", "~> 3.0" | ||
gem 'sniffer', git: 'https://github.com/dsalahutdinov/sniffer', branch: 'feature/middleware' | ||
gem 'rake', '~> 12.0' | ||
gem 'rspec', '~> 3.0' | ||
gem 'rubocop' | ||
|
||
gem 'byebug' | ||
gem 'faraday' | ||
gem 'faraday', require: false | ||
gem 'sniffer', | ||
git: 'https://github.com/dsalahutdinov/sniffer', | ||
branch: 'feature/middleware' |
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,6 +1,11 @@ | ||
require "bundler/gem_tasks" | ||
require "rspec/core/rake_task" | ||
# frozen_string_literal: true | ||
|
||
require 'bundler/gem_tasks' | ||
require 'rspec/core/rake_task' | ||
require 'rubocop/rake_task' | ||
|
||
RuboCop::RakeTask.new | ||
|
||
RSpec::Core::RakeTask.new(:spec) | ||
|
||
task :default => :spec | ||
task default: %i[rubocop spec] |
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
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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
# frozen_string_literal: true | ||
|
||
module Yabeda | ||
module Http | ||
VERSION = "0.1.0" | ||
VERSION = '0.1.0' | ||
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
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,9 +1,27 @@ | ||
# frozen_string_literal: true | ||
|
||
RSpec.describe Yabeda::Http do | ||
it "has a version number" do | ||
it 'has a version number' do | ||
expect(Yabeda::Http::VERSION).not_to be nil | ||
end | ||
|
||
it "does something useful" do | ||
expect(false).to eq(true) | ||
context 'sdf' do | ||
before do | ||
Yabeda.configure! | ||
Faraday.get 'http://sushi.com/nigiri/sake.json' | ||
end | ||
|
||
it do | ||
expect(Yabeda.http_requests_total.values).to( | ||
eq( | ||
{ | ||
host: 'sushi.com', | ||
method: 'GET', | ||
port: 80, | ||
query: '/nigiri/sake.json' | ||
} => 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 |
---|---|---|
@@ -1,27 +1,31 @@ | ||
# frozen_string_literal: true | ||
|
||
require_relative 'lib/yabeda/http/version' | ||
|
||
Gem::Specification.new do |spec| | ||
spec.name = "yabeda-http" | ||
spec.name = 'yabeda-http' | ||
spec.version = Yabeda::Http::VERSION | ||
spec.authors = ["Dmitry Salahutdinov"] | ||
spec.email = ["[email protected]"] | ||
spec.authors = ['Dmitry Salahutdinov'] | ||
spec.email = ['[email protected]'] | ||
|
||
spec.summary = %q{Monitoring of external services http/https calls} | ||
spec.description = %q{Extends Yabeda metrics to collect external calls} | ||
spec.homepage = "https://github.com/yabeda-rb/yabeda-http" | ||
spec.license = "MIT" | ||
spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0") | ||
spec.summary = 'Monitoring of external services http/https calls' | ||
spec.description = 'Extends Yabeda metrics to collect external calls' | ||
spec.homepage = 'https://github.com/yabeda-rb/yabeda-http' | ||
spec.license = 'MIT' | ||
spec.required_ruby_version = Gem::Requirement.new('>= 2.3.0') | ||
|
||
spec.metadata["homepage_uri"] = spec.homepage | ||
spec.metadata["source_code_uri"] = "https://github.com/yabeda-rb/yabeda-http" | ||
spec.metadata['homepage_uri'] = spec.homepage | ||
spec.metadata['source_code_uri'] = 'https://github.com/yabeda-rb/yabeda-http' | ||
|
||
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do | ||
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } | ||
spec.files = Dir.chdir(File.expand_path(__dir__)) do | ||
`git ls-files -z`.split("\x0").reject do |f| | ||
f.match(%r{^(test|spec|features)/}) | ||
end | ||
end | ||
spec.bindir = "exe" | ||
spec.bindir = 'exe' | ||
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } | ||
spec.require_paths = ["lib"] | ||
spec.require_paths = ['lib'] | ||
|
||
spec.add_runtime_dependency "yabeda" | ||
spec.add_runtime_dependency "sniffer" | ||
spec.add_runtime_dependency 'sniffer' | ||
spec.add_runtime_dependency 'yabeda' | ||
end |