roadkill 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,2 +1,2 @@
1
1
  load 'todo_app.rb'
2
- run TodoApp.new
2
+ run TodoApp.new({base_dir: Dir.pwd})
@@ -9,7 +9,12 @@
9
9
  </head>
10
10
  <body>
11
11
  <div id="login">
12
- Please login.
12
+ <p>
13
+ Welcome!
14
+ </p>
15
+ <p>
16
+ Please login.
17
+ </p>
13
18
  <input id="email" type="name" name="email" placeholder="email" />
14
19
  <input id="password" type="password" name="password" />
15
20
  <input id="submit" type="submit" value="Login" />
@@ -1,6 +1,11 @@
1
1
  class TodoApp
2
+ attr_accessor :base_dir
3
+ def initialize(options)
4
+ @base_dir = options[:base_dir]
5
+ super()
6
+ end
2
7
  def call env
3
- html = File.open("home.html", "rb")
8
+ html = File.open("#{@base_dir}/home.html", "rb")
4
9
  [200, {"Content-Type" => "text/html"}, [html.read]]
5
10
  end
6
11
  end
@@ -1,3 +1,3 @@
1
1
  module Roadkill
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: roadkill
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: