fog-akamai 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0fd6496beeb81adaf17b9c531670a5fc4d29cbd6
4
- data.tar.gz: 17398769af5612dbfbc314845a84feced0843552
3
+ metadata.gz: f8e1c183618f068be64f0d0959e390b23b19b46f
4
+ data.tar.gz: cdb9cd220be1caff79b65c156aa6754fb75b7fde
5
5
  SHA512:
6
- metadata.gz: 95ab846e7491dfd361f61ab744641efd98c2401f5c9f4b296cbc8d058bcad4caad01b3401e3574288b49c4ff970e89ff7ab63177bcbf6a8541d29da83628070f
7
- data.tar.gz: 02df2e86430f927c848b427075af5e8327730ff41a15795242afb6ebe0890465b9ebd82fac9d679bb92edb442b1150bc4c400bc1116ea0807f8fc5f62dd26507
6
+ metadata.gz: 5197933b51c297b44232851ce28e99ba5911019ed43db5f4de44b7907c327f1fe4a70a85ba1b59bdd510e2239bbb830b666aaf8be235216fb85eaf8c454e66f9
7
+ data.tar.gz: fc093806a9fd762caddce13ad6f6796f5a05dbd857097d0f77fb8744a99cd04cd2d1d565d5ae8477db05d140f303eda50d37c2e996647f1c23456fbf2a1d1e07
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
- # Fog::Storage
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
- TODO: Delete this and the text above, and describe your gem
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
- TODO: Write usage instructions here
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
 
@@ -27,6 +27,8 @@ module Fog
27
27
  end
28
28
 
29
29
  class Mock
30
+ def initialize(_options = {})
31
+ end
30
32
  end
31
33
 
32
34
  class Real
@@ -1,5 +1,5 @@
1
1
  module Fog
2
2
  module Akamai
3
- VERSION = "0.1.0"
3
+ VERSION = '0.1.1'
4
4
  end
5
5
  end
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.0
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-04 00:00:00.000000000 Z
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.8
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