acts_as_ferret 0.4.6 → 0.4.7

Sign up to get free protection for your applications and to get access to all the features.
data/README CHANGED
@@ -13,45 +13,32 @@ http://j-k.lighthouseapp.com/projects/45560-acts-as-ferret
13
13
 
14
14
  == Installation
15
15
 
16
- Aaf is available via git from rubyforge.org and github.com. Github also offers
17
- tarball downloads, check out http://github.com/jkraemer/acts_as_ferret/tree/master .
16
+ Aaf is available as a gem (gem install acts_as_ferret), or via git from github.com.
17
+ Github also offers tarball downloads, check out
18
+ http://github.com/jkraemer/acts_as_ferret/tree/master .
18
19
 
19
- === Installation inside your Rails > 2.1 project via gem management
20
+ === Set up your Rails > 2.1 project to use the acts_as_ferret gem.
20
21
 
21
- Add this to your projects config/environment.rb:
22
+ Add this to your project's config/environment.rb:
22
23
 
23
- <tt>config.gem 'acts_as_ferret', :version => '~> 0.4.4'</tt>
24
+ <tt>config.gem 'acts_as_ferret', :version => '~> 0.4.7'</tt>
24
25
 
25
- Or, use github:
26
+ With Rails 3 of course instead you have to update your Gemfile, but I guess you already knew that ;-)
27
+ With the gem installed, change into your RAILS_ROOT and run the supplied aaf_install script.
28
+ This will copy rake tasks, capistrano recipes and the ferret server config and startup script
29
+ into your project.
26
30
 
27
- <tt>config.gem 'jkraemer-acts_as_ferret', :version => '~> 0.4.4', :lib => 'acts_as_ferret', :source => 'http://gems.github.com'"</tt>
31
+ In order to have the capistrano recipe loaded you'll have to patch your Capfile a bit. I use to have
32
+ a line like that in my Capfiles, loading everything found below RAILS_ROOT/lib/recipes:
28
33
 
29
- === Installation inside your Rails project via script/plugin
30
-
31
- script/plugin install git://github.com/jkraemer/acts_as_ferret.git
32
-
33
- The rubyforge repository is located at git://rubyforge.org/actsasferret.git
34
-
35
- === Old SVN repository
34
+ <tt>Dir['lib/recipes/**/*.rb'].each { |plugin| load(plugin) }</tt>
36
35
 
37
- In november 2008 I stopped updating the svn repository that has been the main
38
- repository for aaf for several years. In case you want to retrieve any of the
39
- older versions of the plugin, it's still there at
40
36
 
41
- svn://code.jkraemer.net/acts_as_ferret/
42
-
43
- === System-wide installation with Rubygems
44
-
45
- <tt>sudo gem install acts_as_ferret</tt>
46
-
47
- To use acts_as_ferret in your project, add the following line to the end of your
48
- project's config/environment.rb:
37
+ === Installation inside your Rails project via script/plugin
49
38
 
50
- <tt>require 'acts_as_ferret'</tt>
39
+ script/plugin install git://github.com/jkraemer/acts_as_ferret.git
51
40
 
52
- Call the aaf_install script that came with the gem inside your project
53
- directory to install the sample config file and the drb server start/stop
54
- script.
41
+ No additional setup needed.
55
42
 
56
43
 
57
44
  == Usage
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 4
8
- - 6
9
- version: 0.4.6
8
+ - 7
9
+ version: 0.4.7
10
10
  platform: ruby
11
11
  authors:
12
12
  - Jens Kraemer
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-05-29 00:00:00 +02:00
17
+ date: 2010-07-06 13:50:00 +02:00
18
18
  default_executable: aaf_install
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -5,20 +5,25 @@ require 'fileutils'
5
5
 
6
6
  @basedir = File.join(File.dirname(__FILE__), '..')
7
7
 
8
- def install(dir, file, executable=false)
9
- puts "Installing: #{file}"
10
- target = File.join('.', dir, file)
8
+ def install(src, target_dir, executable=false)
9
+ puts "Installing: #{src}"
10
+ src = File.join(@basedir, src)
11
+ fname = File.basename(src)
12
+ target = File.join(target_dir, fname)
11
13
  if File.exists?(target)
12
14
  puts "#{target} already exists, skipping"
13
15
  else
14
- FileUtils.cp File.join(@basedir, dir, file), target
16
+ FileUtils.mkdir_p target_dir
17
+ FileUtils.cp src, target
15
18
  FileUtils.chmod 0755, target if executable
16
19
  end
17
20
  end
18
21
 
19
22
 
20
- install 'script', 'ferret_server', true
21
- install 'config', 'ferret_server.yml'
23
+ install 'script/ferret_server', 'script', true
24
+ install 'config/ferret_server.yml', 'config'
25
+ install 'tasks/ferret.rake', 'lib/tasks'
26
+ install 'recipes/aaf_recipes.rb', 'lib/recipes'
22
27
 
23
28
  puts IO.read(File.join(@basedir, 'README'))
24
29
 
@@ -103,7 +103,7 @@ module ActsAsFerret #:nodoc:
103
103
  end
104
104
  true # signal success to AR
105
105
  end
106
- alias :ferret_update :ferret_create
106
+ def ferret_update; ferret_create end
107
107
 
108
108
 
109
109
  # remove from index
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 4
8
- - 6
9
- version: 0.4.6
8
+ - 7
9
+ version: 0.4.7
10
10
  platform: ruby
11
11
  authors:
12
12
  - Jens Kraemer
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-05-29 00:00:00 +02:00
17
+ date: 2010-07-06 13:50:00 +02:00
18
18
  default_executable: aaf_install
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency