whipped-cream 0.0.1pre2 → 0.0.1pre3
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +2 -0
- data/Gemfile +1 -2
- data/README.md +3 -0
- data/lib/whipped-cream/deployer.rb +2 -4
- data/lib/whipped-cream/public/assets/config.rb +7 -0
- data/lib/whipped-cream/public/assets/sass/_default.sass +54 -0
- data/lib/whipped-cream/public/assets/sass/_variables.sass +28 -0
- data/lib/whipped-cream/public/assets/sass/application.sass +7 -0
- data/lib/whipped-cream/public/assets/stylesheets/application.css +154 -0
- data/lib/whipped-cream/public/assets/stylesheets/baseline.compress.css +13 -0
- data/lib/whipped-cream/runner.rb +19 -9
- data/lib/whipped-cream/version.rb +1 -1
- data/lib/whipped-cream/views/layout.erb +2 -1
- data/lib/whipped-cream/views/sensor.erb +4 -2
- metadata +8 -3
- data/lib/whipped-cream/public/assets/application.css +0 -9
data/.gitignore
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,7 @@
|
|
1
1
|
# whipped-cream
|
2
|
+
[![Gem Version](https://badge.fury.io/rb/whipped-cream.png)](http://badge.fury.io/rb/whipped-cream)
|
3
|
+
[![Build Status](https://travis-ci.org/justincampbell/whipped-cream.png?branch=master)](https://travis-ci.org/justincampbell/whipped-cream)
|
4
|
+
[![Code Climate](https://codeclimate.com/github/justincampbell/whipped-cream.png)](https://codeclimate.com/github/justincampbell/whipped-cream)
|
2
5
|
|
3
6
|
## DSL
|
4
7
|
|
@@ -37,9 +37,6 @@ module WhippedCream
|
|
37
37
|
which ruby ||
|
38
38
|
time sudo apt-get install ruby -y
|
39
39
|
|
40
|
-
which runit ||
|
41
|
-
time sudo apt-get install runit -y
|
42
|
-
|
43
40
|
which whipped-cream ||
|
44
41
|
time sudo gem install whipped-cream --no-ri --no-rdoc --pre
|
45
42
|
|
@@ -58,11 +55,12 @@ module WhippedCream
|
|
58
55
|
def run_plugin
|
59
56
|
ssh_exec <<-SCRIPT
|
60
57
|
cd ~/whipped-cream
|
61
|
-
sudo whipped-cream start
|
58
|
+
sudo whipped-cream start #{plugin_filename} --daemonize
|
62
59
|
SCRIPT
|
63
60
|
end
|
64
61
|
|
65
62
|
def scp_copy(local, remote)
|
63
|
+
puts "Copying #{local} to pi@#{pi_address}:#{remote}"
|
66
64
|
scp.upload! local, remote
|
67
65
|
end
|
68
66
|
|
@@ -0,0 +1,54 @@
|
|
1
|
+
body
|
2
|
+
background-color: #fff
|
3
|
+
font-family: sans-serif
|
4
|
+
font-size: 16px
|
5
|
+
color: #798795
|
6
|
+
|
7
|
+
a
|
8
|
+
text-decoration: none
|
9
|
+
|
10
|
+
h1
|
11
|
+
text-align: center
|
12
|
+
color: #fff
|
13
|
+
background-color: #2C3E50
|
14
|
+
top: 0
|
15
|
+
padding: 1em
|
16
|
+
font-size: 1.5em
|
17
|
+
font-weight: 700
|
18
|
+
|
19
|
+
hr
|
20
|
+
height: 1px
|
21
|
+
|
22
|
+
form
|
23
|
+
text-align: center
|
24
|
+
|
25
|
+
input[type="submit"]
|
26
|
+
background-color: #1abc9c
|
27
|
+
width: 90%
|
28
|
+
border: none
|
29
|
+
color: #fff
|
30
|
+
padding: 1em
|
31
|
+
margin-top: 2em
|
32
|
+
font-size: 1em
|
33
|
+
-webkit-appearance: none
|
34
|
+
+border-radius(8px)
|
35
|
+
&:hover, &:active
|
36
|
+
background-color: #16A085
|
37
|
+
|
38
|
+
.item
|
39
|
+
+clearfix
|
40
|
+
padding: 1em
|
41
|
+
margin: 0 auto
|
42
|
+
h2
|
43
|
+
+inline-block
|
44
|
+
vertical-align: middle
|
45
|
+
font-size: 1.2em
|
46
|
+
width: 49%
|
47
|
+
font-weight: 700
|
48
|
+
top: 0
|
49
|
+
p
|
50
|
+
+inline-block
|
51
|
+
vertical-align: middle
|
52
|
+
width: 49%
|
53
|
+
text-align: right
|
54
|
+
top: 0
|
@@ -0,0 +1,28 @@
|
|
1
|
+
//Colors -----
|
2
|
+
|
3
|
+
$light-grey: #ededeb
|
4
|
+
$middle-grey: #d0d0d0
|
5
|
+
$dark-grey: #3B3B3B
|
6
|
+
|
7
|
+
$light-turquoise: #1ABC9C
|
8
|
+
$dark-turquoise: #16A085
|
9
|
+
|
10
|
+
$light-green: #2ECC71
|
11
|
+
$dark-green: #27AE60
|
12
|
+
|
13
|
+
$extra-light-blue: #3498DB
|
14
|
+
$light-blue: #2980B9
|
15
|
+
$dark-blue: #34495E
|
16
|
+
$extra-dark-blue: #2C3E50
|
17
|
+
|
18
|
+
$light-purple: #9B59B6
|
19
|
+
$dark-purple: #8E44AD
|
20
|
+
|
21
|
+
$yellow: #F1C40F
|
22
|
+
$orange: #F39C12
|
23
|
+
|
24
|
+
$light-pumpkin: #E67E22
|
25
|
+
$dark-pumpkin: #D35400
|
26
|
+
|
27
|
+
$light-red: #E74C3C
|
28
|
+
$dark-red: #C0392B
|
@@ -0,0 +1,154 @@
|
|
1
|
+
/* line 17, ../../../../../../../../.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
|
2
|
+
html, body, div, span, applet, object, iframe,
|
3
|
+
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
4
|
+
a, abbr, acronym, address, big, cite, code,
|
5
|
+
del, dfn, em, img, ins, kbd, q, s, samp,
|
6
|
+
small, strike, strong, sub, sup, tt, var,
|
7
|
+
b, u, i, center,
|
8
|
+
dl, dt, dd, ol, ul, li,
|
9
|
+
fieldset, form, label, legend,
|
10
|
+
table, caption, tbody, tfoot, thead, tr, th, td,
|
11
|
+
article, aside, canvas, details, embed,
|
12
|
+
figure, figcaption, footer, header, hgroup,
|
13
|
+
menu, nav, output, ruby, section, summary,
|
14
|
+
time, mark, audio, video {
|
15
|
+
margin: 0;
|
16
|
+
padding: 0;
|
17
|
+
border: 0;
|
18
|
+
font: inherit;
|
19
|
+
font-size: 100%;
|
20
|
+
vertical-align: baseline;
|
21
|
+
}
|
22
|
+
|
23
|
+
/* line 22, ../../../../../../../../.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
|
24
|
+
html {
|
25
|
+
line-height: 1;
|
26
|
+
}
|
27
|
+
|
28
|
+
/* line 24, ../../../../../../../../.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
|
29
|
+
ol, ul {
|
30
|
+
list-style: none;
|
31
|
+
}
|
32
|
+
|
33
|
+
/* line 26, ../../../../../../../../.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
|
34
|
+
table {
|
35
|
+
border-collapse: collapse;
|
36
|
+
border-spacing: 0;
|
37
|
+
}
|
38
|
+
|
39
|
+
/* line 28, ../../../../../../../../.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
|
40
|
+
caption, th, td {
|
41
|
+
text-align: left;
|
42
|
+
font-weight: normal;
|
43
|
+
vertical-align: middle;
|
44
|
+
}
|
45
|
+
|
46
|
+
/* line 30, ../../../../../../../../.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
|
47
|
+
q, blockquote {
|
48
|
+
quotes: none;
|
49
|
+
}
|
50
|
+
/* line 103, ../../../../../../../../.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
|
51
|
+
q:before, q:after, blockquote:before, blockquote:after {
|
52
|
+
content: "";
|
53
|
+
content: none;
|
54
|
+
}
|
55
|
+
|
56
|
+
/* line 32, ../../../../../../../../.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
|
57
|
+
a img {
|
58
|
+
border: none;
|
59
|
+
}
|
60
|
+
|
61
|
+
/* line 116, ../../../../../../../../.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
|
62
|
+
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary {
|
63
|
+
display: block;
|
64
|
+
}
|
65
|
+
|
66
|
+
/* line 1, ../sass/_default.sass */
|
67
|
+
body {
|
68
|
+
background-color: white;
|
69
|
+
font-family: sans-serif;
|
70
|
+
font-size: 16px;
|
71
|
+
color: #798795;
|
72
|
+
}
|
73
|
+
|
74
|
+
/* line 7, ../sass/_default.sass */
|
75
|
+
a {
|
76
|
+
text-decoration: none;
|
77
|
+
}
|
78
|
+
|
79
|
+
/* line 10, ../sass/_default.sass */
|
80
|
+
h1 {
|
81
|
+
text-align: center;
|
82
|
+
color: white;
|
83
|
+
background-color: #2c3e50;
|
84
|
+
top: 0;
|
85
|
+
padding: 1em;
|
86
|
+
font-size: 1.5em;
|
87
|
+
font-weight: 700;
|
88
|
+
}
|
89
|
+
|
90
|
+
/* line 19, ../sass/_default.sass */
|
91
|
+
hr {
|
92
|
+
height: 1px;
|
93
|
+
}
|
94
|
+
|
95
|
+
/* line 22, ../sass/_default.sass */
|
96
|
+
form {
|
97
|
+
text-align: center;
|
98
|
+
}
|
99
|
+
|
100
|
+
/* line 25, ../sass/_default.sass */
|
101
|
+
input[type="submit"] {
|
102
|
+
background-color: #1abc9c;
|
103
|
+
width: 90%;
|
104
|
+
border: none;
|
105
|
+
color: white;
|
106
|
+
padding: 1em;
|
107
|
+
margin-top: 2em;
|
108
|
+
font-size: 1em;
|
109
|
+
-webkit-appearance: none;
|
110
|
+
-webkit-border-radius: 8px;
|
111
|
+
-moz-border-radius: 8px;
|
112
|
+
-ms-border-radius: 8px;
|
113
|
+
-o-border-radius: 8px;
|
114
|
+
border-radius: 8px;
|
115
|
+
}
|
116
|
+
/* line 35, ../sass/_default.sass */
|
117
|
+
input[type="submit"]:hover, input[type="submit"]:active {
|
118
|
+
background-color: #16a085;
|
119
|
+
}
|
120
|
+
|
121
|
+
/* line 38, ../sass/_default.sass */
|
122
|
+
.item {
|
123
|
+
overflow: hidden;
|
124
|
+
*zoom: 1;
|
125
|
+
padding: 1em;
|
126
|
+
margin: 0 auto;
|
127
|
+
}
|
128
|
+
/* line 42, ../sass/_default.sass */
|
129
|
+
.item h2 {
|
130
|
+
display: -moz-inline-stack;
|
131
|
+
display: inline-block;
|
132
|
+
vertical-align: middle;
|
133
|
+
*vertical-align: auto;
|
134
|
+
zoom: 1;
|
135
|
+
*display: inline;
|
136
|
+
vertical-align: middle;
|
137
|
+
font-size: 1.2em;
|
138
|
+
width: 49%;
|
139
|
+
font-weight: 700;
|
140
|
+
top: 0;
|
141
|
+
}
|
142
|
+
/* line 49, ../sass/_default.sass */
|
143
|
+
.item p {
|
144
|
+
display: -moz-inline-stack;
|
145
|
+
display: inline-block;
|
146
|
+
vertical-align: middle;
|
147
|
+
*vertical-align: auto;
|
148
|
+
zoom: 1;
|
149
|
+
*display: inline;
|
150
|
+
vertical-align: middle;
|
151
|
+
width: 49%;
|
152
|
+
text-align: right;
|
153
|
+
top: 0;
|
154
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
/* Baseline - a designer framework, Copyright (C) 2009 Stephane Curzi, ProjetUrbain.com, Creative Commons Attribution-Share Alike 3.0 License */
|
2
|
+
/* reset */
|
3
|
+
html,body,div,span,a,img,h1,h2,h3,h4,h5,h6,hgroup,p,dl,dialog,dt,dd,ol,ul,li,abbr,acronym,address,b,big,blockquote,cite,code,del,dfn,em,i,ins,kbd,pre,q,samp,tt,var,small,strong,sub,sup,object,iframe,form,fieldset,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,footer,header,nav,section,figure,menu,time,mark,audio,video{font-family:inherit;font-size:100%;font-weight:inherit;font-style:inherit;vertical-align:baseline;white-space:normal;text-align:left;margin:0;padding:0;border:0;outline:0;background:transparent}textarea{font-family:inherit;font-size:100%;font-weight:normal;font-style:normal;white-space:normal;text-align:left;margin:0;padding:0}article,aside,footer,header,nav,section,dialog,figure,hgroup,menu{display:block}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal}del,ins{text-decoration:none}ol,ul{list-style:none}nav ul{list-style-type:none}table{border-collapse:separate;border-spacing:0;background-color:transparent;width:auto;height:auto}:focus{outline:0}blockquote:before,blockquote:after,q:before,q:after{content:""}blockquote,q{quotes:"" ""}input{margin:0}applet,basefont,dir,font,isindex,menu,s,strike,u{font-family:inherit;font-size:100%;font-weight:normal;font-style:normal;white-space:normal;vertical-align:baseline;text-decoration:inherit;text-align:left;color:inherit;margin:0;padding:0;border:0;outline:0}dir,menu{list-style:none}nobr{white-space:normal}blink{text-decoration:none}marquee{overflow:visible}
|
4
|
+
/* base */
|
5
|
+
body{font-family:helvetica,arial,sans-serif;line-height:1.5;background:white;color:black}h1,h2,h3,h4,h5,h6{line-height:1.2}h4,h5,h6{font-weight:bold}b,strong,caption,th,thead,dt,legend{font-weight:bold}cite,dfn,em,i{font-style:italic}code,kbd,samp,pre,tt,var{font-family:mono-space,monospace}h1,h2,h3,h4,h5,h6{word-spacing:-0.125em}p{word-spacing:0.125em;hyphenate:auto;hyphenate-lines:3}p+p{text-indent:1.5em}p+p.no-indent{text-indent:0}pre{white-space:pre}del{text-decoration:line-through}mark{background:rgba(255, 255, 0, 0.4);padding:0 .25em}ins{color:#f00}small,sup,sub{font-size:80%}big{font-size:125%;line-height:80%}abbr,acronym{font-size:85%;text-transform:uppercase;letter-spacing:.1em}abbr[title],acronym[title],dfn[title]{border-bottom:1px dotted black;cursor:help}sup,sub{line-height:0}sup{vertical-align:super}sub{vertical-align:sub}blockquote{padding:1.5em}hr{border:none;background:#ddd;width:100%}ul,ol{margin-left:1.5em}ul{list-style:disc outside}ol{list-style:decimal outside}input,select,button{cursor:pointer}table{font:inherit;width:100%}article,aside,header,hgroup,nav,figure,section,footer{display:block}.debug{outline:solid gold 1px}.debug-background{background:rgba(255, 215, 0, 0.2) !important}
|
6
|
+
/* type */
|
7
|
+
body{font-size:75%;line-height:1.5}h1,h2,h3,h4,h5,h6{position:relative}h1,h2{line-height:36px;margin-bottom:18px}h1,h2,h3,h4{margin-top:18px}h3,h4,h5,h6{line-height:18px}h1{font-size:36px;top:5px}h2{font-size:28px;top:8px}h3{font-size:22px;top:1px}h4{font-size:18px;top:2px}h5{font-size:15px;top:4px}h6{font-size:13px;top:5px}h1:first-child,h2:first-child,h3:first-child,h4:first-child{margin-top:0}p,pre,address{font-size:13px;line-height:18px;position:relative;top:5px}small{font-size:11px}abbr,code,kbd,samp,small,var{line-height:15px}ul,ol,dl,dialog{font-size:13px;line-height:18px;position:relative;top:5px;margin-top:18px;margin-bottom:18px}li ul,li ol,ul ul,ol ol{top:0;margin-top:0;margin-bottom:0}li h1,li h2,li h3,li h4,li h5,li h6,li p{top:0}form,legend,label{font-size:13px;line-height:18px}legend{position:relative;top:5px}table{font-size:13px}caption{font-size:13px;line-height:18px;position:relative}hr{position:relative;height:4px;margin:18px 0 14px 0}
|
8
|
+
/* table */
|
9
|
+
table{border-collapse:collapse;border-top:solid 3px #000;position:relative;margin-top:18px}th,td{line-height:18px;padding:9px 18px 8px 0}thead th,thead td{padding-top:7px}tfoot th,tfoot td{padding-bottom:8px}tbody th,tbody td,tfoot th,tfoot td{border-top:solid 1px #000} th:first-child,td:first-child{padding-left:0}th:last-child,td:last-child{padding-right:0}tr:nth-child(even) td{}tbody tr:nth-child(odd) th,tbody tr:nth-child(odd) td{background:rgba(0, 0, 0, 0.035)}caption{top:5px;margin-bottom:18px}
|
10
|
+
/* form */
|
11
|
+
form{overflow:auto}legend{padding-bottom:18px}label{width:100%;position:relative;top:5px;margin-bottom:18px;line-height:18px;display:block}input[type="text"],input[type="password"],input[type="select"],input[type="search"]{width:100%;margin-bottom:-1px;display:block}input[type="radio"]{top:-1px;margin:0 4px 3px 1px}input[type="checkbox"]{top:-2px;margin:0 4px 3px 1px}input[type="file"]{margin:0px 6px 3px 6px}input[type="submit"],input[type="reset"],input[type="button"]{position:relative;top:5px;margin-bottom:18px}select{display:block;margin:0px}textarea{width:99%;line-height:18px;margin-bottom:-2px;display:block;clear:left;overflow:auto}
|
12
|
+
/* grid */
|
13
|
+
#page{width:990px;position:relative}#page:after{content:".";display:block;height:0;clear:both;visibility:hidden}.column{margin-left:18px;display:block;float:left}.colgroup{display:block;float:left}.first{margin-left:0;clear:left}.gutter{margin-left:18px}.no-gutter{margin-left:0}.align-left{float:left}.align-right{float:right;text-align:right}.clear{float:left}header,section{padding-bottom:18px}.leading{margin-bottom:18px}.noleading{margin-bottom:0 !important}.width1{width:234px}.width2{width:486px}.width3{width:738px}.width4{width:990px;margin-left:0 !important}.full{display:block;float:left;width:100%;margin-left:0 !important}.unitx1{width:108px}.unitx2{width:234px}.unitx3{width:360px}.unitx4{width:486px}.unitx5{width:612px}.unitx6{width:738px}.unitx7{width:864px}.unitx8{width:990px;margin-left:0 !important}.columnsx2{-webkit-column-count:2;-webkit-column-gap:18px;-moz-column-count:2;-moz-column-gap:18px;column-count:2;column-gap:18px}.columnsx4{-webkit-column-count:4;-webkit-column-gap:18px;-moz-column-count:4;-moz-column-gap:18px;column-count:4;column-gap:18px}th.width1,td.width1{width:234px}th.width2,td.width2{width:486px}th.width3,td.width3{width:738px}th.width4,td.width4{width:990px}th.unitx1,th.unitx1{width:108px}th.unitx2,td.unitx2{width:234px}th.unitx3,td.unitx3{width:360px}th.unitx4,td.unitx4{width:486px}th.unitx5,td.unitx5{width:612px}th.unitx6,td.unitx6{width:738px}th.unitx7,td.unitx7{width:864px}th.unitx8,td.unitx8{width:990px}label.width1,label.width2,label.width3,label.width4{margin-left:18px;float:left}label.unitx1,label.unitx2,label.unitx3,label.unitx4,label.unitx5,label.unitx6,label.unitx7,label.unitx8{margin-left:18px;float:left}label.first{margin-left:0}label.width4,label.unitx8{width:990px;overflow:hidden}label.width1 input[type="text"],label.width1 input[type="password"],label.width1 input[type="select"],label.width1 input[type="search"]{width:228px}label.width2 input[type="text"],label.width2 input[type="password"],label.width2 input[type="select"],label.width2 input[type="search"]{width:480px}label.width3 input[type="text"],label.width3 input[type="password"],label.width3 input[type="select"],label.width3 input[type="search"]{width:732px}label.width4 input[type="text"],label.width4 input[type="password"],label.width4 input[type="select"],label.width4 input[type="search"]{width:984px}label.width1 select{width:234px}label.width2 select{width:486px}label.width3 select{width:738px}label.width4 select{width:990px}label.unitx1 input[type="text"],label.unitx1 input[type="password"],label.unitx1 input[type="select"],label.unitx1 input[type="search"]{width:102px}label.unitx2 input[type="text"],label.unitx2 input[type="password"],label.unitx2 input[type="select"],label.unitx2 input[type="search"]{width:228px}label.unitx3 input[type="text"],label.unitx3 input[type="password"],label.unitx3 input[type="select"],label.unitx3 input[type="search"]{width:354px}label.unitx4 input[type="text"],label.unitx4 input[type="password"],label.unitx4 input[type="select"],label.unitx4 input[type="search"]{width:480px}label.unitx5 input[type="text"],label.unitx5 input[type="password"],label.unitx5 input[type="select"],label.unitx5 input[type="search"]{width:606px}label.unitx6 input[type="text"],label.unitx6 input[type="password"],label.unitx6 input[type="select"],label.unitx6 input[type="search"]{width:732px}label.unitx7 input[type="text"],label.unitx7 input[type="password"],label.unitx7 input[type="select"],label.unitx7 input[type="search"]{width:858px}label.unitx8 input[type="text"],label.unitx8 input[type="password"],label.unitx8 input[type="select"],label.unitx8 input[type="search"]{width:984px}label.unitx1 select{width:108px}label.unitx2 select{width:234px}label.unitx3 select{width:360px}label.unitx4 select{width:486px}label.unitx5 select{width:612px}label.unitx6 select{width:738px}label.unitx7 select{width:864px}label.unitx8 select{width:990px}
|
data/lib/whipped-cream/runner.rb
CHANGED
@@ -54,17 +54,27 @@ module WhippedCream
|
|
54
54
|
|
55
55
|
def configure_sensors
|
56
56
|
plugin.sensors.each do |sensor|
|
57
|
-
|
57
|
+
if sensor.pin
|
58
|
+
define_sensor_method_with_pin sensor
|
59
|
+
else
|
60
|
+
define_sensor_method_with_block sensor
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
58
64
|
|
59
|
-
|
60
|
-
|
61
|
-
pin = pins[sensor.id]
|
65
|
+
def define_sensor_method_with_pin(sensor)
|
66
|
+
create_pin sensor, direction: :in
|
62
67
|
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
+
define_singleton_method sensor.id do
|
69
|
+
pin = pins[sensor.id]
|
70
|
+
|
71
|
+
pin.value == 1 ? sensor.high : sensor.low
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
def define_sensor_method_with_block(sensor)
|
76
|
+
define_singleton_method sensor.id do
|
77
|
+
sensor.block.call
|
68
78
|
end
|
69
79
|
end
|
70
80
|
|
@@ -2,7 +2,8 @@
|
|
2
2
|
<html>
|
3
3
|
<head>
|
4
4
|
<title><%= title %></title>
|
5
|
-
<link href="/assets/
|
5
|
+
<link href="/assets/stylesheets/baseline.compress.css" media="screen" rel="stylesheet" type="text/css">
|
6
|
+
<link href="/assets/stylesheets/application.css" media="screen" rel="stylesheet" type="text/css">
|
6
7
|
<meta content="width=device-width" name="viewport">
|
7
8
|
</head>
|
8
9
|
<body>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: whipped-cream
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.1pre3
|
5
5
|
prerelease: 5
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-10-
|
12
|
+
date: 2013-10-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: net-scp
|
@@ -200,7 +200,12 @@ files:
|
|
200
200
|
- lib/whipped-cream/deployer.rb
|
201
201
|
- lib/whipped-cream/pi_piper.rb
|
202
202
|
- lib/whipped-cream/plugin.rb
|
203
|
-
- lib/whipped-cream/public/assets/
|
203
|
+
- lib/whipped-cream/public/assets/config.rb
|
204
|
+
- lib/whipped-cream/public/assets/sass/_default.sass
|
205
|
+
- lib/whipped-cream/public/assets/sass/_variables.sass
|
206
|
+
- lib/whipped-cream/public/assets/sass/application.sass
|
207
|
+
- lib/whipped-cream/public/assets/stylesheets/application.css
|
208
|
+
- lib/whipped-cream/public/assets/stylesheets/baseline.compress.css
|
204
209
|
- lib/whipped-cream/runner.rb
|
205
210
|
- lib/whipped-cream/sensor.rb
|
206
211
|
- lib/whipped-cream/server.rb
|