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

made some minor cleanup #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# ignore Rubymine
.idea

.rvmrc
.bundle
/tmp/
/db/
/pkg/
/doc
/target/
/neo4j/
/example/blog/neo4j-db
/example/blog/log
.yardoc
# jedit
*~
.ruby-version
.ruby-gemset

# vim
.*.sw[a-z]

Gemfile.lock
coverage

docs_site/
/docs/_build
/docs/api

# dotenv
.env

# Mac
.DS_Store

# Vagrant
.vagrant/*
ubuntu*
138 changes: 0 additions & 138 deletions Gemfile.lock

This file was deleted.

1 change: 1 addition & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
require 'bundler/gem_tasks'
require 'rspec/core/rake_task'
require 'neo4j/rake_tasks'

RSpec::Core::RakeTask.new(:spec)

Expand Down
4 changes: 2 additions & 2 deletions cancancan-neo4j.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Gem::Specification.new do |spec|
spec.require_paths = ['lib']

spec.add_dependency 'cancancan', '~> 2.0'
spec.add_dependency 'neo4j', '~> 9.0.0'

spec.add_development_dependency 'bundler', '~> 1.3'
spec.add_development_dependency 'rake', '~> 10.1'
Expand All @@ -27,7 +28,6 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'simplecov', '~> 0.12'
spec.add_development_dependency 'coveralls', '~> 0.8'
spec.add_development_dependency 'codeclimate-test-reporter', '~> 1.0'
spec.add_development_dependency 'neo4j', '~> 9.0.0'
spec.add_development_dependency 'pry', '~> 0.11.3'
spec.add_development_dependency('neo4j-community', '~> 2.0') if RUBY_PLATFORM =~ /java/
spec.add_development_dependency('neo4j-rake_tasks', '>= 0.3.0')
end
2 changes: 1 addition & 1 deletion lib/cancancan/neo4j/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ module CanCanCan
end
module CanCanCan
module Neo4j
VERSION = '0.1.0'.freeze
VERSION = '1.0.0.beta1'.freeze
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This component is nearly complete. Let's don't scare people with a low version.

end
end
4 changes: 1 addition & 3 deletions spec/cancancan/model_adapters/neo4j_adapter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
User.delete_all
Mention.delete_all
(@ability = double).extend(CanCan::Ability)
@article_table = 'article'
@comment_table = 'comment'
end

it 'is for only neo4j classes' do
Expand Down Expand Up @@ -58,7 +56,7 @@
article2 = Article.create!(published: true, secret: true)
article3 = Article.create!(published: false, secret: true)
Article.create!(published: false, secret: false)
expect(Article.accessible_by(@ability).to_a).to eq([article1, article2, article3])
expect(Article.accessible_by(@ability)).to contain_exactly(article1, article2, article3)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

without order by clause order is not guaranteed. Order could be achieved by passing a scope to the rule. Is that possible?

end

context 'nested rules' do
Expand Down