source stringclasses 1
value | repo stringlengths 5 63 | repo_url stringlengths 24 82 | path stringlengths 5 167 | language stringclasses 1
value | license stringclasses 5
values | stars int64 10 51.4k | ref stringclasses 23
values | size_bytes int64 200 258k | text stringlengths 137 258k |
|---|---|---|---|---|---|---|---|---|---|
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/spec/vagrant-openstack-provider/client/glance_spec.rb | Ruby | mit | 245 | master | 4,367 | require 'vagrant-openstack-provider/spec_helper'
describe VagrantPlugins::Openstack::GlanceClient do
let(:http) do
double('http').tap do |http|
http.stub(:read_timeout) { 42 }
http.stub(:open_timeout) { 43 }
http.stub(:proxy) { nil }
end
end
let(:config) do
double('config').tap do ... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/spec/vagrant-openstack-provider/client/heat_spec.rb | Ruby | mit | 245 | master | 3,931 | require 'vagrant-openstack-provider/spec_helper'
describe VagrantPlugins::Openstack::HeatClient do
include FakeFS::SpecHelpers::All
let(:http) do
double('http').tap do |http|
http.stub(:read_timeout) { 42 }
http.stub(:open_timeout) { 43 }
http.stub(:proxy) { nil }
end
end
let(:confi... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/spec/vagrant-openstack-provider/client/keystone_spec.rb | Ruby | mit | 245 | master | 7,590 | require 'vagrant-openstack-provider/spec_helper'
describe VagrantPlugins::Openstack::KeystoneClient do
let(:http) do
double('http').tap do |http|
http.stub(:read_timeout) { 42 }
http.stub(:open_timeout) { 43 }
http.stub(:proxy) { nil }
end
end
let(:config) do
double('config').tap d... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/spec/vagrant-openstack-provider/client/neutron_spec.rb | Ruby | mit | 245 | master | 5,416 | require 'vagrant-openstack-provider/spec_helper'
describe VagrantPlugins::Openstack::NeutronClient do
let(:http) do
double('http').tap do |http|
http.stub(:read_timeout) { 42 }
http.stub(:open_timeout) { 43 }
http.stub(:proxy) { nil }
end
end
let(:config) do
double('config').tap do... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/spec/vagrant-openstack-provider/client/utils_spec.rb | Ruby | mit | 245 | master | 5,168 | require 'vagrant-openstack-provider/spec_helper'
include VagrantPlugins::Openstack
describe VagrantPlugins::Openstack::HttpUtils do
let(:keystone) do
double('keystone').tap do |keystone|
keystone.stub(:authenticate).with(anything)
end
end
let(:env) do
{}.tap do |env|
env[:ui] = double('... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/spec/vagrant-openstack-provider/client/nova_spec.rb | Ruby | mit | 245 | master | 26,080 | require 'vagrant-openstack-provider/spec_helper'
describe VagrantPlugins::Openstack::NovaClient do
include FakeFS::SpecHelpers::All
let(:filename) { 'key.pub' }
let(:ssh_key_content) { 'my public key' }
let(:http) do
double('http').tap do |http|
http.stub(:read_timeout) { 42 }
http.stub(:open... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/spec/vagrant-openstack-provider/client/cinder_spec.rb | Ruby | mit | 245 | master | 5,612 | require 'vagrant-openstack-provider/spec_helper'
describe VagrantPlugins::Openstack::CinderClient do
let(:http) do
double('http').tap do |http|
http.stub(:read_timeout) { 42 }
http.stub(:open_timeout) { 43 }
http.stub(:proxy) { nil }
end
end
let(:config) do
double('config').tap do ... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/spec/vagrant-openstack-provider/action/provision_spec.rb | Ruby | mit | 245 | master | 2,884 | require 'vagrant-openstack-provider/spec_helper'
#
# Stubing all the interactions using the real
# provisioner classes is somehow complicated...
#
class FakeProvisioner
def provision
end
end
class FakeShellProvisioner < FakeProvisioner
attr_accessor :config
def initialize(config)
@config = config
end
e... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/spec/vagrant-openstack-provider/action/read_state_spec.rb | Ruby | mit | 245 | master | 2,343 | require 'vagrant-openstack-provider/spec_helper'
describe VagrantPlugins::Openstack::Action::ReadState do
let(:nova) do
double('nova')
end
let(:env) do
{}.tap do |env|
env[:ui] = double('ui').tap do |ui|
ui.stub(:info).with(anything)
ui.stub(:error).with(anything)
end
e... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/spec/vagrant-openstack-provider/action/create_server_spec.rb | Ruby | mit | 245 | master | 9,342 | require 'vagrant-openstack-provider/spec_helper'
require 'ostruct'
require 'sshkey'
include VagrantPlugins::Openstack::Action
include VagrantPlugins::Openstack::HttpUtils
include VagrantPlugins::Openstack::Domain
describe VagrantPlugins::Openstack::Action::CreateServer do
let(:config) do
double('config').tap do... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/spec/vagrant-openstack-provider/action/wait_active_spec.rb | Ruby | mit | 245 | master | 1,636 | require 'vagrant-openstack-provider/spec_helper'
describe VagrantPlugins::Openstack::Action::WaitForServerToBeActive do
let(:nova) do
double('nova')
end
let(:config) do
double('config')
end
let(:env) do
{}.tap do |env|
env[:ui] = double('ui').tap do |ui|
ui.stub(:info).with(anythi... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/spec/vagrant-openstack-provider/action/wait_stop_spec.rb | Ruby | mit | 245 | master | 1,617 | require 'vagrant-openstack-provider/spec_helper'
describe VagrantPlugins::Openstack::Action::WaitForServerToStop do
let(:nova) do
double('nova')
end
let(:config) do
double('config')
end
let(:env) do
{}.tap do |env|
env[:ui] = double('ui').tap do |ui|
ui.stub(:info).with(anything)
... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/spec/vagrant-openstack-provider/action/delete_server_spec.rb | Ruby | mit | 245 | master | 3,325 | require 'vagrant-openstack-provider/spec_helper'
describe VagrantPlugins::Openstack::Action::DeleteServer do
let(:nova) do
double('nova').tap do |app|
app.stub(:delete_server)
app.stub(:delete_keypair_if_vagrant)
end
end
let(:openstack_client) do
double('openstack_client').tap do |os|
... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/spec/vagrant-openstack-provider/action/create_stack_spec.rb | Ruby | mit | 245 | master | 3,565 | require 'vagrant-openstack-provider/spec_helper'
require 'ostruct'
require 'sshkey'
include VagrantPlugins::Openstack::Action
include VagrantPlugins::Openstack::HttpUtils
include VagrantPlugins::Openstack::Domain
describe VagrantPlugins::Openstack::Action::CreateStack do
let(:config) do
double('config').tap do ... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/spec/vagrant-openstack-provider/action/start_server_spec.rb | Ruby | mit | 245 | master | 1,253 | require 'vagrant-openstack-provider/spec_helper'
describe VagrantPlugins::Openstack::Action::StartServer do
let(:nova) do
double('nova').tap do |nova|
nova.stub(:start_server)
end
end
let(:env) do
{}.tap do |env|
env[:ui] = double('ui').tap do |ui|
ui.stub(:info).with(anything)
... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/spec/vagrant-openstack-provider/action/message_spec.rb | Ruby | mit | 245 | master | 712 | require 'vagrant-openstack-provider/spec_helper'
describe VagrantPlugins::Openstack::Action::Message do
let(:ui) do
double('ui').tap do |ui|
ui.stub(:info).with(anything)
ui.stub(:error).with(anything)
end
end
let(:env) do
{}.tap do |env|
env[:ui] = ui
end
end
let(:app) do... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/spec/vagrant-openstack-provider/action/read_ssh_info_spec.rb | Ruby | mit | 245 | master | 6,950 | require 'vagrant-openstack-provider/spec_helper'
include VagrantPlugins::Openstack::Action
include VagrantPlugins::Openstack::HttpUtils
include VagrantPlugins::Openstack::Domain
describe VagrantPlugins::Openstack::Action::ReadSSHInfo do
let(:config) do
double('config').tap do |config|
config.stub(:opensta... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/spec/vagrant-openstack-provider/action/suspend_server_spec.rb | Ruby | mit | 245 | master | 1,247 | require 'vagrant-openstack-provider/spec_helper'
describe VagrantPlugins::Openstack::Action::Suspend do
let(:nova) do
double('nova').tap do |nova|
nova.stub(:suspend_server)
end
end
let(:env) do
{}.tap do |env|
env[:ui] = double('ui').tap do |ui|
ui.stub(:info).with(anything)
... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/spec/vagrant-openstack-provider/action/sync_folders_spec.rb | Ruby | mit | 245 | master | 5,230 | require 'vagrant-openstack-provider/spec_helper'
require 'log4r'
require 'rbconfig'
require 'vagrant/util/subprocess'
include VagrantPlugins::Openstack::Action
describe VagrantPlugins::Openstack::Action::SyncFolders do
let(:app) do
double('app').tap do |app|
app.stub(:call).with(anything)
end
end
... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/spec/vagrant-openstack-provider/action/stop_server_spec.rb | Ruby | mit | 245 | master | 1,246 | require 'vagrant-openstack-provider/spec_helper'
describe VagrantPlugins::Openstack::Action::StopServer do
let(:nova) do
double('nova').tap do |nova|
nova.stub(:stop_server)
end
end
let(:env) do
{}.tap do |env|
env[:ui] = double('ui').tap do |ui|
ui.stub(:info).with(anything)
... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/spec/vagrant-openstack-provider/action/connect_openstack_spec.rb | Ruby | mit | 245 | master | 21,656 | require 'vagrant-openstack-provider/spec_helper'
include VagrantPlugins::Openstack::Action
include VagrantPlugins::Openstack::HttpUtils
describe VagrantPlugins::Openstack::Action::ConnectOpenstack do
let(:app) do
double.tap do |app|
app.stub(:call)
end
end
let(:config) do
double.tap do |confi... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/spec/vagrant-openstack-provider/action/resume_server_spec.rb | Ruby | mit | 245 | master | 1,241 | require 'vagrant-openstack-provider/spec_helper'
describe VagrantPlugins::Openstack::Action::Resume do
let(:nova) do
double('nova').tap do |nova|
nova.stub(:resume_server)
end
end
let(:env) do
{}.tap do |env|
env[:ui] = double('ui').tap do |ui|
ui.stub(:info).with(anything)
... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/spec/vagrant-openstack-provider/action/delete_stack_spec.rb | Ruby | mit | 245 | master | 1,825 | require 'vagrant-openstack-provider/spec_helper'
describe VagrantPlugins::Openstack::Action::DeleteStack do
let(:heat) do
double('heat').tap do |app|
app.stub(:delete_stack)
end
end
let(:openstack_client) do
double('openstack_client').tap do |os|
os.stub(:heat) { heat }
end
end
... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/lib/vagrant-openstack-provider.rb | Ruby | mit | 245 | master | 765 | require 'pathname'
require 'vagrant-openstack-provider/plugin'
require 'vagrant-openstack-provider/logging'
module VagrantPlugins
module Openstack
lib_path = Pathname.new(File.expand_path('../vagrant-openstack-provider', __FILE__))
autoload :Errors, lib_path.join('errors')
# This initializes the i18n l... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/lib/vagrant-openstack-provider/config.rb | Ruby | mit | 245 | master | 19,648 | require 'vagrant'
require 'colorize'
require 'vagrant-openstack-provider/config/http'
module VagrantPlugins
module Openstack
class Config < Vagrant.plugin('2', :config)
# The API key to access Openstack.
#
attr_accessor :password
# The compute service url to access Openstack. If nil, it ... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/lib/vagrant-openstack-provider/version.rb | Ruby | mit | 245 | master | 391 | module VagrantPlugins
module Openstack
#
# Stable versions must respect the pattern given
# by VagrantPlugins::Openstack::VERSION_PATTERN
#
VERSION = '0.13.0'
#
# Stable version must respect the naming convention 'x.y.z'
# where x, y and z are integers inside the range [0, 999]
#
... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/lib/vagrant-openstack-provider/version_checker.rb | Ruby | mit | 245 | master | 2,474 | require 'colorize'
require 'singleton'
require 'vagrant-openstack-provider/version'
module VagrantPlugins
module Openstack
class VersionChecker
include Singleton
#
# :latest, :outdated or :unstable
#
# A version is considered unstable if it does not
# respect the pattern or i... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/lib/vagrant-openstack-provider/action.rb | Ruby | mit | 245 | master | 11,607 | require 'pathname'
require 'vagrant/action/builder'
module VagrantPlugins
module Openstack
module Action
# Include the built-in modules so we can use them as top-level things.
include Vagrant::Action::Builtin
# This action is called to destroy the remote machine.
def self.action_destroy... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/lib/vagrant-openstack-provider/errors.rb | Ruby | mit | 245 | master | 4,998 | require 'vagrant'
module VagrantPlugins
module Openstack
module Errors
class VagrantOpenstackError < Vagrant::Errors::VagrantError
#
# Added for vagrant 1.4.x compatibility This attribute had been
# added in Vagrant::Errors::VagrantError form the version 1.5.0
#
attr... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/lib/vagrant-openstack-provider/config_resolver.rb | Ruby | mit | 245 | master | 13,719 | module VagrantPlugins
module Openstack
class ConfigResolver
def initialize
@logger = Log4r::Logger.new('vagrant_openstack::action::config_resolver')
end
def resolve_ssh_port(env)
machine_config = env[:machine].config
return machine_config.ssh.port if machine_config.ssh.p... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/lib/vagrant-openstack-provider/logging.rb | Ruby | mit | 245 | master | 1,339 | module VagrantPlugins
module Openstack
module Logging
# This initializes the logging so that our logs are outputted at
# the same level as Vagrant core logs.
def self.init
# Initialize logging
level = nil
begin
level = Log4r.const_get(ENV['VAGRANT_LOG'].upcase)
... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/lib/vagrant-openstack-provider/plugin.rb | Ruby | mit | 245 | master | 1,585 | begin
require 'vagrant'
rescue LoadError
raise 'The Openstack Cloud provider must be run within Vagrant.'
end
require 'vagrant-openstack-provider/version_checker'
# This is a sanity check to make sure no one is attempting to install
# this into an early Vagrant version.
if Vagrant::VERSION < '1.4.0'
fail 'Opens... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/lib/vagrant-openstack-provider/provider.rb | Ruby | mit | 245 | master | 1,514 | require 'vagrant'
require 'vagrant-openstack-provider/action'
module VagrantPlugins
module Openstack
class Provider < Vagrant.plugin('2', :provider)
def initialize(machine)
@machine = machine
end
def action(name)
# Attempt to get the action method from the Action class if it
... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/lib/vagrant-openstack-provider/utils.rb | Ruby | mit | 245 | master | 1,088 | module VagrantPlugins
module Openstack
class Utils
def initialize
@logger = Log4r::Logger.new('vagrant_openstack::action::config_resolver')
end
def get_ip_address(env)
addresses = env[:openstack_client].nova.get_server_details(env, env[:machine].id)['addresses']
addresse... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/lib/vagrant-openstack-provider/config/http.rb | Ruby | mit | 245 | master | 1,049 | module VagrantPlugins
module Openstack
class HttpConfig
UNSET_VALUE = Vagrant.plugin('2', :config).const_get(:UNSET_VALUE)
#
# @return [Integer]
attr_accessor :open_timeout
#
# @return [Integer]
attr_accessor :read_timeout
#
# @return [Integer]
attr_a... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/lib/vagrant-openstack-provider/action/delete_server.rb | Ruby | mit | 245 | master | 1,864 | require 'log4r'
require 'vagrant-openstack-provider/action/abstract_action'
module VagrantPlugins
module Openstack
module Action
# This deletes the running server, if there is one.
class DeleteServer < AbstractAction
def initialize(app, _env)
@app = app
@logger = Log4r... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/lib/vagrant-openstack-provider/action/provision.rb | Ruby | mit | 245 | master | 1,775 | require 'log4r'
require 'vagrant/action/builder'
require 'vagrant-openstack-provider/action/abstract_action'
require 'vagrant-openstack-provider/action/read_ssh_info'
module VagrantPlugins
module Openstack
module Action
include Vagrant::Action::Builtin
class ProvisionWrapper < AbstractAction
... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/lib/vagrant-openstack-provider/action/message.rb | Ruby | mit | 245 | master | 387 | require 'vagrant-openstack-provider/action/abstract_action'
module VagrantPlugins
module Openstack
module Action
class Message < AbstractAction
def initialize(app, _env, message)
@app = app
@message = message
end
def execute(env)
env[:ui].info(@message... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/lib/vagrant-openstack-provider/action/abstract_action.rb | Ruby | mit | 245 | master | 681 | require 'colorize'
module VagrantPlugins
module Openstack
module Action
class AbstractAction
def call(env)
execute(env)
# rubocop:disable Style/SpecialGlobalVars
# rubocop:disable Lint/RescueException
rescue Errors::VagrantOpenstackError, SystemExit, Interrupt => e... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/lib/vagrant-openstack-provider/action/start_server.rb | Ruby | mit | 245 | master | 611 | require 'log4r'
require 'vagrant-openstack-provider/action/abstract_action'
module VagrantPlugins
module Openstack
module Action
class StartServer < AbstractAction
def initialize(app, _env)
@app = app
@logger = Log4r::Logger.new('vagrant_openstack::action::start_server')
... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/lib/vagrant-openstack-provider/action/sync_folders.rb | Ruby | mit | 245 | master | 4,867 | require 'log4r'
require 'rbconfig'
require 'vagrant/util/subprocess'
require 'vagrant-openstack-provider/action/abstract_action'
module VagrantPlugins
module Openstack
module Action
class SyncFolders < AbstractAction
def initialize(app, _env)
@app = app
end
def execute(e... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/lib/vagrant-openstack-provider/action/resume.rb | Ruby | mit | 245 | master | 661 | require 'vagrant-openstack-provider/action/abstract_action'
module VagrantPlugins
module Openstack
module Action
class Resume < AbstractAction
def initialize(app, _env)
@app = app
@logger = Log4r::Logger.new('vagrant_openstack::action::resume_server')
end
def ex... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/lib/vagrant-openstack-provider/action/connect_openstack.rb | Ruby | mit | 245 | master | 2,290 | require 'log4r'
require 'json'
require 'vagrant-openstack-provider/client/openstack'
require 'vagrant-openstack-provider/client/request_logger'
require 'vagrant-openstack-provider/action/abstract_action'
require 'vagrant-openstack-provider/catalog/openstack_catalog'
module VagrantPlugins
module Openstack
module... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/lib/vagrant-openstack-provider/action/suspend.rb | Ruby | mit | 245 | master | 686 | require 'vagrant-openstack-provider/action/abstract_action'
module VagrantPlugins
module Openstack
module Action
class Suspend < AbstractAction
def initialize(app, _env)
@app = app
@logger = Log4r::Logger.new('vagrant_openstack::action::suspend_server')
end
def ... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/lib/vagrant-openstack-provider/action/snapshot_restore.rb | Ruby | mit | 245 | master | 767 | require 'vagrant-openstack-provider/action/abstract_action'
module VagrantPlugins
module Openstack
module Action
class SnapshotRestore < AbstractAction
def initialize(app, _env)
@app = app
end
def call(env)
nova = env[:openstack_client].nova
machine_sn... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/lib/vagrant-openstack-provider/action/read_state.rb | Ruby | mit | 245 | master | 1,271 | require 'log4r'
require 'vagrant-openstack-provider/action/abstract_action'
module VagrantPlugins
module Openstack
module Action
# This action reads the state of the machine and puts it in the
# `:machine_state_id` key in the environment.
class ReadState < AbstractAction
def initialize... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/lib/vagrant-openstack-provider/action/snapshot_delete.rb | Ruby | mit | 245 | master | 874 | require 'vagrant-openstack-provider/action/abstract_action'
module VagrantPlugins
module Openstack
module Action
class SnapshotDelete < AbstractAction
def initialize(app, _env)
@app = app
end
def call(env)
nova = env[:openstack_client].nova
machine_sna... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/lib/vagrant-openstack-provider/action/wait_active.rb | Ruby | mit | 245 | master | 1,031 | require 'log4r'
require 'timeout'
require 'vagrant-openstack-provider/action/abstract_action'
module VagrantPlugins
module Openstack
module Action
class WaitForServerToBeActive < AbstractAction
def initialize(app, _env, retry_interval = 3)
@app = app
@logger = Log4r::Logger.... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/lib/vagrant-openstack-provider/action/snapshot_list.rb | Ruby | mit | 245 | master | 506 | require 'vagrant-openstack-provider/action/abstract_action'
module VagrantPlugins
module Openstack
module Action
class SnapshotList < AbstractAction
def initialize(app, _env)
@app = app
end
def call(env)
nova = env[:openstack_client].nova
machine_snaps... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/lib/vagrant-openstack-provider/action/snapshot_cleanup.rb | Ruby | mit | 245 | master | 813 | require 'vagrant-openstack-provider/action/abstract_action'
module VagrantPlugins
module Openstack
module Action
class SnapshotCleanup < AbstractAction
def initialize(app, _env)
@app = app
end
def call(env)
nova = env[:openstack_client].nova
machine_sn... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/lib/vagrant-openstack-provider/action/snapshot_save.rb | Ruby | mit | 245 | master | 1,476 | require 'vagrant-openstack-provider/action/abstract_action'
module VagrantPlugins
module Openstack
module Action
class SnapshotSave < AbstractAction
def initialize(app, _env, retry_interval = 3)
@app = app
@retry_interval = retry_interval
end
def call(env)
... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/lib/vagrant-openstack-provider/action/delete_stack.rb | Ruby | mit | 245 | master | 2,442 | require 'log4r'
require 'socket'
require 'timeout'
require 'sshkey'
require 'yaml'
require 'vagrant-openstack-provider/config_resolver'
require 'vagrant-openstack-provider/utils'
require 'vagrant-openstack-provider/action/abstract_action'
require 'vagrant/util/retryable'
module VagrantPlugins
module Openstack
m... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/lib/vagrant-openstack-provider/action/read_ssh_info.rb | Ruby | mit | 245 | master | 2,369 | require 'log4r'
require 'vagrant-openstack-provider/config_resolver'
require 'vagrant-openstack-provider/utils'
require 'vagrant-openstack-provider/action/abstract_action'
module VagrantPlugins
module Openstack
module Action
# This action reads the SSH info for the machine and puts it into the
# `:m... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/lib/vagrant-openstack-provider/action/create_stack.rb | Ruby | mit | 245 | master | 2,416 | require 'log4r'
require 'socket'
require 'timeout'
require 'sshkey'
require 'yaml'
require 'vagrant-openstack-provider/config_resolver'
require 'vagrant-openstack-provider/utils'
require 'vagrant-openstack-provider/action/abstract_action'
require 'vagrant/util/retryable'
module VagrantPlugins
module Openstack
m... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/lib/vagrant-openstack-provider/action/wait_stop.rb | Ruby | mit | 245 | master | 1,019 | require 'log4r'
require 'timeout'
require 'vagrant-openstack-provider/action/abstract_action'
module VagrantPlugins
module Openstack
module Action
class WaitForServerToStop < AbstractAction
def initialize(app, _env, retry_interval = 3)
@app = app
@logger = Log4r::Logger.new(... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/lib/vagrant-openstack-provider/action/create_server.rb | Ruby | mit | 245 | master | 7,782 | require 'log4r'
require 'socket'
require 'timeout'
require 'sshkey'
require 'vagrant-openstack-provider/config_resolver'
require 'vagrant-openstack-provider/utils'
require 'vagrant-openstack-provider/action/abstract_action'
require 'vagrant/util/retryable'
module VagrantPlugins
module Openstack
module Action
... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/lib/vagrant-openstack-provider/action/stop_server.rb | Ruby | mit | 245 | master | 674 | require 'log4r'
require 'vagrant-openstack-provider/action/abstract_action'
module VagrantPlugins
module Openstack
module Action
class StopServer < AbstractAction
def initialize(app, _env)
@app = app
@logger = Log4r::Logger.new('vagrant_openstack::action::stop_server')
... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/lib/vagrant-openstack-provider/cap/snapshot_list.rb | Ruby | mit | 245 | master | 378 | module VagrantPlugins
module Openstack
module Cap
module SnapshotList
# Returns a list of the snapshots that are taken on this machine.
#
# @return [Array<String>]
def self.snapshot_list(machine)
env = machine.action(:snapshot_list, lock: false)
env[:machi... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/lib/vagrant-openstack-provider/client/http_utils.rb | Ruby | mit | 245 | master | 3,505 | require 'log4r'
require 'json'
require 'vagrant-openstack-provider/client/keystone'
require 'vagrant-openstack-provider/client/request_logger'
require 'vagrant-openstack-provider/client/rest_utils'
module VagrantPlugins
module Openstack
module HttpUtils
include VagrantPlugins::Openstack::HttpUtils::Reques... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/lib/vagrant-openstack-provider/client/heat.rb | Ruby | mit | 245 | master | 1,462 | require 'log4r'
require 'json'
require 'vagrant-openstack-provider/client/http_utils'
require 'vagrant-openstack-provider/client/domain'
module VagrantPlugins
module Openstack
class HeatClient
include Singleton
include VagrantPlugins::Openstack::HttpUtils
include VagrantPlugins::Openstack::Dom... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/lib/vagrant-openstack-provider/client/domain.rb | Ruby | mit | 245 | master | 3,573 | require 'log4r'
require 'json'
module VagrantPlugins
module Openstack
module Domain
class Item
attr_accessor :id, :name
def initialize(id, name)
@id = id
@name = name
end
def ==(other)
other.class == self.class && other.state == state
e... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/lib/vagrant-openstack-provider/client/openstack.rb | Ruby | mit | 245 | master | 1,138 | require 'log4r'
require 'json'
require 'vagrant-openstack-provider/client/heat'
require 'vagrant-openstack-provider/client/keystone'
require 'vagrant-openstack-provider/client/nova'
require 'vagrant-openstack-provider/client/neutron'
require 'vagrant-openstack-provider/client/cinder'
require 'vagrant-openstack-provide... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/lib/vagrant-openstack-provider/client/cinder.rb | Ruby | mit | 245 | master | 1,510 | require 'log4r'
require 'json'
require 'vagrant-openstack-provider/client/http_utils'
require 'vagrant-openstack-provider/client/domain'
module VagrantPlugins
module Openstack
class CinderClient
include Singleton
include VagrantPlugins::Openstack::HttpUtils
include VagrantPlugins::Openstack::D... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/lib/vagrant-openstack-provider/client/request_logger.rb | Ruby | mit | 245 | master | 705 | require 'log4r'
require 'json'
module VagrantPlugins
module Openstack
module HttpUtils
module RequestLogger
def log_request(method, url, body = nil, headers)
@logger.debug "request => method : #{method}"
@logger.debug "request => url : #{url}"
@logger.debug "req... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/lib/vagrant-openstack-provider/client/nova.rb | Ruby | mit | 245 | master | 10,846 | require 'log4r'
require 'json'
require 'vagrant-openstack-provider/client/http_utils'
require 'vagrant-openstack-provider/client/domain'
module VagrantPlugins
module Openstack
class NovaClient
include Singleton
include VagrantPlugins::Openstack::HttpUtils
include VagrantPlugins::Openstack::Dom... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/lib/vagrant-openstack-provider/client/keystone.rb | Ruby | mit | 245 | master | 3,698 | require 'log4r'
require 'json'
require 'vagrant-openstack-provider/client/request_logger'
module VagrantPlugins
module Openstack
class KeystoneClient
include Singleton
include VagrantPlugins::Openstack::HttpUtils::RequestLogger
def initialize
@logger = Log4r::Logger.new('vagrant_opens... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/lib/vagrant-openstack-provider/client/neutron.rb | Ruby | mit | 245 | master | 1,314 | require 'log4r'
require 'json'
require 'vagrant-openstack-provider/client/http_utils'
require 'vagrant-openstack-provider/client/domain'
module VagrantPlugins
module Openstack
class NeutronClient
include Singleton
include VagrantPlugins::Openstack::HttpUtils
include VagrantPlugins::Openstack::... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/lib/vagrant-openstack-provider/client/rest_utils.rb | Ruby | mit | 245 | master | 1,724 | require 'restclient'
module VagrantPlugins
module Openstack
module RestUtils
def self._set_proxy(config)
@logger = Log4r::Logger.new('vagrant_openstack::restutils')
if config.http.proxy
RestClient.proxy = config.http.proxy
@logger.info "Setting up HTTP proxy to '#{config... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/lib/vagrant-openstack-provider/client/glance.rb | Ruby | mit | 245 | master | 2,076 | require 'log4r'
require 'json'
require 'vagrant-openstack-provider/client/http_utils'
require 'vagrant-openstack-provider/client/rest_utils'
require 'vagrant-openstack-provider/client/domain'
module VagrantPlugins
module Openstack
class GlanceClient
include Singleton
include VagrantPlugins::Openstac... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/lib/vagrant-openstack-provider/command/subnet_list.rb | Ruby | mit | 245 | master | 712 | require 'vagrant-openstack-provider/command/openstack_command'
module VagrantPlugins
module Openstack
module Command
class SubnetList < OpenstackCommand
def self.synopsis
I18n.t('vagrant_openstack.command.subnet_list_synopsis')
end
def cmd(name, argv, env)
fail ... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/lib/vagrant-openstack-provider/command/image_list.rb | Ruby | mit | 245 | master | 1,062 | require 'vagrant-openstack-provider/command/openstack_command'
module VagrantPlugins
module Openstack
module Command
class ImageList < OpenstackCommand
def self.synopsis
I18n.t('vagrant_openstack.command.image_list_synopsis')
end
def cmd(name, argv, env)
fail Er... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/lib/vagrant-openstack-provider/command/flavor_list.rb | Ruby | mit | 245 | master | 707 | require 'vagrant-openstack-provider/command/openstack_command'
module VagrantPlugins
module Openstack
module Command
class FlavorList < OpenstackCommand
def self.synopsis
I18n.t('vagrant_openstack.command.flavor_list_synopsis')
end
def cmd(name, argv, env)
fail ... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/lib/vagrant-openstack-provider/command/utils.rb | Ruby | mit | 245 | master | 506 | require 'terminal-table'
module VagrantPlugins
module Openstack
module Command
module Utils
def display_item_list(env, items)
rows = []
items.each do |item|
rows << [item.id, item.name]
end
display_table(env, %w(ID Name), rows)
end
... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/lib/vagrant-openstack-provider/command/reset.rb | Ruby | mit | 245 | master | 582 | require 'vagrant-openstack-provider/command/utils'
require 'vagrant-openstack-provider/command/abstract_command'
module VagrantPlugins
module Openstack
module Command
class Reset < AbstractCommand
def self.synopsis
I18n.t('vagrant_openstack.command.reset')
end
def cmd(nam... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/lib/vagrant-openstack-provider/command/volume_list.rb | Ruby | mit | 245 | master | 823 | require 'vagrant-openstack-provider/command/openstack_command'
module VagrantPlugins
module Openstack
module Command
class VolumeList < OpenstackCommand
def self.synopsis
I18n.t('vagrant_openstack.command.volume_list_synopsis')
end
def cmd(name, argv, env)
fail ... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/lib/vagrant-openstack-provider/command/floatingip_list.rb | Ruby | mit | 245 | master | 1,049 | require 'vagrant-openstack-provider/command/openstack_command'
module VagrantPlugins
module Openstack
module Command
class FloatingIpList < OpenstackCommand
def self.synopsis
I18n.t('vagrant_openstack.command.flaotingip_list_synopsis')
end
def cmd(name, argv, env)
... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/lib/vagrant-openstack-provider/command/main.rb | Ruby | mit | 245 | master | 1,804 | module VagrantPlugins
module Openstack
module Command
COMMANDS = [
{ name: :'image-list', file: 'image_list', clazz: 'ImageList' },
{ name: :'flavor-list', file: 'flavor_list', clazz: 'FlavorList' },
{ name: :'network-list', file: 'network_list', clazz: 'NetworkList' },
{ nam... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/lib/vagrant-openstack-provider/command/network_list.rb | Ruby | mit | 245 | master | 803 | require 'vagrant-openstack-provider/command/openstack_command'
module VagrantPlugins
module Openstack
module Command
class NetworkList < OpenstackCommand
def self.synopsis
I18n.t('vagrant_openstack.command.network_list_synopsis')
end
def cmd(name, argv, env)
fai... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/lib/vagrant-openstack-provider/command/openstack_command.rb | Ruby | mit | 245 | master | 448 | require 'vagrant-openstack-provider/command/utils'
require 'vagrant-openstack-provider/command/abstract_command'
module VagrantPlugins
module Openstack
module Command
class OpenstackCommand < AbstractCommand
include VagrantPlugins::Openstack::Command::Utils
def before_cmd(_name, _argv, env... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/lib/vagrant-openstack-provider/command/abstract_command.rb | Ruby | mit | 245 | master | 1,456 | require 'vagrant-openstack-provider/client/openstack'
require 'colorize'
module VagrantPlugins
module Openstack
module Command
class AbstractCommand < Vagrant.plugin('2', :command)
def initialize(argv, env)
@env = env
super(normalize_args(argv), env)
end
def exe... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/lib/vagrant-openstack-provider/catalog/openstack_catalog.rb | Ruby | mit | 245 | master | 3,653 | module VagrantPlugins
module Openstack
module Catalog
class OpenstackCatalog
def initialize
@logger = Log4r::Logger.new('vagrant_openstack::action::openstack_reader')
end
def read(env, catalog)
config = env[:machine].provider_config
client = env[:openst... |
github | ggiamarchi/vagrant-openstack-provider | https://github.com/ggiamarchi/vagrant-openstack-provider | source/functional_tests/Vagrantfile | Ruby | mit | 245 | master | 2,129 | require 'vagrant-openstack-provider'
Vagrant.configure('2') do |config|
config.vm.box = 'openstack'
config.vm.box_url = 'https://github.com/ggiamarchi/vagrant-openstack/raw/master/source/dummy.box'
config.vm.boot_timeout = ENV['OS_SSH_TIMEOUT'].to_i
config.ssh.private_key_path = ENV['OS_KEYPAIR_PRIVATE_KEY']... |
github | syncforynab/fintech-to-ynab | https://github.com/syncforynab/fintech-to-ynab | Gemfile | Ruby | mit | 246 | main | 594 | ruby '2.7.2'
source 'https://rubygems.org'
git_source(:github) do |repo_name|
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
"https://github.com/#{repo_name}.git"
end
gem 'rails', '~> 6.1'
gem 'puma'
gem 'f2ynab'
# gem 'f2ynab', path: '../f2ynab'
# Utilities
gem 'awesome_print'
gem 'com... |
github | syncforynab/fintech-to-ynab | https://github.com/syncforynab/fintech-to-ynab | spec/rails_helper.rb | Ruby | mit | 246 | main | 609 | # This file is copied to spec/ when you run 'rails generate rspec:install'
require 'simplecov'
SimpleCov.start
if ENV['CI']
require 'codecov'
SimpleCov.formatter = SimpleCov::Formatter::Codecov
end
require 'spec_helper'
ENV['RAILS_ENV'] ||= 'test'
require File.expand_path('../../config/environment', __FILE__)
ab... |
github | syncforynab/fintech-to-ynab | https://github.com/syncforynab/fintech-to-ynab | spec/spec_helper.rb | Ruby | mit | 246 | main | 312 | RSpec.configure do |config|
config.expect_with :rspec do |expectations|
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
end
config.mock_with :rspec do |mocks|
mocks.verify_partial_doubles = true
end
config.shared_context_metadata_behavior = :apply_to_host_groups
end |
github | syncforynab/fintech-to-ynab | https://github.com/syncforynab/fintech-to-ynab | spec/controllers/monzo_controller_spec.rb | Ruby | mit | 246 | main | 2,320 | require 'rails_helper'
RSpec.describe MonzoController, type: :controller do
describe '#receive' do
subject { post :receive, body: body.to_json, format: :json }
let(:body) { {} }
context 'when a URL_SECRET is set, but none is passed' do
before { allow(ENV).to receive(:[]).with('URL_SECRET').and_ret... |
github | syncforynab/fintech-to-ynab | https://github.com/syncforynab/fintech-to-ynab | spec/controllers/starling_controller_spec.rb | Ruby | mit | 246 | main | 1,633 | require 'rails_helper'
RSpec.describe StarlingController, type: :controller do
describe '#receive' do
subject { post :receive, body: body.to_json, format: :json }
let(:body) { {} }
context 'when a URL_SECRET is set, but none is passed' do
before { allow(ENV).to receive(:[]).with('URL_SECRET').and_... |
github | syncforynab/fintech-to-ynab | https://github.com/syncforynab/fintech-to-ynab | spec/support/response_matcher.rb | Ruby | mit | 246 | main | 241 | RSpec::Matchers.define :have_json do |expected_json|
match do |response|
JSON.parse(response.body) == expected_json
end
failure_message do |response|
"Expected #{JSON.parse(response.body)} to match #{expected_json}"
end
end |
github | syncforynab/fintech-to-ynab | https://github.com/syncforynab/fintech-to-ynab | config/routes.rb | Ruby | mit | 246 | main | 236 | Rails.application.routes.draw do
root to: 'application#home'
get '/ping', to: 'application#ping'
post '/monzo', to: 'monzo#receive'
post '/starling', to: 'starling#receive'
post '/starling/feed-item', to: 'starlingv2#feed'
end |
github | syncforynab/fintech-to-ynab | https://github.com/syncforynab/fintech-to-ynab | config/application.rb | Ruby | mit | 246 | main | 1,162 | require_relative 'boot'
require "rails"
# Pick the frameworks you want:
require "active_model/railtie"
require "active_job/railtie"
# require "active_record/railtie"
require "action_controller/railtie"
# require "action_mailer/railtie"
require "action_view/railtie"
# require "action_cable/engine"
# require "sprockets/... |
github | syncforynab/fintech-to-ynab | https://github.com/syncforynab/fintech-to-ynab | config/environments/development.rb | Ruby | mit | 246 | main | 1,542 | Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# In the development environment your application's code is reloaded on
# every request. This slows down response time but is perfect for development
# since you don't have to restart the web serv... |
github | syncforynab/fintech-to-ynab | https://github.com/syncforynab/fintech-to-ynab | config/environments/production.rb | Ruby | mit | 246 | main | 2,838 | Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# Code is not reloaded between requests.
config.cache_classes = true
# Eager load code on boot. This eager loads most of Rails and
# your application in memory, allowing both threaded web serve... |
github | syncforynab/fintech-to-ynab | https://github.com/syncforynab/fintech-to-ynab | config/environments/test.rb | Ruby | mit | 246 | main | 1,397 | Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# The test environment is used exclusively to run your application's
# test suite. You never need to work with it otherwise. Remember that
# your test database is "scratch space" for the test suit... |
github | syncforynab/fintech-to-ynab | https://github.com/syncforynab/fintech-to-ynab | app/controllers/application_controller.rb | Ruby | mit | 246 | main | 405 | class ApplicationController < ActionController::API
before_action :verify_token, except: [:home, :ping]
def home
redirect_to 'https://github.com/syncforynab/fintech-to-ynab'
end
def ping
render json: { pong: true }
end
private
def verify_token
render json: { error: :unauthorised }, status:... |
github | syncforynab/fintech-to-ynab | https://github.com/syncforynab/fintech-to-ynab | app/controllers/monzo_controller.rb | Ruby | mit | 246 | main | 799 | class MonzoController < ApplicationController
def receive
webhook = JSON.parse(request.body.read, symbolize_names: true)
ynab_budget_id = params[:ynab_budget_id] || ENV['YNAB_BUDGET_ID']
ynab_account_id = params[:ynab_account_id] || ENV['YNAB_MONZO_ACCOUNT_ID'] || ENV['YNAB_ACCOUNT_ID']
ynab_client =... |
github | syncforynab/fintech-to-ynab | https://github.com/syncforynab/fintech-to-ynab | app/controllers/starling_controller.rb | Ruby | mit | 246 | main | 692 | class StarlingController < ApplicationController
def receive
webhook = JSON.parse(request.body.read, symbolize_names: true)
ynab_budget_id = params[:ynab_budget_id] || ENV['YNAB_BUDGET_ID']
ynab_account_id = params[:ynab_account_id] || ENV['YNAB_STARLING_ACCOUNT_ID']
ynab_client = ::F2ynab::YNAB::Cli... |
github | syncforynab/fintech-to-ynab | https://github.com/syncforynab/fintech-to-ynab | app/controllers/starlingv2_controller.rb | Ruby | mit | 246 | main | 1,865 | class Starlingv2Controller < ApplicationController
SUPPORTED_SOURCES = %w[
MASTER_CARD
CASH_WITHDRAWAL
DIRECT_CREDIT
DIRECT_DEBIT
DIRECT_DEBIT_DISPUTE
FASTER_PAYMENTS_IN
FASTER_PAYMENTS_OUT
FASTER_PAYMENTS_REVERSAL
INTEREST_PAYMENT
INTERN... |
github | pundit-community/pundit-matchers | https://github.com/pundit-community/pundit-matchers | pundit-matchers.gemspec | Ruby | mit | 245 | main | 717 | # frozen_string_literal: true
Gem::Specification.new do |s|
s.name = 'pundit-matchers'
s.version = '4.0.0'
s.summary = 'RSpec matchers for Pundit policies'
s.description = 'A set of RSpec matchers for testing Pundit authorisation ' \
'policies'
s.authors = ['Chris Alley']... |
github | pundit-community/pundit-matchers | https://github.com/pundit-community/pundit-matchers | Gemfile | Ruby | mit | 245 | main | 421 | # frozen_string_literal: true
source 'https://rubygems.org'
gemspec
gem 'bundler'
gem 'rake'
gem 'rubocop', '~> 1.84', require: false
gem 'rubocop-packaging', '~> 0.6.0', require: false
gem 'rubocop-performance', '~> 1.26', require: false
gem 'rubocop-rake', '~> 0.7.1', require: false
gem 'rubocop-rspec', '~> 3.9',... |
github | pundit-community/pundit-matchers | https://github.com/pundit-community/pundit-matchers | lib/pundit/matchers.rb | Ruby | mit | 245 | main | 6,581 | # frozen_string_literal: true
require 'rspec/core'
require_relative 'matchers/permit_actions_matcher'
require_relative 'matchers/permit_attributes_matcher'
require_relative 'matchers/forbid_all_actions_matcher'
require_relative 'matchers/forbid_only_actions_matcher'
require_relative 'matchers/permit_all_actions_ma... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.