From 530ae40f6849bcd1d527743eae3736b530e2ee43 Mon Sep 17 00:00:00 2001 From: cintamani Date: Fri, 7 Jun 2019 15:22:24 +0100 Subject: [PATCH 1/3] Add builds status badges to the Readme file --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 5f49cb2..4247459 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,11 @@ # DefraRuby::Aws [![Build Status](https://travis-ci.com/DEFRA/defra-ruby-aws.svg?branch=master)](https://travis-ci.com/DEFRA/defra-ruby-aws) +[![Maintainability](https://api.codeclimate.com/v1/badges/a0f8611f1a879786f642/maintainability)](https://codeclimate.com/github/DEFRA/defra-ruby-aws/maintainability) +[![Test Coverage](https://api.codeclimate.com/v1/badges/a0f8611f1a879786f642/test_coverage)](https://codeclimate.com/github/DEFRA/defra-ruby-aws/test_coverage) +[![security](https://hakiri.io/github/DEFRA/defra-ruby-aws/master.svg)](https://hakiri.io/github/DEFRA/defra-ruby-aws/master) +[![Gem Version](https://badge.fury.io/rb/defra_ruby_aws.svg)](https://badge.fury.io/rb/defra_ruby_aws) +[![Licence](https://img.shields.io/badge/Licence-OGLv3-blue.svg)](http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3) DEFRA AWS helpers for connecting Rails application to the DEFRA AWS instances. From 29d0f753bc26c790085fff2a9c553fc30d6e9926 Mon Sep 17 00:00:00 2001 From: Alan Cruikshanks Date: Wed, 12 Jun 2019 14:26:39 +0100 Subject: [PATCH 2/3] Update codeclimate references plus tweaks This updates the links to codeclimate to use those provided by it for this project. Also updated a few things in the file, for example the description and assigning lanuguage specifiers to the code blocks. --- README.md | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 4247459..bf61479 100644 --- a/README.md +++ b/README.md @@ -1,35 +1,33 @@ # DefraRuby::Aws [![Build Status](https://travis-ci.com/DEFRA/defra-ruby-aws.svg?branch=master)](https://travis-ci.com/DEFRA/defra-ruby-aws) -[![Maintainability](https://api.codeclimate.com/v1/badges/a0f8611f1a879786f642/maintainability)](https://codeclimate.com/github/DEFRA/defra-ruby-aws/maintainability) -[![Test Coverage](https://api.codeclimate.com/v1/badges/a0f8611f1a879786f642/test_coverage)](https://codeclimate.com/github/DEFRA/defra-ruby-aws/test_coverage) +[![Maintainability](https://api.codeclimate.com/v1/badges/4541a29b2c675b03a5ed/maintainability)](https://codeclimate.com/github/DEFRA/defra-ruby-aws/maintainability) +[![Test Coverage](https://api.codeclimate.com/v1/badges/4541a29b2c675b03a5ed/test_coverage)](https://codeclimate.com/github/DEFRA/defra-ruby-aws/test_coverage) [![security](https://hakiri.io/github/DEFRA/defra-ruby-aws/master.svg)](https://hakiri.io/github/DEFRA/defra-ruby-aws/master) [![Gem Version](https://badge.fury.io/rb/defra_ruby_aws.svg)](https://badge.fury.io/rb/defra_ruby_aws) [![Licence](https://img.shields.io/badge/Licence-OGLv3-blue.svg)](http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3) -DEFRA AWS helpers for connecting Rails application to the DEFRA AWS instances. +Package of Ruby helpers for connecting Rails applications to AWS S3. ## Installation -Add this line to your application's Gemfile: +Add this line to your application's Gemfile ```ruby gem 'defra_ruby_aws' ``` -And then execute: +And then update your dependencies by calling - $ bundle - -Or install it yourself as: - - $ gem install defra_ruby_aws +```bash +bundle install +``` ## Configuration Add a new bucket with: -``` +```ruby # config/initializers/defra_ruby_aws.rb require "defra_ruby/aws" @@ -52,7 +50,7 @@ end ### Upload a file -``` +```ruby file_to_upload = Tempfile.new("test-upload-file.csv") bucket = DefraRuby::Aws.get_bucket("defra-ruby-aws") response = bucket.load(file_to_upload) @@ -67,7 +65,7 @@ end ### Generate a presigned URL for download -``` +```ruby bucket = DefraRuby::Aws.get_bucket("defra-ruby-aws") presigned_url = bucket.presigned_url("test-upload-file.csv") ``` From 34f3fd51d9f310666edcc711c76645ca70679c99 Mon Sep 17 00:00:00 2001 From: Alan Cruikshanks Date: Wed, 12 Jun 2019 14:32:58 +0100 Subject: [PATCH 3/3] Just forcing CI to kick in