ferret 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/README CHANGED
@@ -12,7 +12,11 @@ search for things in them later.
12
12
 
13
13
  == Installation
14
14
 
15
- De-compress the archive and enter its top directory.
15
+ If you have gems installed you can simple do;
16
+
17
+ gem install ferret
18
+
19
+ Otherwise, de-compress the archive and enter its top directory.
16
20
 
17
21
  tar zxpvf ferret-0.1.tar.gz
18
22
  cd ferret-0.1
@@ -20,14 +24,7 @@ De-compress the archive and enter its top directory.
20
24
  Run the setup config;
21
25
 
22
26
  $ ruby setup.rb config
23
-
24
- Then to compile the C extension (optional) type:
25
-
26
27
  $ ruby setup.rb setup
27
-
28
- If you don't have a C compiler, never mind. Just go straight to the next step.
29
- On *nix you'll need to run this with root privalages. Type;
30
-
31
28
  # ruby setup.rb install
32
29
 
33
30
  These simple steps install ferret in the default location of Ruby libraries.
data/Rakefile CHANGED
@@ -196,7 +196,7 @@ end
196
196
 
197
197
  desc "Make a new release"
198
198
  task :prerelease => [:clobber, :all_tests, :parsers]
199
- task :package => [:prerelease]
199
+ #task :package => [:prerelease]
200
200
  task :tag => [:prerelease]
201
201
  task :update_version => [:prerelease]
202
202
  task :release => [:tag, :update_version, :package] do
data/ext/dummy.exe ADDED
Binary file
data/ext/extconf.rb CHANGED
@@ -1,3 +1,15 @@
1
1
  # extconf.rb for Ferret extensions
2
- require 'mkmf'
3
- create_makefile("ferret_ext")
2
+ if (/mswin/ =~ RUBY_PLATFORM) and ENV['make'].nil?
3
+ File.open('Makefile', "w") {}
4
+ begin
5
+ `nmake`
6
+ require 'mkmf'
7
+ create_makefile("ferret_ext")
8
+ rescue => error
9
+ require 'fileutils'
10
+ FileUtils.copy('dummy.exe', 'nmake.exe')
11
+ end
12
+ else
13
+ require 'mkmf'
14
+ create_makefile("ferret_ext")
15
+ end
data/lib/ferret.rb CHANGED
@@ -22,7 +22,7 @@
22
22
  #++
23
23
  # :include: ../TUTORIAL
24
24
  module Ferret
25
- VERSION = '0.1.2'
25
+ VERSION = '0.1.3'
26
26
  end
27
27
 
28
28
  require 'ferret/utils'
@@ -17,7 +17,7 @@ module Ferret::Search
17
17
  elsif arg.is_a?(Ferret::Store::Directory)
18
18
  @reader = IndexReader.open(arg)
19
19
  elsif arg.is_a?(String)
20
- @dir = Ferret::Store::FSDirectory.open(arg)
20
+ @dir = Ferret::Store::FSDirectory.new(arg, true)
21
21
  @reader = IndexReader.open(@dir, true)
22
22
  else
23
23
  raise ArgumentError, "Unknown argument passed to initialize IndexReader"
data/setup.rb CHANGED
@@ -663,6 +663,8 @@ module FileOperations
663
663
 
664
664
  def make(task = nil)
665
665
  command(*[config('makeprog'), task].compact)
666
+ rescue => e
667
+ puts "The C extensions were not installed. But don't worry. Everything should work fine"
666
668
  end
667
669
 
668
670
  def extdir?(dir)
@@ -1235,6 +1237,8 @@ class Installer
1235
1237
 
1236
1238
  def extconf
1237
1239
  ruby "#{curr_srcdir()}/extconf.rb", *@config.config_opt
1240
+ rescue => e
1241
+ puts "The C extensions could not be installed"
1238
1242
  end
1239
1243
 
1240
1244
  def config_dir_data(rel)
@@ -1344,7 +1348,7 @@ class Installer
1344
1348
  def rubyextentions(dir)
1345
1349
  ents = glob_select("*.#{@config.dllext}", targetfiles())
1346
1350
  if ents.empty?
1347
- setup_rb_error "no ruby extention exists: 'ruby #{$0} setup' first"
1351
+ puts "no ruby extention exists: 'ruby #{$0} setup' first"
1348
1352
  end
1349
1353
  ents
1350
1354
  end
metadata CHANGED
@@ -3,7 +3,7 @@ rubygems_version: 0.8.11
3
3
  specification_version: 1
4
4
  name: ferret
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.1.2
6
+ version: 0.1.3
7
7
  date: 2005-10-25 00:00:00 +09:00
8
8
  summary: Ruby indexing library.
9
9
  require_paths:
@@ -47,6 +47,7 @@ files:
47
47
  - ext/ferret.h
48
48
  - ext/util.c
49
49
  - ext/tags
50
+ - ext/dummy.exe
50
51
  - lib/ferret.rb
51
52
  - lib/ferret/analysis.rb
52
53
  - lib/ferret/document.rb