amalgalite 1.1.2 → 1.3.0
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.
- checksums.yaml +15 -0
- data/CONTRIBUTING.md +49 -0
- data/{HISTORY.rdoc → HISTORY.md} +96 -73
- data/LICENSE +2 -2
- data/Manifest.txt +104 -0
- data/README.md +73 -0
- data/Rakefile +25 -0
- data/TODO.md +50 -0
- data/ext/amalgalite/{amalgalite3.c → c/amalgalite.c} +12 -12
- data/ext/amalgalite/{amalgalite3.h → c/amalgalite.h} +5 -5
- data/ext/amalgalite/{amalgalite3_blob.c → c/amalgalite_blob.c} +2 -2
- data/ext/amalgalite/{amalgalite3_constants.c → c/amalgalite_constants.c} +2 -2
- data/ext/amalgalite/{amalgalite3_database.c → c/amalgalite_database.c} +49 -21
- data/ext/amalgalite/{amalgalite3_requires_bootstrap.c → c/amalgalite_requires_bootstrap.c} +131 -58
- data/ext/amalgalite/{amalgalite3_statement.c → c/amalgalite_statement.c} +2 -2
- data/ext/amalgalite/{extconf.rb → c/extconf.rb} +4 -4
- data/ext/amalgalite/{gen_constants.rb → c/gen_constants.rb} +3 -3
- data/ext/amalgalite/c/notes.txt +134 -0
- data/ext/amalgalite/{sqlite3.c → c/sqlite3.c} +94602 -80497
- data/ext/amalgalite/{sqlite3.h → c/sqlite3.h} +1047 -216
- data/ext/amalgalite/{sqlite3_options.h → c/sqlite3_options.h} +0 -0
- data/ext/amalgalite/{sqlite3ext.h → c/sqlite3ext.h} +40 -13
- data/lib/amalgalite.rb +13 -6
- data/lib/amalgalite/column.rb +7 -5
- data/lib/amalgalite/database.rb +18 -10
- data/lib/amalgalite/packer.rb +5 -2
- data/lib/amalgalite/requires.rb +47 -16
- data/lib/amalgalite/schema.rb +63 -36
- data/lib/amalgalite/sqlite3/version.rb +0 -1
- data/lib/amalgalite/statement.rb +7 -5
- data/lib/amalgalite/table.rb +9 -8
- data/lib/amalgalite/type_maps/default_map.rb +0 -1
- data/lib/amalgalite/type_maps/storage_map.rb +0 -2
- data/lib/amalgalite/type_maps/text_map.rb +0 -1
- data/lib/amalgalite/version.rb +3 -32
- data/spec/aggregate_spec.rb +1 -1
- data/spec/amalgalite_spec.rb +1 -1
- data/spec/blob_spec.rb +1 -1
- data/spec/boolean_spec.rb +2 -1
- data/spec/busy_handler.rb +1 -1
- data/spec/database_spec.rb +16 -11
- data/spec/default_map_spec.rb +1 -1
- data/spec/function_spec.rb +1 -1
- data/spec/integeration_spec.rb +2 -1
- data/spec/packer_spec.rb +4 -4
- data/spec/paths_spec.rb +1 -1
- data/spec/progress_handler_spec.rb +4 -5
- data/spec/requires_spec.rb +36 -2
- data/spec/rtree_spec.rb +6 -5
- data/spec/schema_spec.rb +28 -20
- data/spec/spec_helper.rb +2 -7
- data/spec/sqlite3/constants_spec.rb +1 -1
- data/spec/sqlite3/database_status_spec.rb +4 -4
- data/spec/sqlite3/status_spec.rb +5 -5
- data/spec/sqlite3/version_spec.rb +7 -7
- data/spec/sqlite3_spec.rb +3 -3
- data/spec/statement_spec.rb +3 -4
- data/spec/storage_map_spec.rb +1 -1
- data/spec/tap_spec.rb +4 -4
- data/spec/text_map_spec.rb +1 -1
- data/spec/type_map_spec.rb +1 -1
- data/spec/version_spec.rb +2 -9
- data/tasks/custom.rake +99 -0
- data/tasks/default.rake +277 -0
- data/tasks/extension.rake +28 -202
- data/tasks/this.rb +209 -0
- metadata +186 -244
- data/README.rdoc +0 -54
- data/gemspec.rb +0 -63
- data/tasks/announce.rake +0 -44
- data/tasks/config.rb +0 -107
- data/tasks/distribution.rake +0 -77
- data/tasks/documentation.rake +0 -36
- data/tasks/rspec.rake +0 -30
- data/tasks/utils.rb +0 -80
data/tasks/extension.rake
CHANGED
@@ -1,212 +1,38 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
# To be used if the gem has extensions.
|
2
|
+
# If this task set is inclueded then you will need to also have
|
3
|
+
#
|
4
|
+
# spec.add_development_dependency( 'rake-compiler', '~> 0.8.1' )
|
5
|
+
#
|
6
|
+
# in your top level rakefile
|
3
7
|
begin
|
4
|
-
require '
|
5
|
-
|
6
|
-
abort "rake development_dependencies"
|
7
|
-
end
|
8
|
-
|
9
|
-
#-----------------------------------------------------------------------
|
10
|
-
# Extensions
|
11
|
-
#-----------------------------------------------------------------------
|
12
|
-
|
13
|
-
if ext_config = Configuration.for_if_exist?('extension') then
|
14
|
-
namespace :ext do
|
15
|
-
def current_sqlite_version
|
16
|
-
ext = Configuration.for('extension').configs.first
|
17
|
-
path = Pathname.new( ext )
|
18
|
-
h_path = path.dirname.realpath + "sqlite3.h"
|
19
|
-
File.open( h_path ) do |f|
|
20
|
-
f.each_line do |line|
|
21
|
-
if line =~ /\A#define SQLITE_VERSION\s+/ then
|
22
|
-
define ,constant ,value = line.split
|
23
|
-
return value
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
desc "Build the SQLite extension version #{current_sqlite_version}"
|
30
|
-
task :build => :clean do
|
31
|
-
ext_config.configs.each do |extension|
|
32
|
-
path = Pathname.new(extension)
|
33
|
-
parts = path.split
|
34
|
-
conf = parts.last
|
35
|
-
Dir.chdir(path.dirname) do |d|
|
36
|
-
ruby conf.to_s
|
37
|
-
sh "make"
|
8
|
+
require 'rake/extensiontask'
|
9
|
+
require 'rake/javaextensiontask'
|
38
10
|
|
39
|
-
|
40
|
-
subdir = "amalgalite/#{RUBY_VERSION.sub(/\.\d$/,'')}"
|
41
|
-
dest_dir = Amalgalite::Paths.lib_path( subdir )
|
42
|
-
mkdir_p dest_dir, :verbose => true
|
43
|
-
cp "amalgalite3.#{Config::CONFIG['DLEXT']}", dest_dir, :verbose => true
|
44
|
-
end
|
45
|
-
end
|
46
|
-
end
|
11
|
+
if RUBY_PLATFORM == "java" then
|
47
12
|
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
RbConfig::CONFIG['ruby_install_name']
|
53
|
-
)
|
54
|
-
#puts "myruby = #{x}"
|
55
|
-
return x
|
13
|
+
Rake::JavaExtensionTask.new( This.name) do |ext|
|
14
|
+
ext.ext_dir = File.join( 'ext', This.name, "java" )
|
15
|
+
ext.lib_dir = File.join( 'lib', This.name )
|
16
|
+
ext.gem_spec = This.java_gemspec
|
56
17
|
end
|
57
18
|
|
58
|
-
|
59
|
-
ext_config = Configuration.for("extension")
|
60
|
-
rbconfig = ext_config.cross_rbconfig["rbconfig-#{version}"]
|
61
|
-
raise ArgumentError, "No cross compiler for version #{version}, we have #{ext_config.cross_rbconfig.keys.join(",")}" unless rbconfig
|
62
|
-
Amalgalite::GEM_SPEC.extensions.each do |extension|
|
63
|
-
path = Pathname.new(extension)
|
64
|
-
parts = path.split
|
65
|
-
conf = parts.last
|
66
|
-
rvm = File.expand_path( "~/.rvm/bin/rvm" )
|
67
|
-
Dir.chdir(path.dirname) do |d|
|
68
|
-
if File.exist?( "Makefile" ) then
|
69
|
-
sh "make clean distclean"
|
70
|
-
end
|
71
|
-
cp "#{rbconfig}", "rbconfig.rb"
|
72
|
-
rubylib = ENV['RUBYLIB']
|
73
|
-
ENV['RUBYLIB'] = "."
|
74
|
-
sh %[ #{rvm} #{version} -S extconf.rb #{myruby} ]
|
75
|
-
ENV['RUBYLIB'] = rubylib
|
76
|
-
sh "make"
|
77
|
-
end
|
78
|
-
end
|
79
|
-
end
|
19
|
+
else
|
80
20
|
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
win_bname = "build_win-#{s}"
|
86
|
-
win_builds << win_bname
|
87
|
-
task win_bname => :clean do
|
88
|
-
build_win( s )
|
89
|
-
end
|
90
|
-
end
|
21
|
+
Rake::ExtensionTask.new( This.name ) do |ext|
|
22
|
+
ext.ext_dir = File.join( 'ext', This.name, "c" )
|
23
|
+
ext.lib_dir = File.join( 'lib', This.name )
|
24
|
+
ext.gem_spec = This.ruby_gemspec
|
91
25
|
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
parts = path.split
|
96
|
-
conf = parts.last
|
97
|
-
Dir.chdir(path.dirname) do |d|
|
98
|
-
if File.exist?( "Makefile" ) then
|
99
|
-
sh "make clean"
|
100
|
-
end
|
101
|
-
rm_f "rbconfig.rb"
|
102
|
-
end
|
103
|
-
end
|
104
|
-
end
|
105
|
-
|
106
|
-
desc "List the sqlite api calls that are not implemented"
|
107
|
-
task :todo do
|
108
|
-
|
109
|
-
not_implementing = %w[
|
110
|
-
sqlite3_exec
|
111
|
-
sqlite3_open
|
112
|
-
sqlite3_os_end
|
113
|
-
sqlite3_os_init
|
114
|
-
sqlite3_malloc
|
115
|
-
sqlite3_realloc
|
116
|
-
sqlite3_free
|
117
|
-
sqlite3_get_table
|
118
|
-
sqlite3_free_table
|
119
|
-
sqlite3_key
|
120
|
-
sqlite3_rekey
|
121
|
-
sqlite3_next_stmt
|
122
|
-
sqlite3_release_memory
|
123
|
-
sqlite3_sleep
|
124
|
-
sqlite3_snprintf
|
125
|
-
sqlite3_vmprintf
|
126
|
-
sqlite3_strnicmp
|
127
|
-
sqlite3_test_control
|
128
|
-
sqlite3_unlock_notify
|
129
|
-
sqlite3_vfs_find
|
130
|
-
sqlite3_vfs_register
|
131
|
-
sqlite3_vfs_unregister
|
132
|
-
]
|
133
|
-
|
134
|
-
sqlite_h = File.join( *%w[ ext amalgalite sqlite3.h ] )
|
135
|
-
api_todo = {}
|
136
|
-
IO.readlines( sqlite_h ).each do |line|
|
137
|
-
if line =~ /\ASQLITE_API/ then
|
138
|
-
if line !~ /SQLITE_DEPRECATED/ and line !~ /SQLITE_EXPERIMENTAL/ then
|
139
|
-
if md = line.match( /(sqlite3_[^(\s]+)\(/ ) then
|
140
|
-
next if not_implementing.include?(md.captures[0])
|
141
|
-
api_todo[md.captures[0]] = true
|
142
|
-
end
|
143
|
-
end
|
144
|
-
end
|
145
|
-
end
|
146
|
-
|
147
|
-
Dir.glob("ext/amalgalite/amalgalite*.c").each do |am_file|
|
148
|
-
IO.readlines( am_file ).each do |am_line|
|
149
|
-
if md = am_line.match( /(sqlite3_[^(\s]+)\(/ ) then
|
150
|
-
api_todo.delete( md.captures[0] )
|
151
|
-
end
|
152
|
-
end
|
153
|
-
end
|
154
|
-
|
155
|
-
puts "#{api_todo.keys.size} functions to still implement"
|
156
|
-
puts api_todo.keys.sort.join("\n")
|
157
|
-
end
|
158
|
-
|
159
|
-
task :clobber do
|
160
|
-
ext_config.configs.each do |extension|
|
161
|
-
path = Pathname.new(extension)
|
162
|
-
parts = path.split
|
163
|
-
conf = parts.last
|
164
|
-
Dir.chdir(path.dirname) do |d|
|
165
|
-
if File.exist?( "Makefile") then
|
166
|
-
sh "make distclean"
|
167
|
-
end
|
168
|
-
rm_f "rbconfig.rb"
|
169
|
-
end
|
170
|
-
end
|
171
|
-
end
|
172
|
-
|
173
|
-
desc "Download and integrate the next version of sqlite (use VERSION=x.y.z)"
|
174
|
-
task :update_sqlite do
|
175
|
-
require 'uri'
|
176
|
-
require 'net/http'
|
177
|
-
parts = ENV['VERSION'].split(".")
|
178
|
-
next_version = [ parts.shift.to_s ]
|
179
|
-
parts.each do |p|
|
180
|
-
next_version << "#{"%02d" % p }"
|
181
|
-
end
|
182
|
-
next_version << "00" if next_version.size == 3
|
183
|
-
|
184
|
-
next_version = next_version.join('')
|
185
|
-
|
186
|
-
raise "VERSION env variable must be set" unless next_version
|
187
|
-
url = ::URI.parse("http://sqlite.org/sqlite-amalgamation-#{next_version}.zip")
|
188
|
-
puts "downloading #{url.to_s} ..."
|
189
|
-
file = "tmp/#{File.basename( url.path ) }"
|
190
|
-
FileUtils.mkdir "tmp" unless File.directory?( "tmp" )
|
191
|
-
File.open( file, "wb+") do |f|
|
192
|
-
res = Net::HTTP.get_response( url )
|
193
|
-
f.write( res.body )
|
194
|
-
end
|
195
|
-
|
196
|
-
puts "extracting..."
|
197
|
-
upstream_files = %w[ sqlite3.h sqlite3.c sqlite3ext.h ]
|
198
|
-
Zip::ZipInputStream.open( file ) do |io|
|
199
|
-
loop do
|
200
|
-
entry = io.get_next_entry
|
201
|
-
break unless entry
|
202
|
-
bname = File.basename( entry.name )
|
203
|
-
if upstream_files.include?( bname ) then
|
204
|
-
dest_file = File.join( "ext", "amalgalite", bname )
|
205
|
-
puts "updating #{dest_file}"
|
206
|
-
entry.extract( dest_file ) { true }
|
207
|
-
end
|
208
|
-
end
|
209
|
-
end
|
26
|
+
ext.cross_compile = true # enable cross compilation (requires cross compile toolchain)
|
27
|
+
ext.cross_platform = 'i386-mswin32' # forces the Windows platform instead of the default one
|
28
|
+
# configure options only for cross compile
|
210
29
|
end
|
211
30
|
end
|
31
|
+
|
32
|
+
task :test_requirements => :compile
|
33
|
+
rescue LoadError
|
34
|
+
This.task_warning( 'extension' )
|
212
35
|
end
|
36
|
+
|
37
|
+
CLOBBER << FileList["lib/**/*.{jar,so,bundle}"]
|
38
|
+
CLOBBER << FileList["lib/#{This.name}/{1.8,1.9,2.0}/"]
|
data/tasks/this.rb
ADDED
@@ -0,0 +1,209 @@
|
|
1
|
+
require 'pathname'
|
2
|
+
|
3
|
+
# Public: A Class containing all the metadata and utilities needed to manage a
|
4
|
+
# ruby project.
|
5
|
+
class ThisProject
|
6
|
+
# The name of this project
|
7
|
+
attr_accessor :name
|
8
|
+
|
9
|
+
# The author's name
|
10
|
+
attr_accessor :author
|
11
|
+
|
12
|
+
# The email address of the author(s)
|
13
|
+
attr_accessor :email
|
14
|
+
|
15
|
+
# The homepage of this project
|
16
|
+
attr_accessor :homepage
|
17
|
+
|
18
|
+
# The regex of files to exclude from the manifest
|
19
|
+
attr_accessor :exclude_from_manifest
|
20
|
+
|
21
|
+
# The hash of Gem::Specifications keyed' by platform
|
22
|
+
attr_accessor :gemspecs
|
23
|
+
|
24
|
+
# Public: Initialize ThisProject
|
25
|
+
#
|
26
|
+
# Yields self
|
27
|
+
def initialize(&block)
|
28
|
+
@exclude_from_manifest = %r/\.(git|DS_Store)|^(doc|coverage|pkg|tmp)|Gemfile*|\.(gemspec|swp|jar|bundle|so|rvmrc)$|~$/
|
29
|
+
@gemspecs = Hash.new
|
30
|
+
yield self if block_given?
|
31
|
+
end
|
32
|
+
|
33
|
+
# Public: return the version of ThisProject
|
34
|
+
#
|
35
|
+
# Search the ruby files in the project looking for the one that has the
|
36
|
+
# version string in it. This does not eval any code in the project, it parses
|
37
|
+
# the source code looking for the string.
|
38
|
+
#
|
39
|
+
# Returns a String version
|
40
|
+
def version
|
41
|
+
[ "lib/#{ name }.rb", "lib/#{ name }/version.rb" ].each do |v|
|
42
|
+
path = project_path( v )
|
43
|
+
line = path.read[/^\s*VERSION\s*=\s*.*/]
|
44
|
+
if line then
|
45
|
+
return line.match(/.*VERSION\s*=\s*['"](.*)['"]/)[1]
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
# Internal: Return a section of an RDoc file with the given section name
|
51
|
+
#
|
52
|
+
# path - the relative path in the project of the file to parse
|
53
|
+
# section_name - the section out of the file from which to parse data
|
54
|
+
#
|
55
|
+
# Retuns the text of the section as an array of paragrphs.
|
56
|
+
def section_of( file, section_name )
|
57
|
+
re = /^[=#]+ (.*)$/
|
58
|
+
sectional = project_path( file )
|
59
|
+
parts = sectional.read.split( re )[1..-1]
|
60
|
+
parts.map! { |p| p.strip }
|
61
|
+
|
62
|
+
sections = Hash.new
|
63
|
+
Hash[*parts].each do |k,v|
|
64
|
+
sections[k] = v.split("\n\n")
|
65
|
+
end
|
66
|
+
return sections[section_name]
|
67
|
+
end
|
68
|
+
|
69
|
+
# Internal: print out a warning about the give task
|
70
|
+
def task_warning( task )
|
71
|
+
warn "WARNING: '#{task}' tasks are not defined. Please run 'rake develop'"
|
72
|
+
end
|
73
|
+
|
74
|
+
# Internal: Return the full path to the file that is relative to the project
|
75
|
+
# root.
|
76
|
+
#
|
77
|
+
# path - the relative path of the file from the project root
|
78
|
+
#
|
79
|
+
# Returns the Pathname of the file
|
80
|
+
def project_path( *relative_path )
|
81
|
+
project_root.join( *relative_path )
|
82
|
+
end
|
83
|
+
|
84
|
+
# Internal: The absolute path of this file
|
85
|
+
#
|
86
|
+
# Returns the Pathname of this file.
|
87
|
+
def this_file_path
|
88
|
+
Pathname.new( __FILE__ ).expand_path
|
89
|
+
end
|
90
|
+
|
91
|
+
# Internal: The root directory of this project
|
92
|
+
#
|
93
|
+
# This is defined as being the directory that is in the path of this project
|
94
|
+
# that has the first Rakefile
|
95
|
+
#
|
96
|
+
# Returns the Pathname of the directory
|
97
|
+
def project_root
|
98
|
+
this_file_path.ascend do |p|
|
99
|
+
rakefile = p.join( 'Rakefile' )
|
100
|
+
return p if rakefile.exist?
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
104
|
+
# Internal: Returns the contents of the Manifest.txt file as an array
|
105
|
+
#
|
106
|
+
# Returns an Array of strings
|
107
|
+
def manifest
|
108
|
+
manifest_file = project_path( "Manifest.txt" )
|
109
|
+
abort "You need a Manifest.txt" unless manifest_file.readable?
|
110
|
+
manifest_file.readlines.map { |l| l.strip }
|
111
|
+
end
|
112
|
+
|
113
|
+
# Internal: Return the files that define the extensions
|
114
|
+
#
|
115
|
+
# Returns an Array
|
116
|
+
def extension_conf_files
|
117
|
+
manifest.grep( /extconf.rb\Z/ )
|
118
|
+
end
|
119
|
+
|
120
|
+
# Internal: Returns the gemspace associated with the current ruby platform
|
121
|
+
def platform_gemspec
|
122
|
+
gemspecs[platform]
|
123
|
+
end
|
124
|
+
|
125
|
+
def core_gemspec
|
126
|
+
Gem::Specification.new do |spec|
|
127
|
+
spec.name = name
|
128
|
+
spec.version = version
|
129
|
+
spec.author = author
|
130
|
+
spec.email = email
|
131
|
+
spec.homepage = homepage
|
132
|
+
|
133
|
+
spec.summary = summary
|
134
|
+
spec.description = description
|
135
|
+
|
136
|
+
spec.files = manifest
|
137
|
+
spec.executables = spec.files.grep(/^bin/) { |f| File.basename(f) }
|
138
|
+
spec.test_files = spec.files.grep(/^spec/)
|
139
|
+
|
140
|
+
spec.extra_rdoc_files += spec.files.grep(/(txt|rdoc|md)$/)
|
141
|
+
spec.rdoc_options = [ "--main" , 'README.md',
|
142
|
+
"--markup", "tomdoc" ]
|
143
|
+
end
|
144
|
+
end
|
145
|
+
|
146
|
+
# Internal: Return the gemspec for the ruby platform
|
147
|
+
def ruby_gemspec( core = core_gemspec, &block )
|
148
|
+
yielding_gemspec( 'ruby', core, &block )
|
149
|
+
end
|
150
|
+
|
151
|
+
# Internal: Return the gemspec for the jruby platform
|
152
|
+
def java_gemspec( core = core_gemspec, &block )
|
153
|
+
yielding_gemspec( 'java', core, &block )
|
154
|
+
end
|
155
|
+
|
156
|
+
# Internal: give an initial spec and a key, create a new gemspec based off of
|
157
|
+
# it.
|
158
|
+
#
|
159
|
+
# This will force the new gemspecs 'platform' to be that of the key, since the
|
160
|
+
# only reason you would have multiple gemspecs at this point is to deal with
|
161
|
+
# different platforms.
|
162
|
+
def yielding_gemspec( key, core )
|
163
|
+
spec = gemspecs[key] ||= core.dup
|
164
|
+
spec.platform = key
|
165
|
+
yield spec if block_given?
|
166
|
+
return spec
|
167
|
+
end
|
168
|
+
|
169
|
+
# Internal: Set the recovery gem development dependency
|
170
|
+
#
|
171
|
+
# These are dynamically set since they cannot be hard coded as there is
|
172
|
+
# no way to ship them correctly in the gemspec
|
173
|
+
#
|
174
|
+
# Returns nothing.
|
175
|
+
def set_coverage_gem
|
176
|
+
if RUBY_VERSION < "1.9.0"
|
177
|
+
platform_gemspec.add_development_dependency( 'rcov', '~> 1.0.0' )
|
178
|
+
else
|
179
|
+
platform_gemspec.add_development_dependency( 'simplecov', '~> 0.7.1' )
|
180
|
+
end
|
181
|
+
end
|
182
|
+
|
183
|
+
# Internal: Return the platform of ThisProject at the current moment in time.
|
184
|
+
def platform
|
185
|
+
(RUBY_PLATFORM == "java") ? 'java' : Gem::Platform::RUBY
|
186
|
+
end
|
187
|
+
|
188
|
+
# Internal: Return the DESCRIPTION section of the README.rdoc file
|
189
|
+
def description_section
|
190
|
+
section_of( 'README.md', 'DESCRIPTION')
|
191
|
+
end
|
192
|
+
|
193
|
+
# Internal: Return the summary text from the README
|
194
|
+
def summary
|
195
|
+
description_section.first
|
196
|
+
end
|
197
|
+
|
198
|
+
# Internal: Return the full description text from the READEM
|
199
|
+
def description
|
200
|
+
description_section.join(" ").tr("\n", ' ').gsub(/[{}]/,'').gsub(/\[[^\]]+\]/,'') # strip rdoc
|
201
|
+
end
|
202
|
+
|
203
|
+
# Internal: The path to the gemspec file
|
204
|
+
def gemspec_file
|
205
|
+
project_path( "#{ name }.gemspec" )
|
206
|
+
end
|
207
|
+
end
|
208
|
+
|
209
|
+
This = ThisProject.new
|
metadata
CHANGED
@@ -1,232 +1,142 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: amalgalite
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 1
|
8
|
-
- 1
|
9
|
-
- 2
|
10
|
-
version: 1.1.2
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.3.0
|
11
5
|
platform: ruby
|
12
|
-
authors:
|
6
|
+
authors:
|
13
7
|
- Jeremy Hinegardner
|
14
8
|
autorequire:
|
15
9
|
bindir: bin
|
16
10
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
dependencies:
|
21
|
-
- !ruby/object:Gem::Dependency
|
11
|
+
date: 2013-03-13 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
22
14
|
name: arrayfields
|
23
|
-
|
24
|
-
|
25
|
-
none: false
|
26
|
-
requirements:
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
27
17
|
- - ~>
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
hash: 43
|
30
|
-
segments:
|
31
|
-
- 4
|
32
|
-
- 7
|
33
|
-
- 4
|
18
|
+
- !ruby/object:Gem::Version
|
34
19
|
version: 4.7.4
|
35
20
|
type: :runtime
|
36
|
-
version_requirements: *id001
|
37
|
-
- !ruby/object:Gem::Dependency
|
38
|
-
name: fastercsv
|
39
21
|
prerelease: false
|
40
|
-
|
41
|
-
|
42
|
-
requirements:
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
43
24
|
- - ~>
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 4.7.4
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: fastercsv
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.5.5
|
51
34
|
type: :runtime
|
52
|
-
version_requirements: *id002
|
53
|
-
- !ruby/object:Gem::Dependency
|
54
|
-
name: rake
|
55
35
|
prerelease: false
|
56
|
-
|
57
|
-
|
58
|
-
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 1.5.5
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
59
45
|
- - ~>
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
|
62
|
-
segments:
|
63
|
-
- 0
|
64
|
-
- 8
|
65
|
-
- 7
|
66
|
-
version: 0.8.7
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 2.13.0
|
67
48
|
type: :development
|
68
|
-
version_requirements: *id003
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: configuration
|
71
49
|
prerelease: false
|
72
|
-
|
73
|
-
|
74
|
-
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 2.13.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
75
59
|
- - ~>
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
|
78
|
-
segments:
|
79
|
-
- 1
|
80
|
-
- 2
|
81
|
-
- 0
|
82
|
-
version: 1.2.0
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 10.0.3
|
83
62
|
type: :development
|
84
|
-
version_requirements: *id004
|
85
|
-
- !ruby/object:Gem::Dependency
|
86
|
-
name: rspec
|
87
63
|
prerelease: false
|
88
|
-
|
89
|
-
|
90
|
-
requirements:
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
91
66
|
- - ~>
|
92
|
-
- !ruby/object:Gem::Version
|
93
|
-
|
94
|
-
|
95
|
-
- 2
|
96
|
-
- 5
|
97
|
-
- 1
|
98
|
-
version: 2.5.1
|
99
|
-
type: :development
|
100
|
-
version_requirements: *id005
|
101
|
-
- !ruby/object:Gem::Dependency
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 10.0.3
|
69
|
+
- !ruby/object:Gem::Dependency
|
102
70
|
name: rake-compiler
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ~>
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 0.8.1
|
76
|
+
type: :development
|
103
77
|
prerelease: false
|
104
|
-
|
105
|
-
|
106
|
-
requirements:
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
107
80
|
- - ~>
|
108
|
-
- !ruby/object:Gem::Version
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 0.8.1
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rdoc
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ~>
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '4.0'
|
115
90
|
type: :development
|
116
|
-
version_requirements: *id006
|
117
|
-
- !ruby/object:Gem::Dependency
|
118
|
-
name: zip
|
119
91
|
prerelease: false
|
120
|
-
|
121
|
-
|
122
|
-
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ~>
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '4.0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: zip
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
123
101
|
- - ~>
|
124
|
-
- !ruby/object:Gem::Version
|
125
|
-
hash: 11
|
126
|
-
segments:
|
127
|
-
- 2
|
128
|
-
- 0
|
129
|
-
- 2
|
102
|
+
- !ruby/object:Gem::Version
|
130
103
|
version: 2.0.2
|
131
104
|
type: :development
|
132
|
-
version_requirements: *id007
|
133
|
-
- !ruby/object:Gem::Dependency
|
134
|
-
name: rcov
|
135
105
|
prerelease: false
|
136
|
-
|
137
|
-
|
138
|
-
requirements:
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
139
108
|
- - ~>
|
140
|
-
- !ruby/object:Gem::Version
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
Amalgalite embeds the SQLite database engine in a ruby extension. There is no
|
151
|
-
need to install SQLite separately.
|
152
|
-
|
153
|
-
Look in the examples/ directory to see
|
154
|
-
|
155
|
-
* general usage
|
156
|
-
* blob io
|
157
|
-
* schema information
|
158
|
-
* custom functions
|
159
|
-
* custom aggregates
|
160
|
-
* requiring ruby code from a database
|
161
|
-
* full text search
|
162
|
-
|
163
|
-
Also Scroll through Amalgalite::Database for a quick example, and a general
|
164
|
-
overview of the API.
|
165
|
-
|
166
|
-
Amalgalite adds in the following additional non-default SQLite extensions:
|
167
|
-
|
168
|
-
* {R*Tree index extension}[http://sqlite.org/rtree.html]
|
169
|
-
* {Full Text Search}[http://sqlite.org/fts3.html]
|
170
|
-
email: jeremy@hinegardner.org
|
171
|
-
executables:
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 2.0.2
|
111
|
+
description: ! 'Amalgalite embeds the SQLite database engine in a ruby extension. There
|
112
|
+
is no need to install SQLite separately. Look in the examples/ directory to see
|
113
|
+
* general usage * blob io * schema information * custom functions * custom aggregates
|
114
|
+
* requiring ruby code from a database * full text search Also Scroll through Amalgalite::Database
|
115
|
+
for a quick example, and a general overview of the API. Amalgalite adds in the following
|
116
|
+
additional non-default SQLite extensions: * (http://sqlite.org/rtree.html) * (http://sqlite.org/fts3.html)'
|
117
|
+
email: jeremy@copiousfreetime.org
|
118
|
+
executables:
|
172
119
|
- amalgalite-pack
|
173
|
-
extensions:
|
174
|
-
- ext/amalgalite/extconf.rb
|
175
|
-
extra_rdoc_files:
|
176
|
-
-
|
177
|
-
- HISTORY.
|
120
|
+
extensions:
|
121
|
+
- ext/amalgalite/c/extconf.rb
|
122
|
+
extra_rdoc_files:
|
123
|
+
- CONTRIBUTING.md
|
124
|
+
- HISTORY.md
|
125
|
+
- Manifest.txt
|
126
|
+
- README.md
|
127
|
+
- TODO.md
|
128
|
+
- ext/amalgalite/c/notes.txt
|
129
|
+
- spec/data/iso-3166-country.txt
|
130
|
+
- spec/data/iso-3166-subcountry.txt
|
131
|
+
files:
|
132
|
+
- CONTRIBUTING.md
|
133
|
+
- HISTORY.md
|
178
134
|
- LICENSE
|
179
|
-
-
|
180
|
-
-
|
181
|
-
-
|
182
|
-
-
|
183
|
-
- lib/amalgalite/column.rb
|
184
|
-
- lib/amalgalite/core_ext/kernel/require.rb
|
185
|
-
- lib/amalgalite/csv_table_importer.rb
|
186
|
-
- lib/amalgalite/database.rb
|
187
|
-
- lib/amalgalite/function.rb
|
188
|
-
- lib/amalgalite/index.rb
|
189
|
-
- lib/amalgalite/memory_database.rb
|
190
|
-
- lib/amalgalite/packer.rb
|
191
|
-
- lib/amalgalite/paths.rb
|
192
|
-
- lib/amalgalite/profile_tap.rb
|
193
|
-
- lib/amalgalite/progress_handler.rb
|
194
|
-
- lib/amalgalite/requires.rb
|
195
|
-
- lib/amalgalite/schema.rb
|
196
|
-
- lib/amalgalite/sqlite3/constants.rb
|
197
|
-
- lib/amalgalite/sqlite3/database/function.rb
|
198
|
-
- lib/amalgalite/sqlite3/database/status.rb
|
199
|
-
- lib/amalgalite/sqlite3/status.rb
|
200
|
-
- lib/amalgalite/sqlite3/version.rb
|
201
|
-
- lib/amalgalite/sqlite3.rb
|
202
|
-
- lib/amalgalite/statement.rb
|
203
|
-
- lib/amalgalite/table.rb
|
204
|
-
- lib/amalgalite/taps/console.rb
|
205
|
-
- lib/amalgalite/taps/io.rb
|
206
|
-
- lib/amalgalite/taps.rb
|
207
|
-
- lib/amalgalite/trace_tap.rb
|
208
|
-
- lib/amalgalite/type_map.rb
|
209
|
-
- lib/amalgalite/type_maps/default_map.rb
|
210
|
-
- lib/amalgalite/type_maps/storage_map.rb
|
211
|
-
- lib/amalgalite/type_maps/text_map.rb
|
212
|
-
- lib/amalgalite/version.rb
|
213
|
-
- lib/amalgalite/view.rb
|
214
|
-
- lib/amalgalite.rb
|
215
|
-
files:
|
135
|
+
- Manifest.txt
|
136
|
+
- README.md
|
137
|
+
- Rakefile
|
138
|
+
- TODO.md
|
216
139
|
- bin/amalgalite-pack
|
217
|
-
- ext/amalgalite/amalgalite3.c
|
218
|
-
- ext/amalgalite/amalgalite3_blob.c
|
219
|
-
- ext/amalgalite/amalgalite3_constants.c
|
220
|
-
- ext/amalgalite/amalgalite3_database.c
|
221
|
-
- ext/amalgalite/amalgalite3_requires_bootstrap.c
|
222
|
-
- ext/amalgalite/amalgalite3_statement.c
|
223
|
-
- ext/amalgalite/sqlite3.c
|
224
|
-
- ext/amalgalite/amalgalite3.h
|
225
|
-
- ext/amalgalite/sqlite3.h
|
226
|
-
- ext/amalgalite/sqlite3_options.h
|
227
|
-
- ext/amalgalite/sqlite3ext.h
|
228
|
-
- ext/amalgalite/extconf.rb
|
229
|
-
- ext/amalgalite/gen_constants.rb
|
230
140
|
- examples/a.rb
|
231
141
|
- examples/blob.rb
|
232
142
|
- examples/bootstrap.rb
|
@@ -237,6 +147,21 @@ files:
|
|
237
147
|
- examples/require_me.rb
|
238
148
|
- examples/requires.rb
|
239
149
|
- examples/schema-info.rb
|
150
|
+
- ext/amalgalite/c/amalgalite.c
|
151
|
+
- ext/amalgalite/c/amalgalite.h
|
152
|
+
- ext/amalgalite/c/amalgalite_blob.c
|
153
|
+
- ext/amalgalite/c/amalgalite_constants.c
|
154
|
+
- ext/amalgalite/c/amalgalite_database.c
|
155
|
+
- ext/amalgalite/c/amalgalite_requires_bootstrap.c
|
156
|
+
- ext/amalgalite/c/amalgalite_statement.c
|
157
|
+
- ext/amalgalite/c/extconf.rb
|
158
|
+
- ext/amalgalite/c/gen_constants.rb
|
159
|
+
- ext/amalgalite/c/notes.txt
|
160
|
+
- ext/amalgalite/c/sqlite3.c
|
161
|
+
- ext/amalgalite/c/sqlite3.h
|
162
|
+
- ext/amalgalite/c/sqlite3_options.h
|
163
|
+
- ext/amalgalite/c/sqlite3ext.h
|
164
|
+
- lib/amalgalite.rb
|
240
165
|
- lib/amalgalite/aggregate.rb
|
241
166
|
- lib/amalgalite/blob.rb
|
242
167
|
- lib/amalgalite/boolean.rb
|
@@ -254,17 +179,17 @@ files:
|
|
254
179
|
- lib/amalgalite/progress_handler.rb
|
255
180
|
- lib/amalgalite/requires.rb
|
256
181
|
- lib/amalgalite/schema.rb
|
182
|
+
- lib/amalgalite/sqlite3.rb
|
257
183
|
- lib/amalgalite/sqlite3/constants.rb
|
258
184
|
- lib/amalgalite/sqlite3/database/function.rb
|
259
185
|
- lib/amalgalite/sqlite3/database/status.rb
|
260
186
|
- lib/amalgalite/sqlite3/status.rb
|
261
187
|
- lib/amalgalite/sqlite3/version.rb
|
262
|
-
- lib/amalgalite/sqlite3.rb
|
263
188
|
- lib/amalgalite/statement.rb
|
264
189
|
- lib/amalgalite/table.rb
|
190
|
+
- lib/amalgalite/taps.rb
|
265
191
|
- lib/amalgalite/taps/console.rb
|
266
192
|
- lib/amalgalite/taps/io.rb
|
267
|
-
- lib/amalgalite/taps.rb
|
268
193
|
- lib/amalgalite/trace_tap.rb
|
269
194
|
- lib/amalgalite/type_map.rb
|
270
195
|
- lib/amalgalite/type_maps/default_map.rb
|
@@ -272,12 +197,15 @@ files:
|
|
272
197
|
- lib/amalgalite/type_maps/text_map.rb
|
273
198
|
- lib/amalgalite/version.rb
|
274
199
|
- lib/amalgalite/view.rb
|
275
|
-
- lib/amalgalite.rb
|
276
200
|
- spec/aggregate_spec.rb
|
277
201
|
- spec/amalgalite_spec.rb
|
278
202
|
- spec/blob_spec.rb
|
279
203
|
- spec/boolean_spec.rb
|
280
204
|
- spec/busy_handler.rb
|
205
|
+
- spec/data/iso-3166-country.txt
|
206
|
+
- spec/data/iso-3166-schema.sql
|
207
|
+
- spec/data/iso-3166-subcountry.txt
|
208
|
+
- spec/data/make-iso-db.sh
|
281
209
|
- spec/database_spec.rb
|
282
210
|
- spec/default_map_spec.rb
|
283
211
|
- spec/function_spec.rb
|
@@ -301,55 +229,69 @@ files:
|
|
301
229
|
- spec/text_map_spec.rb
|
302
230
|
- spec/type_map_spec.rb
|
303
231
|
- spec/version_spec.rb
|
304
|
-
-
|
305
|
-
-
|
306
|
-
- spec/data/iso-3166-subcountry.txt
|
307
|
-
- spec/data/make-iso-db.sh
|
308
|
-
- README.rdoc
|
309
|
-
- HISTORY.rdoc
|
310
|
-
- LICENSE
|
311
|
-
- tasks/announce.rake
|
312
|
-
- tasks/distribution.rake
|
313
|
-
- tasks/documentation.rake
|
232
|
+
- tasks/custom.rake
|
233
|
+
- tasks/default.rake
|
314
234
|
- tasks/extension.rake
|
315
|
-
- tasks/
|
316
|
-
|
317
|
-
|
318
|
-
-
|
319
|
-
|
320
|
-
homepage: http://copiousfreetime.rubyforge.org/amalgalite/
|
321
|
-
licenses: []
|
322
|
-
|
235
|
+
- tasks/this.rb
|
236
|
+
homepage: http://github.com/copiousfreetime/amalgalite
|
237
|
+
licenses:
|
238
|
+
- BSD
|
239
|
+
metadata: {}
|
323
240
|
post_install_message:
|
324
|
-
rdoc_options:
|
241
|
+
rdoc_options:
|
325
242
|
- --main
|
326
|
-
- README.
|
327
|
-
|
243
|
+
- README.md
|
244
|
+
- --markup
|
245
|
+
- tomdoc
|
246
|
+
require_paths:
|
328
247
|
- lib
|
329
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
none: false
|
340
|
-
requirements:
|
341
|
-
- - ">="
|
342
|
-
- !ruby/object:Gem::Version
|
343
|
-
hash: 3
|
344
|
-
segments:
|
345
|
-
- 0
|
346
|
-
version: "0"
|
248
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
249
|
+
requirements:
|
250
|
+
- - ! '>='
|
251
|
+
- !ruby/object:Gem::Version
|
252
|
+
version: '0'
|
253
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
254
|
+
requirements:
|
255
|
+
- - ! '>='
|
256
|
+
- !ruby/object:Gem::Version
|
257
|
+
version: '0'
|
347
258
|
requirements: []
|
348
|
-
|
349
|
-
|
350
|
-
rubygems_version: 1.5.2
|
259
|
+
rubyforge_project:
|
260
|
+
rubygems_version: 2.0.3
|
351
261
|
signing_key:
|
352
|
-
specification_version:
|
353
|
-
summary: Amalgalite embeds the SQLite database engine in a ruby extension
|
354
|
-
|
355
|
-
|
262
|
+
specification_version: 4
|
263
|
+
summary: Amalgalite embeds the SQLite database engine in a ruby extension. There
|
264
|
+
is no need to install SQLite separately.
|
265
|
+
test_files:
|
266
|
+
- spec/aggregate_spec.rb
|
267
|
+
- spec/amalgalite_spec.rb
|
268
|
+
- spec/blob_spec.rb
|
269
|
+
- spec/boolean_spec.rb
|
270
|
+
- spec/busy_handler.rb
|
271
|
+
- spec/data/iso-3166-country.txt
|
272
|
+
- spec/data/iso-3166-schema.sql
|
273
|
+
- spec/data/iso-3166-subcountry.txt
|
274
|
+
- spec/data/make-iso-db.sh
|
275
|
+
- spec/database_spec.rb
|
276
|
+
- spec/default_map_spec.rb
|
277
|
+
- spec/function_spec.rb
|
278
|
+
- spec/integeration_spec.rb
|
279
|
+
- spec/iso_3166_database.rb
|
280
|
+
- spec/packer_spec.rb
|
281
|
+
- spec/paths_spec.rb
|
282
|
+
- spec/progress_handler_spec.rb
|
283
|
+
- spec/requires_spec.rb
|
284
|
+
- spec/rtree_spec.rb
|
285
|
+
- spec/schema_spec.rb
|
286
|
+
- spec/spec_helper.rb
|
287
|
+
- spec/sqlite3/constants_spec.rb
|
288
|
+
- spec/sqlite3/database_status_spec.rb
|
289
|
+
- spec/sqlite3/status_spec.rb
|
290
|
+
- spec/sqlite3/version_spec.rb
|
291
|
+
- spec/sqlite3_spec.rb
|
292
|
+
- spec/statement_spec.rb
|
293
|
+
- spec/storage_map_spec.rb
|
294
|
+
- spec/tap_spec.rb
|
295
|
+
- spec/text_map_spec.rb
|
296
|
+
- spec/type_map_spec.rb
|
297
|
+
- spec/version_spec.rb
|