Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

elasticsearch_env_config

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

elasticsearch_env_config

  • 0.1.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

ElasticsearchEnvConfig

Provides redis client configuration based on environment variables:

  • ELASTICSEARCH_HOSTS - comma-separated list of standard elasticsearch hosts understood by the elasticsearch-transport gem.
  • ELASTICSEARCH_INDEX - index to log into, sans date pattern (required)
  • ELASTICSEARCH_USER - username for authenticating against all hosts (required if ELASTICSEARCH_PASSWORD is given)
  • ELASTICSEARCH_PASSWORD - password for authenticating against all hosts (required if ELASTICSEARCH_USER is given)
  • ELASTICSEARCH_DATE_PATTERN - time format used to generate the full index name
  • ELASTICSEARCH_HOST - name of this host to appear in log messages
  • ELASTICSEARCH_APPLICATION - name of this application to appear in log messages

Installation

Add this line to your application's Gemfile:

gem 'elasticsearch_env_config'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install elasticsearch_env_config

Usage

require "redis"
require "elasticsearch"
require "semantic_logger"

SemanticLogger.add_appender(appender: :elasticsearch, **(ElasticSearchEnvConfig.new.to_h))

Development

After checking out the repo, run docker-compose build && docker-compose run test to run the tests.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

For development without docker-compose, you can skip examples that connect to elasticsearch with:

ELASTICSEARCH_HOSTS=fake bundle exec rspec -fd --tag ~connect spec

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/webnifico/elasticsearch_env_config.

License

The gem is available as open source under the terms of the MIT License.

FAQs

Package last updated on 12 May 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc