Skip to content

Commit d61dbba

Browse files
committed
Initial setup
1 parent 6ac3362 commit d61dbba

File tree

19 files changed

+308
-1
lines changed

19 files changed

+308
-1
lines changed

.github/CODEOWNERS

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# This is a comment.
2+
# Each line is a file pattern followed by one or more owners.
3+
4+
# These owners will be the default owners for everything in
5+
# the repo. Unless a later match takes precedence,
6+
# @global-owner1 and @global-owner2 will be requested for
7+
# review when someone opens a pull request.
8+
* @chrisdavis180

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
## What
2+
Describe the change(s).
3+
4+
## Why
5+
Describe the reason for the change(s).
6+
7+
## Testing
8+
Describe how to test your change(s).

.gitignore

Lines changed: 11 additions & 0 deletions
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+
Gemfile.lock
10+
.rspec
11+
.DS_store

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
## [Unreleased]
2+
3+
## [0.1.0] - 2022-11-24
4+
5+
- Initial release

Gemfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# frozen_string_literal: true
2+
3+
source 'https://rubygems.org'
4+
5+
# Specify your gem's dependencies in beeceptor_ruby.gemspec
6+
gemspec
7+
8+
gem 'rake', '~> 13.0'

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) 2022 Chris Davis
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: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,51 @@
1-
# beeceptor_ruby
1+
# BeeceptorRuby
2+
3+
## Installation
4+
5+
Install the gem and add to the application's Gemfile by executing:
6+
7+
$ bundle add beeceptor_ruby
8+
9+
If bundler is not being used to manage dependencies, install the gem by executing:
10+
11+
$ gem install beeceptor_ruby
12+
13+
## Usage
14+
15+
This gem provides access to the Beeceptor REST API.
16+
17+
```ruby
18+
require 'beeceptor_ruby'
19+
20+
options = {
21+
:api_key => 'YOUR_API_KEY',
22+
:endpoint => 'YOUR_ENDPOINT'
23+
}
24+
25+
client = BeeceptorRuby::Client.new(options)
26+
27+
puts client.list_rules
28+
```
29+
30+
## Beeceptor REST API Documentation
31+
- [Overview](https://docs.beeceptor.com/docs/api-overview/)
32+
- [Rules](https://docs.beeceptor.com/docs/features-mocking-rules/)
33+
- [History](https://docs.beeceptor.com/docs/api-request-history/)
34+
35+
## Development
36+
37+
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
38+
39+
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 the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
40+
41+
## Contributing
42+
43+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/beeceptor_ruby.
44+
45+
## License
46+
47+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
48+
49+
## Need this for your python project?
50+
51+
If you're on a python stack this gem also comes in a python flavor! Check it out here: https://github.com/chdavis180/beeceptorpy

Rakefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# frozen_string_literal: true
2+
3+
require 'bundler/gem_tasks'
4+
task default: %i[]

beeceptor_ruby.gemspec

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# frozen_string_literal: true
2+
3+
require_relative 'lib/beeceptor_ruby/version'
4+
5+
Gem::Specification.new do |spec|
6+
spec.name = 'beeceptor_ruby'
7+
spec.version = BeeceptorRuby::VERSION
8+
spec.authors = ['Chris Davis']
9+
10+
spec.summary = 'Beeceptor REST API Client for Ruby'
11+
spec.description = "Allows users to use Beeceptor's REST API."
12+
spec.homepage = 'https://github.com/chrisdavis179/beeceptor_ruby'
13+
spec.license = 'MIT'
14+
spec.required_ruby_version = '>= 2.6.0'
15+
16+
# Specify which files should be added to the gem when it is released.
17+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
18+
spec.files = Dir.chdir(__dir__) do
19+
`git ls-files -z`.split("\x0").reject do |f|
20+
(f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
21+
end
22+
end
23+
spec.bindir = 'exe'
24+
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
25+
spec.require_paths = ['lib']
26+
27+
spec.add_dependency 'faraday'
28+
spec.add_dependency 'json'
29+
spec.add_dependency 'rspec', '~> 3.7'
30+
31+
# For more information and examples about making a new gem, check out our
32+
# guide at: https://bundler.io/guides/creating_gem.html
33+
end

bin/console

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/env ruby
2+
# frozen_string_literal: true
3+
4+
require 'bundler/setup'
5+
require 'beeceptor_ruby'
6+
7+
# You can add fixtures and/or initialization code here to make experimenting
8+
# with your gem easier. You can also use a different console, if you like.
9+
10+
# (If you use this, don't forget to add pry to your Gemfile!)
11+
# require "pry"
12+
# Pry.start
13+
14+
require 'irb'
15+
IRB.start(__FILE__)

0 commit comments

Comments
 (0)