arid_cache 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.1
1
+ 1.0.2
data/arid_cache.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{arid_cache}
8
- s.version = "1.0.1"
8
+ s.version = "1.0.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Karl Varga"]
@@ -84,7 +84,7 @@ module AridCache
84
84
  end
85
85
 
86
86
  def is_mysql_adapter?
87
- @is_mysql_adapter ||= ::ActiveRecord::Base.connection.adapter_name =~ /MySQL/i
87
+ @is_mysql_adapter ||= !!(::ActiveRecord::Base.connection.adapter_name =~ /MySQL/i)
88
88
  end
89
89
 
90
90
  def is_mysql_adapter=(value)
@@ -369,16 +369,16 @@ class AridCacheTest < ActiveSupport::TestCase
369
369
  test "should identify the MySQL2 adapter as a MySQL database" do
370
370
  original_adapter_name = ::ActiveRecord::Base.connection.adapter_name
371
371
  ::ActiveRecord::Base.connection.instance_eval { def adapter_name; "Mysql2"; end }
372
- assert_equal ::ActiveRecord::Base.connection.adapter_name, "Mysql2"
373
- assert ::ActiveRecord::Base.is_mysql_adapter?
374
-
372
+ assert_equal "Mysql2", ::ActiveRecord::Base.connection.adapter_name
373
+ assert_equal true, ::ActiveRecord::Base.is_mysql_adapter?
374
+
375
375
  # Restore it otherwise the other tests break
376
376
  ::ActiveRecord::Base.connection.instance_eval { def adapter_name; "SQLite3"; end }
377
- assert_equal ::ActiveRecord::Base.connection.adapter_name, "SQLite3"
377
+ assert_equal "SQLite3", ::ActiveRecord::Base.connection.adapter_name
378
378
  ::ActiveRecord::Base.is_mysql_adapter = nil
379
- assert !::ActiveRecord::Base.is_mysql_adapter?
379
+ assert_equal false, ::ActiveRecord::Base.is_mysql_adapter?
380
380
  end
381
-
381
+
382
382
  #
383
383
  # Tests requiring manual verification by looking at the SQL logs.
384
384
  # TODO move these to a separate class.
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arid_cache
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 1
10
- version: 1.0.1
9
+ - 2
10
+ version: 1.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Karl Varga