railz_lite 0.1.7 → 0.1.8

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e2ebf1f78b9263164fa6d9c864a3344f834171df91856e8f5cfb18b318b7c215
4
- data.tar.gz: 8844959b357a2ad711666cff1eadfdfd5a963621d09f1d035442162eb4ccd0f1
3
+ metadata.gz: 67884b77d71307c891be0cc4402f6c6fb0adf04498956df13ea66bdb2bc36bba
4
+ data.tar.gz: 9ca0c311a2424173ef01cadac5a762ac8ecb59bde762057faa153c64ba2d6560
5
5
  SHA512:
6
- metadata.gz: 3e2f0f87d0a1cbb225d5987518e3f025446b04c075e28c6faf749f616cc3ac0393f12c09b963e08aaa33ac93fd29b8c9c6cbae43aebd0baa766615b62b4b5c50
7
- data.tar.gz: 144b760958c29eaf21ba4c4977af41e47fe068c20eb651798c4fa751e5a2c791e2afd81e24d430a05a506482078f480b0931a9efb53f23846f674ec32d7ea2cc
6
+ metadata.gz: '08dcd22b2260b9ef62ae1927bd37d5ad0bfa53dfe504199712c587dcd75a550c493067fcb4b0675841a01877ebcc01e5d885858c509608e058d52b49fbbff0ba'
7
+ data.tar.gz: 7cfdc71ef797a18e6b34b3fd13e2d08c1be630845b54f1f0e2c7aed20e928239f7b5b0d901a7b6d6e198fba3cb9dd0320fbc22d57dbf866bb80f3ba4794afb0b
@@ -45,8 +45,8 @@ module RailzLite
45
45
  # use ERB and binding to evaluate templates
46
46
  # pass the rendered html to render_content
47
47
  def render(template_name)
48
- dir_path = File.dirname(__FILE__)
49
- file_path = File.join(dir_path, '..', 'views', "#{self.class.name.underscore}", "#{template_name.to_s}.html.erb")
48
+ dir_path = Dir.pwd
49
+ file_path = File.join(dir_path, 'views', "#{self.class.name.underscore}", "#{template_name.to_s}.html.erb")
50
50
  file = File.read(file_path)
51
51
  template = ERB.new(file).result(binding)
52
52
  render_content(template, 'text/html')
@@ -61,7 +61,7 @@ class FileServer
61
61
  def requested_file_name(env)
62
62
  req = Rack::Request.new(env)
63
63
  path = req.path
64
- dir = File.dirname(__FILE__)
65
- File.join(dir, '..', path)
64
+ dir = Dir.pwd
65
+ File.join(dir, path)
66
66
  end
67
67
  end
@@ -11,7 +11,6 @@ module RailzLite
11
11
  end
12
12
 
13
13
  def self.destination_root
14
- puts "destination for folder #{Dir.pwd}"
15
14
  Dir.pwd
16
15
  end
17
16
 
@@ -1,8 +1,7 @@
1
1
  require 'sqlite3'
2
2
 
3
3
  PRINT_QUERIES = ENV['PRINT_QUERIES'] == 'true'
4
- # https://tomafro.net/2010/01/tip-relative-paths-with-file-expand-path
5
- ROOT_FOLDER = File.join(File.dirname(__FILE__), '..')
4
+ ROOT_FOLDER = Dir.pwd
6
5
  SQL_FILE = File.join(ROOT_FOLDER, 'app.sql')
7
6
  DB_FILE = File.join(ROOT_FOLDER, 'app.db')
8
7
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailzLite
4
- VERSION = "0.1.7"
4
+ VERSION = "0.1.8"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: railz_lite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - bryan lynch