diff --git a/.ruby-version b/.ruby-version index cb50681..437459c 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.0.0-p247 +2.5.0 diff --git a/.travis.yml b/.travis.yml index 1ba875c..de79740 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,5 @@ language: ruby rvm: - - 1.9.3 - - 2.0.0 + - 2.5.0 services: - redis-server diff --git a/spec/lib/tabs/metrics/counter_spec.rb b/spec/lib/tabs/metrics/counter_spec.rb index 776e775..b16dce9 100644 --- a/spec/lib/tabs/metrics/counter_spec.rb +++ b/spec/lib/tabs/metrics/counter_spec.rb @@ -135,7 +135,7 @@ 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 @@ -143,18 +143,18 @@ def create_span(time_unit) 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 diff --git a/spec/lib/tabs/metrics/value_spec.rb b/spec/lib/tabs/metrics/value_spec.rb index 02f104c..4432024 100644 --- a/spec/lib/tabs/metrics/value_spec.rb +++ b/spec/lib/tabs/metrics/value_spec.rb @@ -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 diff --git a/spec/lib/tabs_spec.rb b/spec/lib/tabs_spec.rb index a0cb826..18eac73 100644 --- a/spec/lib/tabs_spec.rb +++ b/spec/lib/tabs_spec.rb @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/tabs.gemspec b/tabs.gemspec index 16e50c5..b75979f 100644 --- a/tabs.gemspec +++ b/tabs.gemspec @@ -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"