agilelamp-driver 0.1.0 → 0.1.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.
data.tar.gz.sig CHANGED
Binary file
@@ -14,6 +14,7 @@ bin/agilelamp-driver
14
14
  lib/agilelamp-driver.rb
15
15
  src/agilelamp.c
16
16
  src/Makefile
17
+ src/44-usblamp.rules
17
18
  tasks/deployment.rake
18
19
  tasks/environment.rake
19
20
  tasks/website.rake
data/Rakefile CHANGED
@@ -1,4 +1,4 @@
1
1
  require 'config/requirements'
2
2
  require 'config/hoe' # setup Hoe + all gem configuration
3
3
 
4
- Dir['tasks/**/*.rake'].each { |rake| load rake }
4
+ Dir['tasks/**/*.rake'].each { |rake| load rake }
Binary file
@@ -35,7 +35,7 @@ REV = nil
35
35
  # UNCOMMENT IF REQUIRED:
36
36
  # REV = YAML.load(`svn info`)['Revision']
37
37
  #VERS = Agilelamp-driver::VERSION::STRING + (REV ? ".#{REV}" : "")
38
- VERS = "0.1.0"
38
+ VERS = "0.1.1"
39
39
  RDOC_OPTS = ['--quiet', '--title', 'agilelamp-driver documentation',
40
40
  "--opname", "index.html",
41
41
  "--line-numbers",
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  GEM_NAME = 'agilelamp-driver' # what ppl will type to install your gem
4
- RUBYFORGE_PROJECT = 'agilelamp-driver'
4
+ RUBYFORGE_PROJECT = 'agilelamp'
5
5
 
6
6
  require 'rubygems'
7
7
  begin
@@ -15,9 +15,9 @@ end
15
15
  require 'redcloth'
16
16
  require 'syntax/convertors/html'
17
17
  require 'erb'
18
- require File.dirname(__FILE__) + "/../lib/#{GEM_NAME}/version.rb"
18
+ #require File.dirname(__FILE__) + "/../lib/#{GEM_NAME}/version.rb"
19
19
 
20
- version = Agilelamp-driver::VERSION::STRING
20
+ version = "0.1.0"
21
21
  download = "http://rubyforge.org/projects/#{RUBYFORGE_PROJECT}"
22
22
 
23
23
  def rubyforge_project_id
@@ -0,0 +1 @@
1
+ SYSFS{idVendor}=="1130", SYSFS{idProduct}=="0202", GROUP="plugdev", MODE="0777", OPTIONS="last_rule"
@@ -1,2 +1,6 @@
1
+ ifeq (`uname`, 'Linux')
2
+ export LINUX
3
+ endif
4
+
1
5
  all:
2
6
  gcc agilelamp.c -o agilelamp-driver -lusb
@@ -134,7 +134,6 @@ int load_device(){
134
134
  fprintf(stderr, "You didn't really get the launcher!\n");
135
135
  return 1;
136
136
  }
137
-
138
137
  usb_detach_kernel_driver_np(launcher, 1);
139
138
  usb_detach_kernel_driver_np(launcher, 0);
140
139
 
@@ -29,17 +29,43 @@ end
29
29
  task :make_agilelamp_bin do
30
30
  cd "src/"
31
31
  begin
32
- sh "make"
33
- cp "agilelamp-driver", "../bin"
32
+ sh "make"
33
+ cp "agilelamp-driver", "../bin"
34
34
  rescue
35
- puts "***************************"
36
- puts "Couldn't compile for your architecture. Precompiled binary may still work. If not, try installing libusb headers (compile and install libusb from source)."
37
- puts "***************************"
35
+ puts <<EOF
36
+
37
+ ******************************************************************************
38
+ Couldn't compile for your architecture. Precompiled binary may still work. If
39
+ not, try installing libusb headers (compile and install libusb from source or
40
+ get libusb-dev on debian systems)."
41
+ ******************************************************************************
42
+
43
+ EOF
38
44
  end
39
45
  cd "../"
40
46
  end
41
47
 
42
- task :install_gem => [:clean, :make_agilelamp_bin, :package] do
48
+ task :install_udev_rule do
49
+ begin
50
+ if `uname`.strip == 'Linux'
51
+ puts "Installing udev rule to enable hardware use on Linux"
52
+ cp "src/44-usblamp.rules", "/etc/udev/rules.d/"
53
+ puts "Restarting udev..."
54
+ sh "/etc/init.d/udev restart"
55
+ end
56
+ rescue
57
+ puts <<EOF
58
+
59
+ ****************************************************************************
60
+ Couldn't install udev rules for the USB lamp. Expected to be able to put file
61
+ in /etc/udev/rules.d/. Was this a bad assumption?
62
+ ****************************************************************************
63
+
64
+ EOF
65
+ end
66
+ end
67
+
68
+ task :install_gem => [:clean, :make_agilelamp_bin, :package, :install_udev_rule, ] do
43
69
  sh "#{'sudo ' unless Hoe::WINDOZE}gem install --no-wrappers --local pkg/*.gem"
44
70
  end
45
71
 
@@ -1,11 +1,104 @@
1
- <html>
2
- <head>
3
- <meta http-equiv="Content-type" content="text/html; charset=utf-8">
4
- <title>agilelamp-driver</title>
5
-
6
- </head>
7
- <body id="body">
8
- <p>This page has not yet been created for RubyGem <code>agilelamp-driver</code></p>
9
- <p>To the developer: To generate it, update website/index.txt and run the rake task <code>website</code> to generate this <code>index.html</code> file.</p>
10
- </body>
11
- </html>
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <link rel="stylesheet" href="stylesheets/screen.css" type="text/css" media="screen" />
6
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7
+ <title>
8
+ Agile Lamp Driver
9
+ </title>
10
+ <script src="javascripts/rounded_corners_lite.inc.js" type="text/javascript"></script>
11
+ <style>
12
+
13
+ </style>
14
+ <script type="text/javascript">
15
+ window.onload = function() {
16
+ settings = {
17
+ tl: { radius: 10 },
18
+ tr: { radius: 10 },
19
+ bl: { radius: 10 },
20
+ br: { radius: 10 },
21
+ antiAlias: true,
22
+ autoPad: true,
23
+ validTags: ["div"]
24
+ }
25
+ var versionBox = new curvyCorners(settings, document.getElementById("version"));
26
+ versionBox.applyCornersToAll();
27
+ }
28
+ </script>
29
+ </head>
30
+ <body>
31
+ <div id="main">
32
+
33
+ <h1>Agile Lamp Driver</h1>
34
+ <div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/agilelamp"; return false'>
35
+ <p>Get Version</p>
36
+ <a href="http://rubyforge.org/projects/agilelamp" class="numbers">0.1.0</a>
37
+ </div>
38
+ <h2>What</h2>
39
+
40
+
41
+ <p>A user-space driver for the Agile Lamp <span class="caps">USB</span> Lava Lamp</p>
42
+
43
+
44
+ <h2>Installing</h2>
45
+
46
+
47
+ <p><pre class='syntax'><span class="ident">sudo</span> <span class="ident">gem</span> <span class="ident">install</span> <span class="ident">agilelamp</span><span class="punct">-</span><span class="ident">driver</span></pre></p>
48
+
49
+
50
+ <h2>The basics</h2>
51
+
52
+
53
+ <p>After installing the gem, you should be able to control the Agile Lamp while it is plugged in:</p>
54
+
55
+
56
+ <ul>
57
+ <li><pre class='syntax'>agilelamp-driver red # red means bad!</pre></li>
58
+ <li><pre class='syntax'>agilelamp-driver green # green means good!</pre></li>
59
+ <li><pre class='syntax'>agilelamp-driver various # meaningless cycling colors</pre></li>
60
+ <li><pre class='syntax'>agilelamp-driver bell # the bell is very unpleasant</pre></li>
61
+ </ul>
62
+
63
+
64
+ <h2>Source code</h2>
65
+
66
+
67
+ <p>You can fetch the source from tarball or git repository:</p>
68
+
69
+
70
+ <ul>
71
+ <li>rubyforge: <a href="http://rubyforge.org/scm/?group_id=6281">http://rubyforge.org/scm/?group_id=6281</a></li>
72
+ <li>gitorious: <a href="http://gitorious.org/projects/agile-lamp">website</a> &mdash; <a href="git://gitorious.org/agile-lamp/mainline.git">git://gitorious.org/agile-lamp/mainline.git</a></li>
73
+ </ul>
74
+
75
+
76
+ <pre>git clone git://gitorious.org/agile-lamp/mainline.git</pre>
77
+
78
+ <h3>Build and test instructions</h3>
79
+
80
+
81
+ <pre>cd agilelamp-driver
82
+ rake test
83
+ rake install_gem</pre>
84
+
85
+ <h2>License</h2>
86
+
87
+
88
+ <p>This code is free to use under the terms of the <span class="caps">MIT</span> license.</p>
89
+
90
+
91
+ <h2>Contact</h2>
92
+
93
+
94
+ <p>Comments are welcome. Send comments or questions to <a href="mailto:tristil@gmail.com">Joseph Method</a>.</p>
95
+ <p class="coda">
96
+ <a href="tristil@gmail.com">Joseph Method</a>, 20th May 2008<br>
97
+ Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
98
+ </p>
99
+ </div>
100
+
101
+ <!-- insert site tracking codes here, like Google Urchin -->
102
+
103
+ </body>
104
+ </html>
@@ -1,10 +1,8 @@
1
- h1. agilelamp driver
2
-
3
- h1. &#x2192; 'agilelamp-driver'
4
-
1
+ h1. Agile Lamp Driver
5
2
 
6
3
  h2. What
7
4
 
5
+ A user-space driver for the Agile Lamp USB Lava Lamp
8
6
 
9
7
  h2. Installing
10
8
 
@@ -12,59 +10,21 @@ h2. Installing
12
10
 
13
11
  h2. The basics
14
12
 
13
+ After installing the gem, you should be able to control the Agile Lamp while it is plugged in:
15
14
 
16
- h2. Demonstration of usage
17
-
18
-
19
-
20
- h2. Forum
21
-
22
- "http://groups.google.com/group/agilelamp-driver":http://groups.google.com/group/agilelamp-driver
23
-
24
- TODO - create Google Group - agilelamp-driver
15
+ * <pre syntax="terminal">agilelamp-driver red # red means bad!</pre>
16
+ * <pre syntax="terminal">agilelamp-driver green # green means good!</pre>
17
+ * <pre syntax="terminal">agilelamp-driver various # meaningless cycling colors</pre>
18
+ * <pre syntax="terminal">agilelamp-driver bell # the bell is very unpleasant</pre>
25
19
 
26
- h2. How to submit patches
20
+ h2. Source code
27
21
 
28
- Read the "8 steps for fixing other people's code":http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/ and for section "8b: Submit patch to Google Groups":http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/#8b-google-groups, use the Google Group above.
29
-
30
- TODO - pick SVN or Git instructions
31
-
32
- The trunk repository is <code>svn://rubyforge.org/var/svn/agilelamp-driver/trunk</code> for anonymous access.
33
-
34
- OOOORRRR
35
-
36
- You can fetch the source from either:
37
-
38
- <% if rubyforge_project_id %>
22
+ You can fetch the source from tarball or git repository:
39
23
 
40
24
  * rubyforge: "http://rubyforge.org/scm/?group_id=<%= rubyforge_project_id %>":http://rubyforge.org/scm/?group_id=<%= rubyforge_project_id %>
25
+ * gitorious: "website":http://gitorious.org/projects/agile-lamp &mdash; "git://gitorious.org/agile-lamp/mainline.git":git://gitorious.org/agile-lamp/mainline.git
41
26
 
42
- <pre>git clone git://rubyforge.org/agilelamp-driver.git</pre>
43
-
44
- <% else %>
45
-
46
- * rubyforge: MISSING IN ACTION
47
-
48
- TODO - You can not created a RubyForge project, OR have not run <code>rubyforge config</code>
49
- yet to refresh your local rubyforge data with this projects' id information.
50
-
51
- When you do this, this message will magically disappear!
52
-
53
- Or you can hack website/index.txt and make it all go away!!
54
-
55
- <% end %>
56
-
57
- * github: "http://github.com/GITHUB_USERNAME/agilelamp-driver/tree/master":http://github.com/GITHUB_USERNAME/agilelamp-driver/tree/master
58
-
59
- <pre>git clone git://github.com/GITHUB_USERNAME/agilelamp-driver.git</pre>
60
-
61
-
62
- TODO - add "github_username: username" to ~/.rubyforge/user-config.yml and newgem will reuse it for future projects.
63
-
64
-
65
- * gitorious: "git://gitorious.org/agilelamp-driver/mainline.git":git://gitorious.org/agilelamp-driver/mainline.git
66
-
67
- <pre>git clone git://gitorious.org/agilelamp-driver/mainline.git</pre>
27
+ <pre>git clone git://gitorious.org/agile-lamp/mainline.git</pre>
68
28
 
69
29
  h3. Build and test instructions
70
30
 
@@ -72,12 +32,11 @@ h3. Build and test instructions
72
32
  rake test
73
33
  rake install_gem</pre>
74
34
 
75
-
76
35
  h2. License
77
36
 
78
37
  This code is free to use under the terms of the MIT license.
79
38
 
80
39
  h2. Contact
81
40
 
82
- Comments are welcome. Send an email to "Joseph Method":mailto:tristil@gmail.com via the "forum":http://groups.google.com/group/agilelamp-driver
41
+ Comments are welcome. Send comments or questions to "Joseph Method":mailto:tristil@gmail.com.
83
42
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: agilelamp-driver
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joseph Method
@@ -30,7 +30,7 @@ cert_chain:
30
30
  5VG+ZA==
31
31
  -----END CERTIFICATE-----
32
32
 
33
- date: 2008-05-20 00:00:00 -04:00
33
+ date: 2008-05-22 00:00:00 -04:00
34
34
  default_executable:
35
35
  dependencies: []
36
36
 
@@ -64,6 +64,7 @@ files:
64
64
  - lib/agilelamp-driver.rb
65
65
  - src/agilelamp.c
66
66
  - src/Makefile
67
+ - src/44-usblamp.rules
67
68
  - tasks/deployment.rake
68
69
  - tasks/environment.rake
69
70
  - tasks/website.rake
metadata.gz.sig CHANGED
Binary file