active_record_inline_schema 0.5.3 → 0.5.4
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/CHANGELOG
CHANGED
@@ -1,22 +1,28 @@
|
|
1
|
-
|
1
|
+
0.5.4 / 2012-05-08
|
2
|
+
|
3
|
+
* Enhancements
|
4
|
+
|
5
|
+
* Slightly better way to get name of current database for locking purposes.
|
6
|
+
|
7
|
+
0.5.3 / 2012-04-24
|
2
8
|
|
3
9
|
* Enhancements
|
4
10
|
|
5
11
|
* Cache name of the current database to speed things up.
|
6
12
|
|
7
|
-
|
13
|
+
0.5.2 / 2012-04-19
|
8
14
|
|
9
15
|
* Bug fixes
|
10
16
|
|
11
17
|
* Fix indexes on multiple columns. Amazing how much damage a single #to_s can do.
|
12
18
|
|
13
|
-
|
19
|
+
0.5.1 / 2012-04-19
|
14
20
|
|
15
21
|
* Bug fixes
|
16
22
|
|
17
23
|
* Fix require order... rookie mistake.
|
18
24
|
|
19
|
-
|
25
|
+
0.5.0 / 2012-04-19
|
20
26
|
|
21
27
|
* Known issues
|
22
28
|
|
@@ -18,7 +18,6 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.add_runtime_dependency 'activesupport'
|
19
19
|
s.add_runtime_dependency "activerecord", ">=3"
|
20
20
|
s.add_runtime_dependency 'lock_method'
|
21
|
-
s.add_runtime_dependency 'cache_method'
|
22
21
|
# s.add_runtime_dependency "activerecord", "~>3.0" # must use mysql2 ~>0.2 to test
|
23
22
|
# s.add_runtime_dependency "activerecord", "~>3.1"
|
24
23
|
# s.add_runtime_dependency "activerecord", "~>3.2"
|
@@ -1,6 +1,5 @@
|
|
1
1
|
require 'set'
|
2
2
|
require 'lock_method'
|
3
|
-
require 'cache_method'
|
4
3
|
|
5
4
|
class ActiveRecordInlineSchema::Config
|
6
5
|
DEFAULT_CREATE_TABLE_OPTIONS = {
|
@@ -139,7 +138,8 @@ class ActiveRecordInlineSchema::Config
|
|
139
138
|
lock_method :clear, :ttl => 60
|
140
139
|
|
141
140
|
def as_lock
|
142
|
-
[
|
141
|
+
database_name = connection.instance_variable_get(:@config).try(:[], :database)
|
142
|
+
[database_name, model.name]
|
143
143
|
end
|
144
144
|
|
145
145
|
def as_cache_key
|
@@ -196,13 +196,6 @@ class ActiveRecordInlineSchema::Config
|
|
196
196
|
model.connection
|
197
197
|
end
|
198
198
|
|
199
|
-
def current_database
|
200
|
-
if connection.respond_to? :current_database
|
201
|
-
connection.current_database
|
202
|
-
end
|
203
|
-
end
|
204
|
-
cache_method :current_database, 60
|
205
|
-
|
206
199
|
def database_type
|
207
200
|
if mysql?
|
208
201
|
:mysql
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_record_inline_schema
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-
|
13
|
+
date: 2012-05-08 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|
@@ -60,22 +60,6 @@ dependencies:
|
|
60
60
|
- - ! '>='
|
61
61
|
- !ruby/object:Gem::Version
|
62
62
|
version: '0'
|
63
|
-
- !ruby/object:Gem::Dependency
|
64
|
-
name: cache_method
|
65
|
-
requirement: !ruby/object:Gem::Requirement
|
66
|
-
none: false
|
67
|
-
requirements:
|
68
|
-
- - ! '>='
|
69
|
-
- !ruby/object:Gem::Version
|
70
|
-
version: '0'
|
71
|
-
type: :runtime
|
72
|
-
prerelease: false
|
73
|
-
version_requirements: !ruby/object:Gem::Requirement
|
74
|
-
none: false
|
75
|
-
requirements:
|
76
|
-
- - ! '>='
|
77
|
-
- !ruby/object:Gem::Version
|
78
|
-
version: '0'
|
79
63
|
description: Specify columns like you would with ActiveRecord migrations and then
|
80
64
|
run .auto_upgrade! Based on the mini_record gem from Davide D'Agostino, it adds
|
81
65
|
fewer aliases, doesn't create timestamps and relationship columns automatically.
|