weight-recorder 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/application.rb +6 -4
- data/lib/recorder/version.rb +1 -1
- data/lib/views/_form.haml +3 -3
- data/lib/views/chart.haml +1 -1
- data/tmp1/always_restart.txt +0 -0
- metadata +3 -3
- data/lib/views/#edit.haml# +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 04fc913ff738d9c2de6b940171ef6eccf8f13e35
|
4
|
+
data.tar.gz: 432108a4c9d9081b56f7bba2fd28cfb0a7c224df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f852b2c0b419cff4092f187caaf618b85d75e73b250509a1b71dbb436867ef027cc2eed0acd100f7c1456da380f4ceb7a1b62f627dd32b61bb9b339fe11168e
|
7
|
+
data.tar.gz: bfbfc80b825add0f68d7754e3d1718b85380b4fc8db52c37658bb546c20208feb152fc40ba54d840f40f7cfa48811dfdae068b365c26ff990ebd619aafa2df0e
|
data/lib/application.rb
CHANGED
@@ -34,7 +34,7 @@ module Recorder
|
|
34
34
|
|
35
35
|
get '/data/new' do
|
36
36
|
@data = Data.new
|
37
|
-
|
37
|
+
# @date0 = Time.now.strftime('%Y/%m/%d %H:%M')
|
38
38
|
haml :new
|
39
39
|
end
|
40
40
|
|
@@ -66,6 +66,7 @@ module Recorder
|
|
66
66
|
Data.create!(weight: params[:weight],
|
67
67
|
bodyfat: params[:bodyfat],
|
68
68
|
date: date0,
|
69
|
+
# date: params[:date],
|
69
70
|
memo: params[:memo]
|
70
71
|
)
|
71
72
|
|
@@ -83,22 +84,23 @@ module Recorder
|
|
83
84
|
redirect '/'
|
84
85
|
end
|
85
86
|
|
87
|
+
@min,@max=82,90
|
86
88
|
get '/chart' do
|
87
|
-
@weight_options = {min:
|
89
|
+
@weight_options = {min: @min, max: @max}
|
88
90
|
@bodyfat_options = {min: 15, max: 30}
|
89
91
|
@weight_data,@bodyfat_data = get_data()
|
90
92
|
haml :chart
|
91
93
|
end
|
92
94
|
|
93
95
|
get '/chart_week' do
|
94
|
-
@weight_options = {min:
|
96
|
+
@weight_options = {min: @min, max: @max}
|
95
97
|
@bodyfat_options = {min: 15, max: 30}
|
96
98
|
@weight_data,@bodyfat_data = get_data(:week)
|
97
99
|
haml :chart
|
98
100
|
end
|
99
101
|
|
100
102
|
get '/chart_month' do
|
101
|
-
@weight_options = {min:
|
103
|
+
@weight_options = {min: @min, max: @max}
|
102
104
|
@bodyfat_options = {min: 15, max: 30}
|
103
105
|
@weight_data,@bodyfat_data = get_data(:month)
|
104
106
|
haml :chart
|
data/lib/recorder/version.rb
CHANGED
data/lib/views/_form.haml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
.control-group
|
2
2
|
%label.col-sm-2.control-label(for='weight') Weight
|
3
3
|
.col-sm-4
|
4
|
-
%input.form-control(name='weight'
|
4
|
+
%input.form-control(name='weight' placeholder='in kg' type='text'){value: @data.weight}
|
5
5
|
.control-group
|
6
6
|
%label.col-sm-2.control-label(for='bodyfat') Body Fat
|
7
7
|
.col-sm-4
|
8
|
-
%input.form-control(name='bodyfat'
|
8
|
+
%input.form-control(name='bodyfat' placeholder='in percentage' type='text'){value: @data.bodyfat}
|
9
9
|
.control-group
|
10
10
|
%label.col-sm-2.control-label(for='date') Date
|
11
11
|
.col-sm-4
|
12
|
-
%input.form-control(name='date'
|
12
|
+
%input.form-control(name='date' placeholder='current time, edit later' type='text'){value: @data.date}
|
13
13
|
.control-group
|
14
14
|
%label.col-sm-2.control-label(for='memo') Memo
|
15
15
|
.col-sm-4
|
data/lib/views/chart.haml
CHANGED
File without changes
|
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.7
|
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-
|
11
|
+
date: 2016-10-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -243,7 +243,6 @@ files:
|
|
243
243
|
- lib/recorder/data.rb
|
244
244
|
- lib/recorder/db.rb
|
245
245
|
- lib/recorder/version.rb
|
246
|
-
- lib/views/#edit.haml#
|
247
246
|
- lib/views/_errors.haml
|
248
247
|
- lib/views/_form.haml
|
249
248
|
- lib/views/chart.haml
|
@@ -252,6 +251,7 @@ files:
|
|
252
251
|
- lib/views/layout.haml
|
253
252
|
- lib/views/new.haml
|
254
253
|
- lib/views/new.haml.old
|
254
|
+
- tmp1/always_restart.txt
|
255
255
|
- weight-recorder.gemspec
|
256
256
|
- weight-recorder.wiki/README_en.md
|
257
257
|
- weight-recorder.wiki/modify_db.md
|
data/lib/views/#edit.haml#
DELETED
@@ -1,8 +0,0 @@
|
|
1
|
-
%h1 Editing data
|
2
|
-
|
3
|
-
%form.form-horizontal(method='post'){action: uri("/data/#{@data.id}")}
|
4
|
-
!= haml :_form, locals: {task: @task}
|
5
|
-
%input(name='_method' type='hidden' value='put')
|
6
|
-
.form-group
|
7
|
-
.col-sm-offset-2.col-sm-10
|
8
|
-
%button(name='commit' type='submit') Update
|