Skip to content
This repository
Browse code

Moved the REDIS_CONF directly into the function.

  • Loading branch information...
commit e8cf217c715ae12b01038835d57abb84adc95695 1 parent 5b29e78
authored December 10, 2009 mxcl committed January 13, 2010

Showing 1 changed file with 15 additions and 17 deletions. Show diff stats Hide diff stats

  1. 32  Library/Formula/redis.rb
32  Library/Formula/redis.rb
... ...
@@ -1,6 +1,19 @@
1 1
 require 'formula'
2 2
 
3  
-REDIS_CONF=<<-EOS
  3
+class Redis <Formula
  4
+  url 'http://redis.googlecode.com/files/redis-1.1.91-beta.tar.gz'
  5
+  version '1.1.91-beta'
  6
+  homepage 'http://code.google.com/p/redis/'
  7
+  sha1 '9a5de92aa57c2c70e1d168a4e985ec7d79dae882'
  8
+
  9
+  def install
  10
+    system "make"
  11
+
  12
+    (share+'redis').install %w( utils client-libraries doc )
  13
+    bin.install %w( redis-benchmark redis-cli redis-server )
  14
+
  15
+    # set up the conf file
  16
+    (etc+'redis.conf').write <<-REDIS_CONF
4 17
 # Redis configuration file example
5 18
 
6 19
 # By default Redis does not run as a daemon. Use 'yes' if you need it.
@@ -133,22 +146,7 @@
133 146
 # your development environment so that we can test it better.
134 147
 shareobjects no
135 148
 shareobjectspoolsize 1024
136  
-EOS
137  
-
138  
-class Redis <Formula
139  
-  url 'http://redis.googlecode.com/files/redis-1.1.91-beta.tar.gz'
140  
-  version '1.1.91-beta'
141  
-  homepage 'http://code.google.com/p/redis/'
142  
-  sha1 '9a5de92aa57c2c70e1d168a4e985ec7d79dae882'
143  
-
144  
-  def install
145  
-    system "make"
146  
-
147  
-    (share+'redis').install %w( utils client-libraries doc )
148  
-    bin.install %w( redis-benchmark redis-cli redis-server )
149  
-
150  
-    # set up the conf file
151  
-    (etc+'redis.conf').write REDIS_CONF
  149
+    REDIS_CONF
152 150
     
153 151
     # FIXME: You get “* Can't chdir to '/var/db/redis/': No such file or
154 152
     #        directory” when running with this conf. We need to either make

0 notes on commit e8cf217

Please sign in to comment.
Something went wrong with that request. Please try again.