activerecord-metal 0.1.5 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/active_record/metal/logging.rb +0 -6
- data/lib/active_record/metal/version.rb +1 -1
- data/test/test_helper.rb +7 -2
- metadata +13 -20
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 26a0b261607e11c004f15ebdb2df7e0a7d9f7dac
|
4
|
+
data.tar.gz: cb1336caf87abe1c97b48690dd98ee89e16b9c40
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: bf7b0cc2e2cecbf8b95c1aaaa5dcfde20c15c2e8d277962968bf388223f1377c1eda30153707b43f4011e14d47a42fff7c030121ad4d307e15a90e837be87123
|
7
|
+
data.tar.gz: f8818aa34909268dfc632e61114ab175232352f328aa4625ab574d8bafcb57998cb7e28b7200c51a1d5fc1cd1a52c680f2e7daf2a703f5e616bc471840dab3bf
|
@@ -16,12 +16,6 @@ module ActiveRecord::Metal::Logging
|
|
16
16
|
return if @benchmark_depth > 0
|
17
17
|
return unless logger = SELF.logger
|
18
18
|
|
19
|
-
threshold = ActiveRecord::Base.auto_explain_threshold_in_seconds
|
20
|
-
if threshold
|
21
|
-
return if runtime < threshold
|
22
|
-
severity = :info if severity == :debug
|
23
|
-
end
|
24
|
-
|
25
19
|
runtime = "%.1f msecs" % (runtime * 1000)
|
26
20
|
|
27
21
|
unless msg.gsub!(/\{\{runtime\}\}/, runtime)
|
data/test/test_helper.rb
CHANGED
@@ -13,7 +13,13 @@ ActiveRecord::Base.establish_connection(
|
|
13
13
|
:database => "activerecord_metal"
|
14
14
|
)
|
15
15
|
|
16
|
-
metal =
|
16
|
+
metal = begin
|
17
|
+
ActiveRecord::Metal.new
|
18
|
+
rescue ActiveRecord::NoDatabaseError
|
19
|
+
STDERR.puts "[ERR] Make sure there is a database 'activerecord_metal' on the current postgresql connection."
|
20
|
+
exit 0
|
21
|
+
end
|
22
|
+
|
17
23
|
metal.ask "DROP TABLE IF EXISTS alloys"
|
18
24
|
metal.ask <<-SQL
|
19
25
|
CREATE TABLE alloys(
|
@@ -35,4 +41,3 @@ ENV["ARM_ENV"] = "test"
|
|
35
41
|
# ActiveRecord::Base.logger = Logger.new File.open(File.expand_path("../../log/test.log", __FILE__), "w")
|
36
42
|
ActiveRecord::Base.logger = Logger.new STDERR
|
37
43
|
ActiveRecord::Base.logger.level = Logger::INFO
|
38
|
-
# ActiveRecord::Base.auto_explain_threshold_in_seconds = 0.010
|
metadata
CHANGED
@@ -1,30 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-metal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.2.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- radiospiel
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2014-09-24 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: activerecord
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - ">"
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '3.2'
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - ">"
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '3.2'
|
30
27
|
description: Sometimes you just need SQL.
|
@@ -33,48 +30,44 @@ executables: []
|
|
33
30
|
extensions: []
|
34
31
|
extra_rdoc_files: []
|
35
32
|
files:
|
33
|
+
- README.md
|
34
|
+
- lib/active_record/metal.rb
|
36
35
|
- lib/active_record/metal/logging.rb
|
36
|
+
- lib/active_record/metal/postgresql.rb
|
37
37
|
- lib/active_record/metal/postgresql/aggregate.rb
|
38
|
-
- lib/active_record/metal/postgresql/conversions/etest.rb
|
39
38
|
- lib/active_record/metal/postgresql/conversions.rb
|
39
|
+
- lib/active_record/metal/postgresql/conversions/etest.rb
|
40
40
|
- lib/active_record/metal/postgresql/etest.rb
|
41
41
|
- lib/active_record/metal/postgresql/exec.rb
|
42
42
|
- lib/active_record/metal/postgresql/import.rb
|
43
43
|
- lib/active_record/metal/postgresql/prepared_queries.rb
|
44
44
|
- lib/active_record/metal/postgresql/queries.rb
|
45
|
-
- lib/active_record/metal/postgresql.rb
|
46
45
|
- lib/active_record/metal/transaction.rb
|
47
46
|
- lib/active_record/metal/version.rb
|
48
|
-
- lib/active_record/metal.rb
|
49
47
|
- lib/activerecord-metal.rb
|
50
|
-
- README.md
|
51
48
|
- test/pg_test.rb
|
52
49
|
- test/test_helper.rb
|
53
50
|
homepage: http://github.com/radiospiel/etest
|
54
51
|
licenses: []
|
52
|
+
metadata: {}
|
55
53
|
post_install_message:
|
56
54
|
rdoc_options: []
|
57
55
|
require_paths:
|
58
56
|
- lib
|
59
57
|
required_ruby_version: !ruby/object:Gem::Requirement
|
60
|
-
none: false
|
61
58
|
requirements:
|
62
|
-
- -
|
59
|
+
- - ">="
|
63
60
|
- !ruby/object:Gem::Version
|
64
61
|
version: '0'
|
65
|
-
segments:
|
66
|
-
- 0
|
67
|
-
hash: 2358583121152594136
|
68
62
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
69
|
-
none: false
|
70
63
|
requirements:
|
71
|
-
- -
|
64
|
+
- - ">="
|
72
65
|
- !ruby/object:Gem::Version
|
73
66
|
version: '0'
|
74
67
|
requirements: []
|
75
68
|
rubyforge_project:
|
76
|
-
rubygems_version:
|
69
|
+
rubygems_version: 2.2.2
|
77
70
|
signing_key:
|
78
|
-
specification_version:
|
71
|
+
specification_version: 4
|
79
72
|
summary: Sometimes you just need SQL.
|
80
73
|
test_files: []
|