Skip to content

Commit

Permalink
Upgrading images to be used with CircleCI
Browse files Browse the repository at this point in the history
 * Ignore timeout status of nc command
  • Loading branch information
Konstantin Gredeskoul committed Apr 10, 2019
1 parent e27487b commit b2fbf06
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ jobs:
build:
docker:
# specify the version you desire here
- image: circleci/ruby:2.4.1-node-browsers
- image: circleci/ruby:2.6.2-node-browsers-legacy
environment:
TEST_DRB: false

- image: memcached:1.4-alpine
- image: memcached:latest

working_directory: ~/repo

Expand Down Expand Up @@ -50,6 +50,6 @@ jobs:
if [[ -p /dev/stdout ]]; then echo "this is a PIPE!"; else echo "this is NOT a pipe"; fi
if [[ ! -t 1 && ! -p /dev/stdout ]]; then echo "this is a REDIRECT!"; else echo "this is NOT a redirect"; fi
echo "Flushing MemCached...."
echo flush_all | nc -G 4 127.0.0.1 11211
echo flush_all | timeout -k 2 -s HUP 10 nc -G 4 127.0.0.1 11211 || true
timeout -k 2 -s HUP 30 bundle exec rspec --order random --backtrace
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,12 @@ The above example will take an unencrypted key passed in `$mykey`, ask for a pas

Nobody likes to re-type passwords over and over again, and for this reason *Sym* supports password caching via a locally running `memcached` instance (using the default port 11211, if available).

Specifics of configuring both Cache Providers is left to the `Configuration` class, an example of which is shown below in the Ruby API section.
*Multiple Providers*

Cache is written using the Provider design pattern (a.k.a. plugin architecture), and so it's easy to add a new Cache Provider that uses a custom backend. The supplied production-ready provider only works with a `memcached` daemon running (ideally) locally.


For customization of memcached location, we refer you to the `Configuration` class for an example of how to configure MemCached provider — shown below in the Ruby API section.

In order to control password caching, the following flags are available:

Expand Down
2 changes: 1 addition & 1 deletion lib/sym/constants.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ module Log
end

ENV_ARGS_VARIABLE_NAME = 'SYM_ARGS'.freeze
SYM_KEY_FILE = "#{ENV['HOME']}/.sym.key"
SYM_KEY_FILE = "#{Dir.home}/.sym.key".freeze

end
end

0 comments on commit b2fbf06

Please sign in to comment.