Commit Graph

53 Commits

Author SHA1 Message Date
Anton Lindström c4bd95e4ab Fix issues with linter and drop 1.5 CI tests
This an issue that the linter `gofmt -s` isn't found and will fail the build.
Also, the CI tests for Go 1.5 is now dropped.
2017-03-13 12:06:53 +00:00
Anton Lindström 49d6d0ff7e Merge pull request #24 from faxal/master
Ignore error when no session is found in database
2017-03-13 12:58:32 +01:00
Mohamedh Fazal 5045c06a78 ignore error when no session is found in database 2017-03-13 16:40:01 +05:00
Anton Lindström 68b36d681a Merge pull request #22 from wchrisjohnson/remove-gorp
Remove the Gorp dependency
2016-08-21 20:53:55 +02:00
Chris Johnson 5a829a35de Dont need to disable lll 2016-08-15 19:03:51 -04:00
Chris Johnson 1cfe32f2bf Fix env line 2016-08-15 19:00:25 -04:00
Chris Johnson e34d9b5628 Enable GO15VENDOREXPERIMENT environment variable
Try to fix the Travis failure of the lll linter
2016-08-15 18:56:58 -04:00
Chris Johnson df656e2dc1 Disable the lll linter due to errors 2016-08-12 13:39:06 -04:00
Chris Johnson 189f77e155 Add back exclusion for lint error 2016-08-12 13:21:25 -04:00
Chris Johnson f6cbf2c4df Clean up the way we specify the CREATE TABLE statement 2016-08-12 13:19:46 -04:00
Chris Johnson 2fc037c81e Enable docker host discovery to work across Mac, Linux 2016-08-12 13:18:15 -04:00
Chris Johnson 1eb5e3d517 Remove the Gorp dependency
Removed the underlying Gorp package as a dependency & replaced with use of the standard database/sql driver.

