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 | osunyorg/admin | https://github.com/osunyorg/admin | config/navigation/admin/university/people_navigation.rb | Ruby | mit | 48 | main | 754 | SimpleNavigation::Configuration.run do |navigation|
navigation.renderer = ::SimpleNavigation::Renderer::Osuny::FeatureNav
navigation.auto_highlight = true
navigation.highlight_on_subpath = true
navigation.items do |primary|
primary.item :feature_nav_people,
University::Person.model_name.... |
github | osunyorg/admin | https://github.com/osunyorg/admin | config/navigation/admin/university/organizations_navigation.rb | Ruby | mit | 48 | main | 799 | SimpleNavigation::Configuration.run do |navigation|
navigation.renderer = ::SimpleNavigation::Renderer::Osuny::FeatureNav
navigation.auto_highlight = true
navigation.highlight_on_subpath = true
navigation.items do |primary|
primary.item :feature_nav_organizations,
University::Organizatio... |
github | osunyorg/admin | https://github.com/osunyorg/admin | config/navigation/admin/communication/extranet_navigation.rb | Ruby | mit | 48 | main | 1,141 | SimpleNavigation::Configuration.run do |navigation|
navigation.renderer = ::SimpleNavigation::Renderer::Links
navigation.auto_highlight = true
navigation.highlight_on_subpath = true
navigation.selected_class = 'active'
navigation.items do |primary|
primary.item :subnav_summary,
t('admi... |
github | osunyorg/admin | https://github.com/osunyorg/admin | config/navigation/admin/communication/medias_navigation.rb | Ruby | mit | 48 | main | 997 | SimpleNavigation::Configuration.run do |navigation|
navigation.renderer = ::SimpleNavigation::Renderer::Osuny::FeatureNav
navigation.auto_highlight = true
navigation.highlight_on_subpath = true
navigation.items do |primary|
primary.item :feature_nav_medias,
t('communication.description.p... |
github | osunyorg/admin | https://github.com/osunyorg/admin | config/navigation/admin/communication/website_navigation.rb | Ruby | mit | 48 | main | 3,886 | SimpleNavigation::Configuration.run do |navigation|
navigation.renderer = ::SimpleNavigation::Renderer::Links
navigation.auto_highlight = true
navigation.highlight_on_subpath = true
navigation.selected_class = 'active'
navigation.items do |primary|
primary.item :subnav_summary,
t('admi... |
github | osunyorg/admin | https://github.com/osunyorg/admin | config/navigation/admin/communication/extranet/posts_navigation.rb | Ruby | mit | 48 | main | 804 | SimpleNavigation::Configuration.run do |navigation|
navigation.renderer = ::SimpleNavigation::Renderer::Osuny::FeatureNav
navigation.auto_highlight = true
navigation.highlight_on_subpath = true
navigation.items do |primary|
primary.item :feature_nav_posts,
Communication::Extranet::Post.m... |
github | osunyorg/admin | https://github.com/osunyorg/admin | config/navigation/admin/communication/extranet/library_navigation.rb | Ruby | mit | 48 | main | 1,046 | SimpleNavigation::Configuration.run do |navigation|
navigation.renderer = ::SimpleNavigation::Renderer::Osuny::FeatureNav
navigation.auto_highlight = true
navigation.highlight_on_subpath = true
navigation.items do |primary|
primary.item :feature_nav_documents,
Communication::Extranet::Do... |
github | osunyorg/admin | https://github.com/osunyorg/admin | config/navigation/admin/communication/website/posts_navigation.rb | Ruby | mit | 48 | main | 1,002 | SimpleNavigation::Configuration.run do |navigation|
navigation.renderer = ::SimpleNavigation::Renderer::Osuny::FeatureNav
navigation.auto_highlight = true
navigation.highlight_on_subpath = true
navigation.items do |primary|
primary.item :feature_nav_posts,
@website.feature_posts_name(cur... |
github | osunyorg/admin | https://github.com/osunyorg/admin | config/navigation/admin/communication/website/agenda_navigation.rb | Ruby | mit | 48 | main | 890 | SimpleNavigation::Configuration.run do |navigation|
navigation.renderer = ::SimpleNavigation::Renderer::Osuny::FeatureNav
navigation.auto_highlight = true
navigation.highlight_on_subpath = true
navigation.items do |primary|
primary.item :feature_nav_events,
@website.feature_agenda_name(c... |
github | osunyorg/admin | https://github.com/osunyorg/admin | config/navigation/admin/communication/website/portfolio_navigation.rb | Ruby | mit | 48 | main | 678 | SimpleNavigation::Configuration.run do |navigation|
navigation.renderer = ::SimpleNavigation::Renderer::Osuny::FeatureNav
navigation.auto_highlight = true
navigation.highlight_on_subpath = true
navigation.items do |primary|
primary.item :feature_nav_projects,
@website.feature_portfolio_n... |
github | osunyorg/admin | https://github.com/osunyorg/admin | config/navigation/admin/communication/website/settings_navigation.rb | Ruby | mit | 48 | main | 1,488 | SimpleNavigation::Configuration.run do |navigation|
navigation.renderer = ::SimpleNavigation::Renderer::Osuny::FeatureNav
navigation.auto_highlight = true
navigation.highlight_on_subpath = true
navigation.items do |primary|
primary.item :subnav_settings,
t('admin.subnav.settings'),
... |
github | osunyorg/admin | https://github.com/osunyorg/admin | config/navigation/admin/communication/website/jobboard_navigation.rb | Ruby | mit | 48 | main | 666 | SimpleNavigation::Configuration.run do |navigation|
navigation.renderer = ::SimpleNavigation::Renderer::Osuny::FeatureNav
navigation.auto_highlight = true
navigation.highlight_on_subpath = true
navigation.items do |primary|
primary.item :feature_nav_jobs,
@website.feature_jobboard_name(c... |
github | osunyorg/admin | https://github.com/osunyorg/admin | config/navigation/admin/communication/website/pages_navigation.rb | Ruby | mit | 48 | main | 1,130 | SimpleNavigation::Configuration.run do |navigation|
navigation.renderer = ::SimpleNavigation::Renderer::Osuny::FeatureNav
navigation.auto_highlight = true
navigation.highlight_on_subpath = true
navigation.items do |primary|
primary.item :feature_nav_pages,
Communication::Website::Page.mo... |
github | osunyorg/admin | https://github.com/osunyorg/admin | config/routes/showcase.rb | Ruby | mit | 48 | main | 454 | constraints host: ENV['OSUNY_SHOWCASE'] do
namespace :showcase, path: '' do
resources :instances, only: :index
resources :websites, only: [:index, :show]
get ':feature' => 'websites#feature',
as: :feature,
constraints: {
feature: /actualites|... |
github | osunyorg/admin | https://github.com/osunyorg/admin | config/routes/server.rb | Ruby | mit | 48 | main | 845 | namespace :server do
resources :universities do
collection do
get :potential
end
end
resources :languages
resources :tags
resources :websites do
collection do
post :clean_and_rebuild_all_websites
end
member do
post :analyse
post :clean_and_rebuild
post :sync_t... |
github | osunyorg/admin | https://github.com/osunyorg/admin | config/routes/extranet.rb | Ruby | mit | 48 | main | 2,137 | # Full :as names are useful for the resolution of links like [:alumni, cohort]
# Feature Contacts
namespace :contacts do
get 'persons' => 'persons#index', as: :persons
get 'persons/:id' => 'persons#show', as: :person
get 'organizations' => 'organizations#index', as: :organizations
get 'organizations/:id' => 'o... |
github | osunyorg/admin | https://github.com/osunyorg/admin | config/routes/api.rb | Ruby | mit | 48 | main | 3,016 | namespace :api do
get 'lheo' => 'lheo#index', defaults: { format: :xml }
# v0
get 'osuny' => '/api/osuny#redirect_to_v1' # redirect to v1
post 'osuny/websites/theme-released' => '/api/osuny/server/websites#theme_released', defaults: {format: :json}
# v1
namespace :osuny, path: 'osuny/v1', defaults: { format... |
github | osunyorg/admin | https://github.com/osunyorg/admin | config/routes/admin/education.rb | Ruby | mit | 48 | main | 2,145 | namespace :education do
resources :academic_years do
member do
get :static
end
end
resources :cohorts, only: [:index, :show, :destroy] do
member do
get :static
post :restore
end
end
resources :diplomas do
collection do
post :reorder
end
member do
get :... |
github | osunyorg/admin | https://github.com/osunyorg/admin | config/routes/admin/research.rb | Ruby | mit | 48 | main | 1,553 | namespace :research do
resources :researchers, only: [:index, :show, :update] do
member do
post 'sync-with-hal' => 'researchers#sync_with_hal', as: :sync_with_hal
get :static
end
end
resources :publications do
member do
get :static
end
end
namespace :hal do
resources :aut... |
github | osunyorg/admin | https://github.com/osunyorg/admin | config/routes/admin/communication.rb | Ruby | mit | 48 | main | 8,664 | namespace :communication do
resources :authors, only: [:index, :show]
scope 'photo-imports' do
get 'unsplash' => 'photo_imports#unsplash'
get 'pexels' => 'photo_imports#pexels'
end
resources :websites do
member do
scope 'settings' do
get 'federation' => 'websites/settings#federation'
... |
github | osunyorg/admin | https://github.com/osunyorg/admin | config/routes/admin/university.rb | Ruby | mit | 48 | main | 1,649 | namespace :university, path: :directory do
# Resources must come after namespaces, otherwise there is a confusion with ids
namespace :organizations do
resources :imports, only: [:index, :show, :new, :create]
end
resources :apps do
post :regenerate_token, on: :member
end
namespace :people do
reso... |
github | osunyorg/admin | https://github.com/osunyorg/admin | config/routes/admin/administration.rb | Ruby | mit | 48 | main | 609 | namespace :administration do
namespace :alumni do
namespace :cohorts do
resources :imports, only: [:index, :show, :new, :create]
end
end
resources :alumni, only: [:index, :show] do
member do
get 'cohorts' => 'alumni/cohorts#edit'
patch 'cohorts' => 'alumni/cohorts#update'
end
e... |
github | osunyorg/admin | https://github.com/osunyorg/admin | config/initializers/brevo.rb | Ruby | mit | 48 | main | 426 | # Load the gem
require 'brevo'
# Setup authorization
Brevo.configure do |config|
config.api_key['api-key'] = ENV['BREVO_API_KEY']
config.api_key['partner-key'] = ENV['BREVO_API_KEY']
end
api_instance = Brevo::AccountApi.new
begin
# Get your account information, plan and credits details
result = api_instance.... |
github | osunyorg/admin | https://github.com/osunyorg/admin | config/initializers/octokit.rb | Ruby | mit | 48 | main | 781 | if Rails.env.development?
rack = Faraday::RackBuilder.new do |builder|
builder.use Faraday::Retry::Middleware, exceptions: Faraday::Retry::Middleware::DEFAULT_EXCEPTIONS + [Octokit::ServerError]
builder.use Octokit::Middleware::FollowRedirects
builder.use Octokit::Response::RaiseError
builder.use Octo... |
github | osunyorg/admin | https://github.com/osunyorg/admin | config/initializers/mime_types.rb | Ruby | mit | 48 | main | 222 | # Be sure to restart your server when you modify this file.
Mime::Type.register "application/xls", :xlsx
Mime::Type.register "text/plain", :txt
Mime::Type.register "application/xml", :xml, %w( text/xml application/x-xml ) |
github | osunyorg/admin | https://github.com/osunyorg/admin | config/initializers/saml_override.rb | Ruby | mit | 48 | main | 585 | # https://stackoverflow.com/questions/48806629/google-saml-app-not-configured-for-user-equivalent-of-prompt-select-account-sa
module OneLogin
module RubySaml
class Authrequest < SamlMessage
GOOGLE_ACCOUNT_CHOOSER_URL = "https://accounts.google.com/AccountChooser?continue="
alias_method :old_create, :c... |
github | osunyorg/admin | https://github.com/osunyorg/admin | config/initializers/rswag_api.rb | Ruby | mit | 48 | main | 817 | Rswag::Api.configure do |c|
# Specify a root folder where Swagger JSON files are located
# This is used by the Swagger middleware to serve requests for API descriptions
# NOTE: If you're using rswag-specs to generate Swagger, you'll need to ensure
# that it's configured to generate files in the same folder
c... |
github | osunyorg/admin | https://github.com/osunyorg/admin | config/initializers/inflections.rb | Ruby | mit | 48 | main | 758 | # Be sure to restart your server when you modify this file.
# Add new inflection rules using the following format. Inflections
# are locale specific, and you may define rules for as many different
# locales as you wish. All of these examples are active by default:
ActiveSupport::Inflector.inflections(:en) do |inflect|... |
github | osunyorg/admin | https://github.com/osunyorg/admin | config/initializers/simple_form_bootstrap.rb | Ruby | mit | 48 | main | 14,969 | # frozen_string_literal: true
# Please do not make direct changes to this file!
# This generator is maintained by the community around simple_form-bootstrap:
# https://github.com/heartcombo/simple_form-bootstrap
# All future development, tests, and organization should happen there.
# Background history: https://github... |
github | osunyorg/admin | https://github.com/osunyorg/admin | config/initializers/devise.rb | Ruby | mit | 48 | main | 16,605 | # frozen_string_literal: true
# Assuming you have not yet modified this file, each configuration option below
# is set to its default value. Note that some are commented out while others
# are not: uncommented lines are intended to protect your configuration from
# breaking changes in upgrades (i.e., in the event that... |
github | osunyorg/admin | https://github.com/osunyorg/admin | config/initializers/assets.rb | Ruby | mit | 48 | main | 508 | # Be sure to restart your server when you modify this file.
# Version of your assets, change this if you want to expire all your assets.
Rails.application.config.assets.version = "1.0"
# Add additional assets to the asset load path.
# Rails.application.config.assets.paths << Emoji.images_path
Rails.application.config... |
github | osunyorg/admin | https://github.com/osunyorg/admin | config/initializers/simple_form.rb | Ruby | mit | 48 | main | 6,914 | # frozen_string_literal: true
#
# Uncomment this and change the path if necessary to include your own
# components.
# See https://github.com/heartcombo/simple_form#custom-components to know
# more about custom components.
# Dir[Rails.root.join('lib/components/**/*.rb')].each { |f| require f }
#
# Use this setup block t... |
github | osunyorg/admin | https://github.com/osunyorg/admin | config/initializers/string.rb | Ruby | mit | 48 | main | 291 | # encoding: utf-8
String.class_eval do
# Time in seconds
#
def reading_time
# https://www.sciencedirect.com/science/article/abs/pii/S0749596X19300786
words_per_minute = 238
(60.0 * words / words_per_minute).round
end
def words
self.scan(/(\w|-)+/).size
end
end |
github | osunyorg/admin | https://github.com/osunyorg/admin | config/initializers/filter_parameter_logging.rb | Ruby | mit | 48 | main | 483 | # Be sure to restart your server when you modify this file.
# Configure parameters to be partially matched (e.g. passw matches password) and filtered from the log file.
# Use this to limit dissemination of sensitive information.
# See the ActiveSupport::ParameterFilter documentation for supported notations and behavio... |
github | osunyorg/admin | https://github.com/osunyorg/admin | config/initializers/good_job.rb | Ruby | mit | 48 | main | 1,265 | Rails.application.configure do
# Configure options individually...
# config.good_job.preserve_job_records = true
config.good_job.cleanup_preserved_jobs_before_seconds_ago = 1.day
# config.good_job.retry_on_unhandled_error = false
# config.good_job.on_thread_error = -> (exception) { Rails.error.report(exceptio... |
github | osunyorg/admin | https://github.com/osunyorg/admin | config/initializers/libretranslate.rb | Ruby | mit | 48 | main | 325 | # frozen_string_literal: true
LibreTranslate.configure do |config|
# Configure the base URL of your LibreTranslate provider.
config.base_url = ENV.fetch("LIBRETRANSLATE_BASE_URL", "https://libretranslate.com")
# Configure the API key that will be used in requests.
config.api_key = ENV["LIBRETRANSLATE_API_KEY"... |
github | osunyorg/admin | https://github.com/osunyorg/admin | config/initializers/rswag_ui.rb | Ruby | mit | 48 | main | 1,372 | Rswag::Ui.configure do |c|
# List the Swagger endpoints that you want to be documented through the
# swagger-ui. The first parameter is the path (absolute or relative to the UI
# host) to the corresponding endpoint and the second is a title that will be
# displayed in the document selector.
# NOTE: If you're... |
github | osunyorg/admin | https://github.com/osunyorg/admin | config/initializers/sanitizer.rb | Ruby | mit | 48 | main | 406 | Rails.application.configure do
# TEMP TODO: Corriger le problème des nbsp avec le sanitizer HTML5
config.action_view.sanitizer_vendor = Rails::HTML4::Sanitizer
config.action_view.sanitized_allowed_tags = [
"a", "b", "br", "em", "i", "img", "li", "ol", "p", "q", "strong", "sub", "sup", "ul", "note"
]
confi... |
github | osunyorg/admin | https://github.com/osunyorg/admin | config/initializers/invisible_captcha.rb | Ruby | mit | 48 | main | 236 | InvisibleCaptcha.setup do |config|
# Timestamp check enabled except in test environment
config.timestamp_enabled = !Rails.env.test?
# Spinner check enabled except in test environment
config.spinner_enabled = !Rails.env.test?
end |
github | osunyorg/admin | https://github.com/osunyorg/admin | config/initializers/active_storage.rb | Ruby | mit | 48 | main | 2,869 | # https://stackoverflow.com/questions/8895103/how-can-i-keep-my-initializer-configuration-from-being-lost-in-development-mode
Rails.application.config.to_prepare do
ActiveStorage::Engine.config.active_storage.content_types_to_serve_as_binary.delete('image/svg+xml')
# Hook ActiveStorage::Attachment to add brand_id ... |
github | osunyorg/admin | https://github.com/osunyorg/admin | config/initializers/bugsnag.rb | Ruby | mit | 48 | main | 965 | Bugsnag.configure do |config|
config.api_key = ENV['BUGSNAG_RUBY_KEY']
config.release_stage = ENV['APPLICATION_ENV']
config.notify_release_stages = ['production', 'staging']
config.meta_data_filters += ['default_github_access_token', 'access_token', 'sso_cert']
config.add_on_error(proc do |event|
next un... |
github | osunyorg/admin | https://github.com/osunyorg/admin | config/initializers/kaminari_config.rb | Ruby | mit | 48 | main | 384 | # frozen_string_literal: true
Kaminari.configure do |config|
config.default_per_page = 36 # Dividable by 12, 6, 4, 3 and 2
# config.max_per_page = nil
# config.window = 4
# config.outer_window = 0
# config.left = 0
# config.right = 0
# config.page_method_name = :page
# config.param_name = :page
# con... |
github | osunyorg/admin | https://github.com/osunyorg/admin | config/initializers/content_security_policy.rb | Ruby | mit | 48 | main | 2,414 | # Be sure to restart your server when you modify this file.
# Define an application-wide content security policy.
# See the Securing Rails Applications Guide for more information:
# https://guides.rubyonrails.org/security.html#content-security-policy-header
Rails.application.configure do
style_urls = %w(
https... |
github | osunyorg/admin | https://github.com/osunyorg/admin | config/environments/test.rb | Ruby | mit | 48 | main | 2,496 | # 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 suite and is wiped
# and recreated between test runs. Don't rely on the data there!
Rails.application.configure do
# Settings... |
github | osunyorg/admin | https://github.com/osunyorg/admin | config/environments/development.rb | Ruby | mit | 48 | main | 2,838 | require "active_support/core_ext/integer/time"
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# Make code changes take effect immediately without server restart.
config.enable_reloading = true
# Do not eager load code on boot.
config.eager... |
github | osunyorg/admin | https://github.com/osunyorg/admin | config/environments/production.rb | Ruby | mit | 48 | main | 3,802 | require "active_support/core_ext/integer/time"
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# Code is not reloaded between requests.
config.enable_reloading = false
# Eager load code on boot for better performance and memory savings (ignor... |
github | oggy/respec | https://github.com/oggy/respec | Rakefile | Ruby | mit | 48 | master | 228 | require 'ritual'
task :ci do
sh 'git config --global user.name || git config --global user.name Test'
sh 'git config --global user.email || git config --global user.email test@example.com'
sh 'bundle exec rspec spec'
end |
github | oggy/respec | https://github.com/oggy/respec | respec.gemspec | Ruby | mit | 48 | master | 681 | $:.unshift File.expand_path('lib', File.dirname(__FILE__))
require 'respec/version'
Gem::Specification.new do |gem|
gem.name = 'respec'
gem.version = Respec::VERSION
gem.authors = ['George Ogata']
gem.email = ['george.ogata@gmail.com']
gem.license = 'MIT'
gem.summary ... |
github | oggy/respec | https://github.com/oggy/respec | lib/respec/app.rb | Ruby | mit | 48 | master | 6,105 | require 'set'
module Respec
class App
def initialize(*args)
if (i = args.index('--'))
@args = args.slice!(0...i)
@raw_args = args[1..-1]
else
@args = args
@raw_args = []
end
@failures_path = self.class.default_failures_path
@update_failures = true
... |
github | oggy/respec | https://github.com/oggy/respec | lib/respec/formatter.rb | Ruby | mit | 48 | master | 1,628 | require 'rspec/core/formatters/base_formatter'
require 'rspec/core/version'
module Respec
def self.failures_path
@failures_path ||= ENV['RESPEC_FAILURES'] || File.expand_path(".respec_failures")
end
if (RSpec::Core::Version::STRING.scan(/\d+/).map { |s| s.to_i } <=> [3]) < 0
class Formatter < RSpec::Co... |
github | oggy/respec | https://github.com/oggy/respec | spec/integration_spec.rb | Ruby | mit | 48 | master | 1,743 | require_relative 'spec_helper'
require 'rbconfig'
describe Respec do
use_temporary_directory TMP
CONFIG = (Object.const_defined?(:RbConfig) ? RbConfig : Config)::CONFIG
def respec(args)
# Rubinius can trip here as the simulated edits to the .rb files happen quickly enough that the
# .rbc will look curre... |
github | oggy/respec | https://github.com/oggy/respec | spec/respec/formatter_spec.rb | Ruby | mit | 48 | master | 2,014 | require_relative '../spec_helper'
require 'rspec/version'
describe Respec::Formatter do
use_temporary_directory TMP
let(:formatter) { Respec::Formatter.new }
def failures
File.read("#{TMP}/failures.txt")
end
describe Respec::Formatter do
if (RSpec::Core::Version::STRING.scan(/\d+/).map { |s| s.to_i... |
github | oggy/respec | https://github.com/oggy/respec | spec/respec/app_spec.rb | Ruby | mit | 48 | master | 11,623 | require File.expand_path('../spec_helper', File.dirname(__FILE__))
require 'fileutils'
describe Respec::App do
use_temporary_directory TMP
FORMATTER_PATH = File.expand_path("#{ROOT}/lib/respec/formatter.rb", File.dirname(__FILE__))
FAIL_PATH = "#{TMP}/failures.txt"
Respec::App.default_failures_path = FAIL_PA... |
github | tech-bureau/catapult-service-bootstrap | https://github.com/tech-bureau/catapult-service-bootstrap | bin/ruby/format.rb | Ruby | apache-2.0 | 48 | master | 2,422 | require 'yaml'
input_file_path = ARGV[0]
fail "No file exists at path '#{input_file_path}'" unless File.file?(input_file_path)
module TopLevel
def self.parse(input_file_path)
parsed_flat_form = Helper.parse_into_flat_form(input_file_path)
parsed_form = Helper.break_into_sections(parsed_flat_form)
yaml_fo... |
github | tech-bureau/catapult-service-bootstrap | https://github.com/tech-bureau/catapult-service-bootstrap | common/ruby/catapult-bootstrap.gemspec | Ruby | apache-2.0 | 48 | master | 875 | $:.push File.expand_path("../lib", __FILE__)
require "catapult/bootstrap/version"
Gem::Specification.new do |s|
s.name = "catapult-bootstrap"
s.version = Catapult::Bootstrap::VERSION
s.platform = Gem::Platform::RUBY
s.authors = ["Techbureau"]
s.email = [""]
s.summary = "Code to ... |
github | tech-bureau/catapult-service-bootstrap | https://github.com/tech-bureau/catapult-service-bootstrap | common/ruby/lib/catapult.rb | Ruby | apache-2.0 | 48 | master | 711 | # Copyright 2018 Tech Bureau, Corp
#
# 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
#
# Unless required by applicable la... |
github | tech-bureau/catapult-service-bootstrap | https://github.com/tech-bureau/catapult-service-bootstrap | common/ruby/lib/catapult/bootstrap.rb | Ruby | apache-2.0 | 48 | master | 1,136 | # Copyright 2018 Tech Bureau, Corp
#
# 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
#
# Unless required by applicable la... |
github | tech-bureau/catapult-service-bootstrap | https://github.com/tech-bureau/catapult-service-bootstrap | common/ruby/lib/catapult/bootstrap/global.rb | Ruby | apache-2.0 | 48 | master | 2,664 | # Copyright 2018 Tech Bureau, Corp
#
# 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
#
# Unless required by applicable la... |
github | tech-bureau/catapult-service-bootstrap | https://github.com/tech-bureau/catapult-service-bootstrap | common/ruby/lib/catapult/bootstrap/config.rb | Ruby | apache-2.0 | 48 | master | 5,868 | # Copyright 2018 Tech Bureau, Corp
#
# 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
#
# Unless required by applicable la... |
github | tech-bureau/catapult-service-bootstrap | https://github.com/tech-bureau/catapult-service-bootstrap | common/ruby/lib/catapult/bootstrap/directory.rb | Ruby | apache-2.0 | 48 | master | 300 | module Catapult::Bootstrap
class Directory
class Nemesis < self
end
class BaseConfig < self
end
class BaseData < self
end
def self.set!(full_path)
@base = full_path
end
def self.full_path
@base || fail("set! has not been called")
end
end
end |
github | tech-bureau/catapult-service-bootstrap | https://github.com/tech-bureau/catapult-service-bootstrap | common/ruby/lib/catapult/bootstrap/addresses.rb | Ruby | apache-2.0 | 48 | master | 3,070 | # Copyright 2018 Tech Bureau, Corp
#
# 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
#
# Unless required by applicable la... |
github | tech-bureau/catapult-service-bootstrap | https://github.com/tech-bureau/catapult-service-bootstrap | common/ruby/lib/catapult/bootstrap/tools.rb | Ruby | apache-2.0 | 48 | master | 622 | module Catapult::Bootstrap
class Tools
require_relative('tools/address')
require_relative('tools/nemesis')
DEFAULT_BIN_DIR = '/usr/catapult/bin'
include Mixin::ExecuteCommand
protected
@@bin_dir = nil
def bin_dir
@@bin_dir ||= DEFAULT_BIN_DIR
end
def type
@typ... |
github | tech-bureau/catapult-service-bootstrap | https://github.com/tech-bureau/catapult-service-bootstrap | common/ruby/lib/catapult/bootstrap/mixin/execute_command.rb | Ruby | apache-2.0 | 48 | master | 1,141 | require 'frontkick'
require 'tempfile'
module Catapult::Bootstrap
module Mixin
module ExecuteCommand
# returns stdout if no error
def execute_command(command_string, timeout: nil)
execute_command_all_info(command_string, timeout: timeout).stdout
end
ExecuteInfo = Struct.new... |
github | tech-bureau/catapult-service-bootstrap | https://github.com/tech-bureau/catapult-service-bootstrap | common/ruby/lib/catapult/bootstrap/mixin/mustache.rb | Ruby | apache-2.0 | 48 | master | 330 | require 'mustache'
module Catapult::Bootstrap
module Mixin
module Mustache
def bind_mustache_variables(template, template_attributes_hash)
ret = ::Mustache.render(template, template_attributes_hash)
ret.gsub(''',"'") # protection around ::Mustache.render "'" to '''
end
end
... |
github | tech-bureau/catapult-service-bootstrap | https://github.com/tech-bureau/catapult-service-bootstrap | common/ruby/lib/catapult/bootstrap/addresses/parse.rb | Ruby | apache-2.0 | 48 | master | 3,776 | # Copyright 2018 Tech Bureau, Corp
#
# 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
#
# Unless required by applicable la... |
github | tech-bureau/catapult-service-bootstrap | https://github.com/tech-bureau/catapult-service-bootstrap | common/ruby/lib/catapult/bootstrap/config/paths.rb | Ruby | apache-2.0 | 48 | master | 3,320 | # Copyright 2018 Tech Bureau, Corp
#
# 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
#
# Unless required by applicable la... |
github | tech-bureau/catapult-service-bootstrap | https://github.com/tech-bureau/catapult-service-bootstrap | common/ruby/lib/catapult/bootstrap/config/source_target_pair.rb | Ruby | apache-2.0 | 48 | master | 1,504 | # Copyright 2018 Tech Bureau, Corp
#
# 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
#
# Unless required by applicable la... |
github | tech-bureau/catapult-service-bootstrap | https://github.com/tech-bureau/catapult-service-bootstrap | common/ruby/lib/catapult/bootstrap/config/nemesis.rb | Ruby | apache-2.0 | 48 | master | 1,663 | # Copyright 2018 Tech Bureau, Corp
#
# 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
#
# Unless required by applicable la... |
github | tech-bureau/catapult-service-bootstrap | https://github.com/tech-bureau/catapult-service-bootstrap | common/ruby/lib/catapult/bootstrap/config/keys.rb | Ruby | apache-2.0 | 48 | master | 1,884 | # Copyright 2018 Tech Bureau, Corp
#
# 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
#
# Unless required by applicable la... |
github | tech-bureau/catapult-service-bootstrap | https://github.com/tech-bureau/catapult-service-bootstrap | common/ruby/lib/catapult/bootstrap/config/catapult_node.rb | Ruby | apache-2.0 | 48 | master | 3,430 | # Copyright 2018 Tech Bureau, Corp
#
# 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
#
# Unless required by applicable la... |
github | tech-bureau/catapult-service-bootstrap | https://github.com/tech-bureau/catapult-service-bootstrap | common/ruby/lib/catapult/bootstrap/config/rest_gateway.rb | Ruby | apache-2.0 | 48 | master | 1,443 | # Copyright 2018 Tech Bureau, Corp
#
# 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
#
# Unless required by applicable la... |
github | tech-bureau/catapult-service-bootstrap | https://github.com/tech-bureau/catapult-service-bootstrap | common/ruby/lib/catapult/bootstrap/config/rest_gateway/template_attributes.rb | Ruby | apache-2.0 | 48 | master | 1,728 | # Copyright 2018 Tech Bureau, Corp
#
# 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
#
# Unless required by applicable la... |
github | tech-bureau/catapult-service-bootstrap | https://github.com/tech-bureau/catapult-service-bootstrap | common/ruby/lib/catapult/bootstrap/config/keys/content.rb | Ruby | apache-2.0 | 48 | master | 4,399 | # Copyright 2018 Tech Bureau, Corp
#
# 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
#
# Unless required by applicable la... |
github | tech-bureau/catapult-service-bootstrap | https://github.com/tech-bureau/catapult-service-bootstrap | common/ruby/lib/catapult/bootstrap/config/keys/component.rb | Ruby | apache-2.0 | 48 | master | 2,324 | # Copyright 2018 Tech Bureau, Corp
#
# 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
#
# Unless required by applicable la... |
github | tech-bureau/catapult-service-bootstrap | https://github.com/tech-bureau/catapult-service-bootstrap | common/ruby/lib/catapult/bootstrap/config/keys/parsed_content.rb | Ruby | apache-2.0 | 48 | master | 3,569 | # Copyright 2018 Tech Bureau, Corp
#
# 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
#
# Unless required by applicable la... |
github | tech-bureau/catapult-service-bootstrap | https://github.com/tech-bureau/catapult-service-bootstrap | common/ruby/lib/catapult/bootstrap/config/keys/handle.rb | Ruby | apache-2.0 | 48 | master | 1,577 | # Copyright 2018 Tech Bureau, Corp
#
# 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
#
# Unless required by applicable la... |
github | tech-bureau/catapult-service-bootstrap | https://github.com/tech-bureau/catapult-service-bootstrap | common/ruby/lib/catapult/bootstrap/config/keys/nemesis.rb | Ruby | apache-2.0 | 48 | master | 2,757 | # Copyright 2018 Tech Bureau, Corp
#
# 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
#
# Unless required by applicable la... |
github | tech-bureau/catapult-service-bootstrap | https://github.com/tech-bureau/catapult-service-bootstrap | common/ruby/lib/catapult/bootstrap/config/nemesis/block_properties_file.rb | Ruby | apache-2.0 | 48 | master | 2,118 | # Copyright 2018 Tech Bureau, Corp
#
# 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
#
# Unless required by applicable la... |
github | tech-bureau/catapult-service-bootstrap | https://github.com/tech-bureau/catapult-service-bootstrap | common/ruby/lib/catapult/bootstrap/config/nemesis/harvest_vrf_files.rb | Ruby | apache-2.0 | 48 | master | 1,279 | # Copyright 2018 Tech Bureau, Corp
#
# 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
#
# Unless required by applicable la... |
github | tech-bureau/catapult-service-bootstrap | https://github.com/tech-bureau/catapult-service-bootstrap | common/ruby/lib/catapult/bootstrap/config/nemesis/block_properties_file/template_bindings.rb | Ruby | apache-2.0 | 48 | master | 2,808 | # Copyright 2018 Tech Bureau, Corp
#
# 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
#
# Unless required by applicable la... |
github | tech-bureau/catapult-service-bootstrap | https://github.com/tech-bureau/catapult-service-bootstrap | common/ruby/lib/catapult/bootstrap/config/catapult_node/peer.rb | Ruby | apache-2.0 | 48 | master | 1,664 | # Copyright 2018 Tech Bureau, Corp
#
# 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
#
# Unless required by applicable la... |
github | tech-bureau/catapult-service-bootstrap | https://github.com/tech-bureau/catapult-service-bootstrap | common/ruby/lib/catapult/bootstrap/config/catapult_node/peer_node.rb | Ruby | apache-2.0 | 48 | master | 738 | # Copyright 2018 Tech Bureau, Corp
#
# 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
#
# Unless required by applicable la... |
github | tech-bureau/catapult-service-bootstrap | https://github.com/tech-bureau/catapult-service-bootstrap | common/ruby/lib/catapult/bootstrap/config/catapult_node/api_node.rb | Ruby | apache-2.0 | 48 | master | 737 | # Copyright 2018 Tech Bureau, Corp
#
# 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
#
# Unless required by applicable la... |
github | tech-bureau/catapult-service-bootstrap | https://github.com/tech-bureau/catapult-service-bootstrap | common/ruby/lib/catapult/bootstrap/config/catapult_node/template_attributes.rb | Ruby | apache-2.0 | 48 | master | 1,559 | # Copyright 2018 Tech Bureau, Corp
#
# 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
#
# Unless required by applicable la... |
github | tech-bureau/catapult-service-bootstrap | https://github.com/tech-bureau/catapult-service-bootstrap | common/ruby/lib/catapult/bootstrap/config/catapult_node/json_peers.rb | Ruby | apache-2.0 | 48 | master | 3,042 | # Copyright 2018 Tech Bureau, Corp
#
# 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
#
# Unless required by applicable la... |
github | tech-bureau/catapult-service-bootstrap | https://github.com/tech-bureau/catapult-service-bootstrap | common/ruby/lib/catapult/bootstrap/config/catapult_node/cert_generate.rb | Ruby | apache-2.0 | 48 | master | 3,241 | # Copyright 2018 Tech Bureau, Corp
#
# 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
#
# Unless required by applicable la... |
github | tech-bureau/catapult-service-bootstrap | https://github.com/tech-bureau/catapult-service-bootstrap | common/ruby/lib/catapult/bootstrap/config/catapult_node/cert_generate/template.rb | Ruby | apache-2.0 | 48 | master | 2,351 | # Copyright 2018 Tech Bureau, Corp
#
# 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
#
# Unless required by applicable la... |
github | tech-bureau/catapult-service-bootstrap | https://github.com/tech-bureau/catapult-service-bootstrap | common/ruby/lib/catapult/bootstrap/config/catapult_node/cert_generate/crypto.rb | Ruby | apache-2.0 | 48 | master | 3,934 | # Copyright 2018 Tech Bureau, Corp
#
# 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
#
# Unless required by applicable la... |
github | tech-bureau/catapult-service-bootstrap | https://github.com/tech-bureau/catapult-service-bootstrap | common/ruby/lib/catapult/bootstrap/config/catapult_node/cert_generate/crypto/top.rb | Ruby | apache-2.0 | 48 | master | 1,118 | # Copyright 2018 Tech Bureau, Corp
#
# 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
#
# Unless required by applicable la... |
github | tech-bureau/catapult-service-bootstrap | https://github.com/tech-bureau/catapult-service-bootstrap | common/ruby/lib/catapult/bootstrap/config/catapult_node/cert_generate/crypto/cert.rb | Ruby | apache-2.0 | 48 | master | 1,972 | # Copyright 2018 Tech Bureau, Corp
#
# 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
#
# Unless required by applicable la... |
github | tech-bureau/catapult-service-bootstrap | https://github.com/tech-bureau/catapult-service-bootstrap | common/ruby/lib/catapult/bootstrap/config/catapult_node/cert_generate/crypto/request.rb | Ruby | apache-2.0 | 48 | master | 1,692 | # Copyright 2018 Tech Bureau, Corp
#
# 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
#
# Unless required by applicable la... |
github | tech-bureau/catapult-service-bootstrap | https://github.com/tech-bureau/catapult-service-bootstrap | common/ruby/lib/catapult/bootstrap/config/catapult_node/cert_generate/crypto/key.rb | Ruby | apache-2.0 | 48 | master | 3,817 | # Copyright 2018 Tech Bureau, Corp
#
# 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
#
# Unless required by applicable la... |
github | tech-bureau/catapult-service-bootstrap | https://github.com/tech-bureau/catapult-service-bootstrap | common/ruby/lib/catapult/bootstrap/config/catapult_node/cert_generate/crypto/write_to_files.rb | Ruby | apache-2.0 | 48 | master | 4,784 | # Copyright 2018 Tech Bureau, Corp
#
# 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
#
# Unless required by applicable la... |
github | tech-bureau/catapult-service-bootstrap | https://github.com/tech-bureau/catapult-service-bootstrap | common/ruby/lib/catapult/bootstrap/config/catapult_node/cert_generate/crypto/cnf_file.rb | Ruby | apache-2.0 | 48 | master | 857 | # Copyright 2018 Tech Bureau, Corp
#
# 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
#
# Unless required by applicable la... |
github | tech-bureau/catapult-service-bootstrap | https://github.com/tech-bureau/catapult-service-bootstrap | common/ruby/lib/catapult/bootstrap/config/catapult_node/cert_generate/crypto/top/execute_command_mixin.rb | Ruby | apache-2.0 | 48 | master | 1,225 | # Copyright 2018 Tech Bureau, Corp
#
# 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
#
# Unless required by applicable la... |
github | tech-bureau/catapult-service-bootstrap | https://github.com/tech-bureau/catapult-service-bootstrap | common/ruby/lib/catapult/bootstrap/config/catapult_node/template_attributes/per_index.rb | Ruby | apache-2.0 | 48 | master | 4,198 | # Copyright 2018 Tech Bureau, Corp
#
# 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
#
# Unless required by applicable la... |
github | tech-bureau/catapult-service-bootstrap | https://github.com/tech-bureau/catapult-service-bootstrap | common/ruby/lib/catapult/bootstrap/tools/address.rb | Ruby | apache-2.0 | 48 | master | 442 | module Catapult::Bootstrap
class Tools
class Address < self
def self.generate_raw_addresses(num_addresses)
new.generate_raw_addresses(num_addresses)
end
def generate_raw_addresses(num_addresses)
execute_command("#{self.executable} -g #{num_addresses} -n #{self.network}")
en... |
github | tech-bureau/catapult-service-bootstrap | https://github.com/tech-bureau/catapult-service-bootstrap | common/ruby/lib/catapult/bootstrap/tools/nemesis/linker.rb | Ruby | apache-2.0 | 48 | master | 906 | module Catapult::Bootstrap
class Tools::Nemesis
class Linker < self
def initialize(harvest_vrf_directory)
@harvest_vrf_directory = harvest_vrf_directory
end
def link_harvesting_pair(harvesting_pair)
execute_command(command(harvesting_pair))
end
protected
... |
github | tech-bureau/catapult-service-bootstrap | https://github.com/tech-bureau/catapult-service-bootstrap | common/ruby/lib/catapult/bootstrap/tools/nemesis/nemgen.rb | Ruby | apache-2.0 | 48 | master | 3,308 | module Catapult::Bootstrap
class Tools::Nemesis
class Nemgen < self
require_relative('nemgen/process_node')
require_relative('nemgen/mosaics')
require_relative('nemgen/temp_dir')
def initialize
@nemesis_temp_dir = TempDir.new
end
private :initialize
def self.gen... |
github | tech-bureau/catapult-service-bootstrap | https://github.com/tech-bureau/catapult-service-bootstrap | common/ruby/lib/catapult/bootstrap/tools/nemesis/nemgen/temp_dir.rb | Ruby | apache-2.0 | 48 | master | 2,181 | module Catapult::Bootstrap
class Tools::Nemesis::Nemgen
class TempDir < self
def initialize
# dynamically set
@temp_dir_path = nil
@mosaics = nil
end
# If generate_nemesis? called, we must always call remove
def generate_nemesis?
@temp_dir_path ||= gen... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.