ledger_web 1.4.7 → 1.4.8
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -1
- data/lib/ledger_web.rb +0 -11
- data/lib/ledger_web/config.rb +8 -0
- data/lib/ledger_web/db.rb +3 -3
- data/lib/ledger_web/report.rb +1 -1
- data/lib/ledger_web/version.rb +1 -1
- metadata +1 -1
data/README.md
CHANGED
@@ -67,7 +67,7 @@ This says that every value in the `Account` column will be surrounded with an `<
|
|
67
67
|
|
68
68
|
#### Customizing
|
69
69
|
|
70
|
-
|
70
|
+
You can put [Sequel migrations](http://sequel.rubyforge.org/rdoc/files/doc/migration_rdoc.html) in `~/.ledger_web/migrate` and they'll get applied as necessary at startup.
|
71
71
|
|
72
72
|
#### Hooks
|
73
73
|
|
data/lib/ledger_web.rb
CHANGED
@@ -8,14 +8,3 @@ require 'ledger_web/report'
|
|
8
8
|
require 'ledger_web/watcher'
|
9
9
|
require 'ledger_web/helpers'
|
10
10
|
require 'ledger_web/app'
|
11
|
-
|
12
|
-
|
13
|
-
ledger_web_dir = "#{ENV['HOME']}/.ledger_web"
|
14
|
-
|
15
|
-
if File.directory? ledger_web_dir
|
16
|
-
if File.directory? File.join(ledger_web_dir, "lib")
|
17
|
-
Dir.glob(File.join(ledger_web_dir, "lib", "*.rb")).each do |f|
|
18
|
-
require f
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
data/lib/ledger_web/config.rb
CHANGED
@@ -69,6 +69,14 @@ module LedgerWeb
|
|
69
69
|
self.set :report_directories, dirs
|
70
70
|
end
|
71
71
|
|
72
|
+
if File.directory? "#{user_dir}/migrate"
|
73
|
+
self.set :user_migrate_dir, "#{user_dir}/migrate"
|
74
|
+
end
|
75
|
+
|
76
|
+
if File.directory? "#{user_dir}/reports"
|
77
|
+
self.set :user_reports_dir, "#{user_dir}/reports"
|
78
|
+
end
|
79
|
+
|
72
80
|
if File.exists? "#{user_dir}/config.rb"
|
73
81
|
self.override_with(LedgerWeb::Config.from_file("#{user_dir}/config.rb"))
|
74
82
|
end
|
data/lib/ledger_web/db.rb
CHANGED
@@ -22,9 +22,9 @@ module LedgerWeb
|
|
22
22
|
def self.run_migrations
|
23
23
|
Sequel::Migrator.apply(@@db, File.join(File.dirname(__FILE__), "db/migrate"))
|
24
24
|
|
25
|
-
|
26
|
-
if
|
27
|
-
Sequel::Migrator.run(@@db,
|
25
|
+
user_migrations = LedgerWeb::Config.instance.get :user_migrate_directory
|
26
|
+
if not user_migrations.nil?
|
27
|
+
Sequel::Migrator.run(@@db, user_migrations, :table => "user_schema_changes")
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
data/lib/ledger_web/report.rb
CHANGED
data/lib/ledger_web/version.rb
CHANGED