dc-notifier-animate 0.0.1

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 0c7e85f5abe5356616cd770b18d5e14c11870746
4
+ data.tar.gz: d99049a5f0c1ae4f2e079068db6e1d5a01fb75d9
5
+ SHA512:
6
+ metadata.gz: 88abf2f7cea1ed27cd201231675c53aa0a06819b4087e5cfbdd57add5341bce9ea90ae549ee093c2cf210f30bde4d133741373f2da995c67ab9ca02f9d4dd4d5
7
+ data.tar.gz: a06620a9a91905d9f1d8107275d4bb90ef0a3c93db75c79292e4a3ae1b489693b07e9096d4ed4ad6011ee259c3bc1975ee60ba26aaa2b60eda08b5fdcdf961c5
data/README.md ADDED
@@ -0,0 +1,22 @@
1
+ # DreamCheeky Notifier Animations
2
+
3
+ This is a gem for animating the DreamCheeky Email Notifiers. It currently uses a fairly naïve threading implementation, but it works as a proof of concept
4
+
5
+ ## Usage
6
+ ```gem install dc-notifier-animate```
7
+ or use Bundler
8
+ ```
9
+ require 'dreamcheeky/notifier/animate'
10
+
11
+ x,y = DreamCheeky::Notifier.all # This assumes that we're using at least 2 notifiers
12
+ x.breathe(Color::RGB::Blue, 2)
13
+ y.breathe(Color::RGB::Lime, 5)
14
+ ```
15
+
16
+ ## TODO
17
+ * Better threading
18
+ * New Animations
19
+ * Fade between colours
20
+ * Pulse
21
+ * Fade In
22
+ * Fade Out
@@ -0,0 +1,17 @@
1
+ # coding: utf-8
2
+
3
+ Gem::Specification.new do |spec|
4
+ spec.name = "dc-notifier-animate"
5
+ spec.version = "0.0.1"
6
+ spec.authors = [ "Andy Palmer" ]
7
+ spec.email = [ "andy@andypalmer.com" ]
8
+ spec.description = "Threaded animations for the DreamCheeky Email Notifier"
9
+ spec.summary = "Does what it says on the tin"
10
+ spec.homepage = "https://github.com/andypalmer/dc-notifier-animate"
11
+
12
+ spec.files = `git ls-files`.split($/)
13
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
14
+ spec.require_paths = ["lib"]
15
+
16
+ spec.add_dependency 'dc-notifier', "~> 0.1"
17
+ end
@@ -0,0 +1,20 @@
1
+ require "dreamcheeky/notifier"
2
+ require "eventmachine"
3
+
4
+ module DreamCheeky
5
+ class Notifier
6
+ def breathe(colour, rate)
7
+ @thread = Thread.new {
8
+ EM.run {
9
+ n=1
10
+ direction=1
11
+ EM::PeriodicTimer.new(rate/20.0) {
12
+ self.colour colour.adjust_brightness (-n*10)
13
+ direction = -direction if n == 0 || n == 10
14
+ n += direction
15
+ }
16
+ }
17
+ }
18
+ end
19
+ end
20
+ end
metadata ADDED
@@ -0,0 +1,61 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: dc-notifier-animate
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Andy Palmer
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-05-14 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: dc-notifier
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '0.1'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '0.1'
27
+ description: Threaded animations for the DreamCheeky Email Notifier
28
+ email:
29
+ - andy@andypalmer.com
30
+ executables: []
31
+ extensions: []
32
+ extra_rdoc_files: []
33
+ files:
34
+ - README.md
35
+ - dc-notifier-animate.gemspec
36
+ - lib/dreamcheeky/notifier/animate.rb
37
+ homepage: https://github.com/andypalmer/dc-notifier-animate
38
+ licenses: []
39
+ metadata: {}
40
+ post_install_message:
41
+ rdoc_options: []
42
+ require_paths:
43
+ - lib
44
+ required_ruby_version: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ">="
47
+ - !ruby/object:Gem::Version
48
+ version: '0'
49
+ required_rubygems_version: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ requirements: []
55
+ rubyforge_project:
56
+ rubygems_version: 2.2.2
57
+ signing_key:
58
+ specification_version: 4
59
+ summary: Does what it says on the tin
60
+ test_files: []
61
+ has_rdoc: