From 6fb9c3c80793a0532595df5b3eec0614feaa0aaf Mon Sep 17 00:00:00 2001 From: Gustavo Sobral Date: Mon, 11 Nov 2019 22:09:40 +0100 Subject: [PATCH] Add bin/setup and bin/console with instructions on README --- README.md | 6 +++++- bin/console | 14 ++++++++++++++ bin/setup | 8 ++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100755 bin/console create mode 100755 bin/setup diff --git a/README.md b/README.md index e5aee4c58..e53b9f5b8 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ instance = ec2.servers.get("i-02db5af4") instance.destroy ``` -`Fog::AWS` is more than EC2 since it supports many services provided by AWS. The best way to learn and to know about how many services are supported is to take a look at the source code. To review the tests directory and to play with the library in ```irb``` can be very helpful resources as well. +`Fog::AWS` is more than EC2 since it supports many services provided by AWS. The best way to learn and to know about how many services are supported is to take a look at the source code. To review the tests directory and to play with the library in ```bin/console``` can be very helpful resources as well. ### S3 @@ -109,6 +109,10 @@ directory.files.new(key: 'user/1/Gemfile').url(Time.now + 60) See the [online documentation](http://www.rubydoc.info/github/fog/fog-aws) for a complete API reference. +## Development + +After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment. + ## Contributing 1. Fork it ( https://github.com/fog/fog-aws/fork ) diff --git a/bin/console b/bin/console new file mode 100755 index 000000000..2f6042afd --- /dev/null +++ b/bin/console @@ -0,0 +1,14 @@ +#!/usr/bin/env ruby + +require "bundler/setup" +require "fog-aws" + +# You can add fixtures and/or initialization code here to make experimenting +# with your gem easier. You can also use a different console, if you like. + +# (If you use this, don't forget to add pry to your Gemfile!) +# require "pry" +# Pry.start + +require "irb" +IRB.start(__FILE__) diff --git a/bin/setup b/bin/setup new file mode 100755 index 000000000..dce67d860 --- /dev/null +++ b/bin/setup @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +set -euo pipefail +IFS=$'\n\t' +set -vx + +bundle install + +# Do any other automated setup that you need to do here