Skip to content

Commit b0c0608

Browse files
rename so
1 parent 006c1bb commit b0c0608

18 files changed

+25
-122
lines changed

Rakefile

+1-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@ require "bundler/gem_tasks"
22
require 'rake/extensiontask'
33
require 'rspec/core/rake_task'
44

5-
Rake::ExtensionTask.new('xmlsecrb') do |t|
6-
t.lib_dir = 'lib/ext/xmlsecrb'
7-
end
5+
Rake::ExtensionTask.new('nokogiri_ext_xmlsec')
86

97
RSpec::Core::RakeTask.new :rspec
108

ext/nokogiri_ext_xmlsec/extconf.rb

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
require 'mkmf'
2+
3+
def barf message = 'dependencies not met'
4+
raise message
5+
end
6+
7+
barf unless have_header('ruby.h')
8+
9+
if pkg_config('xmlsec1-openssl')
10+
# HACK 'openssl' is escaped too many times, I don't know why
11+
if $CFLAGS =~ /\-DXMLSEC_CRYPTO=\\\\\\"openssl\\\\\\"/
12+
$CFLAGS['-DXMLSEC_CRYPTO=\\\\\\"openssl\\\\\\"'] =
13+
'-DXMLSEC_CRYPTO=\\"openssl\\"'
14+
end
15+
16+
have_library 'xmlsec1-openssl'
17+
create_makefile('nokogiri_ext_xmlsec')
18+
else
19+
barf "xmlsec1 is not installed."
20+
end

ext/xmlsecrb/init.c ext/nokogiri_ext_xmlsec/init.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include "xmlsecrb.h"
22

3-
void Init_xmlsecrb() {
3+
void Init_nokogiri_ext_xmlsec() {
44
/* xmlsec proper */
55
// libxml
66
xmlInitParser();

ext/xmlsecrb/nokogiri_encrypt_with_key.c ext/nokogiri_ext_xmlsec/nokogiri_encrypt_with_key.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include "xmlsecrb.h"
22

3-
xmlSecKeysMngrPtr getKeyManager(char* keyStr, unsigned int keyLength, char *keyName) {
3+
static xmlSecKeysMngrPtr getKeyManager(char* keyStr, unsigned int keyLength, char *keyName) {
44
xmlSecKeysMngrPtr mngr;
55
xmlSecKeyPtr key;
66

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

ext/xmlsecrb/extconf.rb

-45
This file was deleted.

ext/xmlsecrb/template.c

-70
This file was deleted.

lib/ext/.gitkeep

Whitespace-only changes.

lib/xmlsec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
require "xmlsec/version"
22
require 'nokogiri'
3-
require 'ext/xmlsecrb/xmlsecrb'
3+
require 'nokogiri_ext_xmlsec'
44

55
class Nokogiri::XML::Document
66
# Signs this document, and then returns it.

lib/xmlsec/version.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module Xmlsec
2-
VERSION = '0.0.2'
2+
VERSION = '0.0.3'
33
end

0 commit comments

Comments
 (0)