logical-insight 0.4.3 → 0.4.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -23,7 +23,7 @@ module Insight
23
23
  INSIGHT_ROOT = "/__insight__"
24
24
  INSIGHT_REGEX = %r{^#{INSIGHT_ROOT}}
25
25
 
26
- VERSION = "0.4.1"
26
+ VERSION = "0.4.4"
27
27
 
28
28
  class SecurityError < StandardError
29
29
  end
@@ -41,7 +41,7 @@ module Insight
41
41
  include Logging
42
42
 
43
43
  def database_path=(value)
44
- @database_path = value
44
+ @database_path = value || "insight.sqlite"
45
45
  end
46
46
 
47
47
  def database_path
@@ -69,7 +69,7 @@ module Insight
69
69
 
70
70
  if defined?(PhusionPassenger)
71
71
  PhusionPassenger.on_event(:starting_worker_process) do |forked|
72
- open_database if forked
72
+ Insight::Database::open_database if forked
73
73
  end
74
74
  end
75
75
  end
@@ -192,4 +192,3 @@ module Insight
192
192
  end
193
193
  end
194
194
  end
195
-
@@ -142,6 +142,8 @@ describe Insight do
142
142
  context "configured with a SQLite database file path" do
143
143
  before do
144
144
  # We need to pass the SQLite database file path to the gem
145
+ require 'fileutils'
146
+ FileUtils.rm_rf("my_custom_db_path.sqlite") #because it doesn't count if it's already there
145
147
  reset_insight :database_path => 'my_custom_db_path.sqlite'
146
148
  end
147
149
 
@@ -150,7 +152,8 @@ describe Insight do
150
152
  end
151
153
 
152
154
  after do
153
- File.delete("my_custom_db_path.sqlite")
155
+ FileUtils.rm_rf("my_custom_db_path.sqlite")
156
+ reset_insight :database_path => nil
154
157
  end
155
158
 
156
159
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: logical-insight
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.4.3
5
+ version: 0.4.4
6
6
  platform: ruby
7
7
  authors:
8
8
  - Bryan Helmkamp
@@ -177,7 +177,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
177
177
  requirements:
178
178
  - - ">="
179
179
  - !ruby/object:Gem::Version
180
- hash: -756212099
180
+ hash: 910188977
181
181
  segments:
182
182
  - 0
183
183
  version: "0"