icebox 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +3 -7
- data/README.rdoc +24 -9
- data/VERSION +1 -1
- data/icebox.gemspec +3 -3
- metadata +4 -4
data/Gemfile
CHANGED
@@ -1,13 +1,9 @@
|
|
1
1
|
source "http://rubygems.org"
|
2
|
-
# Add dependencies required to use your gem here.
|
3
|
-
# Example:
|
4
|
-
# gem "activesupport", ">= 2.3.5"
|
5
2
|
|
6
|
-
|
7
|
-
|
3
|
+
gem "mysql", "~> 2.8.1"
|
4
|
+
gem "sequel", "~> 3.27.0"
|
5
|
+
|
8
6
|
group :development do
|
9
|
-
gem "mysql", "~> 2.8.1"
|
10
|
-
gem "sequel", "~> 3.27.0"
|
11
7
|
gem "shoulda", ">= 0"
|
12
8
|
gem "bundler", "~> 1.0.0"
|
13
9
|
gem "jeweler", "~> 1.6.4"
|
data/README.rdoc
CHANGED
@@ -10,16 +10,31 @@ change at any time. Curious tinkerers who don't mind that should still at least
|
|
10
10
|
wait until 0.1.0, which I use to signify that others could conceivably find the
|
11
11
|
project useful.
|
12
12
|
|
13
|
-
==
|
13
|
+
== Usage
|
14
|
+
=== From the command line
|
15
|
+
icebox create_table_as <database> <table> <select_query>
|
16
|
+
icebox insert_into <database> <table> <select_query>
|
17
|
+
icebox load_data_infile <database> <table> <csv_file>
|
18
|
+
icebox [-h|-?|--help]
|
19
|
+
|
20
|
+
=== From Ruby
|
21
|
+
require 'icebox'
|
22
|
+
|
23
|
+
# Icebox can wrap around an existing Sequel database handle:
|
24
|
+
db = Sequel.mysql(database: 'test', socket: '/tmp/mysql-ib.sock')
|
25
|
+
box = Icebox.new(db)
|
26
|
+
|
27
|
+
# Alternatively, you can supply Sequel#mysql options to Icebox#new:
|
28
|
+
box = Icebox.new(database: 'test', socket: '/tmp/mysql-ib.sock')
|
29
|
+
|
30
|
+
# Either way, you can access the internal Sequel object using #db:
|
31
|
+
box.db["SELECT alpha, beta, gamma FROM my_table"].all
|
32
|
+
|
33
|
+
# From the Icebox wrapper, you can call handy functions:
|
34
|
+
box.create_table_as "output_table", "SELECT * FROM input_table"
|
35
|
+
box.insert_into "output_table", "SELECT * FROM input_table"
|
36
|
+
box.load_data_infile "output_table", "/tmp/my_example_data.csv"
|
14
37
|
|
15
|
-
# Icebox wraps around a Sequel database handle:
|
16
|
-
db = Sequel.mysql('test', socket: '/tmp/mysql-ib.sock')
|
17
|
-
box = Icebox::Icebox.new(db)
|
18
|
-
|
19
|
-
# From there, you can call handy functions:
|
20
|
-
box.create_table_as "output_table", "SELECT * FROM input_table"
|
21
|
-
|
22
|
-
(Command-line interface forthcoming.)
|
23
38
|
|
24
39
|
== Contributing to Icebox
|
25
40
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.5
|
data/icebox.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{icebox}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.5"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Riley Goodside"]
|
@@ -43,8 +43,8 @@ Gem::Specification.new do |s|
|
|
43
43
|
s.specification_version = 3
|
44
44
|
|
45
45
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
46
|
-
s.
|
47
|
-
s.
|
46
|
+
s.add_runtime_dependency(%q<mysql>, ["~> 2.8.1"])
|
47
|
+
s.add_runtime_dependency(%q<sequel>, ["~> 3.27.0"])
|
48
48
|
s.add_development_dependency(%q<shoulda>, [">= 0"])
|
49
49
|
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
50
50
|
s.add_development_dependency(%q<jeweler>, ["~> 1.6.4"])
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: icebox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.5
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Riley Goodside
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
- - ~>
|
22
22
|
- !ruby/object:Gem::Version
|
23
23
|
version: 2.8.1
|
24
|
-
type: :
|
24
|
+
type: :runtime
|
25
25
|
prerelease: false
|
26
26
|
version_requirements: *id001
|
27
27
|
- !ruby/object:Gem::Dependency
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
- - ~>
|
33
33
|
- !ruby/object:Gem::Version
|
34
34
|
version: 3.27.0
|
35
|
-
type: :
|
35
|
+
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: *id002
|
38
38
|
- !ruby/object:Gem::Dependency
|
@@ -127,7 +127,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
127
127
|
requirements:
|
128
128
|
- - ">="
|
129
129
|
- !ruby/object:Gem::Version
|
130
|
-
hash:
|
130
|
+
hash: -3223841351810768805
|
131
131
|
segments:
|
132
132
|
- 0
|
133
133
|
version: "0"
|