amalgalite 0.4.2-x86-mswin32-60

Sign up to get free protection for your applications and to get access to all the features.
Files changed (83) hide show
  1. data/HISTORY +81 -0
  2. data/LICENSE +29 -0
  3. data/README +40 -0
  4. data/bin/amalgalite-pack-into-db +155 -0
  5. data/examples/a.rb +9 -0
  6. data/examples/blob.rb +105 -0
  7. data/examples/bootstrap.rb +36 -0
  8. data/examples/gem-db.rb +94 -0
  9. data/examples/requires.rb +54 -0
  10. data/examples/schema-info.rb +34 -0
  11. data/ext/amalgalite3.c +201 -0
  12. data/ext/amalgalite3.h +121 -0
  13. data/ext/amalgalite3_blob.c +241 -0
  14. data/ext/amalgalite3_constants.c +221 -0
  15. data/ext/amalgalite3_database.c +550 -0
  16. data/ext/amalgalite3_requires_bootstrap.c +210 -0
  17. data/ext/amalgalite3_statement.c +628 -0
  18. data/ext/extconf.rb +19 -0
  19. data/ext/gen_constants.rb +130 -0
  20. data/ext/rbconfig-mingw.rb +178 -0
  21. data/ext/sqlite3.c +97092 -0
  22. data/ext/sqlite3.h +6364 -0
  23. data/ext/sqlite3_options.h +4 -0
  24. data/ext/sqlite3ext.h +372 -0
  25. data/gemspec.rb +55 -0
  26. data/lib/amalgalite.rb +33 -0
  27. data/lib/amalgalite/blob.rb +186 -0
  28. data/lib/amalgalite/boolean.rb +42 -0
  29. data/lib/amalgalite/column.rb +86 -0
  30. data/lib/amalgalite/core_ext/kernel/require.rb +14 -0
  31. data/lib/amalgalite/database.rb +514 -0
  32. data/lib/amalgalite/index.rb +43 -0
  33. data/lib/amalgalite/paths.rb +70 -0
  34. data/lib/amalgalite/profile_tap.rb +130 -0
  35. data/lib/amalgalite/requires.rb +112 -0
  36. data/lib/amalgalite/schema.rb +115 -0
  37. data/lib/amalgalite/sqlite3.rb +6 -0
  38. data/lib/amalgalite/sqlite3/constants.rb +82 -0
  39. data/lib/amalgalite/sqlite3/database/status.rb +69 -0
  40. data/lib/amalgalite/sqlite3/status.rb +61 -0
  41. data/lib/amalgalite/sqlite3/version.rb +38 -0
  42. data/lib/amalgalite/statement.rb +394 -0
  43. data/lib/amalgalite/table.rb +36 -0
  44. data/lib/amalgalite/taps.rb +2 -0
  45. data/lib/amalgalite/taps/console.rb +27 -0
  46. data/lib/amalgalite/taps/io.rb +71 -0
  47. data/lib/amalgalite/trace_tap.rb +35 -0
  48. data/lib/amalgalite/type_map.rb +63 -0
  49. data/lib/amalgalite/type_maps/default_map.rb +167 -0
  50. data/lib/amalgalite/type_maps/storage_map.rb +41 -0
  51. data/lib/amalgalite/type_maps/text_map.rb +23 -0
  52. data/lib/amalgalite/version.rb +37 -0
  53. data/lib/amalgalite/view.rb +26 -0
  54. data/lib/amalgalite3.so +0 -0
  55. data/spec/amalgalite_spec.rb +4 -0
  56. data/spec/blob_spec.rb +81 -0
  57. data/spec/boolean_spec.rb +23 -0
  58. data/spec/database_spec.rb +238 -0
  59. data/spec/default_map_spec.rb +87 -0
  60. data/spec/integeration_spec.rb +111 -0
  61. data/spec/paths_spec.rb +28 -0
  62. data/spec/schema_spec.rb +60 -0
  63. data/spec/spec_helper.rb +25 -0
  64. data/spec/sqlite3/constants_spec.rb +65 -0
  65. data/spec/sqlite3/database_status_spec.rb +36 -0
  66. data/spec/sqlite3/status_spec.rb +18 -0
  67. data/spec/sqlite3/version_spec.rb +14 -0
  68. data/spec/sqlite3_spec.rb +23 -0
  69. data/spec/statement_spec.rb +134 -0
  70. data/spec/storage_map_spec.rb +41 -0
  71. data/spec/tap_spec.rb +59 -0
  72. data/spec/text_map_spec.rb +23 -0
  73. data/spec/type_map_spec.rb +17 -0
  74. data/spec/version_spec.rb +9 -0
  75. data/tasks/announce.rake +39 -0
  76. data/tasks/config.rb +110 -0
  77. data/tasks/distribution.rake +53 -0
  78. data/tasks/documentation.rake +33 -0
  79. data/tasks/extension.rake +100 -0
  80. data/tasks/rspec.rake +32 -0
  81. data/tasks/rubyforge.rake +59 -0
  82. data/tasks/utils.rb +80 -0
  83. metadata +192 -0
