8000 GitHub - atward/awsrm: Simple AWS Resource "READONLY" Mapper for awspec.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
/ awsrm Public
forked from k1LoW/awsrm

Simple AWS Resource "READONLY" Mapper for awspec.

License

Notifications You must be signed in to change notification settings

atward/awsrm

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

awsrm Gem Travis

Simple AWS Resource "READONLY" Mapper for awspec.

Installation

Add this line to your application's Gemfile:

gem 'awsrm'

And then execute:

$ bundle

Or install it yourself as:

$ gem install awsrm

Usage

::one

Awsrm::Resource::one identify uniquely one resource or raise error. this method not like ActiveRecord find .

  • identify 1 resource -> return resource
  • identify 0 resource -> raise error
  • identify >1 resources -> raise error
require 'awspec'
require 'awsrm'

describe route_table(Awsrm::RouteTable.one(name: 'my-route-table', vpc: 'my-vpc').id) do
  it { should exist }
  it { should belong_to_vpc('my-vpc') }
end

::all

Awsrm::Resource::all return all resources.

  • identify 0 resource -> return empty array
  • identify >1 resources -> return resources array
require 'awspec'
require 'awsrm'

Awsrm::RouteTable.all(vpc: 'my-vpc').each do | route |
  describe route_table(route.id) do
    it { should exist }
    it { should belong_to_vpc('my-vpc') }
  end
end

Support AWS Resources

Resources

License

The gem is available as open source under the terms of the MIT License.

About

Simple AWS Resource "READONLY" Mapper for awspec.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 99.9%
  • Shell 0.1%
0