Project

fog-akamai

0.0
No commit activity in last 3 years
No release in over 3 years
This library can be used as a module for `fog` or as standalone provider to use Akamai
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.10
~> 5.8
~> 10.0
~> 0.35
~> 3.1
~> 0.8.0
~> 1.22

Runtime

~> 1.27
~> 1.0
~> 0.1
 Project Readme

Code Climate

Test Coverage

Fog Akamai

Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file lib/fog/storage. To experiment with that code, run bin/console for an interactive prompt.

All the functionality of the net storage api is implemented except the really dangerous bit, quick-delete.

Installation

Add this line to your application's Gemfile:

gem 'fog-akamai'

And then execute:

$ bundle

Or install it yourself as:

$ gem install fog-akamai

Usage

Before you can use fog-akamai, you must require it in your application:

require 'fog/akamai'

Since it's a bad practice to have your credentials in source code, you should load them from default fog configuration file: ~/.fog. This file could look like this:

default:
  akamai_host:     <YOUR_AKAMAIHOST>
  akamai_key_name: <YOUR_KEY_NAME>
  akamai_key:      <YOU_KEY>
  akamai_cp_code:  <YOU_CP_CODE>

You can get more detail about how to obtain this credential form this doc

Connecting to NetStorage service

net_storage = Fog::Compute.new :provider => 'akamai'

To get a directory:

directory = net_storage.directories.get('/path')

To check if a file exists:

directory.files.stat('file.ext')

To upload a file:

directory.files.create(directory: directory, body: file_body, key: file_name)

Roadmap

  • implement ccu api

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.

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 tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/alexandru-calinoiu/fog-akamai.