0.0
No commit activity in last 3 years
No release in over 3 years
OpenStack Swift Client for ConoHa オブジェクトストレージ
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 1.7
~> 10.0

Runtime

 Project Readme

ConoStorage

https://objectstore-r1nd1001.cnode.jp/v1/b7daff98c2b748dfa6cb8240c8ac7c33/kksg/bg_main-visual.png
OpenStack Swift Client for ConoHa オブジェクトストレージ

Usage

require 'cono_storage'

client = ConoStorage.new(
  # via. https://identity.tyo1.conoha.io/
  auth_url:  'https://identity.tyo1.conoha.io/v2.0/',
  tenant_id: 'b7daff9xxxxxxxxxxxxxxxxx',
  username: 1111111,
  password: '^passw0rd$',
  endpoint: 'https://objectstore-r1nd1001.cnode.jp/v1/b7daff9xxxxxxxxxxxxxxxxx',
  web_mode: true # Web公開モード
)

client.put_container('awsome_gifs')# => ConoStorage::Response
client.put_object('awsome_gifs', 'nyan.gif', '/local/path/to/nyan.gif').url #=> "https://objectstore-...cnode.jp/.../awsome_gifs/nyan.gif"
client.put_object('awsome_gifs', 'wan.gif', '/local/path/to/wan.gif', headers: { 'X-Delete-At' => "1170774000" } ) # Custom Headers
client.get_object('awsome_gifs', 'nyan.gif')
client.delete_object('awsome_gifs', 'nyan.gif')
client.delete_container('awsome_gifs').status #=> 204

Documentation

Requirements

Ruby 2.1.0 or later

Installation

Add this line to your application's Gemfile:

gem 'cono_storage'

And then execute:

$ bundle

Or install it yourself as:

$ gem install cono_storage

Contributing

  1. Fork it ( https://github.com/kkosuge/cono_storage/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request