<commit_before>:star2: :star2: Store archives privately on S3 :star2: :star2:
==============================================================

Star helps you write Ruby apps that need to store files on S3 and retrieve them with expiring URLs.

The **source code** is available on [GitHub](https://github.com/Fullscreen/star) and the **documentation** on [RubyDoc](http://www.rubydoc.info/github/Fullscreen/star/master/Star/Interface).

[![Build Status](http://img.shields.io/travis/Fullscreen/star/master.svg)](https://travis-ci.org/Fullscreen/star)
[![Coverage Status](http://img.shields.io/coveralls/Fullscreen/star/master.svg)](https://coveralls.io/r/Fullscreen/star)
[![Dependency Status](http://img.shields.io/gemnasium/Fullscreen/star.svg)](https://gemnasium.com/Fullscreen/star)
[![Code Climate](http://img.shields.io/codeclimate/github/Fullscreen/star.svg)](https://codeclimate.com/github/Fullscreen/star)
[![Online docs](http://img.shields.io/badge/docs-✓-green.svg)](http://www.rubydoc.info/github/Fullscreen/star/master/Star/File)
[![Gem Version](http://img.shields.io/gem/v/star.svg)](http://rubygems.org/gems/star)


After [configuring your app](#how-to-configure), you can write a file to S3 by running:

```ruby
  file = Star::File.new
  file.open{|f| f << "some text to store in a remote file"}
```

You can successively retrieve the same file from S3 by calling:

```ruby
  url = file.url
```

This will provide a URL that everyone can access *for the next 30 seconds*.

After 30 seconds, access to the file using that URL [will be denied](http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-signed-urls.html#private-content-overview-choosing-duration).

Why use Star
============

Star is not the only Ruby library to help Ruby developers store archives on S3.
However, most other libraries are [huge](https://rubygems.org/gems/aws-sdk-core) and [heavy on dependencies](https://github.com/fog/fog/blob/master/fog.gemspec#L50-L100).

Star does one thing, and does it well.
The codebase is small and there are no runtime dependencies.
This means less footprint on your app, and code that is easier to read, maintain and upgrade.

How to install
==============

To install on your system, run

    gem install star

To use inside a bundled Ruby project, add this line to the Gemfile:

    gem 'star', '~> 0.1.0'


How to use
==========

To write a file to S3, [configure your app](#how-to-configure), then create a new remote file
instance:

```ruby
file = Star::File.new
```

You can now call any method you would normally use to add content to a
`File`, for instance:<commit_msg>A small PR to test GitHub integrations<commit_after>:star2: :star2: Store archives privately on S3 :star2: :star2:
==============================================================

Star helps you write Ruby apps that need to store files on S3 and retrieve them with expiring URLs.

The **source code** is available on [GitHub](https://github.com/Fullscreen/star) and the **documentation** on [RubyDoc](http://www.rubydoc.info/github/Fullscreen/star/master/Star/Interface).

[![Build Status](http://img.shields.io/travis/Fullscreen/star/master.svg)](https://travis-ci.org/Fullscreen/star)
[![Coverage Status](http://img.shields.io/coveralls/Fullscreen/star/master.svg)](https://coveralls.io/r/Fullscreen/star)
[![Dependency Status](http://img.shields.io/gemnasium/Fullscreen/star.svg)](https://gemnasium.com/Fullscreen/star)
[![Code Climate](http://img.shields.io/codeclimate/github/Fullscreen/star.svg)](https://codeclimate.com/github/Fullscreen/star)
[![Online docs](http://img.shields.io/badge/docs-✓-green.svg)](http://www.rubydoc.info/github/Fullscreen/star/master/Star/File)
[![Gem Version](http://img.shields.io/gem/v/star.svg)](http://rubygems.org/gems/star)


After [configuring your app](#how-to-configure), you can write a file to S3 by running:

```ruby
  file = Star::File.new
  file.open{|f| f << "some text to store in a remote file"}
```

You can successively retrieve the same file from S3 by calling:

```ruby
  url = file.url
```

This will provide a URL that everyone can access *for the next 30 seconds*.

After 30 seconds, access to the file using that URL [will be denied](http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-signed-urls.html#private-content-overview-choosing-duration).

Why use Star
============

Star is not the only Ruby library to help developers store archives on S3.
However, most other libraries are [huge](https://rubygems.org/gems/aws-sdk-core) and [heavy on dependencies](https://github.com/fog/fog/blob/master/fog.gemspec#L50-L100).

Star does one thing, and does it well.
The codebase is small and there are no runtime dependencies.
This means less footprint on your app, and code that is easier to read, maintain and upgrade.

How to install
==============

To install on your system, run

    gem install star

To use inside a bundled Ruby project, add this line to the Gemfile:

    gem 'star', '~> 0.1.0'


How to use
==========

To write a file to S3, [configure your app](#how-to-configure), then create a new remote file
instance:

```ruby
file = Star::File.new
```

You can now call any method you would normally use to add content to a
`File`, for instance:
{'fraction_non_alphanumeric': 0.1666034155597723, 'fraction_numerical': 0.008349146110056925, 'mean_word_length': 4.741830065359477, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 14, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2692822', 'n_tokens_mistral': 1720, 'n_tokens_neox': 1598, 'n_words': 504}