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
socialpandas/sidekiq_monitor
https://github.com/socialpandas/sidekiq_monitor
lib/sidekiq/monitor/processor.rb
Ruby
mit
229
master
2,671
module Sidekiq module Monitor class Processor def queue(worker_class, item, queue) job = find_or_initialize_job(worker_class, item, queue) job.save end def start(worker, item, queue) job = find_or_initialize_job(worker, item, queue) job.update_attributes( ...
github
socialpandas/sidekiq_monitor
https://github.com/socialpandas/sidekiq_monitor
lib/sidekiq/monitor/cleaner.rb
Ruby
mit
229
master
1,946
module Sidekiq module Monitor class Cleaner @ignored_queues = [] class << self attr_reader :ignored_queues def add_ignored_queue(queue) @ignored_queues << queue.to_s @ignored_queues.uniq! end end # Cleans up records that are no longer in sync ...
github
socialpandas/sidekiq_monitor
https://github.com/socialpandas/sidekiq_monitor
lib/sidekiq/monitor/engine.rb
Ruby
mit
229
master
261
module Sidekiq module Monitor class Engine < ::Rails::Engine isolate_namespace Monitor initializer "sidekiq_monitor.asset_pipeline" do |app| app.config.assets.precompile << 'sidekiq/monitor/application.js' end end end end
github
socialpandas/sidekiq_monitor
https://github.com/socialpandas/sidekiq_monitor
lib/sidekiq/monitor/client/middleware.rb
Ruby
mit
229
master
420
module Sidekiq module Monitor module Client class Middleware def initialize(options=nil) @processor = Monitor::Processor.new end def call(worker_class, item, queue, redis_pool=nil) ActiveRecord::Base.connection_pool.with_connection do @processor.queue...
github
socialpandas/sidekiq_monitor
https://github.com/socialpandas/sidekiq_monitor
lib/sidekiq/monitor/server/middleware.rb
Ruby
mit
229
master
682
module Sidekiq module Monitor module Server class Middleware def initialize(options=nil) @processor = Monitor::Processor.new end def call(worker, msg, queue, redis_pool=nil) ActiveRecord::Base.connection_pool.with_connection do @processor.start(worker...
github
socialpandas/sidekiq_monitor
https://github.com/socialpandas/sidekiq_monitor
app/controllers/sidekiq/monitor/queues_controller.rb
Ruby
mit
229
master
358
module Sidekiq module Monitor class QueuesController < ActionController::Base protect_from_forgery layout 'sidekiq/monitor/layouts/application' helper Sidekiq::Monitor::SidekiqHelper def index @queues = Sidekiq::Monitor::Job.select('DISTINCT queue').collect { |job| job.que...
github
socialpandas/sidekiq_monitor
https://github.com/socialpandas/sidekiq_monitor
app/controllers/sidekiq/monitor/jobs_controller.rb
Ruby
mit
229
master
285
module Sidekiq module Monitor class JobsController < ActionController::Base protect_from_forgery layout 'sidekiq/monitor/layouts/application' helper Sidekiq::Monitor::SidekiqHelper def index end def graph end end end end
github
socialpandas/sidekiq_monitor
https://github.com/socialpandas/sidekiq_monitor
app/controllers/sidekiq/monitor/api/jobs_controller.rb
Ruby
mit
229
master
2,217
module Sidekiq module Monitor module Api class JobsController < ActionController::Base protect_from_forgery def index render json: JobsDatatable.new(view_context) end def graph queues_jobs = Sidekiq::Monitor::Job.select('queue, status').all.group_by(&:qu...
github
socialpandas/sidekiq_monitor
https://github.com/socialpandas/sidekiq_monitor
app/controllers/sidekiq/monitor/api/queues_controller.rb
Ruby
mit
229
master
728
module Sidekiq module Monitor module Api class QueuesController < ActionController::Base protect_from_forgery def show queue = params[:queue] render json: {}, status: 404 and return if queue.blank? status_counts = Sidekiq::Monitor::Job.where(queue: queue).coun...
github
socialpandas/sidekiq_monitor
https://github.com/socialpandas/sidekiq_monitor
app/models/sidekiq/monitor/job.rb
Ruby
mit
229
master
1,442
module Sidekiq module Monitor class Job < ActiveRecord::Base attr_accessible :args, :class_name, :enqueued_at, :finished_at, :jid, :name, :queue, :result, :retry, :started_at, :status if ActiveRecord::VERSION::MAJOR < 4 || ActiveRecord.constants.include?(:MassAssignmentSecurity) serialize :args ...
github
socialpandas/sidekiq_monitor
https://github.com/socialpandas/sidekiq_monitor
app/datatables/sidekiq/monitor/jobs_datatable.rb
Ruby
mit
229
master
4,019
module Sidekiq module Monitor class JobsDatatable < RailsDatatables include ActionView::Helpers::DateHelper @search_filters = [] class << self attr_reader :search_filters def add_search_filter(search_filter) @search_filters << search_filter end end ...
github
socialpandas/sidekiq_monitor
https://github.com/socialpandas/sidekiq_monitor
config/routes.rb
Ruby
mit
229
master
503
Sidekiq::Monitor::Engine.routes.draw do get '/', to: 'jobs#index', :as => 'sidekiq_monitor' get '/graph', to: 'jobs#graph' get '/queues', to: 'queues#index' namespace 'api' do get '/jobs', to: 'jobs#index' get '/jobs/clean', to: 'jobs#clean' get '/jobs/custom_views/:id', to: 'jobs#custom_views' ...
github
how2dock/docbook
https://github.com/how2dock/docbook
ch04/overlay/Vagrantfile
Ruby
apache-2.0
229
master
846
# -*- mode: ruby -*- # vi: set ft=ruby : # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! VAGRANTFILE_API_VERSION = "2" $bootstrap=<<SCRIPT apt-get update apt-get -y install wget curl git curl -sSL https://get.docker.com | sh gpasswd -a vagrant docker service docker restart SCRIPT Vag...
github
how2dock/docbook
https://github.com/how2dock/docbook
ch04/dockerpytls/Vagrantfile
Ruby
apache-2.0
229
master
971
# -*- mode: ruby -*- # vi: set ft=ruby : # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! VAGRANTFILE_API_VERSION = "2" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| # Every Vagrant virtual environment requires a box to build off of. config.vm.box = "ubuntu/trusty64" # ...
github
how2dock/docbook
https://github.com/how2dock/docbook
ch04/runc/Vagrantfile
Ruby
apache-2.0
229
master
1,363
# -*- mode: ruby -*- # vi: set ft=ruby : # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! VAGRANTFILE_API_VERSION = "2" $bootstrap=<<SCRIPT apt-get update apt-get -y install wget curl git curl -sSL https://get.docker.com | sh gpasswd -a vagrant docker service docker restart wget https:...
github
how2dock/docbook
https://github.com/how2dock/docbook
ch04/compile/Vagrantfile
Ruby
apache-2.0
229
master
936
# -*- mode: ruby -*- # vi: set ft=ruby : # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! VAGRANTFILE_API_VERSION = "2" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| # Every Vagrant virtual environment requires a box to build off of. config.vm.box = "ubuntu/trusty64" # ...
github
how2dock/docbook
https://github.com/how2dock/docbook
ch09/logspout/Vagrantfile
Ruby
apache-2.0
229
master
1,287
# -*- mode: ruby -*- # vi: set ft=ruby : # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! VAGRANTFILE_API_VERSION = "2" $bootstrap=<<SCRIPT apt-get update curl -sSL https://get.docker.com/ | sudo sh gpasswd -a vagrant docker SCRIPT Vagrant.configure(VAGRANTFILE_API_VERSION) do |config...
github
how2dock/docbook
https://github.com/how2dock/docbook
ch09/weavescope/Vagrantfile
Ruby
apache-2.0
229
master
1,234
# -*- mode: ruby -*- # vi: set ft=ruby : # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! VAGRANTFILE_API_VERSION = "2" $bootstrap=<<SCRIPT apt-get update curl -sSL https://get.docker.com/ | sudo sh gpasswd -a vagrant docker service docker restart curl -L https://github.com/docker/comp...
github
how2dock/docbook
https://github.com/how2dock/docbook
ch09/cadvisor/Vagrantfile
Ruby
apache-2.0
229
master
750
# -*- mode: ruby -*- # vi: set ft=ruby : # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! VAGRANTFILE_API_VERSION = "2" $bootstrap=<<SCRIPT apt-get update curl -sSL https://get.docker.com/ | sudo sh gpasswd -a vagrant docker SCRIPT Vagrant.configure(VAGRANTFILE_API_VERSION) do |config...
github
how2dock/docbook
https://github.com/how2dock/docbook
ch09/collectd/Vagrantfile
Ruby
apache-2.0
229
master
1,261
# -*- mode: ruby -*- # vi: set ft=ruby : # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! VAGRANTFILE_API_VERSION = "2" $bootstrap=<<SCRIPT apt-get update apt-get -y install python-pip pip install docker-py curl -sSL https://get.docker.com/ | sudo sh gpasswd -a vagrant docker service d...
github
how2dock/docbook
https://github.com/how2dock/docbook
ch03/ovs-plugin/Vagrantfile
Ruby
apache-2.0
229
master
1,483
# -*- mode: ruby -*- # vi: set ft=ruby : # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! VAGRANTFILE_API_VERSION = "2" $bootstrap=<<SCRIPT apt-get update apt-get -y install wget bridge-utils openvswitch-switch wget -qO- https://experimental.docker.com/ | sh service docker stop gpasswd...
github
how2dock/docbook
https://github.com/how2dock/docbook
ch03/network/Vagrantfile
Ruby
apache-2.0
229
master
1,871
# -*- mode: ruby -*- # vi: set ft=ruby : # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! VAGRANTFILE_API_VERSION = "2" $consul=<<SCRIPT apt-get update apt-get -y install wget wget -qO- https://experimental.docker.com/ | sh gpasswd -a vagrant docker service docker restart docker run -d...
github
how2dock/docbook
https://github.com/how2dock/docbook
ch03/simple/Vagrantfile
Ruby
apache-2.0
229
master
1,087
# -*- mode: ruby -*- # vi: set ft=ruby : # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! VAGRANTFILE_API_VERSION = "2" $bootstrap=<<SCRIPT apt-get update apt-get -y install wget curl apt-get -y install bridge-utils apt-get -y install openvswitch-common openvswitch-switch curl -sSL htt...
github
how2dock/docbook
https://github.com/how2dock/docbook
ch03/gresimple/Vagrantfile
Ruby
apache-2.0
229
master
1,104
# -*- mode: ruby -*- # vi: set ft=ruby : # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! VAGRANTFILE_API_VERSION = "2" $bootstrap=<<SCRIPT apt-get update apt-get -y install wget curl apt-get -y install bridge-utils curl -sSL https://get.docker.com | sh #echo DOCKER_OPTS=\\"\\" >> /etc...
github
how2dock/docbook
https://github.com/how2dock/docbook
ch03/flannel/Vagrantfile
Ruby
apache-2.0
229
master
486
VAGRANTFILE_API_VERSION = "2" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.box = "ubuntu/trusty64" config.vm.provider "virtualbox" do |vb| vb.customize ["modifyvm", :id, "--memory", "1024"] end config.vm.provision :shell, :path => "bootstrap.sh" config.vm.define "master" do |master| mast...
github
how2dock/docbook
https://github.com/how2dock/docbook
ch03/weavesimple/Vagrantfile
Ruby
apache-2.0
229
master
1,854
# Basic Ubuntu and Docker setup Vagrantfile # # Weave Getting Started Guides # require 'fileutils' require 'ipaddr' Vagrant.require_version ">= 1.6.0" VAGRANTFILE_API_VERSION = "2" CONFIG = File.join(File.dirname(__FILE__), "config.rb") ENV['VAGRANT_DEFAULT_PROVIDER'] = 'virtualbox' # Defaults for config options d...
github
how2dock/docbook
https://github.com/how2dock/docbook
ch03/calico/Vagrantfile
Ruby
apache-2.0
229
master
2,753
# -*- mode: ruby -*- # vi: set ft=ruby : # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! VAGRANTFILE_API_VERSION = "2" $consul=<<SCRIPT apt-get update apt-get -y install wget wget -qO- https://experimental.docker.com/ | sh gpasswd -a vagrant docker service docker restart docker run -d...
github
how2dock/docbook
https://github.com/how2dock/docbook
ch03/ambassador/Vagrantfile
Ruby
apache-2.0
229
master
1,261
# -*- mode: ruby -*- # vi: set ft=ruby : # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! VAGRANTFILE_API_VERSION = "2" $bootstrap=<<SCRIPT apt-get update curl -sSL https://get.docker.com/ | sudo sh gpasswd -a vagrant docker SCRIPT Vagrant.configure(VAGRANTFILE_API_VERSION) do |config...
github
how2dock/docbook
https://github.com/how2dock/docbook
ch10/mysqlgalera/Vagrantfile
Ruby
apache-2.0
229
master
1,936
# -*- mode: ruby -*- # vi: set ft=ruby : # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! VAGRANTFILE_API_VERSION = "2" $consul=<<SCRIPT apt-get update apt-get -y install wget wget -qO- https://experimental.docker.com/ | sh gpasswd -a vagrant docker service docker restart docker run -d...
github
how2dock/docbook
https://github.com/how2dock/docbook
ch10/spark/Vagrantfile
Ruby
apache-2.0
229
master
1,968
# -*- mode: ruby -*- # vi: set ft=ruby : # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! VAGRANTFILE_API_VERSION = "2" $consul=<<SCRIPT apt-get update apt-get -y install wget wget -qO- https://experimental.docker.com/ | sh gpasswd -a vagrant docker service docker restart docker run -d...
github
how2dock/docbook
https://github.com/how2dock/docbook
ch10/confd/Vagrantfile
Ruby
apache-2.0
229
master
1,819
# -*- mode: ruby -*- # vi: set ft=ruby : # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! VAGRANTFILE_API_VERSION = "2" $bootstrap=<<SCRIPT apt-get update apt-get -y install wget curl -sSL https://get.docker.com/ | sudo sh gpasswd -a vagrant docker service docker restart wget https://g...
github
how2dock/docbook
https://github.com/how2dock/docbook
ch07/swarm/Vagrantfile
Ruby
apache-2.0
229
master
1,330
# -*- mode: ruby -*- # vi: set ft=ruby : # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! VAGRANTFILE_API_VERSION = "2" $bootstrap=<<SCRIPT apt-get update curl -sSL https://get.docker.com/ | sudo sh gpasswd -a vagrant docker echo DOCKER_OPTS=\\"-H tcp://0.0.0.0:2375\\" >> /etc/default/...
github
how2dock/docbook
https://github.com/how2dock/docbook
ch07/ansible/Vagrantfile
Ruby
apache-2.0
229
master
692
# -*- mode: ruby -*- # vi: set ft=ruby : # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! VAGRANTFILE_API_VERSION = "2" $bootstrap=<<SCRIPT apt-get update curl -sSL https://get.docker.com/ | sudo sh gpasswd -a vagrant docker apt-get -y install python-dev apt-get -y install python-pip p...
github
how2dock/docbook
https://github.com/how2dock/docbook
ch07/ansible/solo/Vagrantfile
Ruby
apache-2.0
229
master
1,012
# -*- mode: ruby -*- # vi: set ft=ruby : # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! VAGRANTFILE_API_VERSION = "2" $bootstrap=<<SCRIPT apt-get update curl -sSL https://get.docker.com/ | sudo sh gpasswd -a vagrant docker apt-get -y install python-dev apt-get -y install python-pip p...
github
how2dock/docbook
https://github.com/how2dock/docbook
ch07/clocker/Vagrantfile
Ruby
apache-2.0
229
master
1,044
# -*- mode: ruby -*- # vi: set ft=ruby : VAGRANTFILE_API_VERSION = "2" # Vagrantfile version NODE_COUNT = 2 # Number of Clocker nodes to start Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| # Setup VirtualBox VMs config.vm.box = "ubuntu/trusty64" config.vm.provider "virtualbox" do |box| box.customi...
github
how2dock/docbook
https://github.com/how2dock/docbook
ch07/compose/Vagrantfile
Ruby
apache-2.0
229
master
1,234
# -*- mode: ruby -*- # vi: set ft=ruby : # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! VAGRANTFILE_API_VERSION = "2" $bootstrap=<<SCRIPT apt-get update curl -sSL https://get.docker.com/ | sudo sh gpasswd -a vagrant docker service docker restart curl -L https://github.com/docker/comp...
github
how2dock/docbook
https://github.com/how2dock/docbook
ch07/mesos/Vagrantfile
Ruby
apache-2.0
229
master
1,228
# -*- mode: ruby -*- # vi: set ft=ruby : # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! VAGRANTFILE_API_VERSION = "2" $bootstrap=<<SCRIPT apt-get update curl -sSL https://get.docker.com/ | sudo sh gpasswd -a vagrant docker service docker restart apt-get -y install python-dev apt-get ...
github
how2dock/docbook
https://github.com/how2dock/docbook
ch07/compose-devs/Vagrantfile
Ruby
apache-2.0
229
master
995
# -*- mode: ruby -*- # vi: set ft=ruby : # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! VAGRANTFILE_API_VERSION = "2" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| # Every Vagrant virtual environment requires a box to build off of. config.vm.box = "ubuntu/trusty64" # ...
github
how2dock/docbook
https://github.com/how2dock/docbook
ch02/packer/Vagrantfile
Ruby
apache-2.0
229
master
1,237
# -*- mode: ruby -*- # vi: set ft=ruby : # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! VAGRANTFILE_API_VERSION = "2" $bootstrap=<<SCRIPT apt-get update apt-get -y install wget wget -qO- https://get.docker.com/ | sh gpasswd -a vagrant docker service docker restart apt-get -y install ...
github
how2dock/docbook
https://github.com/how2dock/docbook
ch02/vagrantprovider/provider/Vagrantfile
Ruby
apache-2.0
229
master
265
# -*- mode: ruby -*- # vi: set ft=ruby : VAGRANTFILE_API_VERSION = "2" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.provider "docker" do |d| d.build_dir = "." end config.vm.network "forwarded_port", guest: 5000, host: 5000 end
github
how2dock/docbook
https://github.com/how2dock/docbook
ch08/Vagrantfile
Ruby
apache-2.0
229
master
1,566
# -*- mode: ruby -*- # vi: set ft=ruby : # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! VAGRANTFILE_API_VERSION = "2" $bootstrap=<<SCRIPT apt-get update apt-get -y install unzip apt-get -y install python-pip curl -sSL https://get.docker.com/ | sudo sh gpasswd -a vagrant docker servic...
github
how2dock/docbook
https://github.com/how2dock/docbook
ch05/docker/Vagrantfile
Ruby
apache-2.0
229
master
1,388
# -*- mode: ruby -*- # vi: set ft=ruby : # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! VAGRANTFILE_API_VERSION = "2" $bootstrap=<<SCRIPT apt-get update curl -sSL https://get.docker.com/ | sudo sh gpasswd -a vagrant docker service docker restart curl -L https://github.com/docker/comp...
github
how2dock/docbook
https://github.com/how2dock/docbook
ch01/centos6/Vagrantfile
Ruby
apache-2.0
229
master
1,089
# -*- mode: ruby -*- # vi: set ft=ruby : # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! VAGRANTFILE_API_VERSION = "2" $bootstrap=<<SCRIPT yum -y update yum -y install epel-release yum -y install docker-io service docker start chkconfig docker on usermod -a -G docker vagrant SCRIPT V...
github
how2dock/docbook
https://github.com/how2dock/docbook
ch01/dockermachine/Vagrantfile
Ruby
apache-2.0
229
master
863
# -*- mode: ruby -*- # vi: set ft=ruby : # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! VAGRANTFILE_API_VERSION = "2" $bootstrap=<<SCRIPT apt-get update apt-get -y install wget curl -sSL https://get.docker.com/ | sudo sh gpasswd -a vagrant docker wget https://github.com/docker/machin...
github
how2dock/docbook
https://github.com/how2dock/docbook
ch01/experimental/Vagrantfile
Ruby
apache-2.0
229
master
998
# -*- mode: ruby -*- # vi: set ft=ruby : # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! VAGRANTFILE_API_VERSION = "2" $bootstrap=<<SCRIPT apt-get update apt-get -y install wget curl #curl -sSL https://get.docker.com | sh wget -qO- https://experimental.docker.com/ | sh gpasswd -a vagr...
github
how2dock/docbook
https://github.com/how2dock/docbook
ch01/centos7/Vagrantfile
Ruby
apache-2.0
229
master
1,049
# -*- mode: ruby -*- # vi: set ft=ruby : # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! VAGRANTFILE_API_VERSION = "2" $bootstrap=<<SCRIPT #!/bin/bash yum -y update yum -y install docker service docker start #gpasswd -a vagrant docker SCRIPT Vagrant.configure(VAGRANTFILE_API_VERSION)...
github
how2dock/docbook
https://github.com/how2dock/docbook
ch01/ubuntu12.04/Vagrantfile
Ruby
apache-2.0
229
master
937
# -*- mode: ruby -*- # vi: set ft=ruby : # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! VAGRANTFILE_API_VERSION = "2" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| # Every Vagrant virtual environment requires a box to build off of. config.vm.box = "ubuntu/precise64" #...
github
how2dock/docbook
https://github.com/how2dock/docbook
ch01/ubuntu14.04/Vagrantfile
Ruby
apache-2.0
229
master
793
# -*- mode: ruby -*- # vi: set ft=ruby : # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! VAGRANTFILE_API_VERSION = "2" $bootstrap=<<SCRIPT apt-get update apt-get -y install wget wget -qO- https://get.docker.com/ | sh gpasswd -a vagrant docker service docker restart SCRIPT Vagrant.con...
github
how2dock/docbook
https://github.com/how2dock/docbook
ch06/atomic/Vagrantfile
Ruby
apache-2.0
229
master
706
# -*- mode: ruby -*- # vi: set ft=ruby : $bootstrap=<<SCRIPT gpasswd -a vagrant root SCRIPT # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! VAGRANTFILE_API_VERSION = "2" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| # Every Vagrant virtual environment requires a box to bui...
github
how2dock/docbook
https://github.com/how2dock/docbook
ch06/snappy/Vagrantfile
Ruby
apache-2.0
229
master
578
# -*- mode: ruby -*- # vi: set ft=ruby : # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! VAGRANTFILE_API_VERSION = "2" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| # Every Vagrant virtual environment requires a box to build off of. config.vm.box = "komljen/ubuntu-snappy"...
github
how2dock/docbook
https://github.com/how2dock/docbook
ch06/rancher/Vagrantfile
Ruby
apache-2.0
229
master
1,124
# -*- mode: ruby -*- # vi: set ft=ruby : # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! VAGRANTFILE_API_VERSION = "2" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| num_nodes = 3 base_ip = "192.168.33." swarm_ips = num_nodes.times.collect { |n| base_ip + "#{n+11}" } ...
github
sous-chefs/nodejs
https://github.com/sous-chefs/nodejs
metadata.rb
Ruby
apache-2.0
228
main
664
name 'nodejs' maintainer 'Sous Chefs' maintainer_email 'help@sous-chefs.org' license 'Apache-2.0' description 'Installs/Configures node.js' version '10.2.3' source_url 'https://github.com/sous-chefs/nodejs' issues_url 'https://github.com/sous-chefs/nodejs/iss...
github
sous-chefs/nodejs
https://github.com/sous-chefs/nodejs
resources/npm_package.rb
Ruby
apache-2.0
228
main
3,228
# # Cookbook:: nodejs # Resource:: npm # # Author:: Sergey Balbeko <sergey@balbeko.com> # # Copyright:: 2012-2017, Sergey Balbeko # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http:...
github
sous-chefs/nodejs
https://github.com/sous-chefs/nodejs
recipes/nodejs_from_source.rb
Ruby
apache-2.0
228
main
1,457
# # Author:: Marius Ducea (marius@promethost.com) # Cookbook:: nodejs # Recipe:: source # # Copyright:: 2010-2017, Promet Solutions # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # htt...
github
sous-chefs/nodejs
https://github.com/sous-chefs/nodejs
recipes/default.rb
Ruby
apache-2.0
228
main
880
# Author:: Marius Ducea (marius@promethost.com) # Cookbook:: nodejs # Recipe:: default # # Copyright:: 2010-2017, Promet Solutions # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http...
github
sous-chefs/nodejs
https://github.com/sous-chefs/nodejs
recipes/npm.rb
Ruby
apache-2.0
228
main
893
# # Author:: Marius Ducea (marius@promethost.com) # Cookbook:: nodejs # Recipe:: npm # # Copyright:: 2010-2017, Promet Solutions # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http:/...
github
sous-chefs/nodejs
https://github.com/sous-chefs/nodejs
recipes/nodejs_from_package.rb
Ruby
apache-2.0
228
main
1,481
# # Author:: Nathan L Smith (nlloyds@gmail.com) # Author:: Marius Ducea (marius@promethost.com) # Cookbook:: nodejs # Recipe:: package # # Copyright:: 2012-2017, Cramer Development, Inc. # Copyright:: 2013-2017, Opscale # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file exce...
github
sous-chefs/nodejs
https://github.com/sous-chefs/nodejs
recipes/install.rb
Ruby
apache-2.0
228
main
755
# # Author:: Marius Ducea (marius@promethost.com) # Cookbook:: nodejs # Recipe:: install # # Copyright:: 2010-2017, Promet Solutions # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # ht...
github
sous-chefs/nodejs
https://github.com/sous-chefs/nodejs
recipes/nodejs_from_chocolatey.rb
Ruby
apache-2.0
228
main
806
# # Author:: Hossein Margani (hossein@margani.dev) # Cookbook:: nodejs # Recipe:: install_from_chocolatey # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/license...
github
sous-chefs/nodejs
https://github.com/sous-chefs/nodejs
recipes/npm_from_source.rb
Ruby
apache-2.0
228
main
899
# # Author:: Marius Ducea (marius@promethost.com) # Cookbook:: nodejs # Recipe:: npm # # Copyright:: 2010-2017, Promet Solutions # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http:/...
github
sous-chefs/nodejs
https://github.com/sous-chefs/nodejs
recipes/npm_packages.rb
Ruby
apache-2.0
228
main
407
if node['nodejs'].key?('npm_packages') node['nodejs']['npm_packages'].each do |pkg| pkg_action = pkg.key?('action') ? pkg['action'] : :install f = npm_package "nodejs_npm-#{pkg['name']}-#{pkg_action}" do action :nothing package pkg['name'] end pkg.each do |key, value| f.send(key, val...
github
sous-chefs/nodejs
https://github.com/sous-chefs/nodejs
recipes/nodejs.rb
Ruby
apache-2.0
228
main
792
# # Author:: Marius Ducea (marius@promethost.com) # Cookbook:: nodejs # Recipe:: nodejs # # Copyright:: 2010-2017, Promet Solutions # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # htt...
github
sous-chefs/nodejs
https://github.com/sous-chefs/nodejs
recipes/nodejs_from_binary.rb
Ruby
apache-2.0
228
main
2,444
# # Author:: Julian Wilde (jules@jules.com.au) # Cookbook:: nodejs # Recipe:: install_from_binary # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENS...
github
sous-chefs/nodejs
https://github.com/sous-chefs/nodejs
recipes/repo.rb
Ruby
apache-2.0
228
main
1,645
case node['platform_family'] when 'debian' # Install necessary packages for downloading and verifying new repository information package %w(ca-certificates curl gnupg apt-transport-https) # Create a directory for the new repository's keyring, if it doesn't exist directory '/etc/apt/keyrings' # Download the ...
github
sous-chefs/nodejs
https://github.com/sous-chefs/nodejs
test/cookbooks/test/recipes/resource.rb
Ruby
apache-2.0
228
main
2,407
apt_update 'update' include_recipe 'nodejs::npm' include_recipe 'git' user 'random' do manage_home true home '/home/random' end user 'random1' do manage_home true home '/home/random1' end user 'random2' do manage_home true home '/home/random2' end # global "express" using the old resource name nodejs_n...
github
sous-chefs/nodejs
https://github.com/sous-chefs/nodejs
test/cookbooks/test/recipes/source.rb
Ruby
apache-2.0
228
main
241
apt_update 'update' # Source install puts the npm symlink in /usr/local/bin ENV['PATH'] = '/usr/local/bin:' + ENV['PATH'] node.default['nodejs']['install_method'] = 'source' include_recipe 'nodejs::default' include_recipe 'test::resource'
github
sous-chefs/nodejs
https://github.com/sous-chefs/nodejs
test/cookbooks/test/recipes/source_iojs.rb
Ruby
apache-2.0
228
main
307
apt_update 'update' node.default['nodejs']['engine'] = 'iojs' node.default['nodejs']['install_method'] = 'source' node.default['nodejs']['source']['checksum'] = '55e79cc4f4cde41f03c1e204d2af5ee4b6e4edcf14defc82e518436e939195fa' node.default['nodejs']['version'] = '2.2.1' include_recipe 'nodejs::default'
github
sous-chefs/nodejs
https://github.com/sous-chefs/nodejs
test/cookbooks/test/recipes/resource_win.rb
Ruby
apache-2.0
228
main
424
include_recipe 'nodejs::npm' include_recipe 'git' user 'random' do manage_home true home '/home/random' end user 'random1' do manage_home true home '/home/random1' end user 'random2' do manage_home true home '/home/random2' end # global "express" using the old resource name nodejs_npm 'express' npm_pac...
github
sous-chefs/nodejs
https://github.com/sous-chefs/nodejs
test/integration/default/default_spec.rb
Ruby
apache-2.0
228
main
884
os_family = os.family control 'commands should exist' do describe command('node -v') do its('exit_status') { should eq 0 } # No upstream repository so it installs the OS version unless os_family == 'suse' its('stdout') { should match /^v17\.*/ } end end describe command('npm -v') do it...
github
sous-chefs/nodejs
https://github.com/sous-chefs/nodejs
test/integration/npm_source/default_spec.rb
Ruby
apache-2.0
228
main
418
control 'commands should exist' do describe command('node -v') do its('exit_status') { should eq 0 } end describe command('npm -v') do its('exit_status') { should eq 0 } end describe command('npx -v') do its('exit_status') { should eq 0 } end describe file('/usr/local/bin/npm') do it { ...
github
sous-chefs/nodejs
https://github.com/sous-chefs/nodejs
test/integration/chocolatey/default.rb
Ruby
apache-2.0
228
main
436
control 'commands should exist' do describe command('node -v') do its('exit_status') { should eq 0 } end describe command('npm -v') do its('exit_status') { should eq 0 } end describe command('npm list -json -global') do its('stdout') { should match(/express/) } its('stdout') { should match(/...
github
sous-chefs/nodejs
https://github.com/sous-chefs/nodejs
test/integration/options/default_spec.rb
Ruby
apache-2.0
228
main
252
control 'packages should install' do describe package('nodejs') do it { should be_installed } end describe package('acpid') do it { should be_installed } end describe package('adcli') do it { should_not be_installed } end end
github
sous-chefs/nodejs
https://github.com/sous-chefs/nodejs
test/integration/package/default.rb
Ruby
apache-2.0
228
main
1,327
control 'commands should exist' do describe command('node -v') do its('exit_status') { should eq 0 } end describe command('npm -v') do its('exit_status') { should eq 0 } end describe file '/home/random/staging' do it { should exist } end describe command('npm list -json -global') do its...
github
sous-chefs/nodejs
https://github.com/sous-chefs/nodejs
test/integration/source/default.rb
Ruby
apache-2.0
228
main
490
control 'commands should exist' do describe command('node -v') do its('exit_status') { should eq 0 } end describe command('npm -v') do its('exit_status') { should eq 0 } end describe file '/home/random/staging' do it { should exist } end describe command('npx -v') do its('exit_status') ...
github
sous-chefs/nodejs
https://github.com/sous-chefs/nodejs
test/integration/npm_embedded/default_spec.rb
Ruby
apache-2.0
228
main
274
control 'commands should exist' do describe command('node -v') do its('exit_status') { should eq 0 } end describe command('npm -v') do its('exit_status') { should eq 0 } end describe command('npx -v') do its('exit_status') { should eq 0 } end end
github
sous-chefs/nodejs
https://github.com/sous-chefs/nodejs
attributes/default.rb
Ruby
apache-2.0
228
main
1,908
# # Cookbook:: nodejs # Attributes:: nodejs # # Copyright:: 2010-2017, Promet Solutions # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
github
sous-chefs/nodejs
https://github.com/sous-chefs/nodejs
attributes/packages.rb
Ruby
apache-2.0
228
main
703
include_attribute 'nodejs::default' include_attribute 'nodejs::repo' default['nodejs']['packages'] = value_for_platform_family( 'debian' => node['nodejs']['install_repo'] ? ['nodejs'] : %w(nodejs npm nodejs-dev), %w(rhel fedora amazon) => node['nodejs']['install_repo'] ? %w(nodejs nodejs-devel) : %w(nodejs npm nod...
github
sous-chefs/nodejs
https://github.com/sous-chefs/nodejs
attributes/repo.rb
Ruby
apache-2.0
228
main
656
case node['platform_family'] when 'debian' default['nodejs']['install_repo'] = true default['nodejs']['repo'] = 'https://deb.nodesource.com/node_20.x' default['nodejs']['distribution'] = 'nodistro' default['nodejs']['key'] = 'https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key' when 'rhel...
github
sous-chefs/nodejs
https://github.com/sous-chefs/nodejs
spec/rspec_helper.rb
Ruby
apache-2.0
228
main
239
Dir.glob('libraries/*.rb').each do |lib| require_relative "../#{lib}" end RSpec.configure do |config| config.expose_dsl_globally = true config.mock_with :rspec do |mocks| mocks.allow_message_expectations_on_nil = true end end
github
sous-chefs/nodejs
https://github.com/sous-chefs/nodejs
spec/unit/recipes/default_spec.rb
Ruby
apache-2.0
228
main
2,392
require 'spec_helper' describe 'default recipe on ubuntu 22.04' do let(:runner) { ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '22.04') } let(:chef_run) { runner.converge('nodejs::default') } it 'includes the package install recipes' do expect(chef_run).to include_recipe('nodejs::nodejs_from_pack...
github
sous-chefs/nodejs
https://github.com/sous-chefs/nodejs
spec/unit/library/helper_spec.rb
Ruby
apache-2.0
228
main
6,176
require 'rspec_helper' require 'mixlib/shellout' require 'ostruct' describe 'helper methods' do before(:each) do @mt = MT.new end describe 'npm_dist' do it 'should return a url if specified in the node attributes' do n = { 'nodejs': { 'npm': { 'url': 'get it' } } } n = Mash.new(n) allo...
github
sous-chefs/nodejs
https://github.com/sous-chefs/nodejs
libraries/nodejs_helper.rb
Ruby
apache-2.0
228
main
1,905
module NodeJs module Helper def npm_dist if node['nodejs']['npm']['url'] { 'url' => node['nodejs']['npm']['url'] } else require 'open-uri' require 'json' result = JSON.parse(URI.parse("https://registry.npmjs.org/npm/#{node['nodejs']['npm']['version']}").read, max_nesti...
github
bankscrap/bankscrap
https://github.com/bankscrap/bankscrap
bankscrap.gemspec
Ruby
mit
228
master
1,218
lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'bankscrap/version' Gem::Specification.new do |spec| spec.name = 'bankscrap' spec.version = Bankscrap::VERSION spec.authors = [ 'Javier Cuevas', 'Raúl Marcos' ] spec.email ...
github
bankscrap/bankscrap
https://github.com/bankscrap/bankscrap
spec/account_spec.rb
Ruby
mit
228
master
652
require 'spec_helper' describe Bankscrap::Account do describe '#initialize' do context 'the received balance is a Money object' do subject do Bankscrap::Account.new( balance: Money.new(1000, 'EUR'), available_balance: Money.new(1000, 'EUR') ) end it 'raise a...
github
bankscrap/bankscrap
https://github.com/bankscrap/bankscrap
spec/transaction_spec.rb
Ruby
mit
228
master
570
require 'spec_helper' describe Bankscrap::Transaction do describe '#initialize' do context 'the received amount is a Money object' do subject { Bankscrap::Transaction.new(amount: Money.new(1000, 'EUR')) } it 'raise an exception' do expect { subject }.not_to raise_error end end ...
github
bankscrap/bankscrap
https://github.com/bankscrap/bankscrap
spec/bank_spec.rb
Ruby
mit
228
master
2,200
require 'spec_helper' describe Bankscrap::Bank do before do # Stub login and fetch_accounts methods allow_any_instance_of(Bankscrap::Bank).to receive(:login) allow_any_instance_of(Bankscrap::Bank).to receive(:fetch_accounts) end describe '#initialize' do subject { Bankscrap::Bank.new(user: '1234...
github
bankscrap/bankscrap
https://github.com/bankscrap/bankscrap
lib/bankscrap.rb
Ruby
mit
228
master
917
require 'active_support/all' require 'money' require 'rubygems' require_relative 'bankscrap/utils/inspectable' require_relative 'bankscrap/utils/cli_string' require_relative 'bankscrap/version' require_relative 'bankscrap/config' require_relative 'bankscrap/cli' require_relative 'bankscrap/bank' require_relative 'banks...
github
bankscrap/bankscrap
https://github.com/bankscrap/bankscrap
lib/bankscrap/bank.rb
Ruby
mit
228
master
3,205
require 'mechanize' require 'logger' module Bankscrap class Bank WEB_USER_AGENT = 'Mozilla/5.0 (Linux; Android 4.2.1; en-us; Nexus 4 Build/JOP40D) AppleWebKit/535.19 (KHTML, ' \ 'like Gecko) Chrome/18.0.1025.166 Mobile Safari/535.19'.freeze attr_accessor :headers, :accounts, :cards, :loa...
github
bankscrap/bankscrap
https://github.com/bankscrap/bankscrap
lib/bankscrap/investment.rb
Ruby
mit
228
master
341
module Bankscrap class Investment include Utils::Inspectable attr_accessor :bank, :id, :name, :balance, :currency, :investment def initialize(params = {}) params.each { |key, value| send "#{key}=", value } end private def inspect_attributes %i[id name balance currency investmen...
github
bankscrap/bankscrap
https://github.com/bankscrap/bankscrap
lib/bankscrap/account.rb
Ruby
mit
228
master
1,065
module Bankscrap class Account include Utils::Inspectable attr_accessor :bank, :id, :name, :balance, :available_balance, :description, :transactions, :iban, :bic, :raw_data def initialize(params = {}) raise NotMoneyObjectError, :balance unless ...
github
bankscrap/bankscrap
https://github.com/bankscrap/bankscrap
lib/bankscrap/loan.rb
Ruby
mit
228
master
594
module Bankscrap class Loan include Utils::Inspectable attr_accessor :bank, :id, :name, :amount, :description, :raw_data def initialize(params = {}) raise NotMoneyObjectError, :amount unless params[:amount].is_a?(Money) params.each { |key, value| send "#{...
github
bankscrap/bankscrap
https://github.com/bankscrap/bankscrap
lib/bankscrap/card.rb
Ruby
mit
228
master
758
module Bankscrap class Card include Utils::Inspectable attr_accessor :bank, :id, :name, :pan, :amount, :avaliable, :is_credit, :description, :raw_data def initialize(params = {}) raise NotMoneyObjectError, :amount unless params[:amount].is_a?(Money) raise ...
github
bankscrap/bankscrap
https://github.com/bankscrap/bankscrap
lib/bankscrap/transaction.rb
Ruby
mit
228
master
678
module Bankscrap class Transaction include Utils::Inspectable attr_accessor :id, :amount, :description, :description_detail, :effective_date, :operation_date, :balance, :account def initialize(params = {}) raise NotMoneyObjectError, :amount unless params[:amount].is_a?(Money) params.each { ...
github
bankscrap/bankscrap
https://github.com/bankscrap/bankscrap
lib/bankscrap/cli.rb
Ruby
mit
228
master
5,190
require 'thor' require 'active_support/core_ext/string' Dir[File.expand_path('../../..', __FILE__) + '/generators/*.rb'].each do |generator| require generator end module Bankscrap class CLI < Thor SPACER = (' ' * 3).freeze def self.shared_options option :credentials, default: {}, type: :hash o...
github
bankscrap/bankscrap
https://github.com/bankscrap/bankscrap
lib/bankscrap/config.rb
Ruby
mit
228
master
203
module Bankscrap # Default format for money: 1.000,00 € Money.default_formatting_rules = { symbol_position: :after } I18n.load_path += Dir.glob(File.expand_path('../locale/*.yml', __FILE__)) end
github
bankscrap/bankscrap
https://github.com/bankscrap/bankscrap
lib/bankscrap/utils/inspectable.rb
Ruby
mit
228
master
523
module Bankscrap module Utils module Inspectable def inspect attributes = inspect_attributes.reject do |x| begin attribute = send x !attribute || (attribute.respond_to?(:empty?) && attribute.empty?) rescue NoMethodError true end ...
github
bankscrap/bankscrap
https://github.com/bankscrap/bankscrap
lib/bankscrap/utils/cli_string.rb
Ruby
mit
228
master
836
require 'unicode/display_width' module Bankscrap module Utils class CliString < String def ljust(to_length, padstr = ' ') self.class.new(self + padding(to_length, padstr)) end def rjust(to_length, padstr = ' ') self.class.new(padding(to_length, padstr) + self) end ...
github
bankscrap/bankscrap
https://github.com/bankscrap/bankscrap
lib/bankscrap/exporters/csv.rb
Ruby
mit
228
master
2,108
require 'csv' require 'thor' module BankScrap module Exporter class Csv < Thor::Group include Thor::Actions def initialize(account) @account = account end def get_filename(data, output) if output if output == '-' '/dev/stdout' else ...
github
bankscrap/bankscrap
https://github.com/bankscrap/bankscrap
lib/bankscrap/exporters/json.rb
Ruby
mit
228
master
2,916
require 'json' require 'thor' module BankScrap module Exporter class Json < Thor::Group include Thor::Actions def initialize(account) @account = account end def get_filename(data, output) if output if output == '-' '/dev/stdout' else ...
github
bankscrap/bankscrap
https://github.com/bankscrap/bankscrap
generators/adapter_generator.rb
Ruby
mit
228
master
1,010
module Bankscrap class AdapterGenerator < Thor::Group include Thor::Actions argument :bank_name def self.source_root File.join(File.dirname(__FILE__), 'templates') end def generate self.destination_root = File.expand_path('.', gem_name) directory '.' say '' say "G...