duoconsole 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/lib/duoconsole.rb +5 -9
  3. metadata +11 -18
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 1abf14816a0573ee19583a436b6c52aac3f92891
4
+ data.tar.gz: 86a8a79b0305f8d216f7e3f4b9c02a4cfbd0211b
5
+ SHA512:
6
+ metadata.gz: 812c7af8d68a7c9e445c58d8047792bb9954ba0bcf1415ec1b0b25ca7e6768cb284ce9fdae9e790d2ba904a959d2990b4b3217fd575f646d4448f95fa5d20356
7
+ data.tar.gz: 20c5f45d26ded389ecb18fe7e8845bb0f9d24537af4087f922b4136d2f490207125caf83919127c3b16913995f02427adc0aa724c747fca4b27ba1c92febd844
data/lib/duoconsole.rb CHANGED
@@ -87,9 +87,13 @@ class Duoconsole
87
87
  # 1. fix issue with Postgres adapter and forking behavior
88
88
  # 2. trap INT signal and exit
89
89
  def fork
90
- clear_active_record_connections
90
+ defined?(ActiveRecord::Base) and
91
+ ActiveRecord::Base.connection.disconnect!
91
92
 
92
93
  Rails::Commands::Environment.fork do
94
+ defined?(ActiveRecord::Base) and
95
+ ActiveRecord::Base.establish_connection
96
+
93
97
  setup_for_test
94
98
 
95
99
  trap(:INT) {
@@ -98,14 +102,6 @@ class Duoconsole
98
102
  }
99
103
 
100
104
  yield
101
-
102
- clear_active_record_connections
103
- end
104
- end
105
-
106
- def clear_active_record_connections
107
- if defined? ActiveRecord
108
- ActiveRecord::Base.clear_active_connections!
109
105
  end
110
106
  end
111
107
  end
metadata CHANGED
@@ -1,46 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: duoconsole
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
5
- prerelease:
4
+ version: 0.1.5
6
5
  platform: ruby
7
6
  authors:
8
7
  - Geoff Buesing
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-01-05 00:00:00.000000000 Z
11
+ date: 2013-06-18 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rails
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.0
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.0
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: commands
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - '>='
36
32
  - !ruby/object:Gem::Version
37
33
  version: 0.2.1
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - '>='
44
39
  - !ruby/object:Gem::Version
45
40
  version: 0.2.1
46
41
  description:
@@ -55,27 +50,25 @@ files:
55
50
  homepage: https://github.com/gbuesing/duoconsole
56
51
  licenses:
57
52
  - MIT
53
+ metadata: {}
58
54
  post_install_message:
59
55
  rdoc_options: []
60
56
  require_paths:
61
57
  - lib
62
58
  required_ruby_version: !ruby/object:Gem::Requirement
63
- none: false
64
59
  requirements:
65
- - - ! '>='
60
+ - - '>='
66
61
  - !ruby/object:Gem::Version
67
62
  version: '0'
68
63
  required_rubygems_version: !ruby/object:Gem::Requirement
69
- none: false
70
64
  requirements:
71
- - - ! '>='
65
+ - - '>='
72
66
  - !ruby/object:Gem::Version
73
67
  version: '0'
74
68
  requirements: []
75
69
  rubyforge_project:
76
- rubygems_version: 1.8.23
70
+ rubygems_version: 2.0.0
77
71
  signing_key:
78
- specification_version: 3
72
+ specification_version: 4
79
73
  summary: Launch Rails development console with test environment as a child process
80
74
  test_files: []
81
- has_rdoc: