charguess 1.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/History.txt +5 -0
- data/README.rdoc +5 -5
- data/Rakefile +1 -2
- data/ext/charguess/extconf.rb +8 -0
- data/tasks/extconf/charguess.rake +7 -2
- metadata +1 -1
data/History.txt
CHANGED
data/README.rdoc
CHANGED
@@ -15,11 +15,11 @@ This gem builds and installs libcharguess and it's binding libcharguess-ruby
|
|
15
15
|
|
16
16
|
== USSAGE:
|
17
17
|
|
18
|
-
require "rubygems"
|
19
|
-
require "charguess"
|
20
|
-
|
21
|
-
CharGuess.guess("áéíóú")
|
22
|
-
#=> "UTF-8"
|
18
|
+
require "rubygems"
|
19
|
+
require "charguess"
|
20
|
+
|
21
|
+
CharGuess.guess("áéíóú")
|
22
|
+
#=> "UTF-8"
|
23
23
|
|
24
24
|
== LICENSE:
|
25
25
|
|
data/Rakefile
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# Generate all the Rake tasks
|
4
4
|
# Run 'rake -T' to see list of generated tasks (from gem root directory)
|
5
|
-
$hoe = Hoe.new('charguess', "1.
|
5
|
+
$hoe = Hoe.new('charguess', "1.1") do |p|
|
6
6
|
p.developer('Ernesto Jiménez', 'erjica@gmail.com')
|
7
7
|
p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n")
|
8
8
|
p.post_install_message = 'PostInstall.txt' # TODO remove if post-install message not required
|
@@ -15,7 +15,6 @@ $hoe = Hoe.new('charguess', "1.0") do |p|
|
|
15
15
|
path = (p.rubyforge_name == p.name) ? p.rubyforge_name : "\#{p.rubyforge_name}/\#{p.name}"
|
16
16
|
p.remote_rdoc_dir = File.join(path.gsub(/^#{p.rubyforge_name}\/?/,''), 'rdoc')
|
17
17
|
p.rsync_args = '-av --delete --ignore-errors'
|
18
|
-
p.spec_extras = { :extensions => ["ext/charguess/extconf.rb"] }
|
19
18
|
end
|
20
19
|
|
21
20
|
require 'newgem/tasks' # load /tasks/*.rake
|
data/ext/charguess/extconf.rb
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
#!/usr/bin/ruby
|
2
|
+
require 'rubygems'
|
2
3
|
require 'mkmf'
|
4
|
+
require 'rake'
|
3
5
|
|
4
6
|
libcharguess = File.expand_path(File.dirname(__FILE__), "../libcharguess/cpp")
|
7
|
+
|
8
|
+
Dir.chdir(libcharguess) do
|
9
|
+
sh("./configure")
|
10
|
+
sh("make")
|
11
|
+
end
|
12
|
+
|
5
13
|
dir_config('charguess', libcharguess, libcharguess)
|
6
14
|
|
7
15
|
if have_library('charguess') && have_library('stdc++') && have_header('charguess.h')
|
@@ -26,12 +26,17 @@ namespace :extconf do
|
|
26
26
|
desc "Builds just the #{extension} extension"
|
27
27
|
task extension.to_sym => ["#{ext}/Makefile", ext_so ]
|
28
28
|
|
29
|
-
file "#{ext}/Makefile" => ["#{ext}/extconf.rb"] do
|
29
|
+
file "#{ext}/Makefile" => ["#{ext}/extconf.rb", "ext/libcharguess/cpp/charguess.a"] do
|
30
|
+
puts "--------> in the buttt"
|
31
|
+
Dir.chdir(ext) do ruby "extconf.rb" end
|
32
|
+
end
|
33
|
+
|
34
|
+
task :"ext/libcharguess/cpp/charguess.a" do
|
35
|
+
puts "--------> whaaat"
|
30
36
|
Dir.chdir("ext/libcharguess/cpp") do
|
31
37
|
sh("./configure")
|
32
38
|
sh("make")
|
33
39
|
end
|
34
|
-
Dir.chdir(ext) do ruby "extconf.rb" end
|
35
40
|
end
|
36
41
|
|
37
42
|
file ext_so => ext_files do
|