Skip to content

Commit 27b8d31

Browse files
committed
Add initial gem structure
0 parents  commit 27b8d31

14 files changed

+166
-0
lines changed

.gitignore

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/.bundle/
2+
/.yardoc
3+
/_yardoc/
4+
/coverage/
5+
/doc/
6+
/pkg/
7+
/spec/reports/
8+
/tmp/
9+
10+
# rspec failure tracking
11+
.rspec_status

.rspec

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
--format documentation
2+
--color
3+
--require spec_helper

.travis.yml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
sudo: false
3+
language: ruby
4+
cache: bundler
5+
rvm:
6+
- 2.6.3
7+
before_install: gem install bundler -v 2.0.2

Gemfile

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
source "https://rubygems.org"
2+
3+
gemspec

LICENSE.txt

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2019 Mario Celi, David Revelo
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.

README.md

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# GraphqlDevise
2+
3+
## Installation
4+
5+
Add this line to your application's Gemfile:
6+
7+
```ruby
8+
gem 'graphql_devise'
9+
```
10+
11+
And then execute:
12+
13+
$ bundle
14+
15+
Or install it yourself as:
16+
17+
$ gem install graphql_devise
18+
19+
## Usage
20+
21+
## Development
22+
23+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
24+
25+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
26+
27+
## Contributing
28+
29+
Bug reports and pull requests are welcome on GitHub at https://github.com/graphql-device/graphql_devise.
30+
31+
## License
32+
33+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).

Rakefile

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
require "bundler/gem_tasks"
2+
require "rspec/core/rake_task"
3+
4+
RSpec::Core::RakeTask.new(:spec)
5+
6+
task :default => :spec

bin/console

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env ruby
2+
3+
require "bundler/setup"
4+
require "graphql_devise"
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__)

bin/setup

+8
Original file line numberDiff line numberDiff line change
@@ -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

graphql_devise.gemspec

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
lib = File.expand_path('lib', __dir__)
2+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3+
require 'graphql_devise/version'
4+
5+
Gem::Specification.new do |spec|
6+
spec.name = 'graphql_devise'
7+
spec.version = GraphqlDevise::VERSION
8+
spec.authors = ['Mario Celi', 'David Revelo']
9+
spec.email = ['[email protected]']
10+
11+
spec.summary = 'GraphQL queries and mutations on top of devise_token_auth'
12+
spec.description = 'GraphQL queries and mutations on top of devise_token_auth'
13+
spec.homepage = 'https://github.com/graphql-device/graphql_devise'
14+
spec.license = 'MIT'
15+
16+
spec.metadata['homepage_uri'] = spec.homepage
17+
spec.metadata['source_code_uri'] = 'https://github.com/graphql-device/graphql_devise'
18+
19+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
20+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
21+
end
22+
spec.bindir = 'exe'
23+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
24+
spec.require_paths = ['lib']
25+
26+
spec.add_development_dependency 'bundler', '~> 2.0'
27+
spec.add_development_dependency 'rake', '~> 10.0'
28+
spec.add_development_dependency 'rspec', '~> 3.0'
29+
end

lib/graphql_devise.rb

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
require 'graphql_devise/version'
2+
3+
module GraphqlDevise
4+
class Error < StandardError; end
5+
end

lib/graphql_devise/version.rb

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module GraphqlDevise
2+
VERSION = '0.1.0'.freeze
3+
end

spec/graphql_devise_spec.rb

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
RSpec.describe GraphqlDevise do
2+
it "has a version number" do
3+
expect(GraphqlDevise::VERSION).not_to be nil
4+
end
5+
6+
it "does something useful" do
7+
expect(false).to eq(true)
8+
end
9+
end

spec/spec_helper.rb

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
require "bundler/setup"
2+
require "graphql_devise"
3+
4+
RSpec.configure do |config|
5+
# Enable flags like --only-failures and --next-failure
6+
config.example_status_persistence_file_path = ".rspec_status"
7+
8+
# Disable RSpec exposing methods globally on `Module` and `main`
9+
config.disable_monkey_patching!
10+
11+
config.expect_with :rspec do |c|
12+
c.syntax = :expect
13+
end
14+
end

0 commit comments

Comments
 (0)