Skip to content
This repository has been archived by the owner on Mar 6, 2024. It is now read-only.

Upgrade gem dependences #11

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0.0-p247
2.5.0
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
language: ruby
rvm:
- 1.9.3
- 2.0.0
- 2.5.0
services:
- redis-server
8 changes: 4 additions & 4 deletions spec/lib/tabs/metrics/counter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -135,26 +135,26 @@ def create_span(time_unit)

before do
3.times { metric.increment }
expect(exists("stat:counter:foo:total")).to be_true
expect(exists("stat:counter:foo:total")).to be_truthy
@count_keys = (Tabs::Resolution.all.map do |res|
smembers("stat:counter:foo:keys:#{res}")
end).flatten
metric.drop!
end

it "deletes the counter total key" do
expect(exists("stat:counter:foo:total")).to be_false
expect(exists("stat:counter:foo:total")).to be_falsey
end

it "deletes all resolution count keys" do
@count_keys.each do |key|
expect(exists(key)).to be_false
expect(exists(key)).to be_falsey
end
end

it "deletes all resolution key collection keys" do
Tabs::Resolution.all.each do |res|
expect(exists("stat:counter:foo:keys:#{res}")).to be_false
expect(exists("stat:counter:foo:keys:#{res}")).to be_falsey
end
end

Expand Down
4 changes: 2 additions & 2 deletions spec/lib/tabs/metrics/value_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,13 @@ def create_span(time_unit)

it "deletes all resolution count keys" do
@count_keys.each do |key|
expect(exists(key)).to be_false
expect(exists(key)).to be_falsey
end
end

it "deletes all resolution key collection keys" do
Tabs::Resolution.all.each do |res|
expect(exists("stat:value:foo:keys:#{res}")).to be_false
expect(exists("stat:value:foo:keys:#{res}")).to be_falsey
end
end

Expand Down
20 changes: 10 additions & 10 deletions spec/lib/tabs_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@

it "returns true if the metric exists" do
Tabs.create_metric("foo", "counter")
expect(Tabs.metric_exists?("foo")).to be_true
expect(Tabs.metric_exists?("foo")).to be_truthy
end

it "returns false if the metric does not exist" do
expect(Tabs.metric_exists?("foo")).to be_false
expect(Tabs.metric_exists?("foo")).to be_falsey
end

end
Expand All @@ -95,7 +95,7 @@

it "results in metric_exists? returning false" do
Tabs.drop_metric!("foo")
expect(Tabs.metric_exists?("foo")).to be_false
expect(Tabs.metric_exists?("foo")).to be_falsey
end

it "calls drop! on the metric" do
Expand All @@ -113,8 +113,8 @@
Tabs.create_metric("foo", "counter")
Tabs.create_metric("bar", "value")
Tabs.drop_all_metrics!
expect(Tabs.metric_exists?("foo")).to be_false
expect(Tabs.metric_exists?("bar")).to be_false
expect(Tabs.metric_exists?("foo")).to be_falsey
expect(Tabs.metric_exists?("bar")).to be_falsey
end

end
Expand All @@ -127,9 +127,9 @@
end

it "creates the metric if it doesn't exist" do
expect(Tabs.metric_exists?("foo")).to be_false
expect(Tabs.metric_exists?("foo")).to be_falsey
lambda { Tabs.increment_counter("foo") }.should_not raise_error
expect(Tabs.metric_exists?("foo")).to be_true
expect(Tabs.metric_exists?("foo")).to be_truthy
end

it "calls increment on the metric" do
Expand All @@ -144,9 +144,9 @@
describe ".record_value" do

it "creates the metric if it doesn't exist" do
expect(Tabs.metric_exists?("foo")).to be_false
expect(Tabs.metric_exists?("foo")).to be_falsey
lambda { Tabs.record_value("foo", 38) }.should_not raise_error
expect(Tabs.metric_exists?("foo")).to be_true
expect(Tabs.metric_exists?("foo")).to be_truthy
end

it "raises a Tabs::MetricTypeMismatchError if the metric is the wrong type" do
Expand Down Expand Up @@ -216,7 +216,7 @@
metric.record(42, now)
Tabs.drop_resolution_for_metric!("baz", :minute)
minute_key = Tabs::Metrics::Value.new("baz").storage_key(:minute, now)
expect(Tabs::Storage.exists(minute_key)).to be_false
expect(Tabs::Storage.exists(minute_key)).to be_falsey
end
end

Expand Down
2 changes: 1 addition & 1 deletion tabs.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ within major point releases.
EOS

gem.add_dependency "activesupport", ">= 3.2"
gem.add_dependency "redis", "~> 3.0.0"
gem.add_dependency "redis", "~> 4.1.0"

gem.add_development_dependency "pry"
gem.add_development_dependency "pry-nav"
Expand Down