Skip to content

Commit

Permalink
initial gem
Browse files Browse the repository at this point in the history
  • Loading branch information
mkon committed Feb 18, 2018
0 parents commit 24e7f9a
Show file tree
Hide file tree
Showing 12 changed files with 123 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.byebug_history
Gemfile.lock
/coverage/*
3 changes: 3 additions & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
--color
--require spec_helper
--format documentation
24 changes: 24 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
AllCops:
TargetRubyVersion: 2.4

Layout/SpaceInsideHashLiteralBraces:
EnforcedStyle: no_space

Lint/AssignmentInCondition:
Enabled: false

Metrics/LineLength:
Max: 100

Style/ClassAndModuleChildren:
Enabled: false
Style/ConditionalAssignment:
Enabled: false
Style/Documentation:
Enabled: false
Style/FrozenStringLiteralComment:
Enabled: false
Style/PercentLiteralDelimiters:
PreferredDelimiters:
'%i': ()
'%w': ()
1 change: 1 addition & 0 deletions .ruby-gemset
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
api_valve
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.4.3
7 changes: 7 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
source 'https://rubygems.org'

gemspec

group :development, :test do
gem 'byebug'
end
20 changes: 20 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Copyright (c) 2018 Konstantin Munteanu

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# ApiValve

Lightweight API proxy written in ruby. Based on rack.
26 changes: 26 additions & 0 deletions api_valve.gemspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
$LOAD_PATH.push File.expand_path('../lib', __FILE__)

# Describe your gem and declare its dependencies:
Gem::Specification.new do |s|
s.name = 'api_valve'
s.version = '0.0.1'
s.authors = ['mkon']
s.email = ['[email protected]']
s.homepage = 'https://github.com/mkon/api_valve'
s.summary = 'Lightweight ruby/rack API reverse proxy or gateway'
s.license = 'MIT'

s.files = Dir['lib/**/*', 'README.md']

s.add_dependency 'activesupport', '>= 5.0.2', '< 6'
s.add_dependency 'faraday', '~> 0.14'
s.add_dependency 'rack', '~> 2'

s.add_development_dependency 'rack-test', '~> 0'
s.add_development_dependency 'rspec', '~> 3'
s.add_development_dependency 'rubocop', '0.52.1'
s.add_development_dependency 'rubocop-rspec', '1.22.2'
s.add_development_dependency 'simplecov', '~> 0'
s.add_development_dependency 'timecop', '~> 0'
s.add_development_dependency 'webmock', '~> 2'
end
2 changes: 2 additions & 0 deletions lib/api_valve.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
module ApiValve
end
13 changes: 13 additions & 0 deletions spec/.rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
require: rubocop-rspec
inherit_from: ../.rubocop.yml

Metrics/BlockLength:
Enabled: false

RSpec/MultipleExpectations:
Enabled: false
RSpec/NamedSubject:
Enabled: false

Style/BlockDelimiters:
Enabled: false
20 changes: 20 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
ENV['RACK_ENV'] = 'test'

require 'rubygems'
require 'bundler'
Bundler.require :default, 'test'

require 'rack/test'
require 'timecop'

require 'webmock/rspec'
WebMock.disable_net_connect!

require 'simplecov'
SimpleCov.start

module RSpecMixin
include Rack::Test::Methods
end

RSpec.configure { |c| c.include RSpecMixin }

0 comments on commit 24e7f9a

Please sign in to comment.