slim_scrooge 1.0.7 → 1.0.9

Sign up to get free protection for your applications and to get access to all the features.
data/README.textile CHANGED
@@ -31,12 +31,18 @@ h3. Gem
31
31
 
32
32
  Note that the C extension will only build in MRI Ruby 1.8 on non-windows at present, but do not worry, for other platforms the backup callsite mechanism is used.
33
33
 
34
- Next add this to your Rails::Initializer section in environment.rb:
34
+ For Rails 2, add this to your Rails::Initializer section in environment.rb:
35
35
 
36
36
  <pre>
37
37
  config.gem 'slim_scrooge'
38
38
  </pre>
39
39
 
40
+ For Rails 3, add this to your Gemfile:
41
+
42
+ <pre>
43
+ gem 'slim_scrooge'
44
+ </pre>
45
+
40
46
  h3. Plugin
41
47
 
42
48
  <pre>
data/VERSION.yml CHANGED
@@ -2,4 +2,4 @@
2
2
  :major: 1
3
3
  :build:
4
4
  :minor: 0
5
- :patch: 7
5
+ :patch: 9
@@ -34,7 +34,7 @@ module SlimScrooge
34
34
  # the list of columns we actually need
35
35
  #
36
36
  def select_regexp(table_name)
37
- %r{SELECT +(?:`?#{table_name}`?.)?\* +FROM}
37
+ %r{SELECT +(?:[`"]?#{table_name}[`"]?.)?\* +FROM}
38
38
  end
39
39
  end
40
40
 
data/test/helper.rb CHANGED
@@ -79,10 +79,16 @@ module SlimScrooge
79
79
  end
80
80
 
81
81
  def find_active_record_test_suite
82
- ts = ($:).grep(/activerecord/).last.split('/')
83
- ts.pop
84
- ts << 'test'
85
- ts.join('/')
82
+ if ActiveRecord::VERSION::MAJOR >= 3
83
+ rails_checkout = "/Users/sds/Rails/rails/activerecord"
84
+ Dir.chdir rails_checkout
85
+ rails_checkout + "/test"
86
+ else
87
+ ts = ($:).grep(/activerecord/).last.split('/')
88
+ ts.pop
89
+ ts << 'test'
90
+ ts.join('/')
91
+ end
86
92
  end
87
93
  end
88
94
 
data/test/setup.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  require 'rubygems'
2
+ gem 'activerecord', '= 2.3.5'
2
3
  require 'active_record'
3
4
  require 'active_record/connection_adapters/mysql_adapter'
4
5
  $:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 0
8
- - 7
9
- version: 1.0.7
8
+ - 9
9
+ version: 1.0.9
10
10
  platform: ruby
11
11
  authors:
12
12
  - Stephen Sykes
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-04-05 00:00:00 +03:00
17
+ date: 2010-05-02 00:00:00 +03:00
18
18
  default_executable:
19
19
  dependencies: []
20
20