This removes a dependency and makes this package very lightweight and makes database interactions very transparent. Lastly, from the standpoint of unit testing where you want to mock the database layer instead of requiring a real database, you can now easily use a package like [go-SQLMock](https://github.com/DATA-DOG/go-sqlmock) to do just that.

The tests may/not pass for Golang 1.5; it appears that the problem is Travis need to install a linter.
2016-08-11 15:06:09 -04:00
Anton Lindström f5f86fd237 Merge pull request #20 from antonlindstrom/feature/testable-example
Add testable example in README
2016-07-21 22:44:55 +02:00
Anton Lindstrom be8bed0dab Add testable example in README
This adds a testable example for the README to be able to make the user
experience for new users better.
2016-07-21 20:39:33 +00:00
Anton Lindström 0ea471cce0 Merge pull request #19 from antonlindstrom/refactor/cleanup
Refactor parts of the code and add more tests
2016-07-21 22:12:35 +02:00
Anton Lindstrom d42994de5c Refactor parts of the code and add more tests
This is a refactor of parts of the code, some minor things such as adding
punctuation in the end of sentences and making the code a bit easier to read.

More tests has been added in the form of gometalinter which checks the code
health, style and spelling errors. The flaky cleanup test should also be fixed
with this commit.
2016-07-21 20:02:52 +00:00
Anton Lindström 3d07ee7804 Add breaking changes note to README
This adds a section about breaking changes and when they were introduced in the README.
2016-07-19 21:21:08 +02:00
Anton Lindström f20977c3dd Merge pull request #17 from marinbek/master
NewPGStore should not ignore errors
2016-07-19 21:16:22 +02:00
Marin Bek 22d954a682 NewPGStore should not ignore errors 2016-02-24 13:29:35 +01:00
Anton Lindström 646ee39852 Merge pull request #16 from caarlos0/10
Improved docs for #10
2015-09-18 21:34:32 +02:00
Carlos Alexandro Becker c10f375a5e Improved docs for #10 2015-09-17 19:49:25 -03:00
Anton Lindström 31a178b4b1 Merge pull request #14 from antonlindstrom/bugfix/column-names-underscores
Add underscores when querying column names
2015-09-15 16:58:32 +02:00
Anton Lindström 44eb1e8a22 Add underscores when querying column names
This commit aims to fix tests which fails on not finding columns such as
`expireson`. Adding the underscore that are used when creating the table
should fix this.

An issue with this is that it must have worked previously without underscores.
In that case this might break existing usage.
2015-09-15 11:11:49 +00:00
Anton Lindström 0f6deb08b7 Merge pull request #12 from antonlindstrom/feature/travisci
Update tests to use TravisCI
2015-09-15 13:10:45 +02:00
Anton Lindström e89b6e26f7 Merge pull request #15 from brunoqc/patch-1
Syntax highlighting in README.md
2015-09-14 07:33:57 +02:00
Bruno Bigras ff2aec5019 Syntax highlighting in README.md 2015-09-13 15:14:50 -04:00
Anton Lindström 49077d4e04 Merge pull request #13 from caarlos0/10
Allowing the use of an existing database/sql pool
2015-09-09 14:14:02 +02:00
Carlos Alexandro Becker b96a0c781e Allowing the use of an existing database/sql pool 2015-09-09 09:07:11 -03:00
Anton Lindström 269ca2e7e5 Update tests to use TravisCI
This will remove the current .drone.yml which isn't used anymore, update the
Makefile target and move tests to using `t.Skip` instead of `t.Fatal` if no
database exists during tests. This is so it's possible to develop new tests
that may not require a database.
2015-09-08 14:21:07 +00:00
Anton Lindström 96c90e2150 Merge pull request #9 from caarlos0/vet
added missing docs, fixed warnings and 80c
2015-09-08 15:25:15 +02:00
Carlos Alexandro Becker 7c98dee240 added missing docs and fixed vet warns 2015-09-08 10:21:43 -03:00
Anton Lindström 4cff112644 Merge pull request #8 from elithrar/max-age-fix
Provide method to set MaxAge on underlying cookies.
2015-08-11 15:41:50 +02:00
Matt Silverlock ab9eca674d Provide method to set MaxAge on underlying cookies.
- Addresses https://github.com/gorilla/sessions/issues/48
2015-08-11 20:13:41 +08:00
Anton Lindström 6dafa07cd9 Merge pull request #6 from imjoshholloway/master 2015-07-15 16:26:42 +02:00
Josh Holloway ad7b0ee0eb Added MaxLength support port of: https://github.com/boj/redistore/pull/5 2015-07-15 15:08:34 +01:00
Anton Lindström 4c9cf6b101 Merge pull request #7 from elithrar/cleanup-old-ticker
Feature: Expired sessions can be deleted via a background goroutine.
2015-07-15 11:14:07 +02:00
Matt Silverlock 1ad21d029c feature: expired sessions can be deleted via a background goroutine.
- Call defer store.StopCleanup(store.Cleanup(time.Minute * 5)) after store creation.
- Does not break the existing API (optional, but recommended)
- Based on https://github.com/yosssi/boltstore/reaper
- Deletes expired sessions (where expireson > now())
- Includes tests
2015-07-11 11:56:04 +08:00
Anton Lindström 794392bd2e Merge pull request #4 from jcbwlkr/copy_options
Make a copy of Options for each new session
2015-05-07 14:29:52 +02:00
Jacob Walker cbe9f2afe4 Make a copy of Options for each new session 2015-05-06 11:10:11 -05:00
Anton Lindström 951665cd6d Merge pull request #3 from brunoqc/patch-1
Fix godoc link in README
2014-10-12 18:14:57 +02:00
Bruno Bigras f051d4e5e4 Fix godoc link in README 2014-10-11 17:17:54 -04:00
Anton Lindström e4236d22af fix drone testing
this commit fixes the drone testing with a postgres database
2014-06-10 15:20:15 +00:00
Anton Lindström 56defcdd65 fix ssl-mode for drone test 2014-06-09 16:56:27 +00:00
Anton Lindström 3ead5a545f format code 2014-06-09 16:54:10 +00:00
Anton Lindström 568eb0c1c5 fail test if db is nil 2014-06-09 16:53:59 +00:00
Anton Lindström 69833dab93 enable postgres service for drone testing 2014-06-09 16:44:35 +00:00
Anton Lindström b205a0ee64 remove repeated assignment in Save(), fixes #2 2014-06-09 16:19:20 +00:00
Anton Lindström 5c8fa0fe70 remove unused fmt code 2014-05-20 06:09:24 +00:00
Anton Lindström c44d6679ce add ci .drone.yml file 2014-05-20 06:03:26 +00:00
Anton Lindström 31c2148d2b add step build and test to Makefile 2014-05-20 06:02:59 +00:00