ledger_web 1.4.9 → 1.4.10

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,16 +6,17 @@ require 'sinatra/session'
6
6
  module LedgerWeb
7
7
  class Application < Sinatra::Base
8
8
  register Sinatra::Session
9
+
9
10
  set :session_secret, LedgerWeb::Config.instance.get(:session_secret)
10
11
  set :session_expire, LedgerWeb::Config.instance.get(:session_expire)
11
- set :views, LedgerWeb::Config.instance.get(:report_directories) + [File.join(File.dirname(__FILE__), 'views')]
12
12
  set :reload_templates, true
13
13
 
14
14
  helpers Sinatra::Capture
15
15
  helpers LedgerWeb::Helpers
16
16
 
17
17
  def find_template(views, name, engine, &block)
18
- Array(views).each { |v| super(v, name, engine, &block) }
18
+ _views = LedgerWeb::Config.instance.get(:report_directories) + [File.join(File.dirname(__FILE__), 'views')]
19
+ Array(_views).each { |v| super(v, name, engine, &block) }
19
20
  end
20
21
 
21
22
  before do
@@ -73,10 +73,6 @@ module LedgerWeb
73
73
  self.set :user_migrate_dir, "#{user_dir}/migrate"
74
74
  end
75
75
 
76
- if File.directory? "#{user_dir}/reports"
77
- self.set :user_reports_dir, "#{user_dir}/reports"
78
- end
79
-
80
76
  if File.exists? "#{user_dir}/config.rb"
81
77
  self.override_with(LedgerWeb::Config.from_file("#{user_dir}/config.rb"))
82
78
  end
data/lib/ledger_web/db.rb CHANGED
@@ -22,7 +22,7 @@ module LedgerWeb
22
22
  def self.run_migrations
23
23
  Sequel::Migrator.apply(@@db, File.join(File.dirname(__FILE__), "db/migrate"))
24
24
 
25
- user_migrations = LedgerWeb::Config.instance.get :user_migrate_directory
25
+ user_migrations = LedgerWeb::Config.instance.get :user_migrate_dir
26
26
  if not user_migrations.nil?
27
27
  Sequel::Migrator.run(@@db, user_migrations, :table => "user_schema_changes")
28
28
  end
@@ -172,10 +172,7 @@ module LedgerWeb
172
172
  end
173
173
 
174
174
  def find_all_reports
175
- directories = [
176
- File.join(File.dirname(__FILE__), "reports"),
177
- LedgerWeb::Config.instance.get(:user_report_dir)
178
- ]
175
+ directories = LedgerWeb::Config.instance.get :report_directories
179
176
 
180
177
  reports = {}
181
178
 
@@ -1,3 +1,3 @@
1
1
  module LedgerWeb
2
- VERSION = '1.4.9'
2
+ VERSION = '1.4.10'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ledger_web
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.9
4
+ version: 1.4.10
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-05-18 00:00:00.000000000Z
12
+ date: 2012-06-03 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: pg