%define oname arel Name: ruby-%{oname} Version: 3.0.2 Release: %mkrel 4 Summary: Ruby SQL AST manager Group: Development/Ruby License: MIT URL: http://www.rubyonrails.org Source0: http://rubygems.org/downloads/%{oname}-%{version}.gem BuildRequires: rubygems BuildRequires: rubygem(rake) BuildRequires: locales-en BuildArch: noarch %description Arel is a SQL AST manager for Ruby. It 1. Simplifies the generation of complex SQL queries 2. Adapts to various RDBMS systems It is intended to be a framework framework; that is, you can build your own ORM with it, focusing on innovative object and collection modeling as opposed to database compatibility and query generation. #------------------------------------------------------------------------------- %package doc Summary: Documentation for %{name} Group: Development/Ruby Requires: %{name} = %{version}-%{release} %description doc Documents, Rdoc & RI documentation for %{name}. #------------------------------------------------------------------------------- %prep %setup -q tar xmf data.tar.gz %build %gem_build %install %gem_install find "$RPM_BUILD_ROOT" -name '*%*' -type f | perl -lne 'my $s = $_; $s =~ tr/%/_/; rename ($_, $s);' %files %dir %{ruby_gemdir}/gems/%{oname}-%{version}/ %{ruby_gemdir}/gems/%{oname}-%{version}/lib %{ruby_gemdir}/specifications/%{oname}-%{version}.gemspec %files doc %doc %{ruby_gemdir}/doc/%{oname}-%{version} %doc %{ruby_gemdir}/gems/%{oname}-%{version}/History.txt %doc %{ruby_gemdir}/gems/%{oname}-%{version}/Manifest.txt %doc %{ruby_gemdir}/gems/%{oname}-%{version}/MIT-LICENSE.txt %doc %{ruby_gemdir}/gems/%{oname}-%{version}/README.markdown #check # rake test_sqlite3 # # # start an unprivileged instance of mysql # mysql_install_db --datadir=$PWD/var/lib/mysql/ --user=$USER # /usr/sbin/mysqld --datadir=$PWD/var/lib/mysql \ # --socket $PWD/var/lib/mysql.sock \ # --pid-file $PWD/var/lib/mysqld.pid & # export MYSQL_SOCK=$PWD/var/lib/mysql.sock # # FIXME: add a delay so that mysql is fully started when running other commands # sleep 10 # # create the test databases # echo "create database activerecord_unittest character set utf8;" | mysql --socket $PWD/var/lib/mysql.sock # echo "create database activerecord_unittest2;" | mysql --socket $PWD/var/lib/mysql.sock # # create the rails user # echo "create user 'rails'@'localhost'; # grant all privileges on activerecord_unittest.* to 'rails'@'localhost'; # grant all privileges on activerecord_unittest2.* to 'rails'@'localhost';" | mysql --socket $PWD/var/lib/mysql.sock # # fix socket for the test # sed -i '/:username.*/a \ # :socket => "var/lib/mysql.sock",' test/connections/native_mysql/connection.rb # rake test_mysql # kill `cat $PWD/var/lib/mysqld.pid` # start postgresql #mkdir -p $PWD/var/log/postgres/ #initdb -D $PWD/var/lib/pgsql/data --locale=UTF-8 #pg_ctl start -l $PWD/var/log/postgres/postgresql \ # -D $PWD/var/lib/pgsql/data # FIXME: add a delay so that pgsql is fully started when running other commands #sleep 20 #create the test database #createdb -E UTF-8 activerecord_unittest #createdb -E UTF-8 activerecord_unittest2 #rake test_postgresql #pg_ctl stop -D $PWD/var/lib/pgsql/data -m "fast" %clean rm -rf %{buildroot} %changelog * Fri Feb 08 2013 umeabot <umeabot> 3.0.2-4.mga3 + Revision: 395716 - Rebuild for CVE-2013-0256 * Mon Jan 14 2013 umeabot <umeabot> 3.0.2-3.mga3 + Revision: 380653 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Thu Nov 01 2012 fwang <fwang> 3.0.2-2.mga3 + Revision: 312267 - rebuild for new ruby * Thu Jun 07 2012 shlomif <shlomif> 3.0.2-1.mga3 + Revision: 257069 - Rename so we won't have filenames with percentages. - imported package ruby-arel