mysql2xxxx 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -2,3 +2,4 @@
2
2
  .bundle
3
3
  Gemfile.lock
4
4
  pkg/*
5
+ rdoc/*
data/README.rdoc ADDED
@@ -0,0 +1,31 @@
1
+ =mysql2xxxx
2
+
3
+ ==Binaries
4
+
5
+ mysql2csv --user=dbuser --password=dbpassword --database=dbname --execute="select * from automobile_makes"
6
+ mysql2json --user=dbuser --password=dbpassword --database=dbname --execute="select * from automobile_makes"
7
+ mysql2xml --user=dbuser --password=dbpassword --database=dbname --execute="select * from automobile_makes"
8
+
9
+ To see all options
10
+
11
+ mysql2csv --help
12
+
13
+ ==Ruby
14
+
15
+ a = Mysql2xxxx::JSON.new :user => 'dbuser', :password => 'dbpassword', :database => 'dbname', :execute => "select * from automobile_makes"
16
+ a.to_stdout # write it directly to $stdout
17
+ puts a.to_s # get a string
18
+ a.to_path('/tmp/outfile.json') # write it to a file at this path
19
+ a.to_file(File.open('/tmp/outfile.json', 'w')) # write it to a file handle
20
+
21
+ Note also that if you're running it inside a Rails application, it will default to the ActiveRecord connection config.
22
+
23
+ a = Mysql2xxxx::JSON.new :execute => "select * from automobile_makes" # no need to specify user, etc. because it's taken from ActiveRecord
24
+
25
+ ==Well-formedness
26
+
27
+ * CSV output depends on FasterCSV <tt>to_csv</tt>
28
+ * JSON output depends on ActiveSupport <tt>to_json</tt>
29
+ * XML output is written manually, but looks like the output of <tt>mysql [hyphen][hyphen]xml</tt>
30
+
31
+ Copyright 2011 Seamus Abshere
data/Rakefile CHANGED
@@ -8,3 +8,16 @@ Rake::TestTask.new(:test) do |test|
8
8
  test.pattern = 'test/**/test_*.rb'
9
9
  test.verbose = true
10
10
  end
11
+
12
+ begin
13
+ require 'rake/rdoctask'
14
+ Rake::RDocTask.new do |rdoc|
15
+ rdoc.rdoc_dir = 'rdoc'
16
+ rdoc.title = 'remote_table'
17
+ rdoc.options << '--line-numbers' << '--inline-source'
18
+ rdoc.rdoc_files.include('README*')
19
+ rdoc.rdoc_files.include('lib/**/*.rb')
20
+ end
21
+ rescue LoadError
22
+ puts "Rdoc is not available"
23
+ end
@@ -1,3 +1,3 @@
1
1
  module Mysql2xxxx
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/mysql2xxxx.gemspec CHANGED
@@ -9,8 +9,8 @@ Gem::Specification.new do |s|
9
9
  s.authors = ["Seamus Abshere"]
10
10
  s.email = ["seamus@abshere.net"]
11
11
  s.homepage = ""
12
- s.summary = %q{Gives you binaries like mysql2csv, mysql2json, and mysql2xml, and Ruby classes to match.}
13
- s.description = %q{In a memory-sensitive way (but not fast), dump mysql tables to JSON, CSV, XML.}
12
+ s.summary = %q{In a memory-sensitive way (but not fast), dump mysql tables to JSON, CSV, XML.}
13
+ s.description = %q{Gives you binaries like mysql2csv, mysql2json, and mysql2xml, and Ruby classes to match.}
14
14
 
15
15
  s.rubyforge_project = "mysql2xxxx"
16
16
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mysql2xxxx
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Seamus Abshere
@@ -132,7 +132,7 @@ dependencies:
132
132
  version: "0"
133
133
  type: :development
134
134
  version_requirements: *id008
135
- description: In a memory-sensitive way (but not fast), dump mysql tables to JSON, CSV, XML.
135
+ description: Gives you binaries like mysql2csv, mysql2json, and mysql2xml, and Ruby classes to match.
136
136
  email:
137
137
  - seamus@abshere.net
138
138
  executables:
@@ -146,6 +146,7 @@ extra_rdoc_files: []
146
146
  files:
147
147
  - .gitignore
148
148
  - Gemfile
149
+ - README.rdoc
149
150
  - Rakefile
150
151
  - bin/mysql2csv
151
152
  - bin/mysql2json
@@ -201,7 +202,7 @@ rubyforge_project: mysql2xxxx
201
202
  rubygems_version: 1.3.7
202
203
  signing_key:
203
204
  specification_version: 3
204
- summary: Gives you binaries like mysql2csv, mysql2json, and mysql2xml, and Ruby classes to match.
205
+ summary: In a memory-sensitive way (but not fast), dump mysql tables to JSON, CSV, XML.
205
206
  test_files:
206
207
  - test/fixtures/automobile_make_years.sql
207
208
  - test/fixtures/automobile_makes.sql