Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENV-based login/pass/encryption set #1643

Closed
wants to merge 1 commit into from
Closed

ENV-based login/pass/encryption set #1643

wants to merge 1 commit into from

Conversation

EugeneIstomin
Copy link

This pull introduces/changes:

  • Add possibility to set login, password, encryption on/off for using migration in non-Rails projects

Add possibility to set login, password, encryption for using migration in non-Rails projects
@@ -7,9 +7,12 @@ if !defined?(Rails) && !Rake::Task.task_defined?('environment')
task :environment do
require 'ostruct'
neo4j_url = ENV['NEO4J_URL'] || 'bolt://localhost:7687'
neo4j_user = ENV['NEO4J_USER'] || 'neo4j'
neo4j_password = ENV['NEO4J_PASSWORD'] || 'neo4j'
neo4j_encryption = ENV['NEO4J_ENCRYPTION'] == 'true' ? true : false
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This conditional expression can just be replaced by ENV['NEO4J_ENCRYPTION'] == 'true'.

@codeclimate
Copy link

codeclimate bot commented Jan 11, 2021

Code Climate has analyzed commit aca9026 and detected 1 issue on this pull request.

Here's the issue category breakdown:

Category Count
Style 1

View more on Code Climate.

@klobuczek
Copy link
Member

Thanks @EugeneIstomin . Have you considered extracting this https://github.com/neo4jrb/activegraph/blob/master/lib/active_graph/railtie.rb#L82-L85 out of railtie.rb? There are many configuration options. Creating an environment variable each time someone needs one of those options doesn't seem like a sustainable solution. It would be great to solve the problem for any possible configuration.

@EugeneIstomin EugeneIstomin closed this by deleting the head repository Apr 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants