forked from smcpherson/odbc_adapter
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from doximity/rk-pull-fixes-from-springbuk-fork
Pull lots of fixes and improvements from Springbuk's fork
- Loading branch information
Showing
32 changed files
with
896 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FROM ruby:2.4.0 | ||
MAINTAINER [email protected] | ||
|
||
ENV DEBIAN_FRONTEND noninteractive | ||
RUN echo "deb http://deb.debian.org/debian/ jessie main" > /etc/apt/sources.list | ||
RUN echo "deb-src http://deb.debian.org/debian/ jessie main" >> /etc/apt/sources.list | ||
RUN echo "deb http://security.debian.org/ jessie/updates main" >> /etc/apt/sources.list | ||
RUN echo "deb-src http://security.debian.org/ jessie/updates main" >> /etc/apt/sources.list | ||
RUN apt-get update && apt-get -y install libnss3-tools unixodbc-dev libmyodbc mysql-client odbc-postgresql postgresql | ||
|
||
WORKDIR /workspace | ||
CMD docker/docker-entrypoint.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
source 'https://rubygems.org' | ||
|
||
gemspec | ||
|
||
gem 'activerecord', '5.0.1' | ||
gem 'pry', '~> 0.11.1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
set -e -x | ||
|
||
# Installing mysql at startup due to file permissions: https://github.com/geerlingguy/drupal-vm/issues/1497 | ||
apt-get install -y mysql-server | ||
bundle install --local | ||
service mysql start | ||
|
||
# Allows passwordless auth from command line and odbc | ||
sed -i "s/local all postgres peer/local all postgres trust/" /etc/postgresql/9.4/main/pg_hba.conf | ||
sed -i "s/host all all 127.0.0.1\/32 md5/host all all 127.0.0.1\/32 trust/" /etc/postgresql/9.4/main/pg_hba.conf | ||
service postgresql start | ||
|
||
odbcinst -i -d -f /usr/share/libmyodbc/odbcinst.ini | ||
mysql -e "DROP DATABASE IF EXISTS odbc_test; CREATE DATABASE IF NOT EXISTS odbc_test;" -uroot | ||
mysql -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost';" -uroot | ||
|
||
odbcinst -i -d -f /usr/share/psqlodbc/odbcinst.ini.template | ||
psql -c "CREATE DATABASE odbc_test;" -U postgres | ||
|
||
/bin/bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
|
||
echo "Testing mysql" && CONN_STR='DRIVER=MySQL;SERVER=localhost;DATABASE=odbc_test;USER=root;PASSWORD=;' bundle exec rake && \ | ||
echo "Testing postgres" && CONN_STR='DRIVER={PostgreSQL ANSI};SERVER=localhost;PORT=5432;DATABASE=odbc_test;UID=postgres;' bundle exec rake && \ | ||
echo "Testing postgres utf8" && CONN_STR='DRIVER={PostgreSQL UNICODE};SERVER=localhost;PORT=5432;DATABASE=odbc_test;UID=postgres;ENCODING=utf8' bundle exec rake |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.