Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
Merge pull request #5 from ontohub/improve
Browse files Browse the repository at this point in the history
Improve
  • Loading branch information
eugenk authored Aug 5, 2017
2 parents ce8bc02 + 69308e8 commit ee063f5
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
Add this line to your application's Gemfile:

```ruby
gem 'graphql-pundit', github: 'phyrog/graphql-pundit',
gem 'graphql-pundit', github: 'ontohub/graphql-pundit',
branch: 'master'
```

Expand Down Expand Up @@ -75,7 +75,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/phyrog/graphql-pundit.
Bug reports and pull requests are welcome on GitHub at https://github.com/ontohub/graphql-pundit.


## License
Expand Down
12 changes: 6 additions & 6 deletions graphql-pundit.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@

lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'graphql/pundit/version'
require 'graphql-pundit/version'

Gem::Specification.new do |spec|
spec.name = 'graphql-pundit'
spec.version = GraphQL::Pundit::VERSION
spec.authors = ['Tom Gehrke']
spec.email = ['phyrog@cognitive-coding.com']
spec.authors = ['Ontohub Core Developers']
spec.email = ['ontohub-dev-l@ovgu.de']

spec.summary = 'Pundit authorization support for graphql'
spec.description = spec.summary
spec.homepage = 'https://github.com/phyrog/graphql-pundit'
spec.homepage = 'https://github.com/ontohub/graphql-pundit'
spec.license = 'MIT'

spec.files = `git ls-files -z`.split("\x0").reject do |f|
Expand All @@ -28,6 +28,6 @@ Gem::Specification.new do |spec|

spec.add_development_dependency 'pry', '~> 0.10.4'
spec.add_development_dependency 'bundler', '~> 1.14'
spec.add_development_dependency 'rake', '~> 10.0'
spec.add_development_dependency 'rspec', '~> 3.0'
spec.add_development_dependency 'rake', '~> 12.0'
spec.add_development_dependency 'rspec', '~> 3.6'
end
4 changes: 2 additions & 2 deletions lib/graphql/pundit.rb → lib/graphql-pundit.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require_relative 'pundit/instrumenter'
require_relative 'pundit/version'
require 'graphql-pundit/instrumenter'
require 'graphql-pundit/version'

require 'graphql'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def resolve_proc(current_user, old_resolve, options)
record = options[:record] || obj
begin
unless ::Pundit.authorize(ctx[current_user], record, query)
raise ::Pundit::NotAuthorized
raise ::Pundit::NotAuthorizedError
end
old_resolve.call(obj, args, ctx)
rescue ::Pundit::NotAuthorizedError
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require_relative "../../spec_helper"
require "spec_helper"

class Test
def initialize(value)
Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require "bundler/setup"
require "graphql/pundit"
require "graphql-pundit"

RSpec.configure do |config|
# Enable flags like --only-failures and --next-failure
Expand Down

0 comments on commit ee063f5

Please sign in to comment.