underglow 0.1.6 → 0.1.7
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.
- checksums.yaml +4 -4
- data/lib/underglow/tasks/db.rake +10 -3
- data/lib/underglow/version.rb +1 -1
- data/underglow.gemspec +3 -3
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 97d1d3096bbc803fc39402f43d44e857385f5508
|
|
4
|
+
data.tar.gz: 00c466a05323056648943876e80e73b4332ac57e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d884d9de3887d6377572e2fdef53ff40667dcd0852818b26b84f317aded3fd543b680b05be046aefaf6d857dc8bdf1b6686f734794e0e707fc7d1ba453d0acac
|
|
7
|
+
data.tar.gz: 44626cc4fcb586832a9bed34c096fdc6ac2e18ea07fe2f8f765cb56882de947686e0cd88caf74d3486e476c6c82650b5815fac4fba865943135b2902c16eb547
|
data/lib/underglow/tasks/db.rake
CHANGED
|
@@ -22,9 +22,16 @@ namespace :db do
|
|
|
22
22
|
|
|
23
23
|
FileUtils.rm(file)
|
|
24
24
|
when 'postgresql'
|
|
25
|
-
|
|
25
|
+
# Detect PostgreSQL version
|
|
26
|
+
version = `psql --version`.match(/([0-9\.]+)/)[1]
|
|
27
|
+
release, major, minor = version.split(".").map(&:to_i)
|
|
28
|
+
|
|
29
|
+
# In PostgreSQL >= 9.2 the column has changed to pid
|
|
30
|
+
pid_column = major >= 2 ? "pid" : "procpid"
|
|
31
|
+
|
|
32
|
+
ActiveRecord::Base.connection.select_all("select * from pg_stat_activity order by #{pid_column};").each do |x|
|
|
26
33
|
if config['database'] == x['datname'] && x['current_query'] == '<IDLE>'
|
|
27
|
-
|
|
34
|
+
ActiveRecord::Base.connection.execute("select pg_terminate_backend(#{x[pid_column]})")
|
|
28
35
|
end
|
|
29
36
|
end
|
|
30
37
|
ActiveRecord::Base.establish_connection(config.merge('database' => 'postgres', 'schema_search_path' => 'public'))
|
|
@@ -32,7 +39,7 @@ namespace :db do
|
|
|
32
39
|
end
|
|
33
40
|
end
|
|
34
41
|
end
|
|
35
|
-
|
|
42
|
+
|
|
36
43
|
desc "Recreates and migrates db useful for development"
|
|
37
44
|
task :fresh do
|
|
38
45
|
# We need to keep track of initial RAILS_ENV because db:test:load changes RAILS_ENV to test
|
data/lib/underglow/version.rb
CHANGED
data/underglow.gemspec
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |s|
|
|
7
7
|
s.name = "underglow"
|
|
8
|
-
s.version = "0.1.
|
|
8
|
+
s.version = "0.1.7"
|
|
9
9
|
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
11
11
|
s.authors = ["James Hu"]
|
|
12
|
-
s.date = "
|
|
12
|
+
s.date = "2014-10-06"
|
|
13
13
|
s.description = "A library that makes life easier."
|
|
14
14
|
s.email = "axsuul@gmail.com"
|
|
15
15
|
s.extra_rdoc_files = [
|
|
@@ -49,7 +49,7 @@ Gem::Specification.new do |s|
|
|
|
49
49
|
s.homepage = "http://github.com/axsuul/underglow"
|
|
50
50
|
s.licenses = ["MIT"]
|
|
51
51
|
s.require_paths = ["lib"]
|
|
52
|
-
s.rubygems_version = "2.0.
|
|
52
|
+
s.rubygems_version = "2.0.14"
|
|
53
53
|
s.summary = "Vroom yourself."
|
|
54
54
|
|
|
55
55
|
if s.respond_to? :specification_version then
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: underglow
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- James Hu
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2014-10-06 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rspec
|
|
@@ -122,7 +122,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
122
122
|
version: '0'
|
|
123
123
|
requirements: []
|
|
124
124
|
rubyforge_project:
|
|
125
|
-
rubygems_version: 2.0.
|
|
125
|
+
rubygems_version: 2.0.14
|
|
126
126
|
signing_key:
|
|
127
127
|
specification_version: 4
|
|
128
128
|
summary: Vroom yourself.
|