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

1330 fix #1331

Merged
merged 5 commits into from Feb 4, 2017
Merged

1330 fix #1331

merged 5 commits into from Feb 4, 2017

Conversation

cheerfulstoic
Copy link
Contributor

Fixes #1330

This pull introduces/changes:

  • Migration rake tasks are always loaded since they are needed for anybody using the neo4j gem (not just rails apps)
  • Removed dependency on the Railtie for loading an environment for non-Rails apps (I'd still like this to be able to look for the neo4j.yml, but this should work for now)

Pings:
@subvertallchris
@ProGM

@codecov-io
Copy link

codecov-io commented Dec 19, 2016

Codecov Report

Merging #1331 into master will increase coverage by -0.47%.

@@            Coverage Diff             @@
##           master    #1331      +/-   ##
==========================================
- Coverage   97.06%   96.59%   -0.47%     
==========================================
  Files         203      205       +2     
  Lines       12337    12704     +367     
==========================================
+ Hits        11975    12272     +297     
- Misses        362      432      +70
Impacted Files Coverage Δ
lib/neo4j/railtie.rb 85.41% <ø> (+3.59%)
lib/neo4j/tasks/migration.rake 33.73% <ø> (ø)
lib/neo4j.rb 97.93% <100%> (+0.02%)
spec/e2e/railtie_spec.rb 96.96% <ø> (-3.04%)
spec/e2e/active_model_spec.rb 97.1% <ø> (-0.62%)
lib/neo4j/shared/callbacks.rb 100% <ø> (ø)
spec/shared_examples/after_commit.rb 91.89% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3fa2949...975dd7a. Read the comment docs.

neo4j_url = ENV['NEO4J_URL'] || 'http://localhost:7474'
$:.unshift File.dirname('./')
Neo4j::ActiveBase.on_establish_session do
type = neo4j_url.match(/^bolt/) ? :bolt : http

Choose a reason for hiding this comment

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

I think http here should be :http ..
This commit resolves my issues if I set that environment variable to a bolt:// URL in the Rakefile but fails with this otherwise:
'NameError: undefined local variable or method `http' for main:Object'

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great catch, thanks! Since you can confirm this I'll go ahead and get it in and release a patch version

@cheerfulstoic
Copy link
Contributor Author

Fixes #1353

@cheerfulstoic cheerfulstoic merged commit a29974b into master Feb 4, 2017
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.

None yet

3 participants