logical-insight 0.4.3 → 0.4.4
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.
- data/lib/insight/app.rb +1 -1
- data/lib/insight/database.rb +2 -3
- data/spec/insight_spec.rb +4 -1
- metadata +2 -2
data/lib/insight/app.rb
CHANGED
data/lib/insight/database.rb
CHANGED
@@ -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
|
-
|
data/spec/insight_spec.rb
CHANGED
@@ -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
|
-
|
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.
|
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:
|
180
|
+
hash: 910188977
|
181
181
|
segments:
|
182
182
|
- 0
|
183
183
|
version: "0"
|