Commit 23b80fb4 authored by Pablo Carranza's avatar Pablo Carranza

Add gemspec and initial code extraction

parent bddfd04a
source "https://rubygems.org"
group :test do
gem "rspec", "~>3.5"
end
GEM
remote: https://rubygems.org/
specs:
diff-lcs (1.2.5)
rspec (3.5.0)
rspec-core (~> 3.5.0)
rspec-expectations (~> 3.5.0)
rspec-mocks (~> 3.5.0)
rspec-core (3.5.1)
rspec-support (~> 3.5.0)
rspec-expectations (3.5.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.5.0)
rspec-mocks (3.5.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.5.0)
rspec-support (3.5.0)
PLATFORMS
ruby
DEPENDENCIES
rspec (~> 3.5)
BUNDLED WITH
1.12.5
Gem::Specification.new do |s|
s.name = "gitlab-monitoring"
s.version = "0.0.1"
s.date = "2016-07-27"
s.summary = "GitLab monitoring tools"
s.description = "GitLab monitoring tools"
s.authors = ["Pablo Carranza"]
s.email = "pablo@gitlab.com"
s.files = `git ls-files -z`.split("\x0")
s.require_paths = ["lib"]
s.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
s.test_files = spec.files.grep(%r{^(test|spec|features)/})
s.homepage = "http://gitlab.com"
s.license = "MIT"
end
module GitLab
class TimeTracker
def track
@start = Time.now.to_f
yield
Time.now.to_f - @start
end
end
end
require "spec_helper"
describe GitLab::TimeTracker do
let(:tracker) { subject.new }
it "tracks execution time" do
expect(tracker.track { sleep 0.1 }).to match {|v| v >= 0.1}
end
end
require "rspec"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment