Skip to content

Commit 39863c6

Browse files
committed
Initial
0 parents  commit 39863c6

File tree

18 files changed

+512
-0
lines changed

18 files changed

+512
-0
lines changed

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/.bundle/
2+
/.yardoc
3+
/Gemfile.lock
4+
/_yardoc/
5+
/coverage/
6+
/doc/
7+
/pkg/
8+
/spec/reports/
9+
/tmp/

.rspec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
--format documentation
2+
--color

.rubocop.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
AllCops:
2+
Exclude:
3+
- vendor/**/*
4+
5+
inherit_from: .rubocop_todo.yml

.rubocop_todo.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# This configuration was generated by
2+
# `rubocop --auto-gen-config`
3+
# on 2016-05-08 01:57:12 +0300 using RuboCop version 0.39.0.
4+
# The point is for the user to remove these configuration records
5+
# one by one as the offenses are removed from the code base.
6+
# Note that changes in the inspected code, or installation of new
7+
# versions of RuboCop, may require this file to be generated again.
8+
9+
# Offense count: 2
10+
Metrics/AbcSize:
11+
Max: 69
12+
13+
# Offense count: 1
14+
Metrics/CyclomaticComplexity:
15+
Max: 16
16+
17+
# Offense count: 51
18+
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes.
19+
# URISchemes: http, https
20+
Metrics/LineLength:
21+
Max: 136
22+
23+
# Offense count: 1
24+
# Configuration parameters: CountComments.
25+
Metrics/MethodLength:
26+
Max: 27
27+
28+
# Offense count: 1
29+
Metrics/PerceivedComplexity:
30+
Max: 19
31+
32+
# Offense count: 2
33+
Style/Documentation:
34+
Exclude:
35+
- 'spec/**/*'
36+
- 'test/**/*'
37+
- 'lib/grape-swagger/entity.rb'
38+
- 'lib/grape-swagger/entity/parser.rb'

.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
sudo: false
2+
language: ruby
3+
rvm:
4+
- 2.3.0
5+
before_install: gem install bundler -v 1.12.1

Gemfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
source 'https://rubygems.org'
2+
3+
# Specify your gem's dependencies in grape-swagger-entity.gemspec
4+
gemspec
5+
6+
gem 'grape-swagger', github: 'Bugagazavr/grape-swagger', branch: 'representers'

LICENSE.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2016 Kirill Zaitsev
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

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# GrapeSwagger::Entity [![Build Status](https://travis-ci.org/Bugagazavr/grape-swagger-entity.svg)](https://travis-ci.org/Bugagazavr/grape-swagger-entity)
2+
3+
A simple grape-swagger adapter to allow parse representers as response model
4+
5+
## Installation
6+
7+
Add this line to your application's Gemfile:
8+
9+
```ruby
10+
gem 'grape-swagger-entity'
11+
```
12+
13+
And then execute:
14+
15+
$ bundle
16+
17+
Or install it yourself as:
18+
19+
$ gem install grape-swagger-entity
20+
21+
## Development
22+
23+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rspec` to run the tests. You can also run `bin/pry` 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/[USERNAME]/grape-swagger-entity.
30+
31+
## License
32+
33+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
34+

Rakefile

Lines changed: 6 additions & 0 deletions
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/pry

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env ruby
2+
3+
require 'bundler/setup'
4+
require 'grape-swagger/entity'
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 'pry'
14+
Pry.start

0 commit comments

Comments
 (0)