weight-recorder 0.1.1 → 0.1.2

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
  SHA1:
3
- metadata.gz: b88733b5ee4f822be87993fd7407a25f3fc87449
4
- data.tar.gz: d7ff5f9977aa765b9f93c295feb353a3ce4c8c36
3
+ metadata.gz: c892d3b3c9be06c1135ec2efa7c1cd40cdbdc2c8
4
+ data.tar.gz: 6b5ecc0591dd0215d3ef56456ce31ec9e4632d7b
5
5
  SHA512:
6
- metadata.gz: 800d031ec59ff2c1c76a484d230d6673e2a6bab65f4a2c06afd036eda1e9ddcc412901220d7e1b77a4a6cad4ec5343d03a33bea6a15de7a15e1c9b8d6375ef34
7
- data.tar.gz: fc47d8adc8935ca199cfc0e9edd000a628780875a735ba64dfef8c11d654df36af6ee72877343ee02c4f3b5737b435f76d5fa23440c3bc0dda949930028f79e5
6
+ metadata.gz: 10d59ab2521e0d7e191789c435927a5a7bac77fea112436599096c45c1b84cb025366d32bf430e6a3d90d7fb52217647ff5bd6bbe0c828bca0b5c8d67b4bfea7
7
+ data.tar.gz: 741fb7caff51aff7e5a9e6aca543f1c51f7e648d741a72114852e67c2114692c47798af9a7bc07e7ed7f030c5298cd8956bd51f2f9a36d00f3e86f27c5928296
data/lib/application.rb CHANGED
@@ -61,9 +61,10 @@ module Recorder
61
61
 
62
62
  post '/data' do
63
63
  begin
64
+ date0 = Time.now.strftime('%Y/%m/%d %H:%M')
64
65
  Data.create!(weight: params[:weight],
65
66
  bodyfat: params[:bodyfat],
66
- date: params[:date])
67
+ date: date0)
67
68
 
68
69
  redirect '/'
69
70
  rescue ActiveRecord::RecordInvalid => e
@@ -1,3 +1,3 @@
1
1
  module Recorder
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
data/lib/views/chart.haml CHANGED
@@ -1,4 +1,4 @@
1
- %h1 Weight[kg] and BodyFat[%] chart
1
+ %h1 Charts
2
2
 
3
3
  %div
4
4
  %a{href: uri('/')} List
data/lib/views/index.haml CHANGED
@@ -1,10 +1,5 @@
1
1
  %h1 Listing Data
2
2
 
3
- %div
4
- %a{href: uri('/data/new')} New
5
- %div
6
- %a{href: uri('/chart')} Chart
7
-
8
3
  %table.table
9
4
  %thead
10
5
  %tr
@@ -2,7 +2,8 @@
2
2
  %html
3
3
  %head
4
4
  %meta(charset='utf-8')
5
- %title Recorder Application
5
+ %meta(name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1,user-scalable=no")
6
+ %title Weight Recorder
6
7
  /%link(href='/css/bootstrap.min.css' rel='stylesheet' type='text/css')
7
8
  %link(rel='stylesheet' type='text/css'){href: uri('css/bootstrap.min.css')}
8
9
 
@@ -12,7 +13,11 @@
12
13
  %nav.navbar.navbar-default
13
14
  .container-fluid
14
15
  .navbar-header
15
- %a.brand{href: uri('/data')} Recorder Application
16
+ %a.navbar-brand{href: uri('/data')} Weight Recorder
17
+ %button{class: ('btn btn-default navbar-btn')}
18
+ %a(class="glyphicon glyphicon-plus-sign" href='data/new') new
19
+ %button{class: ('btn btn-default navbar-btn')}
20
+ %a(class="glyphicon glyphicon-plus-sign" href='chart') chart
16
21
 
17
22
  .container
18
23
  !=yield
data/lib/views/new.haml CHANGED
@@ -1,6 +1,6 @@
1
1
  %h1 New Data
2
2
 
3
- %form.form-horizontal(method='post' action='/data')
3
+ %form.form-horizontal(method='post'){action: uri('/data')}
4
4
  .control-group
5
5
  %label.control-label(for='weight') Weight[kg]
6
6
  .controls
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.1
4
+ version: 0.1.2
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-08-31 00:00:00.000000000 Z
11
+ date: 2016-09-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord