Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* https://github.com/bookshelf/bookshelf: (43 commits)
  Fixed random test failure in test/integration/model.js
  Update .npmignore to exclude non-prod files
  Fix bookshelf#1662: move appropriate files into .github directory
  chore(package): update babel-eslint to version 8.0.1
  Add js formatting to "How do I debug?" at README
  Revert "Update dependencies to enable Greenkeeper 🌴 (bookshelf#1616)"
  Update dependencies to enable Greenkeeper 🌴 (bookshelf#1616)
  small registry plugin refactoring for easier read
  Build Project before testing in "npm test" script
  Update README.md (bookshelf#1537)
  New implementation for the setting of timestamps columns values
  Update CONTRIBUTING.md due to changes in MySQL 5.7 (bookshelf#1610)
  use OracleDB tests only when oracledb is installed (bookshelf#1609)
  added morphValues for morphTo relation (bookshelf#1326)
  Rename ISSUE-TEMPLATE.md to ISSUE_TEMPLATE.md
  Rename PR-TEMPLATE.md to PULL_REQUEST_TEMPLATE.md
  Revision to the contributing guidelines (bookshelf#1601)
  npm install knex@0.13 in the README (bookshelf#1604)
  Link to the bookshelf#1600 discussion in README
  Allow passing of time via options (bookshelf#1592)
  ...
  • Loading branch information
lyfeyaj committed Nov 6, 2017
2 parents cec4a8b + 9a9620e commit ade939f
Show file tree
Hide file tree
Showing 36 changed files with 2,333 additions and 361 deletions.
24 changes: 18 additions & 6 deletions CONTRIBUTING.md → .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
## How to contribute to Bookshelf.js

* Before sending a pull request for a feature or bug fix, be sure to have
[tests](https://github.com/tgriesser/bookshelf/tree/master/test).
[tests](https://github.com/bookshelf/bookshelf/tree/master/test).

* Use the same coding style as the rest of the
[codebase](https://github.com/tgriesser/bookshelf/blob/master/src/bookshelf.js).
[codebase](https://github.com/bookshelf/bookshelf/blob/master/src/bookshelf.js).

* Make changes in the /src directory, running "npm run dev" which will kick off
* Use the [issue](https://github.com/bookshelf/bookshelf/blob/master/ISSUE-TEMPLATE.js) or [pull request](https://github.com/bookshelf/bookshelf/blob/master/PR-TEMPLATE.js) templates when creating your entry, this will help clarify the scope of your proposal or the subject of your issue.

* Make changes in the /src directory, running "npm run dev" which will kick off
transpilation from ES6 in the background.

* All pull requests should be made to the `master` branch.

### Development Environment Setup

You'll need to have `git` installed obviously. Begin by forking the [main
repository](https://github.com/tgriesser/bookshelf) and then getting the code from your forked copy:
repository](https://github.com/bookshelf/bookshelf) and then getting the code from your forked copy:

```sh
$ git clone git@github.com:yourusername/bookshelf.git
Expand Down Expand Up @@ -74,17 +76,27 @@ and enter the password when asked. Then just set an empty password for root like

```SQL
USE mysql;
UPDATE user SET password = "" WHERE User = "root";
UPDATE user SET authentication_string = "" WHERE User = "root";
FLUSH PRIVILEGES;
QUIT;
```
If you see an error like:

```sh
ERROR 1054 (42S22): Unknown column 'authentication_string' in 'field list'
```
It's because you are using an MySQL version older than 5.7. The `authentication_string` column has replaced the `password` column
in this newer version. If you are using an older version just use `password` instead of `authentication_string` in the example above.

Note that you'll probably need to set the password to `NULL` instead of an empty string in MySQL versions 5.5 and older.
The above example should work with versions 5.6 and newer.
The above example should work with versions 5.7 and newer.

If you have forgotten the root password you'll need to take some extra steps to reset it. Take a look at
[this Stack Overflow answer](http://stackoverflow.com/a/7825212/504930) for further details.

If you still can't access the MySQL server without a root password after all this trouble then
[this answer on Ask Ubuntu](https://askubuntu.com/a/784347/18193) has another alternative approach to the problem.

#### PostgreSQL

You can install [PostgreSQL](http://www.postgresql.org/) easily on most linux distros by using their package manager.
Expand Down
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Issue name

* Related Issues : _#IssueNumber if necessary_

## Introduction

A short description of what the features or the bugs are. Try to keep it simple and within a
single-paragraph.

## Issue Description

Describe the bug found or the feature that you are proposing.

If it's completely new feature explain why this new functionality is necessary, and propose some advice for the development (or just open a Pull Request if you have already started to work on the feature on your own).

## Steps to reproduce issue

If the bug is complex to describe, show how developers can reproduce it (using code snippet, database data, etc...) and describe its drawbacks.

## Expected behaviour

Explain what is the expected behaviour of a program while using the code related to this issue.

## Actual behaviour

Explain what is the actual behaviour of a program and what are the actual errors while running the affected code.
32 changes: 32 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# PR name

* Related Issues : _#IssueNumber if necessary_
* Previous PRs: _#PRNumber if this PR is a follow-up_

## Introduction

A short description of what the feature or the bug-fix is. Try to keep it to a
single-paragraph "elevator pitch" so the reader understands what
problem this proposal is addressing.

## Motivation

Describe the problems that this proposal seeks to address. If the
problem is that some common pattern is currently hard to express, show
how one can currently get a similar effect and describe its
drawbacks. If it's completely new functionality that cannot be
emulated, motivate why this new functionality is necessary.

## Proposed solution

Describe your solution to the problem. Provide examples and describe
how they work. Show why your solution is better than current
workarounds: is it cleaner, safer, or more efficient?

## Current PR Issues

If present describe some issues in the Pull Request, in order to help others in the full development of the PR.

## Alternatives considered

Describe alternative approaches to addressing the same problem, and why you chose this approach instead.
4 changes: 4 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,9 @@ index.html
.eslintrc
.istanbul.yml
.travis.yml
.npmignore
.babelrc
CNAME
CONTRIBUTING.md
src
scripts
18 changes: 16 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,37 @@
# .travis.yml
language: node_js
dist: trusty
sudo: required

services:
- postgresql
- mysql

sudo: false

node_js:
- '4'
- '6'
- '7'

before_install:
- wget https://raw.githubusercontent.com/Vincit/travis-oracledb-xe/master/accept_the_license_agreement_for_oracledb_xe_11g_and_install.sh
- bash ./accept_the_license_agreement_for_oracledb_xe_11g_and_install.sh
- npm install oracledb

before_script:
- psql -c 'create database bookshelf_test;' -U postgres
- mysql -e 'create database bookshelf_test;'

notifications:
email: false

env:
- CXX=g++-4.8 KNEX_TEST_TIMEOUT=60000 ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe ORACLE_SID=XE OCI_LIB_DIR=/u01/app/oracle/product/11.2.0/xe/lib LD_LIBRARY_PATH=/u01/app/oracle/product/11.2.0/xe/lib

matrix:
fast_finish: true

addons:
apt:
packages:
- g++-4.8
- gcc-4.8
Loading

0 comments on commit ade939f

Please sign in to comment.