Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Big cleanup to gem development process.

Remove jeweler, integrate RVM and Bundler.
  • Loading branch information...
commit 81c03754516f195cdac234d875e3fcefc8d68a1e 1 parent a9515ed
@mperham mperham authored
View
1  .rvmrc
@@ -0,0 +1 @@
+rvm use 1.9.2@mysql2 --create
View
9 Gemfile
@@ -0,0 +1,9 @@
+source :rubygems
+
+gemspec
+
+group :test do
+ gem 'eventmachine'
+ gem 'rake-compiler', "~> 0.7.1"
+ gem 'rspec'
+end
View
8 README.rdoc
@@ -232,6 +232,14 @@ then iterating over every row using an #each like method yielding a block:
Mysql
7.500000 0.210000 7.710000 ( 8.065871)
+== Development
+
+To run the tests, you can use RVM and Bundler to create a pristine environment for mysql2 development/hacking.
+Use 'bundle install' to install the necessary development and testing gems:
+
+ bundle install
+ rake
+
== Special Thanks
* Eric Wong - for the contribution (and the informative explanations) of some thread-safety, non-blocking I/O and cleanup patches. You rock dude
View
2  lib/mysql2.rb
@@ -3,6 +3,7 @@
require 'bigdecimal'
require 'rational' unless RUBY_VERSION >= '1.9.2'
+require 'mysql2/version'
require 'mysql2/error'
require 'mysql2/mysql2'
require 'mysql2/client'
@@ -12,5 +13,4 @@
#
# A modern, simple and very fast Mysql library for Ruby - binding to libmysql
module Mysql2
- VERSION = "0.2.6"
end
View
3  lib/mysql2/version.rb
@@ -0,0 +1,3 @@
+module Mysql2
+ VERSION = "0.2.6"
+end
View
76 mysql2.gemspec
@@ -2,89 +2,25 @@
# DO NOT EDIT THIS FILE DIRECTLY
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
# -*- encoding: utf-8 -*-
+$LOAD_PATH << File.dirname(__FILE__) + '/lib'
+require 'mysql2/version'
Gem::Specification.new do |s|
s.name = %q{mysql2}
- s.version = "0.2.6"
-
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
+ s.version = Mysql2::VERSION
s.authors = ["Brian Lopez"]
- s.date = %q{2010-10-19}
+ s.date = Time.now.utc.strftime("%Y-%m-%d")
s.email = %q{seniorlopez@gmail.com}
s.extensions = ["ext/mysql2/extconf.rb"]
s.extra_rdoc_files = [
"README.rdoc"
]
- s.files = [
- ".gitignore",
- ".rspec",
- "CHANGELOG.md",
- "MIT-LICENSE",
- "README.rdoc",
- "Rakefile",
- "VERSION",
- "benchmark/active_record.rb",
- "benchmark/allocations.rb",
- "benchmark/escape.rb",
- "benchmark/query_with_mysql_casting.rb",
- "benchmark/query_without_mysql_casting.rb",
- "benchmark/sequel.rb",
- "benchmark/setup_db.rb",
- "examples/eventmachine.rb",
- "examples/threaded.rb",
- "ext/mysql2/client.c",
- "ext/mysql2/client.h",
- "ext/mysql2/extconf.rb",
- "ext/mysql2/mysql2_ext.c",
- "ext/mysql2/mysql2_ext.h",
- "ext/mysql2/result.c",
- "ext/mysql2/result.h",
- "lib/active_record/connection_adapters/em_mysql2_adapter.rb",
- "lib/active_record/connection_adapters/mysql2_adapter.rb",
- "lib/active_record/fiber_patches.rb",
- "lib/arel/engines/sql/compilers/mysql2_compiler.rb",
- "lib/mysql2.rb",
- "lib/mysql2/client.rb",
- "lib/mysql2/em.rb",
- "lib/mysql2/em_fiber.rb",
- "lib/mysql2/error.rb",
- "lib/mysql2/result.rb",
- "mysql2.gemspec",
- "spec/em/em_spec.rb",
- "spec/mysql2/client_spec.rb",
- "spec/mysql2/error_spec.rb",
- "spec/mysql2/result_spec.rb",
- "spec/rcov.opts",
- "spec/spec_helper.rb",
- "tasks/benchmarks.rake",
- "tasks/compile.rake",
- "tasks/jeweler.rake",
- "tasks/rspec.rake",
- "tasks/vendor_mysql.rake"
- ]
+ s.files = `git ls-files`.split("\n")
s.homepage = %q{http://github.com/brianmario/mysql2}
s.rdoc_options = ["--charset=UTF-8"]
s.require_paths = ["lib", "ext"]
s.rubygems_version = %q{1.3.7}
s.summary = %q{A simple, fast Mysql library for Ruby, binding to libmysql}
- s.test_files = [
- "spec/em/em_spec.rb",
- "spec/mysql2/client_spec.rb",
- "spec/mysql2/error_spec.rb",
- "spec/mysql2/result_spec.rb",
- "spec/spec_helper.rb",
- "examples/eventmachine.rb",
- "examples/threaded.rb"
- ]
-
- if s.respond_to? :specification_version then
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
- s.specification_version = 3
-
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
- else
- end
- else
- end
+ s.test_files = `git ls-files spec examples`.split("\n")
end
View
1  spec/spec_helper.rb
@@ -1,6 +1,5 @@
# encoding: UTF-8
-$LOAD_PATH.unshift File.expand_path("../../lib", __FILE__)
require 'rspec'
require 'mysql2'
require 'timeout'
View
1  tasks/compile.rake
@@ -1,4 +1,3 @@
-gem 'rake-compiler', '~> 0.7.1'
require "rake/extensiontask"
MYSQL_VERSION = "5.1.51"
View
17 tasks/jeweler.rake
@@ -1,17 +0,0 @@
-begin
- require 'jeweler'
- JEWELER = Jeweler::Tasks.new do |gem|
- gem.name = "mysql2"
- gem.summary = "A simple, fast Mysql library for Ruby, binding to libmysql"
- gem.email = "seniorlopez@gmail.com"
- gem.homepage = "http://github.com/brianmario/mysql2"
- gem.authors = ["Brian Lopez"]
- gem.require_paths = ["lib", "ext"]
- gem.extra_rdoc_files = `git ls-files *.rdoc`.split("\n")
- gem.files = `git ls-files`.split("\n")
- gem.extensions = ["ext/mysql2/extconf.rb"]
- gem.files.include %w(lib/jeweler/templates/.document lib/jeweler/templates/.gitignore)
- end
-rescue LoadError
- puts "jeweler, or one of its dependencies, is not available. Install it with: sudo gem install jeweler"
-end
Please sign in to comment.
Something went wrong with that request. Please try again.