arid_cache 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/arid_cache.gemspec +1 -1
- data/lib/arid_cache/active_record.rb +1 -1
- data/test/arid_cache_test.rb +6 -6
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.2
|
data/arid_cache.gemspec
CHANGED
@@ -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)
|
data/test/arid_cache_test.rb
CHANGED
@@ -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
|
373
|
-
|
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
|
377
|
+
assert_equal "SQLite3", ::ActiveRecord::Base.connection.adapter_name
|
378
378
|
::ActiveRecord::Base.is_mysql_adapter = nil
|
379
|
-
|
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:
|
4
|
+
hash: 19
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 2
|
10
|
+
version: 1.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Karl Varga
|