Verizon Personal Cloud Storage SDK for Ruby allows you to develop apps for Ruby platform which can access Verizon Personal Cloud Storage user content (subject to the user’s prior approval).
Before you can start coding, you will need to:
Key, Secret, and Callback URL are established during registration. If you have not yet registered, follow the steps on the Getting Credentials to Use the Personal Cloud Storage APIs page in the API Developer Guide to register.
In order to download Verizon Personal Cloud Storage SDK for Ruby, you must log on to ThingSpace Developer Portal and accept Verizon terms and conditions. If you start downloading the file without logging on, the download will stop and you will be redirected to the log on screen. Download will resume after a successful log on.
Ruby Version Manager, RVM is a command-line tool which allows you to install, work with, and manage Ruby environments. If you already have RVM installed, update it to the latest version using the following code. Otherwise, follow the steps below to instll RVM.
$ rvm get stable --autolibs=enable
1. Install Ruby Version Manager.
$ \curl -L https://get.rvm.io | bash -s stable
curlprevents potential version conflicts.
autolibsoption to identify and install components needed for your operating system. RVM will update your system and install all required dependencies for installing Ruby on Mac OS X.
Enter your Mac password if you see the following message during the installation:
mkdir: /etc/openssl: Permission denied mkdir -p "/etc/openssl" failed, retrying with sudo your password required for 'mkdir -p /etc/openssl':
If prompted, install Java SE 6 runtime for javac Java compiler.
After installing RVM, close and reopen the Terminal window or enter the following command to refresh the terminal environment:
$ source ~/.rvm/scripts/rvm
If you have trouble installing RVM, you can use
rvm implode command to remove all traces of RVM from your system (with exception of the changes RVM makes to your shell files such as
.bash_profile). You can also contact RVM team for support using IRC, Internet Relay Chat. You will have to register before you will be able to acces the chat.
2. Install Ruby.
RVM does not update system Ruby. It uses your shell to intercept all calls to Ruby. There’s no need to remove the system Ruby because the RVM version takes precedence.
To install the newest stable version, specify the version number as in the following example:
$ rvm install ruby-2.3.1
If prompted, enter your password.
NOTE: Type carefully, as you will not see the characters you enter.
Verify that the new version of Ruby is installed:
``` $ ruby -v ruby 2.3.1…
**3. Install ROR SDK.** 1. Place the code in the directory of your choice. 2. Verify that the directory structure looks like this: ``` /mydirectory --examples -- web_file_browser.rb --lib -- client.rb -- changelog --Gemfile --Gemfile.lock --License --Readme --api-sdk.gemspec --connection.yml (Configuration or connection variables) cd /opt/mydirectory ``` 3. Enter the following command from the terminal root: ``` gem install sinatra
Perform the installation.
gem install bundler
Browse to the code directory and enter the following command:
Change the directory to the example folder.
Start the server:
After the server has been started, you can access the app with the following:
Copyright © 2015-2017, Verizon and/or its Licensors. All rights reserved.