dc-notifier-animate 0.0.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/dc-notifier-animate.gemspec +1 -1
- data/lib/dreamcheeky/notifier/animate.rb +11 -10
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 429badb25b93177ceccf8ba65a67d9184c6cfc57
|
4
|
+
data.tar.gz: 5ffa9d064e68e03d12e662e95c6f95268abe7fbb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 848f2724f3300c1201b8a874c826cfae02f4046708160656fd0565397a3c35b571b079ae9dcd66ea744ba00d5abb652240be10e26824d2d9f985b5e621de11e1
|
7
|
+
data.tar.gz: 2c3efbf852ad2a25b6b3eeb01c0ed79953b0e3bdb4161ba3cd5e7777e2805b902c323d194bc39b32357f1e085e28eb93b234ea24a83878ac455e377b4067631d
|
data/dc-notifier-animate.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |spec|
|
4
4
|
spec.name = "dc-notifier-animate"
|
5
|
-
spec.version = "0.0
|
5
|
+
spec.version = "0.1.0"
|
6
6
|
spec.authors = [ "Andy Palmer" ]
|
7
7
|
spec.email = [ "andy@andypalmer.com" ]
|
8
8
|
spec.description = "Threaded animations for the DreamCheeky Email Notifier"
|
@@ -4,16 +4,17 @@ require "eventmachine"
|
|
4
4
|
module DreamCheeky
|
5
5
|
class Notifier
|
6
6
|
def breathe(colour, rate)
|
7
|
-
|
8
|
-
EM.run
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
7
|
+
unless EM.reactor_running?
|
8
|
+
Thread.new { EM.run }
|
9
|
+
sleep 1
|
10
|
+
end
|
11
|
+
@animate.cancel if !!@animate
|
12
|
+
n=1
|
13
|
+
direction=1
|
14
|
+
@animate = EM::PeriodicTimer.new(rate/20.0) {
|
15
|
+
self.colour colour.adjust_brightness (-n*10)
|
16
|
+
direction = -direction if n == 0 || n == 10
|
17
|
+
n += direction
|
17
18
|
}
|
18
19
|
end
|
19
20
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dc-notifier-animate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Palmer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05-
|
11
|
+
date: 2014-05-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dc-notifier
|