amalgalite 0.4.1 → 0.4.2
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 +15 -7
- data/README +4 -0
- data/ext/amalgalite3_constants.c +1 -1
- data/ext/amalgalite3_requires_bootstrap.c +15 -9
- data/ext/extconf.rb +4 -0
- data/ext/gen_constants.rb +6 -1
- data/ext/rbconfig-mingw.rb +178 -0
- data/gemspec.rb +7 -1
- data/lib/amalgalite/version.rb +1 -1
- data/tasks/config.rb +1 -1
- data/tasks/distribution.rake +10 -2
- data/tasks/documentation.rake +2 -2
- data/tasks/extension.rake +20 -2
- data/tasks/rubyforge.rake +4 -1
- data/tasks/utils.rb +1 -1
- metadata +3 -5
- data/examples/filestore.db +0 -0
data/HISTORY
CHANGED
@@ -1,24 +1,32 @@
|
|
1
1
|
= Changelog
|
2
|
-
== Version 0.4.
|
2
|
+
== Version 0.4.2 - 2008-10-12
|
3
|
+
|
4
|
+
=== Minor Enhancements
|
5
|
+
|
6
|
+
* release of windows gem
|
7
|
+
|
8
|
+
== Version 0.4.1 - 2008-09-28
|
3
9
|
|
4
10
|
=== Minor Enhancement
|
11
|
+
|
5
12
|
* update to SQLite3 version 3.6.3
|
6
13
|
* change rdoc template to darkfish
|
7
14
|
|
8
|
-
== Version 0.4.0 2008-09-14
|
15
|
+
== Version 0.4.0 - 2008-09-14
|
9
16
|
|
10
17
|
=== Major Enhancements
|
11
18
|
* update to SQLite3 version 3.6.2 and enable the RTree option by default
|
12
|
-
* Amalgalite::Requires module allowing ruby code to be 'required' from columns
|
13
|
-
in an SQLite database
|
19
|
+
* Amalgalite::Requires module allowing ruby code to be 'required' from columns in an SQLite database
|
14
20
|
* Amagalite::Requires::Bootstrap extension module enabling low level boot
|
15
21
|
strapping of the pure ruby Amalgalite code from an sqlite database
|
16
22
|
|
17
23
|
=== Minor Enhancements
|
24
|
+
|
18
25
|
* more indepth information about indexes is available via the Index class
|
19
26
|
* add support for sqlite3_status and sqlite3_db_status information
|
20
27
|
|
21
28
|
=== Bugfixes
|
29
|
+
|
22
30
|
* fix nil exception when using a declared_data_type on primary key column that
|
23
31
|
has no declared_data_type
|
24
32
|
* when Database#transaction is passed a block, the return value is the return
|
@@ -29,17 +37,17 @@
|
|
29
37
|
* raise LoadError if required in the same program as sqlite3-ruby. These
|
30
38
|
libraries conflict with each other.
|
31
39
|
|
32
|
-
== Version 0.2.4 2008-07-13
|
40
|
+
== Version 0.2.4 - 2008-07-13
|
33
41
|
|
34
42
|
=== Bugfixes
|
35
43
|
* fix compilation when ruby is compiled without pthreads using
|
36
44
|
|
37
|
-
== Version 0.2.3 2008-07-12
|
45
|
+
== Version 0.2.3 - 2008-07-12
|
38
46
|
|
39
47
|
=== Bugfixes
|
40
48
|
* make sure file permissions are all read before shipping gem
|
41
49
|
|
42
|
-
== Version 0.2.2 2008-07-12
|
50
|
+
== Version 0.2.2 - 2008-07-12
|
43
51
|
|
44
52
|
=== Bugfixes
|
45
53
|
* Database#pragma should accept a block just like Database#execute does
|
data/README
CHANGED
data/ext/amalgalite3_constants.c
CHANGED
@@ -6,6 +6,7 @@
|
|
6
6
|
*/
|
7
7
|
|
8
8
|
#include "amalgalite3.h"
|
9
|
+
#include <stdio.h>
|
9
10
|
extern VALUE mA;
|
10
11
|
static VALUE cAR;
|
11
12
|
static VALUE cARB;
|
@@ -66,7 +67,7 @@ VALUE am_bootstrap_lift( VALUE self, VALUE args )
|
|
66
67
|
sqlite3_stmt* stmt = NULL;
|
67
68
|
int rc;
|
68
69
|
int last_row_good;
|
69
|
-
char
|
70
|
+
char raise_msg[BUFSIZ];
|
70
71
|
|
71
72
|
VALUE am_db_c = rb_const_get( cARB, rb_intern("DEFAULT_DB") );
|
72
73
|
VALUE am_tbl_c = rb_const_get( cARB, rb_intern("DEFAULT_TABLE") );
|
@@ -80,7 +81,7 @@ VALUE am_bootstrap_lift( VALUE self, VALUE args )
|
|
80
81
|
char* fname_col = NULL;
|
81
82
|
char* content_col = NULL;
|
82
83
|
|
83
|
-
char
|
84
|
+
char sql[BUFSIZ];
|
84
85
|
const char* sql_tail = NULL;
|
85
86
|
int sql_bytes = 0;
|
86
87
|
|
@@ -115,16 +116,18 @@ VALUE am_bootstrap_lift( VALUE self, VALUE args )
|
|
115
116
|
/* open the database */
|
116
117
|
rc = sqlite3_open_v2( dbfile , &db, SQLITE_OPEN_READONLY, NULL);
|
117
118
|
if ( SQLITE_OK != rc ) {
|
118
|
-
|
119
|
+
memset( raise_msg, 0, BUFSIZ );
|
120
|
+
snprintf(raise_msg, BUFSIZ, "Failure to open database %s for bootload: [SQLITE_ERROR %d] : %s", dbfile, rc, sqlite3_errmsg( db ) );
|
119
121
|
am_bootstrap_cleanup_and_raise( raise_msg, db, stmt );
|
120
122
|
}
|
121
123
|
|
122
124
|
/* prepare the db query */
|
123
|
-
|
125
|
+
memset( sql, 0, BUFSIZ );
|
126
|
+
sql_bytes = snprintf( sql, BUFSIZ, "SELECT %s, %s FROM %s ORDER BY %s", fname_col, content_col, tbl_name, pk_col );
|
124
127
|
rc = sqlite3_prepare_v2( db, sql, sql_bytes, &stmt, &sql_tail ) ;
|
125
|
-
free( sql );
|
126
128
|
if ( SQLITE_OK != rc) {
|
127
|
-
|
129
|
+
memset( raise_msg, 0, BUFSIZ );
|
130
|
+
snprintf( raise_msg, BUFSIZ,
|
128
131
|
"Failure to prepare bootload select statement table = '%s', rowid col = '%s', filename col ='%s', contents col = '%s' : [SQLITE_ERROR %d] %s\n",
|
129
132
|
tbl_name, pk_col, fname_col, content_col, rc, sqlite3_errmsg( db ));
|
130
133
|
am_bootstrap_cleanup_and_raise( raise_msg, db, stmt );
|
@@ -153,7 +156,8 @@ VALUE am_bootstrap_lift( VALUE self, VALUE args )
|
|
153
156
|
|
154
157
|
/* if there was some sqlite error in the processing of the rows */
|
155
158
|
if ( SQLITE_DONE != rc ) {
|
156
|
-
|
159
|
+
memset( raise_msg, 0, BUFSIZ );
|
160
|
+
snprintf( raise_msg, BUFSIZ, "Failure in bootloading, last successfully loaded rowid was %d : [SQLITE_ERROR %d] %s\n",
|
157
161
|
last_row_good, rc, sqlite3_errmsg( db ) );
|
158
162
|
am_bootstrap_cleanup_and_raise( raise_msg, db, stmt );
|
159
163
|
}
|
@@ -161,7 +165,8 @@ VALUE am_bootstrap_lift( VALUE self, VALUE args )
|
|
161
165
|
/* finalize the statement */
|
162
166
|
rc = sqlite3_finalize( stmt );
|
163
167
|
if ( SQLITE_OK != rc ) {
|
164
|
-
|
168
|
+
memset( raise_msg, 0, BUFSIZ );
|
169
|
+
snprintf( raise_msg, BUFSIZ, "Failure to finalize bootload statement : [SQLITE_ERROR %d]\n", rc, sqlite3_errmsg( db ) );
|
165
170
|
am_bootstrap_cleanup_and_raise( raise_msg, db, stmt );
|
166
171
|
}
|
167
172
|
|
@@ -170,7 +175,8 @@ VALUE am_bootstrap_lift( VALUE self, VALUE args )
|
|
170
175
|
/* close the database */
|
171
176
|
rc = sqlite3_close( db );
|
172
177
|
if ( SQLITE_OK != rc ) {
|
173
|
-
|
178
|
+
memset( raise_msg, 0, BUFSIZ );
|
179
|
+
snprintf( raise_msg, BUFSIZ, "Failure to close database : [SQLITE_ERROR %d] : %s\n", rc, sqlite3_errmsg( db )),
|
174
180
|
am_bootstrap_cleanup_and_raise( raise_msg, db,stmt );
|
175
181
|
}
|
176
182
|
|
data/ext/extconf.rb
CHANGED
data/ext/gen_constants.rb
CHANGED
@@ -80,7 +80,12 @@ fname = File.expand_path(File.join(File.dirname(__FILE__), "amalgalite3_constant
|
|
80
80
|
File.open(fname, "w+") do |f|
|
81
81
|
f.puts "/* Generated by gen_constants.rb -- do not edit */"
|
82
82
|
f.puts
|
83
|
-
f.puts '#include "amalgalite3.h"
|
83
|
+
f.puts '#include "amalgalite3.h"'
|
84
|
+
f.puts '/**'
|
85
|
+
f.puts ' * Document-class: Amalgalite::SQLite3::Constants'
|
86
|
+
f.puts ' *'
|
87
|
+
f.puts ' * class holding constants in the sqlite extension'
|
88
|
+
f.puts ' */'
|
84
89
|
f.puts "void Init_amalgalite3_constants( )"
|
85
90
|
f.puts "{"
|
86
91
|
f.puts
|
@@ -0,0 +1,178 @@
|
|
1
|
+
|
2
|
+
# This file was created by mkconfig.rb when ruby was built. Any
|
3
|
+
# changes made to this file will be lost the next time ruby is built.
|
4
|
+
|
5
|
+
module Config
|
6
|
+
RUBY_VERSION == "1.8.6" or
|
7
|
+
raise "ruby lib version (1.8.6) doesn't match executable version (#{RUBY_VERSION})"
|
8
|
+
|
9
|
+
TOPDIR = File.dirname(__FILE__).chomp!("/lib/ruby/1.8/i386-mingw32")
|
10
|
+
DESTDIR = '' unless defined? DESTDIR
|
11
|
+
CONFIG = {}
|
12
|
+
CONFIG["DESTDIR"] = DESTDIR
|
13
|
+
CONFIG["INSTALL"] = '/opt/local/bin/ginstall -c'
|
14
|
+
CONFIG["prefix"] = (TOPDIR || DESTDIR + "#{ENV["HOME"]}/ruby-mingw32")
|
15
|
+
CONFIG["EXEEXT"] = ".exe"
|
16
|
+
CONFIG["ruby_install_name"] = "ruby"
|
17
|
+
CONFIG["RUBY_INSTALL_NAME"] = "ruby"
|
18
|
+
CONFIG["RUBY_SO_NAME"] = "msvcrt-ruby18"
|
19
|
+
CONFIG["SHELL"] = "/bin/sh"
|
20
|
+
CONFIG["PATH_SEPARATOR"] = ":"
|
21
|
+
CONFIG["PACKAGE_NAME"] = ""
|
22
|
+
CONFIG["PACKAGE_TARNAME"] = ""
|
23
|
+
CONFIG["PACKAGE_VERSION"] = ""
|
24
|
+
CONFIG["PACKAGE_STRING"] = ""
|
25
|
+
CONFIG["PACKAGE_BUGREPORT"] = ""
|
26
|
+
CONFIG["exec_prefix"] = "$(prefix)"
|
27
|
+
CONFIG["bindir"] = "$(exec_prefix)/bin"
|
28
|
+
CONFIG["sbindir"] = "$(exec_prefix)/sbin"
|
29
|
+
CONFIG["libexecdir"] = "$(exec_prefix)/libexec"
|
30
|
+
CONFIG["datarootdir"] = "$(prefix)/share"
|
31
|
+
CONFIG["datadir"] = "$(datarootdir)"
|
32
|
+
CONFIG["sysconfdir"] = "$(prefix)/etc"
|
33
|
+
CONFIG["sharedstatedir"] = "$(prefix)/com"
|
34
|
+
CONFIG["localstatedir"] = "$(prefix)/var"
|
35
|
+
CONFIG["includedir"] = "$(prefix)/include"
|
36
|
+
CONFIG["oldincludedir"] = "/usr/include"
|
37
|
+
CONFIG["docdir"] = "$(datarootdir)/doc/$(PACKAGE)"
|
38
|
+
CONFIG["infodir"] = "$(datarootdir)/info"
|
39
|
+
CONFIG["htmldir"] = "$(docdir)"
|
40
|
+
CONFIG["dvidir"] = "$(docdir)"
|
41
|
+
CONFIG["pdfdir"] = "$(docdir)"
|
42
|
+
CONFIG["psdir"] = "$(docdir)"
|
43
|
+
CONFIG["libdir"] = "$(exec_prefix)/lib"
|
44
|
+
CONFIG["localedir"] = "$(datarootdir)/locale"
|
45
|
+
CONFIG["mandir"] = "$(datarootdir)/man"
|
46
|
+
CONFIG["ECHO_C"] = ""
|
47
|
+
CONFIG["ECHO_N"] = "-n"
|
48
|
+
CONFIG["ECHO_T"] = ""
|
49
|
+
CONFIG["LIBS"] = "-lwsock32 "
|
50
|
+
CONFIG["build_alias"] = "i686-darwin9.2.2"
|
51
|
+
CONFIG["host_alias"] = "i386-mingw32"
|
52
|
+
CONFIG["target_alias"] = "i386-mingw32"
|
53
|
+
CONFIG["MAJOR"] = "1"
|
54
|
+
CONFIG["MINOR"] = "8"
|
55
|
+
CONFIG["TEENY"] = "6"
|
56
|
+
CONFIG["build"] = "i686-pc-darwin9.2.2"
|
57
|
+
CONFIG["build_cpu"] = "i686"
|
58
|
+
CONFIG["build_vendor"] = "pc"
|
59
|
+
CONFIG["build_os"] = "darwin9.2.2"
|
60
|
+
CONFIG["host"] = "i386-pc-mingw32"
|
61
|
+
CONFIG["host_cpu"] = "i386"
|
62
|
+
CONFIG["host_vendor"] = "pc"
|
63
|
+
CONFIG["host_os"] = "mingw32"
|
64
|
+
CONFIG["target"] = "i386-pc-mingw32"
|
65
|
+
CONFIG["target_cpu"] = "i386"
|
66
|
+
CONFIG["target_vendor"] = "pc"
|
67
|
+
CONFIG["target_os"] = "mingw32"
|
68
|
+
CONFIG["CC"] = "i386-mingw32-gcc"
|
69
|
+
CONFIG["CFLAGS"] = "-g -O2 "
|
70
|
+
CONFIG["LDFLAGS"] = "-L. "
|
71
|
+
CONFIG["CPPFLAGS"] = ""
|
72
|
+
CONFIG["OBJEXT"] = "o"
|
73
|
+
CONFIG["CPP"] = "i386-mingw32-gcc -E"
|
74
|
+
CONFIG["GREP"] = "/usr/bin/grep"
|
75
|
+
CONFIG["EGREP"] = "/usr/bin/grep -E"
|
76
|
+
CONFIG["GNU_LD"] = "yes"
|
77
|
+
CONFIG["CPPOUTFILE"] = "-o conftest.i"
|
78
|
+
CONFIG["OUTFLAG"] = "-o "
|
79
|
+
CONFIG["YACC"] = "bison -y"
|
80
|
+
CONFIG["YFLAGS"] = ""
|
81
|
+
CONFIG["RANLIB"] = "i386-mingw32-ranlib"
|
82
|
+
CONFIG["AR"] = "i386-mingw32-ar"
|
83
|
+
CONFIG["AS"] = "i386-mingw32-as"
|
84
|
+
CONFIG["ASFLAGS"] = ""
|
85
|
+
CONFIG["NM"] = "i386-mingw32-nm"
|
86
|
+
CONFIG["WINDRES"] = "i386-mingw32-windres"
|
87
|
+
CONFIG["DLLWRAP"] = "i386-mingw32-dllwrap"
|
88
|
+
CONFIG["OBJDUMP"] = "i386-mingw32-objdump"
|
89
|
+
CONFIG["LN_S"] = "ln -s"
|
90
|
+
CONFIG["SET_MAKE"] = ""
|
91
|
+
CONFIG["INSTALL_PROGRAM"] = "$(INSTALL)"
|
92
|
+
CONFIG["INSTALL_SCRIPT"] = "$(INSTALL)"
|
93
|
+
CONFIG["INSTALL_DATA"] = "$(INSTALL) -m 644"
|
94
|
+
CONFIG["RM"] = "rm -f"
|
95
|
+
CONFIG["CP"] = "cp"
|
96
|
+
CONFIG["MAKEDIRS"] = "mkdir -p"
|
97
|
+
CONFIG["ALLOCA"] = ""
|
98
|
+
CONFIG["DLDFLAGS"] = " -Wl,--enable-auto-image-base,--enable-auto-import,--export-all"
|
99
|
+
CONFIG["ARCH_FLAG"] = ""
|
100
|
+
CONFIG["STATIC"] = ""
|
101
|
+
CONFIG["CCDLFLAGS"] = ""
|
102
|
+
CONFIG["LDSHARED"] = "i386-mingw32-gcc -shared -s"
|
103
|
+
CONFIG["DLEXT"] = "so"
|
104
|
+
CONFIG["DLEXT2"] = "dll"
|
105
|
+
CONFIG["LIBEXT"] = "a"
|
106
|
+
CONFIG["LINK_SO"] = ""
|
107
|
+
CONFIG["LIBPATHFLAG"] = " -L\"%s\""
|
108
|
+
CONFIG["RPATHFLAG"] = ""
|
109
|
+
CONFIG["LIBPATHENV"] = ""
|
110
|
+
CONFIG["TRY_LINK"] = ""
|
111
|
+
CONFIG["STRIP"] = "strip"
|
112
|
+
CONFIG["EXTSTATIC"] = ""
|
113
|
+
CONFIG["setup"] = "Setup"
|
114
|
+
CONFIG["MINIRUBY"] = "ruby -I#{ENV["HOME"]}/pkgs/ruby-1.8.6-p114 -rfake"
|
115
|
+
CONFIG["PREP"] = "fake.rb"
|
116
|
+
CONFIG["RUNRUBY"] = "$(MINIRUBY) -I`cd $(srcdir)/lib; pwd`"
|
117
|
+
CONFIG["EXTOUT"] = ".ext"
|
118
|
+
CONFIG["ARCHFILE"] = ""
|
119
|
+
CONFIG["RDOCTARGET"] = ""
|
120
|
+
CONFIG["XCFLAGS"] = " -DRUBY_EXPORT"
|
121
|
+
CONFIG["XLDFLAGS"] = " -Wl,--stack,0x02000000"
|
122
|
+
CONFIG["LIBRUBY_LDSHARED"] = "i386-mingw32-gcc -shared -s"
|
123
|
+
CONFIG["LIBRUBY_DLDFLAGS"] = " -Wl,--enable-auto-image-base,--enable-auto-import,--export-all -Wl,--out-implib=$(LIBRUBY)"
|
124
|
+
CONFIG["rubyw_install_name"] = "rubyw"
|
125
|
+
CONFIG["RUBYW_INSTALL_NAME"] = "rubyw"
|
126
|
+
CONFIG["LIBRUBY_A"] = "lib$(RUBY_SO_NAME)-static.a"
|
127
|
+
CONFIG["LIBRUBY_SO"] = "$(RUBY_SO_NAME).dll"
|
128
|
+
CONFIG["LIBRUBY_ALIASES"] = ""
|
129
|
+
CONFIG["LIBRUBY"] = "lib$(LIBRUBY_SO).a"
|
130
|
+
CONFIG["LIBRUBYARG"] = "$(LIBRUBYARG_SHARED)"
|
131
|
+
CONFIG["LIBRUBYARG_STATIC"] = "-l$(RUBY_SO_NAME)-static"
|
132
|
+
CONFIG["LIBRUBYARG_SHARED"] = "-l$(RUBY_SO_NAME)"
|
133
|
+
CONFIG["SOLIBS"] = "$(LIBS)"
|
134
|
+
CONFIG["DLDLIBS"] = ""
|
135
|
+
CONFIG["ENABLE_SHARED"] = "yes"
|
136
|
+
CONFIG["MAINLIBS"] = ""
|
137
|
+
CONFIG["COMMON_LIBS"] = "m"
|
138
|
+
CONFIG["COMMON_MACROS"] = ""
|
139
|
+
CONFIG["COMMON_HEADERS"] = "windows.h winsock.h"
|
140
|
+
CONFIG["EXPORT_PREFIX"] = ""
|
141
|
+
CONFIG["MAKEFILES"] = "Makefile GNUmakefile"
|
142
|
+
CONFIG["arch"] = "i386-mingw32"
|
143
|
+
CONFIG["sitearch"] = "i386-msvcrt"
|
144
|
+
CONFIG["sitedir"] = "$(prefix)/lib/ruby/site_ruby"
|
145
|
+
CONFIG["configure_args"] = " '--host=i386-mingw32' '--target=i386-mingw32' '--build=i686-darwin9.2.2' '--prefix=#{ENV['HOME']}/ruby-mingw32' 'build_alias=i686-darwin9.2.2' 'host_alias=i386-mingw32' 'target_alias=i386-mingw32'"
|
146
|
+
CONFIG["NROFF"] = "/usr/bin/nroff"
|
147
|
+
CONFIG["MANTYPE"] = "doc"
|
148
|
+
CONFIG["ruby_version"] = "$(MAJOR).$(MINOR)"
|
149
|
+
CONFIG["rubylibdir"] = "$(libdir)/ruby/$(ruby_version)"
|
150
|
+
CONFIG["archdir"] = "$(rubylibdir)/$(arch)"
|
151
|
+
CONFIG["sitelibdir"] = "$(sitedir)/$(ruby_version)"
|
152
|
+
CONFIG["sitearchdir"] = "$(sitelibdir)/$(sitearch)"
|
153
|
+
CONFIG["topdir"] = File.dirname(__FILE__)
|
154
|
+
MAKEFILE_CONFIG = {}
|
155
|
+
CONFIG.each{|k,v| MAKEFILE_CONFIG[k] = v.dup}
|
156
|
+
def Config::expand(val, config = CONFIG)
|
157
|
+
val.gsub!(/\$\$|\$\(([^()]+)\)|\$\{([^{}]+)\}/) do |var|
|
158
|
+
if !(v = $1 || $2)
|
159
|
+
'$'
|
160
|
+
elsif key = config[v = v[/\A[^:]+(?=(?::(.*?)=(.*))?\z)/]]
|
161
|
+
pat, sub = $1, $2
|
162
|
+
config[v] = false
|
163
|
+
Config::expand(key, config)
|
164
|
+
config[v] = key
|
165
|
+
key = key.gsub(/#{Regexp.quote(pat)}(?=\s|\z)/n) {sub} if pat
|
166
|
+
key
|
167
|
+
else
|
168
|
+
var
|
169
|
+
end
|
170
|
+
end
|
171
|
+
val
|
172
|
+
end
|
173
|
+
CONFIG.each_value do |val|
|
174
|
+
Config::expand(val)
|
175
|
+
end
|
176
|
+
end
|
177
|
+
RbConfig = Config # compatibility for ruby-1.9
|
178
|
+
CROSS_COMPILING = nil unless defined? CROSS_COMPILING
|
data/gemspec.rb
CHANGED
@@ -45,5 +45,11 @@ Amalgalite::GEM_SPEC = Gem::Specification.new do |spec|
|
|
45
45
|
if rf = Configuration.for_if_exist?('rubyforge') then
|
46
46
|
spec.rubyforge_project = rf.project
|
47
47
|
end
|
48
|
-
|
49
48
|
end
|
49
|
+
|
50
|
+
Amalgalite::GEM_SPEC_WIN = Amalgalite::GEM_SPEC.clone
|
51
|
+
Amalgalite::GEM_SPEC_WIN.platform = ::Gem::Platform.new( "i386-mswin32_60" )
|
52
|
+
Amalgalite::GEM_SPEC_WIN.extensions = []
|
53
|
+
Amalgalite::GEM_SPEC_WIN.files += ["lib/amalgalite3.so"]
|
54
|
+
|
55
|
+
Amalgalite::SPECS = [ Amalgalite::GEM_SPEC, Amalgalite::GEM_SPEC_WIN ]
|
data/lib/amalgalite/version.rb
CHANGED
data/tasks/config.rb
CHANGED
@@ -85,7 +85,7 @@ Configuration.for('rdoc') {
|
|
85
85
|
files Configuration.for('packaging').files.rdoc
|
86
86
|
main_page files.first
|
87
87
|
title Configuration.for('project').name
|
88
|
-
options %w[ --line-numbers --inline-source
|
88
|
+
options %w[ --line-numbers --inline-source ] #-f darkfish ]
|
89
89
|
output_dir "doc"
|
90
90
|
}
|
91
91
|
|
data/tasks/distribution.rake
CHANGED
@@ -34,11 +34,19 @@ if pkg_config = Configuration.for_if_exist?("packaging") then
|
|
34
34
|
desc "reinstall gem"
|
35
35
|
task :reinstall => [:uninstall, :repackage, :install]
|
36
36
|
|
37
|
+
desc "package the windows gem"
|
38
|
+
task :package_win => "ext:build_win" do
|
39
|
+
cp "ext/amalgalite3.so", "lib", :verbose => true
|
40
|
+
Gem::Builder.new( Amalgalite::GEM_SPEC_WIN ).build
|
41
|
+
mv Dir["*.gem"].first, "pkg"
|
42
|
+
end
|
43
|
+
|
37
44
|
desc "distribute copiously"
|
38
|
-
task :copious => [:package] do
|
45
|
+
task :copious => [:package, :package_win] do
|
46
|
+
gems = Amalgalite::SPECS.collect { |s| "#{s.full_name}.gem" }
|
39
47
|
Rake::SshFilePublisher.new('jeremy@copiousfreetime.org',
|
40
48
|
'/var/www/vhosts/www.copiousfreetime.org/htdocs/gems/gems',
|
41
|
-
'pkg',
|
49
|
+
'pkg', *gems).upload
|
42
50
|
sh "ssh jeremy@copiousfreetime.org rake -f /var/www/vhosts/www.copiousfreetime.org/htdocs/gems/Rakefile"
|
43
51
|
end
|
44
52
|
end
|
data/tasks/documentation.rake
CHANGED
@@ -9,8 +9,8 @@ if rdoc_config = Configuration.for_if_exist?('rdoc') then
|
|
9
9
|
namespace :doc do
|
10
10
|
|
11
11
|
require 'rake/rdoctask'
|
12
|
-
gem 'darkfish-rdoc'
|
13
|
-
require 'darkfish-rdoc'
|
12
|
+
#gem 'darkfish-rdoc'
|
13
|
+
#require 'darkfish-rdoc'
|
14
14
|
|
15
15
|
# generating documentation locally
|
16
16
|
Rake::RDocTask.new do |rdoc|
|
data/tasks/extension.rake
CHANGED
@@ -23,6 +23,21 @@ if ext_config = Configuration.for_if_exist?('extension') then
|
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
26
|
+
desc "Build the extensions for windows"
|
27
|
+
task :build_win => :clobber do
|
28
|
+
ext_config.configs.each do |extension|
|
29
|
+
path = Pathname.new( extension )
|
30
|
+
parts = path.split
|
31
|
+
conf = parts.last
|
32
|
+
Dir.chdir( path.dirname ) do |d|
|
33
|
+
cp "rbconfig-mingw.rb", "rbconfig.rb"
|
34
|
+
sh "ruby -I. extconf.rb"
|
35
|
+
sh "make"
|
36
|
+
rm_f "rbconfig.rb"
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
26
41
|
task :clean do
|
27
42
|
ext_config.configs.each do |extension|
|
28
43
|
path = Pathname.new(extension)
|
@@ -31,6 +46,7 @@ if ext_config = Configuration.for_if_exist?('extension') then
|
|
31
46
|
Dir.chdir(path.dirname) do |d|
|
32
47
|
#sh "rake clean"
|
33
48
|
sh "make clean"
|
49
|
+
rm_f "rbconfig.rb"
|
34
50
|
end
|
35
51
|
end
|
36
52
|
end
|
@@ -42,7 +58,10 @@ if ext_config = Configuration.for_if_exist?('extension') then
|
|
42
58
|
conf = parts.last
|
43
59
|
Dir.chdir(path.dirname) do |d|
|
44
60
|
#sh "rake clobber"
|
45
|
-
|
61
|
+
if File.exist?( "Makefile") then
|
62
|
+
sh "make distclean"
|
63
|
+
end
|
64
|
+
rm_f "rbconfig.rb"
|
46
65
|
end
|
47
66
|
end
|
48
67
|
end
|
@@ -76,7 +95,6 @@ if ext_config = Configuration.for_if_exist?('extension') then
|
|
76
95
|
end
|
77
96
|
end
|
78
97
|
end
|
79
|
-
|
80
98
|
end
|
81
99
|
end
|
82
100
|
end
|
data/tasks/rubyforge.rake
CHANGED
@@ -11,7 +11,7 @@ if rf_conf = Configuration.for_if_exist?("rubyforge") then
|
|
11
11
|
|
12
12
|
namespace :dist do
|
13
13
|
desc "Release files to rubyforge"
|
14
|
-
task :rubyforge => [:clean, :package] do
|
14
|
+
task :rubyforge => [:clean, :package, :package_win] do
|
15
15
|
|
16
16
|
rubyforge = RubyForge.new
|
17
17
|
|
@@ -30,6 +30,9 @@ if rf_conf = Configuration.for_if_exist?("rubyforge") then
|
|
30
30
|
|
31
31
|
puts "Uploading to rubyforge..."
|
32
32
|
files = FileList[File.join("pkg","#{Amalgalite::GEM_SPEC.name}-#{Amalgalite::VERSION}*.*")].to_a
|
33
|
+
files.each do |f|
|
34
|
+
puts " * #{f}"
|
35
|
+
end
|
33
36
|
rubyforge.login
|
34
37
|
rubyforge.add_release(Amalgalite::GEM_SPEC.rubyforge_project, Amalgalite::GEM_SPEC.name, Amalgalite::VERSION, *files)
|
35
38
|
puts "done."
|
data/tasks/utils.rb
CHANGED
@@ -54,7 +54,7 @@ module Utils
|
|
54
54
|
#
|
55
55
|
def release_notes_from(history_file)
|
56
56
|
releases = {}
|
57
|
-
File.read(history_file).split(/^(
|
57
|
+
File.read(history_file).split(/^(?=== Version)/).each do |section|
|
58
58
|
lines = section.split("\n")
|
59
59
|
md = %r{Version ((\w+\.)+\w+)}.match(lines.first)
|
60
60
|
next unless md
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: amalgalite
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeremy Hinegardner
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-
|
12
|
+
date: 2008-10-12 00:00:00 -06:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -91,10 +91,10 @@ files:
|
|
91
91
|
- ext/sqlite3ext.h
|
92
92
|
- ext/extconf.rb
|
93
93
|
- ext/gen_constants.rb
|
94
|
+
- ext/rbconfig-mingw.rb
|
94
95
|
- examples/a.rb
|
95
96
|
- examples/blob.rb
|
96
97
|
- examples/bootstrap.rb
|
97
|
-
- examples/filestore.db
|
98
98
|
- examples/gem-db.rb
|
99
99
|
- examples/requires.rb
|
100
100
|
- examples/schema-info.rb
|
@@ -164,8 +164,6 @@ post_install_message:
|
|
164
164
|
rdoc_options:
|
165
165
|
- --line-numbers
|
166
166
|
- --inline-source
|
167
|
-
- -f
|
168
|
-
- darkfish
|
169
167
|
- --main
|
170
168
|
- README
|
171
169
|
require_paths:
|
data/examples/filestore.db
DELETED
Binary file
|