Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

soar_sc_mvc

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

soar_sc_mvc

  • 0.2.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

SoarScMvc

This library includes a configured controller, configured model and model factory supporting the SOAR reference implementation service component MVC. ConfiguredController provides access to soar_sc dependencies as and requesty body, as well as a configured and ready-to-use SMAAK client.

Installation

Add this line to your application's Gemfile:

gem 'soar_sc_mvc'

And then execute:

$ bundle

Or install it yourself as:

$ gem install soar_sc_mvc

Usage

SoarSc::Web::Models::ModelFactory

Given a configuration with a provider adhering to SoarSc::Web::Models::ConfiguredModel, configured as follows:

{ 'providers' => 
  { 'my_provider' => 
    { 'adaptor' => 'MyAdaptorClass',
      'some' => 'value' }
  }
}

an instance of the model (MyAdaptorClass), readily configured with the configuration hierarchy

{ 'some' => 'value' }

can be obtained so:

model_factory = SoarSc::Web::Models::ModelFactory.new(configuration)
model = model_factory.create('my_provider')

ConfiguredModel

class MyModel < SoarSc::Web::Models::ConfiguredModel
end

model = MyModel.new(configuration)
puts model.configuration

ConfiguredController

class MyController < SoarSc::Web::Controllers::ConfiguredController def serve(request) puts "Dependencies are: #{dependencies}" puts "body is #{body(requests)}" puts "I can use smaak client #{smaak_client}" [200, "100"] end end

controller = MyController.new(configuration)

Contributing

Please send feedback and comments to the author at:

Ernst van Graan ernst.van.graan@hetzner.co.za

This gem is sponsored by Hetzner (Pty) Ltd - http://hetzner.co.za

License

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

FAQs

Package last updated on 21 Oct 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc