action_policy-graphql 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 67e8da87c493d0478d778ba4421a404af3fd7b9f84cb95529f9f72a31c7221fb
4
+ data.tar.gz: 19f45c885b52f2615d93872d67603e0b9ff07ae5ddb0a61805eeaa6fe4d4e024
5
+ SHA512:
6
+ metadata.gz: dc240bd69108871bf60f7ef9b95fbd88565e14a3fdb21542e4330a8a5dbcbaf625ce9fe00cd0fb4caa24dd76e820c27a3975a5eb4862fbb95e130dcd0d1ff873
7
+ data.tar.gz: e99ed4c366a6ae8877e0d37eb8bffbec71e6f2d6e0f0acc1bff93250b02b6146f77c89a453e409b2ecd7b2ea37418cf1966793d9f177f250392dacb2740ddd15
data/.gitignore ADDED
@@ -0,0 +1,10 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ Gemfile.local
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,54 @@
1
+ require:
2
+ - standard/cop/semantic_blocks
3
+ - rubocop-md
4
+
5
+ inherit_gem:
6
+ standard: config/base.yml
7
+
8
+ AllCops:
9
+ Exclude:
10
+ - 'bin/*'
11
+ - 'tmp/**/*'
12
+ - 'Gemfile'
13
+ - 'vendor/**/*'
14
+ - 'gemfiles/**/*'
15
+ DisplayCopNames: true
16
+ TargetRubyVersion: 2.4
17
+
18
+ Standard/SemanticBlocks:
19
+ Enabled: false
20
+
21
+ Style/FrozenStringLiteralComment:
22
+ Enabled: true
23
+
24
+ Style/TrailingCommaInArrayLiteral:
25
+ EnforcedStyleForMultiline: no_comma
26
+
27
+ Style/TrailingCommaInHashLiteral:
28
+ EnforcedStyleForMultiline: no_comma
29
+
30
+ Layout/AlignParameters:
31
+ EnforcedStyle: with_first_parameter
32
+
33
+ Lint/Void:
34
+ Exclude:
35
+ - '**/*.md'
36
+
37
+ # See https://github.com/rubocop-hq/rubocop/issues/4222
38
+ Lint/AmbiguousBlockAssociation:
39
+ Exclude:
40
+ - 'spec/**/*'
41
+ - '**/*.md'
42
+
43
+ Lint/DuplicateMethods:
44
+ Exclude:
45
+ - '**/*.md'
46
+
47
+ Naming/FileName:
48
+ Exclude:
49
+ - 'lib/action_policy-graphql.rb'
50
+ - '**/*.md'
51
+
52
+ Layout/InitialIndentation:
53
+ Exclude:
54
+ - 'CHANGELOG.md'
data/.travis.yml ADDED
@@ -0,0 +1,33 @@
1
+ sudo: false
2
+ language: ruby
3
+ cache: bundler
4
+ notifications:
5
+ email: false
6
+
7
+ before_install:
8
+ - gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true
9
+ - gem install bundler -v '< 2'
10
+
11
+ script:
12
+ - bundle exec rake
13
+
14
+ matrix:
15
+ fast_finish: true
16
+ include:
17
+ - rvm: ruby-head
18
+ gemfile: gemfiles/graphqlmaster.gemfile
19
+ - rvm: 2.6
20
+ gemfile: gemfiles/graphqlmaster.gemfile
21
+ - rvm: jruby-9.2.5.0
22
+ gemfile: gemfiles/jruby.gemfile
23
+ - rvm: 2.6
24
+ gemfile: Gemfile
25
+ - rvm: 2.5
26
+ gemfile: Gemfile
27
+ - rvm: 2.4
28
+ gemfile: Gemfile
29
+ allow_failures:
30
+ - rvm: ruby-head
31
+ gemfile: gemfiles/graphqlmaster.gemfile
32
+ - rvm: 2.6
33
+ gemfile: gemfiles/graphqlmaster.gemfile
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## 0.1.0 (unreleased)
2
+
3
+ - Initial version. ([@palkan][])
4
+
5
+ [@palkan]: https://github.com/palkan
data/Gemfile ADDED
@@ -0,0 +1,16 @@
1
+ source "https://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in action_policy-graphql.gemspec
4
+ gemspec
5
+
6
+ gem "pry-byebug", platform: :mri
7
+
8
+ local_gemfile = File.join(__dir__, "Gemfile.local")
9
+
10
+ if File.exist?(local_gemfile)
11
+ # Specify custom action_policy/graphql-ruby version in Gemfile.local
12
+ eval(File.read(local_gemfile)) # rubocop:disable Security/Eval
13
+ else
14
+ gem "action_policy", "~> 0.3.0"
15
+ gem "graphql", "~> 1.9.3"
16
+ end
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2019 Vladimir Dementyev
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,36 @@
1
+ [![Gem Version](https://badge.fury.io/rb/action_policy-graphql.svg)](https://badge.fury.io/rb/action_policy-graphql)
2
+ [![Build Status](https://travis-ci.org/palkan/action_policy-graphql.svg?branch=master)](https://travis-ci.org/palkan/action_policy-graphql)
3
+ [![Documentation](https://img.shields.io/badge/docs-link-brightgreen.svg)](https://actionpolicy.evilmartians.io/#/graphql)
4
+
5
+ # Action Policy GraphQL
6
+
7
+ This gem provides an integration for using [Action Policy](https://github.com/palkan/action_policy) as an authorization framework for GraphQL applications (built with [`graphql` ruby gem](https://graphql-ruby.org)).
8
+
9
+ 📑 [Documentation](https://actionpolicy.evilmartians.io/#/graphql)
10
+
11
+ <a href="https://evilmartians.com/?utm_source=action_policy-graphql">
12
+ <img src="https://evilmartians.com/badges/sponsored-by-evil-martians.svg" alt="Sponsored by Evil Martians" width="236" height="54"></a>
13
+
14
+ ## Installation
15
+
16
+ Add this line to your application's Gemfile:
17
+
18
+ ```ruby
19
+ gem "action_policy-graphql", "~> 0.1"
20
+ ```
21
+
22
+ And then execute:
23
+
24
+ $ bundle
25
+
26
+ ## Usage
27
+
28
+ TBD
29
+
30
+ ## Contributing
31
+
32
+ Bug reports and pull requests are welcome on GitHub at https://github.com/palkan/action_policy-graphql.
33
+
34
+ ## License
35
+
36
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
data/Rakefile ADDED
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "rubocop/rake_task"
4
+ require "rspec/core/rake_task"
5
+
6
+ RuboCop::RakeTask.new
7
+
8
+ RSpec::Core::RakeTask.new(:spec)
9
+
10
+ task default: [:rubocop, :spec]
@@ -0,0 +1,44 @@
1
+ # frozen_string_literal: true
2
+
3
+ lib = File.expand_path("../lib", __FILE__)
4
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
+ require "action_policy/graphql/version"
6
+
7
+ Gem::Specification.new do |spec|
8
+ spec.name = "action_policy-graphql"
9
+ spec.version = ActionPolicy::GraphQL::VERSION
10
+ spec.authors = ["Vladimir Dementyev"]
11
+ spec.email = ["dementiev.vm@gmail.com"]
12
+
13
+ spec.summary = "Action Policy integration for GraphQL-Ruby"
14
+ spec.description = "Action Policy integration for GraphQL-Ruby"
15
+ spec.homepage = "https://github.com/palkan/action_policy-graphql"
16
+ spec.license = "MIT"
17
+
18
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
19
+ f.match(%r{^(test|spec|features)/})
20
+ end
21
+
22
+ spec.metadata = {
23
+ "bug_tracker_uri" => "https://github.com/palkan/action_policy-graphql/issues",
24
+ "changelog_uri" => "https://github.com/palkan/action_policy-graphql/blob/master/CHANGELOG.md",
25
+ "documentation_uri" => "https://actionpolicy.evilmartians.io/#/graphql",
26
+ "homepage_uri" => "https://github.com/palkan/action_policy-graphql",
27
+ "source_code_uri" => "https://github.com/palkan/action_policy-graphql"
28
+ }
29
+
30
+ spec.require_paths = ["lib"]
31
+
32
+ spec.required_ruby_version = ">= 2.4.0"
33
+
34
+ spec.add_dependency "action_policy", ">= 0.3.0"
35
+ spec.add_dependency "graphql", ">= 1.9.3"
36
+
37
+ spec.add_development_dependency "bundler", ">= 1.15"
38
+ spec.add_development_dependency "rake", "~> 10.0"
39
+ spec.add_development_dependency "rspec", "~> 3.8"
40
+ spec.add_development_dependency "rubocop", "~> 0.67.0"
41
+ spec.add_development_dependency "rubocop-md", "~> 0.3"
42
+ spec.add_development_dependency "standard", "~> 0.0.39"
43
+ spec.add_development_dependency "i18n"
44
+ end
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "action_policy/graphql"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,5 @@
1
+ source "https://rubygems.org"
2
+
3
+ gem "graphql", github: "rmosolgo/graphql-ruby"
4
+
5
+ gemspec path: ".."
@@ -0,0 +1,3 @@
1
+ source "https://rubygems.org"
2
+
3
+ gemspec path: ".."
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ActionPolicy
4
+ module GraphQL
5
+ VERSION = "0.0.1"
6
+ end
7
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "action_policy"
4
+ require "graphql"
5
+
6
+ require "action_policy/graphql/version"
7
+
8
+ module ActionPolicy
9
+ module GraphQL
10
+ end
11
+ end
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "action_policy/graphql"
metadata ADDED
@@ -0,0 +1,191 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: action_policy-graphql
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Vladimir Dementyev
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2019-05-20 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: action_policy
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 0.3.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 0.3.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: graphql
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 1.9.3
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: 1.9.3
41
+ - !ruby/object:Gem::Dependency
42
+ name: bundler
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '1.15'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '1.15'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '10.0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '10.0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rspec
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '3.8'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '3.8'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rubocop
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: 0.67.0
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: 0.67.0
97
+ - !ruby/object:Gem::Dependency
98
+ name: rubocop-md
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '0.3'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '0.3'
111
+ - !ruby/object:Gem::Dependency
112
+ name: standard
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: 0.0.39
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: 0.0.39
125
+ - !ruby/object:Gem::Dependency
126
+ name: i18n
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ description: Action Policy integration for GraphQL-Ruby
140
+ email:
141
+ - dementiev.vm@gmail.com
142
+ executables: []
143
+ extensions: []
144
+ extra_rdoc_files: []
145
+ files:
146
+ - ".gitignore"
147
+ - ".rspec"
148
+ - ".rubocop.yml"
149
+ - ".travis.yml"
150
+ - CHANGELOG.md
151
+ - Gemfile
152
+ - LICENSE.txt
153
+ - README.md
154
+ - Rakefile
155
+ - action_policy-graphql.gemspec
156
+ - bin/console
157
+ - bin/setup
158
+ - gemfiles/graphqlmaster.gemfile
159
+ - gemfiles/jruby.gemfile
160
+ - lib/action_policy-graphql.rb
161
+ - lib/action_policy/graphql.rb
162
+ - lib/action_policy/graphql/version.rb
163
+ homepage: https://github.com/palkan/action_policy-graphql
164
+ licenses:
165
+ - MIT
166
+ metadata:
167
+ bug_tracker_uri: https://github.com/palkan/action_policy-graphql/issues
168
+ changelog_uri: https://github.com/palkan/action_policy-graphql/blob/master/CHANGELOG.md
169
+ documentation_uri: https://actionpolicy.evilmartians.io/#/graphql
170
+ homepage_uri: https://github.com/palkan/action_policy-graphql
171
+ source_code_uri: https://github.com/palkan/action_policy-graphql
172
+ post_install_message:
173
+ rdoc_options: []
174
+ require_paths:
175
+ - lib
176
+ required_ruby_version: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - ">="
179
+ - !ruby/object:Gem::Version
180
+ version: 2.4.0
181
+ required_rubygems_version: !ruby/object:Gem::Requirement
182
+ requirements:
183
+ - - ">="
184
+ - !ruby/object:Gem::Version
185
+ version: '0'
186
+ requirements: []
187
+ rubygems_version: 3.0.3
188
+ signing_key:
189
+ specification_version: 4
190
+ summary: Action Policy integration for GraphQL-Ruby
191
+ test_files: []