weight-recorder 0.1.3 → 0.1.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.
- checksums.yaml +4 -4
- data/lib/application.rb +2 -1
- data/lib/recorder/db.rb +0 -4
- data/lib/recorder/version.rb +1 -1
- data/lib/views/#layout.haml# +17 -0
- data/lib/views/chart.haml +2 -5
- data/lib/views/index.haml +5 -4
- data/lib/views/layout.haml +6 -3
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 877da1c39f46b47849815309a9b92379a6489cbd
|
4
|
+
data.tar.gz: 19ed5f3143e47d7c055ec05a205fa41cddc9abcc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 365f6b7df0047810ea16234d62c8691fada29fd58b418a7ece19f1707b8438086745a9a05950f8e0a0eb5a5dde5f6bf8089aa4d360c17501f7bb837029f39638
|
7
|
+
data.tar.gz: 1f86ec64faf7dde1bf1ea84904071ddcdaa2abc60eec62c76febaba5002be3c50b7fb70422109fb936f0d3d53a7492671c4f329ab1564a7c1d71f4f6cd470f10
|
data/lib/application.rb
CHANGED
@@ -23,7 +23,7 @@ module Recorder
|
|
23
23
|
end
|
24
24
|
|
25
25
|
get '/' do
|
26
|
-
redirect '
|
26
|
+
redirect 'chart'
|
27
27
|
end
|
28
28
|
|
29
29
|
get '/data' do
|
@@ -82,6 +82,7 @@ module Recorder
|
|
82
82
|
|
83
83
|
get '/chart' do
|
84
84
|
@weight_options = {min: 84, max: 90}
|
85
|
+
@bodyfat_options = {min: 15, max: 30}
|
85
86
|
@weight_data,@bodyfat_data = get_data
|
86
87
|
haml :chart
|
87
88
|
end
|
data/lib/recorder/db.rb
CHANGED
data/lib/recorder/version.rb
CHANGED
@@ -0,0 +1,17 @@
|
|
1
|
+
!!!
|
2
|
+
%html
|
3
|
+
%head
|
4
|
+
%meta(charset='utf-8')
|
5
|
+
%meta(name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1,user-scalable=no")
|
6
|
+
%title Weight Recorder
|
7
|
+
/%link(href='/css/bootstrap.min.css' rel='stylesheet' type='text/css')
|
8
|
+
%link(rel='stylesheet' type='text/css'){href: uri('css/bootstrap.min.css')}
|
9
|
+
|
10
|
+
%a(class="glyphicon glyphicon-plus-sign" href='data/new') new
|
11
|
+
%button{class: ('btn btn-default navbar-btn')}
|
12
|
+
%a(class="glyphicon glyphicon-asterisk" href='chart') chart
|
13
|
+
%a(class="glyphicon glyphicon-asterisk" href='data') data
|
14
|
+
%button{class: ('btn btn-default navbar-btn')}
|
15
|
+
|
16
|
+
.container
|
17
|
+
!=yield
|
data/lib/views/chart.haml
CHANGED
data/lib/views/index.haml
CHANGED
@@ -18,14 +18,15 @@
|
|
18
18
|
%td= d.date
|
19
19
|
%td= d.created_at.strftime('%Y/%m/%d %H:%M')
|
20
20
|
%td
|
21
|
-
%
|
21
|
+
%button{class: ('btn btn-default navbar-btn')}
|
22
|
+
%a(class="glyphicon glyphicon-edit"){href: uri("/data/#{d.id}/edit")} edit
|
22
23
|
%td
|
23
24
|
%form.form-inline(method='post'){action: uri("/data/#{d.id}")}
|
24
25
|
%input(name='_method' type='hidden' value='delete')
|
25
26
|
.form-group
|
26
|
-
%button(class='btn btn-default')
|
27
|
-
%a(class='glyphicon glyphicon-
|
28
|
-
%a(type='submit' onclick='return confirm("Delete data?")')
|
27
|
+
%button(class='btn btn-default navbar-btn')
|
28
|
+
%a(class='glyphicon glyphicon-trash')
|
29
|
+
%a(type='submit' onclick='return confirm("Delete data?")') delete
|
29
30
|
|
30
31
|
|
31
32
|
|
data/lib/views/layout.haml
CHANGED
@@ -13,11 +13,14 @@
|
|
13
13
|
%nav.navbar.navbar-default
|
14
14
|
.container-fluid
|
15
15
|
.navbar-header
|
16
|
-
|
16
|
+
/%a.navbar-brand{href: uri('/data')} Weight Recorder
|
17
|
+
%a.navbar-brand Bob's weight
|
17
18
|
%button{class: ('btn btn-default navbar-btn')}
|
18
|
-
%a(class="glyphicon glyphicon-
|
19
|
+
%a(class="glyphicon glyphicon-pencil"){href: uri('data/new')} new
|
19
20
|
%button{class: ('btn btn-default navbar-btn')}
|
20
|
-
%a(class="glyphicon glyphicon-
|
21
|
+
%a(class="glyphicon glyphicon-picture"){href: uri('chart')} chart
|
22
|
+
%button{class: ('btn btn-default navbar-btn')}
|
23
|
+
%a(class="glyphicon glyphicon-th-list"){href: uri('data')} data
|
21
24
|
|
22
25
|
.container
|
23
26
|
!=yield
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: weight-recorder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shigeto R. Nishitani
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-09-
|
11
|
+
date: 2016-09-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -196,6 +196,7 @@ files:
|
|
196
196
|
- lib/recorder/data.rb
|
197
197
|
- lib/recorder/db.rb
|
198
198
|
- lib/recorder/version.rb
|
199
|
+
- lib/views/#layout.haml#
|
199
200
|
- lib/views/_errors.haml
|
200
201
|
- lib/views/_form.haml
|
201
202
|
- lib/views/chart.haml
|