data/tasks/rspec.rake ADDED
@@ -0,0 +1,32 @@
1
+
2
+ require 'tasks/config'
3
+
4
+ #--------------------------------------------------------------------------------
5
+ # configuration for running rspec. This shows up as the test:default task
6
+ #--------------------------------------------------------------------------------
7
+ if spec_config = Configuration.for_if_exist?("test") then
8
+ if spec_config.mode == "spec" then
9
+ namespace :test do
10
+
11
+ task :default => :spec
12
+
13
+ require 'spec/rake/spectask'
14
+ Spec::Rake::SpecTask.new do |r|
15
+ r.ruby_opts = spec_config.ruby_opts
16
+ r.libs = [ Amalgalite::Paths.lib_path,
17
+ Amalgalite::Paths.ext_path,
18
+ Amalgalite::Paths.root_dir ]
19
+ r.spec_files = spec_config.files
20
+ r.spec_opts = spec_config.options
21
+
22
+ if rcov_config = Configuration.for_if_exist?('rcov') then
23
+ r.rcov = true
24
+ r.rcov_dir = rcov_config.output_dir
25
+ r.rcov_opts = rcov_config.rcov_opts
26
+ end
27
+ end
28
+
29
+ task :spec => 'ext:build'
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,59 @@
1
+ require 'tasks/config'
2
+
3
+ #-----------------------------------------------------------------------
4
+ # Rubyforge additions to the task library
5
+ #-----------------------------------------------------------------------
6
+ if rf_conf = Configuration.for_if_exist?("rubyforge") then
7
+
8
+ abort("rubyforge gem not installed 'gem install rubyforge'") unless Utils.try_require('rubyforge')
9
+
10
+ proj_conf = Configuration.for('project')
11
+
12
+ namespace :dist do
13
+ desc "Release files to rubyforge"
14
+ task :rubyforge => [:clean, :package, :package_win] do
15
+
16
+ rubyforge = RubyForge.new
17
+
18
+ config = {}
19
+ config["release_notes"] = proj_conf.description
20
+ config["release_changes"] = Utils.release_notes_from(proj_conf.history)[Amalgalite::VERSION]
21
+ config["Prefomatted"] = true
22
+
23
+ rubyforge.configure config
24
+
25
+ # make sure this release doesn't already exist
26
+ releases = rubyforge.autoconfig['release_ids']
27
+ if releases.has_key?(Amalgalite::GEM_SPEC.name) and releases[Amalgalite::GEM_SPEC.name][Amalgalite::VERSION] then
28
+ abort("Release #{Amalgalite::VERSION} already exists! Unable to release.")
29
+ end
30
+
31
+ puts "Uploading to rubyforge..."
32
+ files = FileList[File.join("pkg","#{Amalgalite::GEM_SPEC.name}-#{Amalgalite::VERSION}*.*")].to_a
33
+ files.each do |f|
34
+ puts " * #{f}"
35
+ end
36
+ rubyforge.login
37
+ rubyforge.add_release(Amalgalite::GEM_SPEC.rubyforge_project, Amalgalite::GEM_SPEC.name, Amalgalite::VERSION, *files)
38
+ puts "done."
39
+ end
40
+ end
41
+
42
+ namespace :announce do
43
+ desc "Post news of #{proj_conf.name} to #{rf_conf.project} on rubyforge"
44
+ task :rubyforge do
45
+ info = Utils.announcement
46
+
47
+ puts "Subject : #{info[:subject]}"
48
+ msg = "#{info[:title]}\n\n#{info[:urls]}\n\n#{info[:release_notes]}"
49
+ puts msg
50
+
51
+ rubyforge = RubyForge.new
52
+ rubyforge.configure
53
+ rubyforge.login
54
+ rubyforge.post_news(rf_conf.project, info[:subject], msg )
55
+ puts "Posted to rubyforge"
56
+ end
57
+
58
+ end
59
+ end
data/tasks/utils.rb ADDED
@@ -0,0 +1,80 @@
1
+ require 'amalgalite/version'
2
+
3
+ #-------------------------------------------------------------------------------
4
+ # Additions to the Configuration class that are useful
5
+ #-------------------------------------------------------------------------------
6
+ class Configuration
7
+ class << self
8
+ def exist?( name )
9
+ Configuration::Table.has_key?( name )
10
+ end
11
+
12
+ def for_if_exist?( name )
13
+ if self.exist?( name ) then
14
+ self.for( name )
15
+ end
16
+ end
17
+ end
18
+ end
19
+
20
+ #-------------------------------------------------------------------------------
21
+ # some useful utilitiy methods for the tasks
22
+ #-------------------------------------------------------------------------------
23
+ module Utils
24
+ class << self
25
+
26
+ # Try to load the given _library_ using the built-in require, but do not
27
+ # raise a LoadError if unsuccessful. Returns +true+ if the _library_ was
28
+ # successfully loaded; returns +false+ otherwise.
29
+ #
30
+ def try_require( lib )
31
+ require lib
32
+ true
33
+ rescue LoadError
34
+ false
35
+ end
36
+
37
+ # partition an rdoc file into sections, and return the text of the section
38
+ # given.
39
+ def section_of(file, section_name)
40
+ File.read(file).split(/^(?==)/).each do |section|
41
+ lines = section.split("\n")
42
+ return lines[1..-1].join("\n").strip if lines.first =~ /#{section_name}/i
43
+ end
44
+ nil
45
+ end
46
+
47
+ # Get an array of all the changes in the application for a particular
48
+ # release. This is done by looking in the history file and grabbing the
49
+ # information for the most recent release. The history file is assumed to
50
+ # be in RDoc format and version release are 2nd tier sections separated by
51
+ # '== Version X.Y.Z'
52
+ #
53
+ # returns:: A hash of notes keyed by version number
54
+ #
55
+ def release_notes_from(history_file)
56
+ releases = {}
57
+ File.read(history_file).split(/^(?=== Version)/).each do |section|
58
+ lines = section.split("\n")
59
+ md = %r{Version ((\w+\.)+\w+)}.match(lines.first)
60
+ next unless md
61
+ releases[md[1]] = lines[1..-1].join("\n").strip
62
+ end
63
+ return releases
64
+ end
65
+
66
+ # return a hash of useful information for the latest release
67
+ # urls, subject, title, description and latest release notes
68
+ #
69
+ def announcement
70
+ cfg = Configuration.for("project")
71
+ {
72
+ :subject => "#{cfg.name} #{Amalgalite::VERSION} Released",
73
+ :title => "#{cfg.name} version #{Amalgalite::VERSION} has been released.",
74
+ :urls => "#{cfg.homepage}",
75
+ :description => "#{cfg.description.rstrip}",
76
+ :release_notes => Utils.release_notes_from(cfg.history)[Amalgalite::VERSION].rstrip
77
+ }
78
+ end
79
+ end
80
+ end # << self
metadata ADDED
@@ -0,0 +1,192 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: amalgalite
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.4.2
5
+ platform: x86-mswin32-60
6
+ authors:
7
+ - Jeremy Hinegardner
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2008-10-12 00:00:00 -06:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: configuration
17
+ type: :runtime
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 0.0.5
24
+ version:
25
+ - !ruby/object:Gem::Dependency
26
+ name: arrayfields
27
+ type: :runtime
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 4.5.0
34
+ version:
35
+ description: Amalgalite embeds the SQLite database engine in a ruby extension. There is no need to install SQLite separately. Look in the examples/ directory to see * general usage * blob io * schema information Also Scroll through Amalgalite::Database for a quick example, and a general overview of the API.
36
+ email: jeremy@hinegardner.org
37
+ executables:
38
+ - amalgalite-pack-into-db
39
+ extensions: []
40
+
41
+ extra_rdoc_files:
42
+ - README
43
+ - HISTORY
44
+ - LICENSE
45
+ - lib/amalgalite/blob.rb
46
+ - lib/amalgalite/boolean.rb
47
+ - lib/amalgalite/column.rb
48
+ - lib/amalgalite/core_ext/kernel/require.rb
49
+ - lib/amalgalite/database.rb
50
+ - lib/amalgalite/index.rb
51
+ - lib/amalgalite/paths.rb
52
+ - lib/amalgalite/profile_tap.rb
53
+ - lib/amalgalite/requires.rb
54
+ - lib/amalgalite/schema.rb
55
+ - lib/amalgalite/sqlite3/constants.rb
56
+ - lib/amalgalite/sqlite3/database/status.rb
57
+ - lib/amalgalite/sqlite3/status.rb
58
+ - lib/amalgalite/sqlite3/version.rb
59
+ - lib/amalgalite/sqlite3.rb
60
+ - lib/amalgalite/statement.rb
61
+ - lib/amalgalite/table.rb
62
+ - lib/amalgalite/taps/console.rb
63
+ - lib/amalgalite/taps/io.rb
64
+ - lib/amalgalite/taps.rb
65
+ - lib/amalgalite/trace_tap.rb
66
+ - lib/amalgalite/type_map.rb
67
+ - lib/amalgalite/type_maps/default_map.rb
68
+ - lib/amalgalite/type_maps/storage_map.rb
69
+ - lib/amalgalite/type_maps/text_map.rb
70
+ - lib/amalgalite/version.rb
71
+ - lib/amalgalite/view.rb
72
+ - lib/amalgalite.rb
73
+ - ext/amalgalite3.c
74
+ - ext/amalgalite3_blob.c
75
+ - ext/amalgalite3_constants.c
76
+ - ext/amalgalite3_database.c
77
+ - ext/amalgalite3_requires_bootstrap.c
78
+ - ext/amalgalite3_statement.c
79
+ files:
80
+ - bin/amalgalite-pack-into-db
81
+ - ext/amalgalite3.c
82
+ - ext/amalgalite3_blob.c
83
+ - ext/amalgalite3_constants.c
84
+ - ext/amalgalite3_database.c
85
+ - ext/amalgalite3_requires_bootstrap.c
86
+ - ext/amalgalite3_statement.c
87
+ - ext/sqlite3.c
88
+ - ext/amalgalite3.h
89
+ - ext/sqlite3.h
90
+ - ext/sqlite3_options.h
91
+ - ext/sqlite3ext.h
92
+ - ext/extconf.rb
93
+ - ext/gen_constants.rb
94
+ - ext/rbconfig-mingw.rb
95
+ - examples/a.rb
96
+ - examples/blob.rb
97
+ - examples/bootstrap.rb
98
+ - examples/gem-db.rb
99
+ - examples/requires.rb
100
+ - examples/schema-info.rb
101
+ - lib/amalgalite/blob.rb
102
+ - lib/amalgalite/boolean.rb
103
+ - lib/amalgalite/column.rb
104
+ - lib/amalgalite/core_ext/kernel/require.rb
105
+ - lib/amalgalite/database.rb
106
+ - lib/amalgalite/index.rb
107
+ - lib/amalgalite/paths.rb
108
+ - lib/amalgalite/profile_tap.rb
109
+ - lib/amalgalite/requires.rb
110
+ - lib/amalgalite/schema.rb
111
+ - lib/amalgalite/sqlite3/constants.rb
112
+ - lib/amalgalite/sqlite3/database/status.rb
113
+ - lib/amalgalite/sqlite3/status.rb
114
+ - lib/amalgalite/sqlite3/version.rb
115
+ - lib/amalgalite/sqlite3.rb
116
+ - lib/amalgalite/statement.rb
117
+ - lib/amalgalite/table.rb
118
+ - lib/amalgalite/taps/console.rb
119
+ - lib/amalgalite/taps/io.rb
120
+ - lib/amalgalite/taps.rb
121
+ - lib/amalgalite/trace_tap.rb
122
+ - lib/amalgalite/type_map.rb
123
+ - lib/amalgalite/type_maps/default_map.rb
124
+ - lib/amalgalite/type_maps/storage_map.rb
125
+ - lib/amalgalite/type_maps/text_map.rb
126
+ - lib/amalgalite/version.rb
127
+ - lib/amalgalite/view.rb
128
+ - lib/amalgalite.rb
129
+ - spec/amalgalite_spec.rb
130
+ - spec/blob_spec.rb
131
+ - spec/boolean_spec.rb
132
+ - spec/database_spec.rb
133
+ - spec/default_map_spec.rb
134
+ - spec/integeration_spec.rb
135
+ - spec/paths_spec.rb
136
+ - spec/schema_spec.rb
137
+ - spec/spec_helper.rb
138
+ - spec/sqlite3/constants_spec.rb
139
+ - spec/sqlite3/database_status_spec.rb
140
+ - spec/sqlite3/status_spec.rb
141
+ - spec/sqlite3/version_spec.rb
142
+ - spec/sqlite3_spec.rb
143
+ - spec/statement_spec.rb
144
+ - spec/storage_map_spec.rb
145
+ - spec/tap_spec.rb
146
+ - spec/text_map_spec.rb
147
+ - spec/type_map_spec.rb
148
+ - spec/version_spec.rb
149
+ - README
150
+ - HISTORY
151
+ - LICENSE
152
+ - tasks/announce.rake
153
+ - tasks/distribution.rake
154
+ - tasks/documentation.rake
155
+ - tasks/extension.rake
156
+ - tasks/rspec.rake
157
+ - tasks/rubyforge.rake
158
+ - tasks/config.rb
159
+ - tasks/utils.rb
160
+ - gemspec.rb
161
+ - lib/amalgalite3.so
162
+ has_rdoc: true
163
+ homepage: http://copiousfreetime.rubyforge.org/amalgalite/
164
+ post_install_message:
165
+ rdoc_options:
166
+ - --line-numbers
167
+ - --inline-source
168
+ - --main
169
+ - README
170
+ require_paths:
171
+ - lib
172
+ required_ruby_version: !ruby/object:Gem::Requirement
173
+ requirements:
174
+ - - ">="
175
+ - !ruby/object:Gem::Version
176
+ version: "0"
177
+ version:
178
+ required_rubygems_version: !ruby/object:Gem::Requirement
179
+ requirements:
180
+ - - ">="
181
+ - !ruby/object:Gem::Version
182
+ version: "0"
183
+ version:
184
+ requirements: []
185
+
186
+ rubyforge_project: copiousfreetime
187
+ rubygems_version: 1.2.0
188
+ signing_key:
189
+ specification_version: 2
190
+ summary: Amalgalite embeds the SQLite database engine in a ruby extension
191
+ test_files: []
192
+