1
0
Fork 0
mirror of https://github.com/ruby-opencv/ruby-opencv synced 2023-03-27 23:22:12 -04:00

fix Psych loading problem

Fix this problem: https://github.com/ruby-opencv/ruby-opencv/pull/6
Thanks for aledalgrande!
This commit is contained in:
ser1zw 2012-02-09 00:01:56 +09:00
parent 92451b92ce
commit 86b5d1918b
4 changed files with 28 additions and 6 deletions

View file

@ -110,6 +110,7 @@ ext/opencv/iplconvkernel.h
ext/opencv/iplimage.cpp
ext/opencv/iplimage.h
ext/opencv/lib/opencv.rb
ext/opencv/lib/opencv/psyched_yaml.rb
ext/opencv/lib/opencv/version.rb
ext/opencv/mouseevent.cpp
ext/opencv/mouseevent.h

View file

@ -1,14 +1,13 @@
# -*- ruby -*-
require 'rubygems'
require './ext/opencv/lib/opencv/psyched_yaml'
require 'hoe'
require 'rake/extensiontask'
require './ext/opencv/lib/opencv/version'
Hoe.plugin :gemspec
hoespec = Hoe.spec 'opencv' do |p|
hoespec = Hoe.spec 'opencv' do |p|
p.version = OpenCV::VERSION
p.changes = p.paragraphs_of('History.txt', 0..1).join("\n\n")
p.description = <<EOF

View file

@ -0,0 +1,22 @@
# -*- mode: ruby; coding: utf-8-unix -*-
# Psych loader for avoiding loading problem
# (borrowed from Bundler 1.1.rc.7 https://github.com/carlhuda/bundler/blob/v1.1.rc.7/lib/bundler/psyched_yaml.rb )
#
# See: https://github.com/ruby-opencv/ruby-opencv/pull/6
# Psych could be a gem
begin
gem 'psych'
rescue Gem::LoadError
end if defined?(Gem)
# Psych could be a stdlib
begin
# it's too late if Syck is already loaded
require 'psych' unless defined?(Syck)
rescue LoadError
end
# Psych might NOT EXIST AT ALL
require 'yaml'

File diff suppressed because one or more lines are too long