fog-akamai 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +49 -3
- data/lib/fog/akamai/storage.rb +2 -0
- data/lib/fog/akamai/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f8e1c183618f068be64f0d0959e390b23b19b46f
|
4
|
+
data.tar.gz: cdb9cd220be1caff79b65c156aa6754fb75b7fde
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5197933b51c297b44232851ce28e99ba5911019ed43db5f4de44b7907c327f1fe4a70a85ba1b59bdd510e2239bbb830b666aaf8be235216fb85eaf8c454e66f9
|
7
|
+
data.tar.gz: fc093806a9fd762caddce13ad6f6796f5a05dbd857097d0f77fb8744a99cd04cd2d1d565d5ae8477db05d140f303eda50d37c2e996647f1c23456fbf2a1d1e07
|
data/README.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
# Fog
|
1
|
+
# Fog Akamai
|
2
2
|
|
3
3
|
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.
|
4
4
|
|
5
|
-
|
5
|
+
This is still under development only very basic net storage functionality has been put in place.
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
@@ -22,7 +22,53 @@ Or install it yourself as:
|
|
22
22
|
|
23
23
|
## Usage
|
24
24
|
|
25
|
-
|
25
|
+
Before you can use fog-akamai, you must require it in your application:
|
26
|
+
|
27
|
+
```ruby
|
28
|
+
require 'fog/aws'
|
29
|
+
```
|
30
|
+
|
31
|
+
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:
|
32
|
+
|
33
|
+
```
|
34
|
+
default:
|
35
|
+
akamai_host: <YOUR_AKAMAIHOST>
|
36
|
+
akamai_key_name: <YOUR_KEY_NAME>
|
37
|
+
akamai_key: <YOU_KEY>
|
38
|
+
akamai_cp_code: <YOU_CP_CODE>
|
39
|
+
```
|
40
|
+
|
41
|
+
You can get more detail about how to obtain this credential form [this doc](https://control.akamai.com/dl/customers/NS/NS_Config_FS.pdf)
|
42
|
+
|
43
|
+
### Connecting to NetStorage service
|
44
|
+
|
45
|
+
```ruby
|
46
|
+
net_storage = Fog::Compute.new :provider => 'akamai'
|
47
|
+
```
|
48
|
+
|
49
|
+
### To get a directory:
|
50
|
+
|
51
|
+
```ruby
|
52
|
+
directory = net_storage.directories.get('/path')
|
53
|
+
```
|
54
|
+
|
55
|
+
### To check if a file exists:
|
56
|
+
|
57
|
+
```ruby
|
58
|
+
directory.files.stat('file.ext')
|
59
|
+
```
|
60
|
+
|
61
|
+
### To upload a file:
|
62
|
+
|
63
|
+
```ruby
|
64
|
+
directory.files.create(directory: directory, body: file_body, key: file_name)
|
65
|
+
```
|
66
|
+
|
67
|
+
## Roadmap
|
68
|
+
|
69
|
+
- finish implementing the netstorage api
|
70
|
+
- add mock support
|
71
|
+
- implement ccu api
|
26
72
|
|
27
73
|
## Development
|
28
74
|
|
data/lib/fog/akamai/storage.rb
CHANGED
data/lib/fog/akamai/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fog-akamai
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Calin
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-11-
|
11
|
+
date: 2015-11-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -192,7 +192,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
192
192
|
version: '0'
|
193
193
|
requirements: []
|
194
194
|
rubyforge_project:
|
195
|
-
rubygems_version: 2.4.
|
195
|
+
rubygems_version: 2.4.6
|
196
196
|
signing_key:
|
197
197
|
specification_version: 4
|
198
198
|
summary: Module for 'fog' gem to support Akamai
|