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
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-cookbooks/package/libraries/config/roles/application.rb
Ruby
apache-2.0
225
master
1,002
# Copyright:: Copyright (c) 2017 GitLab Inc. # License:: Apache License, Version 2.0 # # 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 # # Unl...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-cookbooks/package/libraries/handlers/gitlab.rb
Ruby
apache-2.0
225
master
1,532
# # Copyright:: Copyright (c) 2017 GitLab Inc. # # 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 law or agre...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-cookbooks/package/resources/env_dir.rb
Ruby
apache-2.0
225
master
1,456
# # Copyright:: Copyright (c) 2016 GitLab Inc # License:: Apache License, Version 2.0 # # 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 # # Un...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-cookbooks/package/resources/version_file.rb
Ruby
apache-2.0
225
master
1,019
# # Copyright:: Copyright (c) 2020 GitLab Inc # License:: Apache License, Version 2.0 # # 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 # # Un...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-cookbooks/package/resources/templatesymlink.rb
Ruby
apache-2.0
225
master
1,692
# # Copyright:: Copyright (c) 2016 GitLab Inc # License:: Apache License, Version 2.0 # # 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 # # Un...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-cookbooks/package/resources/gitlab_sysctl.rb
Ruby
apache-2.0
225
master
1,972
# # Copyright:: Copyright (c) 2016 GitLab Inc # License:: Apache License, Version 2.0 # # 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 # # Un...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-cookbooks/package/resources/account.rb
Ruby
apache-2.0
225
master
2,375
# # Copyright:: Copyright (c) 2016 GitLab Inc # License:: Apache License, Version 2.0 # # 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 # # Un...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-cookbooks/package/resources/storage_directory.rb
Ruby
apache-2.0
225
master
1,639
# # Copyright:: Copyright (c) 2016 GitLab Inc # License:: Apache License, Version 2.0 # # 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 # # Un...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-cookbooks/package/attributes/default.rb
Ruby
apache-2.0
225
master
1,926
# Copyright:: Copyright (c) 2017 GitLab Inc # License:: Apache License, Version 2.0 # # 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 # # Unle...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-cookbooks/gitlab-base/metadata.rb
Ruby
apache-2.0
225
master
929
name 'gitlab-base' maintainer 'GitLab Inc' maintainer_email 'support@gitlab.com' license 'Apache 2.0' description "Interface cookbook for basic functionality of GitLab" long_description "Interface cookbook for basic functionality of GitLab" version '0.1.0' chef_version '>= 12.1' if respond_to?(:chef_version) issues_ur...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-cookbooks/gitlab-base/recipes/default.rb
Ruby
apache-2.0
225
master
337
if Dir.exist?(File.absolute_path(File.join(__dir__, "../../gitlab-jh"))) include_recipe 'gitlab-jh::default' elsif Dir.exist?(File.absolute_path(File.join(__dir__, "../../gitlab-ee"))) include_recipe 'gitlab-ee::default' elsif Dir.exist?(File.absolute_path(File.join(__dir__, "../../gitlab"))) include_recipe 'gitl...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-cookbooks/gitlab-base/recipes/config.rb
Ruby
apache-2.0
225
master
321
# To be used in tests. We can't directly converge on `package::config` becaues # `package` cookbook does not define any dependencies, and thus the libraries # in service cookbooks won't run and won't populate any default values. This is # precisely why we have a `gitlab-base` cookbook. include_recipe 'package::config'
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands/remove_accounts.rb
Ruby
apache-2.0
225
master
994
# # Copyright:: Copyright (c) 2015 GitLab Inc. # License:: Apache License, Version 2.0 # # 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 # # U...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands/generate_secrets.rb
Ruby
apache-2.0
225
master
1,600
# 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 law or agreed to in writing, software # distributed under th...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands/set_replication_password.rb
Ruby
apache-2.0
225
master
280
require "#{base_path}/embedded/service/omnibus-ctl/lib/gitlab_ctl/postgresql/replication" add_command_under_category('set-replication-password', 'database', 'Set database replication password', 2) do |_cmd, *args| GitlabCtl::PostgreSQL::Replication.new(self).set_password! end
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands/diff_config.rb
Ruby
apache-2.0
225
master
1,427
# # Copyright:: Copyright (c) 2017 GitLab Inc. # License:: Apache License, Version 2.0 # # 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 # # U...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands/pg-upgrade.rb
Ruby
apache-2.0
225
master
31,590
# # Copyright:: Copyright (c) 2016 GitLab Inc # License:: Apache License, Version 2.0 # # 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 # # Un...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands/selinux.rb
Ruby
apache-2.0
225
master
1,332
# 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 law or agreed to in writing, software # distributed under th...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands/completion.rb
Ruby
apache-2.0
225
master
1,909
# # Copyright:: Copyright (c) 2025 GitLab Inc. # License:: Apache License, Version 2.0 # # 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 # # U...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands/praefect.rb
Ruby
apache-2.0
225
master
468
require 'optparse' require "#{base_path}/embedded/service/omnibus-ctl/lib/gitlab_ctl" require "#{base_path}/embedded/service/omnibus-ctl/lib/praefect" add_command_under_category('praefect', 'gitaly', 'Interact with Gitaly cluster', 2) do begin options = Praefect.parse_options!(ARGV) rescue OptionParser::Parse...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands/postgresql_password_hash.rb
Ruby
apache-2.0
225
master
299
require "#{base_path}/embedded/service/omnibus-ctl/lib/gitlab_ctl/postgresql/password_hash" add_command_under_category('pg-password-md5', 'database', 'Generate MD5 Hash of user password in PostgreSQL format', 2) do |_cmd, user| GitlabCtl::PostgreSQL::PasswordHash.new(user).generate_md5_hash end
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands/restart_except.rb
Ruby
apache-2.0
225
master
1,490
# # Copyright:: Copyright (c) 2014 GitLab Inc. # License:: Apache License, Version 2.0 # # 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 # # U...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands/upgrade.rb
Ruby
apache-2.0
225
master
13,501
# # Copyright:: Copyright (c) 2015 GitLab Inc. # License:: Apache License, Version 2.0 # # 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 # # U...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands/check_config.rb
Ruby
apache-2.0
225
master
2,929
# # Copyright:: Copyright (c) 2017 GitLab Inc. # License:: Apache License, Version 2.0 # # 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 # # U...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands/deploy_page.rb
Ruby
apache-2.0
225
master
1,148
# # Copyright:: Copyright (c) 2014 GitLab Inc. # License:: Apache License, Version 2.0 # # 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 # # U...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands/registry_garbage_collect.rb
Ruby
apache-2.0
225
master
968
# # Copyright:: Copyright (c) 2016 GitLab Inc. # License:: Apache License, Version 2.0 # # 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 # # U...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands/get_redis_master.rb
Ruby
apache-2.0
225
master
3,002
# # Copyright:: Copyright (c) 2019 GitLab Inc. # License:: Apache License, Version 2.0 # # 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 # # U...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands/backup.rb
Ruby
apache-2.0
225
master
1,995
# # Copyright:: Copyright (c) 2017 GitLab Inc. # License:: Apache License, Version 2.0 # # 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 # # U...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands/pg_decomposition_migration.rb
Ruby
apache-2.0
225
master
304
require "#{base_path}/embedded/service/omnibus-ctl/lib/gitlab_ctl/postgresql/decomposition_migration" add_command_under_category('pg-decomposition-migration', 'database', 'Migrate database to two-database setup', 2) do |_cmd, user| GitlabCtl::PostgreSQL::DecompositionMigration.new(self).migrate! end
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands/upgrade-check.rb
Ruby
apache-2.0
225
master
910
require "#{base_path}/embedded/service/omnibus-ctl/lib/gitlab_ctl/upgrade_check" add_command('upgrade-check', 'Check if the upgrade is acceptable', 2) do old_version = ARGV[3] new_version = ARGV[4] unless GitlabCtl::UpgradeCheck.valid?(old_version) old_major = old_version.split('.').first.to_i new_major ...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands/registry_database.rb
Ruby
apache-2.0
225
master
1,244
# # Copyright:: Copyright (c) 2016 GitLab Inc. # License:: Apache License, Version 2.0 # # 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 # # U...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands/letsencrypt.rb
Ruby
apache-2.0
225
master
1,441
# # Copyright:: Copyright (c) 2018 GitLab Inc. # # 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 law or agre...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands/lib/praefect.rb
Ruby
apache-2.0
225
master
9,974
require 'optparse' module Praefect EXEC_PATH = '/opt/gitlab/embedded/bin/praefect'.freeze DIR_PATH = '/var/opt/gitlab/praefect'.freeze USAGE ||= <<~EOS.freeze Usage: gitlab-ctl praefect command [options] COMMANDS: Repository/Metadata Health remove-repository Remove reposit...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands/lib/gitlab_ctl.rb
Ruby
apache-2.0
225
master
1,072
# # Copyright:: Copyright (c) 2017 GitLab Inc. # # 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 law or agre...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands/lib/gitlab_ctl/selinux.rb
Ruby
apache-2.0
225
master
1,541
# 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 law or agreed to in writing, software # distributed under th...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands/lib/gitlab_ctl/backup.rb
Ruby
apache-2.0
225
master
4,125
module GitlabCtl class Backup attr_reader :etc_backup_path, :etc_path, :backup_keep_time, :remove_timestamp def initialize(options = {}) backup_path = options[:backup_path].nil? ? '/etc/gitlab/config_backup' : options[:backup_path] @etc_backup_path = File.expand_path(backup_path) @etc_path ...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands/lib/gitlab_ctl/pg_upgrade.rb
Ruby
apache-2.0
225
master
7,295
require 'optparse' require 'mixlib/shellout' require 'rainbow' require_relative 'util' require_relative '../gitlab_ctl' # For testing purposes, if the first path cannot be found load the second begin require_relative '../../../../cookbooks/gitlab/libraries/pg_version' rescue LoadError require_relative '../../../g...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands/lib/gitlab_ctl/postgresql.rb
Ruby
apache-2.0
225
master
1,484
require 'mixlib/shellout' require 'timeout' require_relative 'postgresql/pgpass' require_relative 'util' module GitlabCtl class PostgreSQL class << self def wait_for_postgresql(timeout, psql_command: 'gitlab-psql') # wait for *timeout* seconds for postgresql to respond to queries Timeout.ti...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands/lib/gitlab_ctl/generate_secrets.rb
Ruby
apache-2.0
225
master
1,559
# 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 law or agreed to in writing, software # distributed under th...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands/lib/gitlab_ctl/upgrade_check.rb
Ruby
apache-2.0
225
master
716
module GitlabCtl class UpgradeCheck class <<self def valid?(ov) # If old_version is nil, this is a fresh install return true if ov.nil? old_version_major = ov.split('.')[0].to_i old_version_minor = ov.split('.')[1].to_i min_version = min_version() min_version...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands/lib/gitlab_ctl/util.rb
Ruby
apache-2.0
225
master
5,709
require 'mixlib/shellout' require 'io/console' require 'chef/mash' require 'chef/mixins' require 'json' require 'socket' module GitlabCtl module Util PUBLIC_ATTRIBUTES_FILE = '/var/opt/gitlab/public_attributes.json'.freeze class <<self def get_command_output(command, user = nil, timeout = nil) ...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands/lib/gitlab_ctl/postgresql/password_hash.rb
Ruby
apache-2.0
225
master
612
require 'io/console' module GitlabCtl class PostgreSQL class PasswordHash def initialize(user) @user = user end def generate_md5_hash if @user.nil? || @user.empty? puts 'You must inform the username for which the password will be encrypted.' puts 'PostgreSQL...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands/lib/gitlab_ctl/postgresql/pgpass.rb
Ruby
apache-2.0
225
master
1,705
# # Copyright:: Copyright (c) 2017 GitLab Inc. # # 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 law or agre...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands/lib/gitlab_ctl/postgresql/decomposition_migration.rb
Ruby
apache-2.0
225
master
4,606
require 'io/console' module GitlabCtl class PostgreSQL class DecompositionMigration def initialize(ctl) @ctl = ctl end def migrate! unless @ctl.service_enabled?('postgresql') puts 'There is no PostgreSQL instance enabled in Omnibus, exiting...' exit 1 ...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands/lib/gitlab_ctl/postgresql/replication.rb
Ruby
apache-2.0
225
master
1,498
require 'io/console' module GitlabCtl class PostgreSQL class Replication def initialize(ctl) @ctl = ctl end def set_password! unless @ctl.service_enabled?('postgresql') || @ctl.service_enabled?('patroni') puts 'There is no PostgreSQL instance enabled in Omnibus, exiti...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands/lib/gitlab_ctl/registry/import.rb
Ruby
apache-2.0
225
master
3,974
require 'optparse' module GitlabCtl module Registry module Import CMD_NAME = 'import'.freeze SUMMARY_WIDTH = 40 DESC_INDENT = 45 def self.indent(str, len) str.gsub(/%%/, ' ' * len) end USAGE = <<~EOS.freeze Import filesystem metadata into the database Se...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands/lib/gitlab_ctl/registry/gc_stats.rb
Ruby
apache-2.0
225
master
1,477
require 'optparse' module GitlabCtl module Registry module GcStats CMD_NAME = 'gc-stats'.freeze USAGE = <<~EOS.freeze Show online garbage collection health statistics Usage: gitlab-ctl registry-database gc-stats [options] Options: -f, --format FORMAT Output form...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands/lib/gitlab_ctl/registry/garbage_collect.rb
Ruby
apache-2.0
225
master
2,034
require_relative './database' module GitlabCtl module Registry class GarbageCollect def initialize(ctl, path, args) @ctl = ctl @path = path || '/var/opt/gitlab/registry/config.yml' @args = args @command = %w(/opt/gitlab/embedded/bin/registry garbage-collect) @comman...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands/lib/gitlab_ctl/registry/migrate.rb
Ruby
apache-2.0
225
master
6,746
require 'optparse' module GitlabCtl module Registry module Migrate CMD_NAME = 'migrate'.freeze SUMMARY_WIDTH = 40 DESC_INDENT = 45 def self.indent(str, len) str.gsub(/%%/, ' ' * len) end USAGE ||= <<~EOS.freeze Manage migrations Usage: gitlab-ctl...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands/lib/gitlab_ctl/registry/database.rb
Ruby
apache-2.0
225
master
7,373
require 'fileutils' require 'optparse' require_relative './migrate' require_relative './import' require_relative './gc_stats' require_relative '../../gitlab_ctl' module GitlabCtl module Registry module Database EXEC_PATH = '/opt/gitlab/embedded/bin/registry'.freeze CONFIG_PATH = '/var/opt/gitlab/reg...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands-ee/patroni.rb
Ruby
apache-2.0
225
master
3,179
require 'optparse' require "#{base_path}/embedded/service/omnibus-ctl/lib/gitlab_ctl" require "#{base_path}/embedded/service/omnibus-ctl-ee/lib/patroni" add_command_under_category('patroni', 'database', 'Interact with Patroni', 2) do begin options = Patroni.parse_options(ARGV) rescue OptionParser::ParseError ...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands-ee/geo_replication.rb
Ruby
apache-2.0
225
master
462
require "#{base_path}/embedded/service/omnibus-ctl-ee/lib/geo/replication_toggle_command" add_command_under_category('geo-replication-pause', 'gitlab-geo', 'Replication Process', 2) do |_cmd_name, *args| Geo::ReplicationToggleCommand.new(self, 'pause', ARGV).execute! end add_command_under_category('geo-replication-...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands-ee/consul.rb
Ruby
apache-2.0
225
master
1,057
# # Copyright:: Copyright (c) 2017 GitLab Inc. # # 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 law or agre...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands-ee/set_geo_primary_node.rb
Ruby
apache-2.0
225
master
1,066
# # Copyright:: Copyright (c) 2017 GitLab Inc. # License:: Apache License, Version 2.0 # # 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 # # U...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands-ee/geo.rb
Ruby
apache-2.0
225
master
1,500
require 'optparse' require "#{base_path}/embedded/cookbooks/package/libraries/gitlab_cluster" require "#{base_path}/embedded/service/omnibus-ctl/lib/gitlab_ctl" require "#{base_path}/embedded/service/omnibus-ctl-ee/lib/geo" require "#{base_path}/embedded/service/omnibus-ctl-ee/lib/geo/promote" add_command_under_categ...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands-ee/promotion_preflight_checks.rb
Ruby
apache-2.0
225
master
678
require "#{base_path}/embedded/service/omnibus-ctl-ee/lib/geo/promotion_preflight_checks" add_command_under_category('promotion-preflight-checks', 'gitlab-geo', 'Run preflight checks for promotion to primary node', 2) do |cmd_name, *args| def get_ctl_options options = {} OptionParser.new do |opts| opts...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands-ee/pgbouncer.rb
Ruby
apache-2.0
225
master
4,097
# # Copyright:: Copyright (c) 2017 GitLab Inc. # # 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 law or agre...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands-ee/replicate_geo_database.rb
Ruby
apache-2.0
225
master
3,658
require "#{base_path}/embedded/service/omnibus-ctl-ee/lib/geo/replication" require 'optparse' require 'English' add_command_under_category('replicate-geo-database', 'gitlab-geo', 'Replicate Geo database', 2) do |_cmd_name, *args| GeoReplicationCommand.new(self, ARGV).execute! end class GeoReplicationCommand def i...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands-ee/get_postgresql_primary.rb
Ruby
apache-2.0
225
master
438
require "#{base_path}/embedded/service/omnibus-ctl/lib/gitlab_ctl/util" require "#{base_path}/embedded/service/omnibus-ctl-ee/lib/gitlab_ctl/postgresql/ee" add_command_under_category 'get-postgresql-primary', 'database', 'Get connection details to the PostgreSQL primary', 2 do GitlabCtl::...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands-ee/lib/consul_download.rb
Ruby
apache-2.0
225
master
2,439
require 'net/http' require 'zip' class ConsulDownloadCommand # This version should be keep in sync with consul versions in # software/consul.rb and consul_helper.rb. DEFAULT_VERSION = '1.21.4'.freeze def initialize(args) @args = args @options = { version: DEFAULT_VERSION, architecture: def...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands-ee/lib/patroni.rb
Ruby
apache-2.0
225
master
10,189
require 'fileutils' require 'net/http' require 'openssl' require 'optparse' module Patroni USAGE ||= <<~EOS.freeze Usage: gitlab-ctl patroni [options] command [options] GLOBAL OPTIONS: -h, --help Usage help -q, --quiet Silent or quiet mode -v, --verbose Verbose or debug mo...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands-ee/lib/consul.rb
Ruby
apache-2.0
225
master
1,513
require 'mixlib/shellout' # For testing purposes, if the first path cannot be found load the second begin require_relative '../../omnibus-ctl/lib/gitlab_ctl' rescue LoadError require_relative '../../gitlab-ctl-commands/lib/gitlab_ctl' end class ConsulHandler WatcherError = Class.new(StandardError) attr_access...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands-ee/lib/pgbouncer.rb
Ruby
apache-2.0
225
master
6,583
require 'chef/mixins' require 'erb' # For testing purposes, if the first path cannot be found load the second begin require_relative '../../omnibus-ctl/lib/gitlab_ctl' rescue LoadError require_relative '../../gitlab-ctl-commands/lib/gitlab_ctl' end module Pgbouncer DEFAULT_RAILS_DATABASE = 'gitlabhq_production'...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands-ee/lib/geo.rb
Ruby
apache-2.0
225
master
1,815
require 'fileutils' require 'net/http' require 'optparse' module Geo USAGE ||= <<~EOS.freeze Usage: gitlab-ctl geo [options] command [options] GLOBAL OPTIONS: -h, --help Usage help -q, --quiet Silent or quiet mode -v, --verbose Verbose or debug mode COMMANDS: pr...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands-ee/lib/geo/promotion_preflight_checks.rb
Ruby
apache-2.0
225
master
2,929
require 'io/console' require 'rainbow/ext/string' module Geo class PromotionPreflightChecks def initialize(base_path, options) @base_path = base_path @options = options end def execute begin confirm_manual_checks confirm_primary_is_down check_replication_verifi...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands-ee/lib/geo/promote.rb
Ruby
apache-2.0
225
master
9,289
require 'io/console' require 'rainbow/ext/string' module Geo class Promote GEO_SITE_ROLES = %i[primary secondary].freeze PATRONI_NODE_ROLES = %i[leader replica standby_leader].freeze PATRONI_LEADER_ROLES = %i[leader standby_leader].freeze SERVICE_NAMES = %w[ geo-logcursor geo-postgresql ...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands-ee/lib/geo/replication_toggle_command.rb
Ruby
apache-2.0
225
master
2,360
require_relative "./replication_process" require_relative "./promote_db" require_relative "./pitr_file" require 'optparse' require 'English' module Geo class ReplicationToggleCommand def initialize(ctl, action, args) @ctl = ctl @args = args @action = action @options = { db_name: ...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands-ee/lib/geo/replication_process.rb
Ruby
apache-2.0
225
master
1,632
require 'rainbow/ext/string' module Geo class ReplicationProcess attr_accessor :base_path, :ctl attr_reader :options def initialize(instance, options) @base_path = instance.base_path @ctl = instance @options = options end def pause puts '* Pausing replication'.color(:gre...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands-ee/lib/geo/promote_db.rb
Ruby
apache-2.0
225
master
2,429
# frozen_string_literal: true require 'rainbow/ext/string' require_relative 'pitr_file' # The first path works on production, while the second path works for tests begin require_relative '../../../omnibus-ctl/lib/gitlab_ctl/util' rescue LoadError require_relative '../../../gitlab-ctl-commands/lib/gitlab_ctl/util'...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands-ee/lib/geo/pitr_file.rb
Ruby
apache-2.0
225
master
1,560
# frozen_string_literal: true require_relative 'promote_db' require_relative '../consul' module Geo class PitrFile attr_accessor :filepath, :consul_key NAMESPACE = 'geo/pitr' PITR_FILE_NAME = 'geo-pitr-file' CONSUL_PITR_KEY = 'promote-db' # @param [Object] ctl the omnibus-ctl object associated...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands-ee/lib/geo/replication.rb
Ruby
apache-2.0
225
master
9,541
require 'io/console' require 'rainbow/ext/string' # For testing purposes, if the first path cannot be found load the second begin require_relative '../../../omnibus-ctl/lib/gitlab_ctl/postgresql' rescue LoadError require_relative '../../../gitlab-ctl-commands/lib/gitlab_ctl/postgresql' end module Geo class Repl...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
files/gitlab-ctl-commands-ee/lib/gitlab_ctl/postgresql/ee.rb
Ruby
apache-2.0
225
master
1,333
require 'resolv' module GitlabCtl class PostgreSQL class EE class << self def get_primary consul_enable = node_attributes.dig('consul', 'enable') postgresql_service_name = node_attributes.dig('patroni', 'scope') raise 'Consul agent is not enabled on this node' unless ...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
danger/template/Dangerfile
Ruby
apache-2.0
225
master
2,142
# frozen_string_literal: true # All the files/directories that could contain a user facing configuration change. ATTRIBUTE_FILES = [ 'files/gitlab-cookbooks/consul/attributes/default.rb', 'files/gitlab-cookbooks/consul/attributes/services.rb', 'files/gitlab-cookbooks/consul/attributes/watchers.rb', 'files/gitl...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
danger/tag_only_jobs/Dangerfile
Ruby
apache-2.0
225
master
1,659
TAG_ONLY_JOB_MESSAGE = <<~MSG.freeze Job definition changes detected in configurations that only run in TAG and release pipelines. Double check that each changed job has any newly included or referenced configuration files in scope. > [!warning] Check Stable Branches in the Support Window > > If your changes are deem...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
danger/ruby_upgrade/Dangerfile
Ruby
apache-2.0
225
master
407
RUBY_UPGRADE_MESSAGE = <<~MSG.freeze This merge request is updating the Ruby version. Please make sure this merge request follows all standards established within the [Ruby upgrade guidelines](https://docs.gitlab.com/ee/development/ruby_upgrade.html). MSG lines = helper.changed_lines("config/software/ruby.rb") warn ...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
danger/specs/Dangerfile
Ruby
apache-2.0
225
master
484
NO_NEW_SPEC_MESSAGE = <<~MSG.freeze You've made some changes in the cookbooks, but didn't add any tests. That's OK as long as you're refactoring existing code, but please consider adding the ~"type::maintenance" label in that case. MSG all_changed_files = helper.all_changed_files has_app_changes = all_changed_files.gr...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
danger/reviewers/Dangerfile
Ruby
apache-2.0
225
master
1,098
# frozen_string_literal: true return if helper.has_scoped_label_with_scope?("workflow") REVIEWERS_MESSAGE = <<~MSG Once your MR is ready for review you can comment `@gitlab-bot ready <@user>` to request the first review to someone. It's recommended that you pick the one suggested by the reviewer roulette. But you can...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
danger/software/Dangerfile
Ruby
apache-2.0
225
master
1,425
NO_BUILD_CHANGE_HAPPENED_LABELS = [ 'maintenance::pipelines', 'maintenance::workflow' ].freeze SOFTWARE_MESSAGE = <<~MSG.freeze You've made some changes to the software definitions. Any change in software definition requires: - package rebuild to verify that builds across the supported platforms are successful. ...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
docker/assets/gitlab.rb
Ruby
apache-2.0
225
master
1,638
# Initialize the env config for each service in case we need to add them in via the wrapper unless ENV['AWS_CONTAINER_CREDENTIALS_RELATIVE_URI'].nil? [gitlab_workhorse['env'], gitlab_pages['env'], registry['env'], gitlab_rails['env']].each do |new_env| new_env['AWS_CONTAINER_CREDENTIALS_RELATIVE_URI'] = ENV['AWS_...
github
Empact/roxml
https://github.com/Empact/roxml
Rakefile
Ruby
mit
225
master
2,094
require 'rake' ENV['RUBY_FLAGS'] = '-W1' Dir['tasks/**/*.rake'].each { |t| load t } task :default => [:test, :spec] task :all => [:libxml, :nokogiri, 'spec:active_record'] task :libxml => ['test:libxml', 'spec:libxml'] task :nokogiri => ['test:nokogiri', 'spec:nokogiri'] require 'rdoc/task' RDoc::Task.new do |rdoc...
github
Empact/roxml
https://github.com/Empact/roxml
roxml.gemspec
Ruby
mit
225
master
5,505
# -*- encoding: utf-8 -*- # stub: roxml 4.2.0 ruby lib Gem::Specification.new do |s| s.name = "roxml" s.version = "4.2.0" s.required_ruby_version = ">= 3.0.0" s.required_rubygems_version = Gem::Requirement.new(">= 0") s.require_paths = ["lib"] s.authors = ["Ben Woosley", "Zak Mandhro", "Anders Engstrom", ...
github
Empact/roxml
https://github.com/Empact/roxml
examples/dashed_elements.rb
Ruby
mit
225
master
439
#!/usr/bin/env ruby require 'date' require_relative './../spec/spec_helper' module GitHub class Commit include ROXML xml_convention :dasherize xml_reader :url xml_reader :tree xml_reader :message xml_reader :id xml_reader :committed_date, :as => Date end end unless defined?(RSpec) c...
github
Empact/roxml
https://github.com/Empact/roxml
examples/twitter.rb
Ruby
mit
225
master
800
#!/usr/bin/env ruby require_relative './../spec/spec_helper' require 'time' class User include ROXML xml_reader :id, :as => Integer xml_reader :name xml_reader :screen_name xml_reader :location xml_reader :description xml_reader :profile_image_url xml_reader :url xml_reader :protected? xml_reade...
github
Empact/roxml
https://github.com/Empact/roxml
examples/rails.rb
Ruby
mit
225
master
1,559
#!/usr/bin/env ruby require_relative './../spec/spec_helper' require 'sqlite3' require 'active_record' ActiveRecord::Base.establish_connection( :adapter => 'sqlite3', :database => ':memory:' ) class Waypoint < ActiveRecord::Base include ROXML belongs_to :route xml_attr :isLeg xml_attr :lonlatx xml_at...
github
Empact/roxml
https://github.com/Empact/roxml
examples/library.rb
Ruby
mit
225
master
957
class Publisher include ROXML xml_accessor :name def initialize(name = nil) @name = name end def ==(other) name == other.name end # other important functionality end class Novel include ROXML xml_accessor :isbn, :from => "@ISBN" # attribute with name 'ISBN' xml_accessor :title ...
github
Empact/roxml
https://github.com/Empact/roxml
examples/posts.rb
Ruby
mit
225
master
608
#!/usr/bin/env ruby require_relative './../spec/spec_helper' class Post include ROXML xml_reader :href, :from => :attr xml_reader :hash, :from => :attr xml_reader :description, :from => :attr xml_reader :tag, :from => :attr xml_reader :created_at, :from => '@time' xml_reader :others, :from => :attr, :...
github
Empact/roxml
https://github.com/Empact/roxml
examples/search_query.rb
Ruby
mit
225
master
328
#!/usr/bin/env ruby require_relative './../spec/spec_helper' class SearchQuery include ROXML xml_accessor :query xml_accessor :max_results, :else => 20, :as => Integer xml_accessor :language, :else => 'EN' end unless defined?(RSpec) q = SearchQuery.new q.query = "Some random query string." puts q.to_xml.to...
github
Empact/roxml
https://github.com/Empact/roxml
examples/person.rb
Ruby
mit
225
master
678
#!/usr/bin/env ruby require_relative './../spec/spec_helper' class Person include ROXML xml_accessor :name, :from => 'name' xml_accessor :lat, :from => 'latitude', :in => 'location/coordinates' xml_accessor :long, :from => 'longitude', :in => 'location/coordinates' xml_accessor :street, :from => 'street', :...
github
Empact/roxml
https://github.com/Empact/roxml
examples/library_with_fines.rb
Ruby
mit
225
master
244
class LibraryWithFines include ROXML xml_name 'library' xml_accessor :name xml_accessor :fines, :as => { :key => 'name', :value => 'desc' }, :from => 'fine', :in => 'policy/fines' end
github
Empact/roxml
https://github.com/Empact/roxml
examples/current_weather.rb
Ruby
mit
225
master
833
#!/usr/bin/env ruby require_relative './../spec/spec_helper' class Base include ROXML xml_convention :dasherize xml_namespace 'aws' end class WeatherObservation < Base xml_name 'ob' xml_reader :temperature, :as => Float, :from => 'aws:temp' xml_reader :feels_like, :as => Integer xml_reader :current_cond...
github
Empact/roxml
https://github.com/Empact/roxml
examples/amazon.rb
Ruby
mit
225
master
1,044
#!/usr/bin/env ruby require_relative './../spec/spec_helper' # The document `pita.xml` contains both a default namespace and the 'georss' # namespace (for the 'point' xml_reader). module PITA class Base include ROXML xml_convention :camelize end class Item < Base xml_reader :asin, :from => 'ASIN' ...
github
Empact/roxml
https://github.com/Empact/roxml
spec/shared_specs.rb
Ruby
mit
225
master
368
if defined?(shared_examples_for) shared_examples_for "freezable xml reference" do describe "with :frozen option" do it "should be frozen" do expect(@frozen.frozen?).to be_truthy end end describe "without :frozen option" do it "should not be frozen" do expect(@unfrozen.fr...
github
Empact/roxml
https://github.com/Empact/roxml
spec/roxml_spec.rb
Ruby
mit
225
master
9,912
require_relative './spec_helper' describe ROXML do describe "::VERSION" do it "should be equal to the VERSION file contents" do expect(ROXML::VERSION).to eq(File.read('VERSION')) end end describe "#from_xml" do shared_examples_for "from_xml call" do it "should fetch values" do bo...
github
Empact/roxml
https://github.com/Empact/roxml
spec/definition_spec.rb
Ruby
mit
225
master
16,202
# encoding: utf-8 require 'bigdecimal' require 'date' require_relative './spec_helper' describe ROXML::Definition do describe "#name_explicit?" do it "should indicate whether from option is present" do expect(ROXML::Definition.new(:element, :from => 'somewhere').name_explicit?).to be_truthy expect(RO...
github
Empact/roxml
https://github.com/Empact/roxml
spec/spec_helper.rb
Ruby
mit
225
master
718
require 'ostruct' require 'rubygems' require 'pathname' require 'ostruct' require 'rspec/matchers' # req by equivalent-xml custom matcher `be_equivalent_to` require 'equivalent-xml' require_relative './../test/support/fixtures' require_relative './../lib/roxml' require_relative './shared_specs' def xml_for(name) Pa...
github
Empact/roxml
https://github.com/Empact/roxml
spec/reference_spec.rb
Ruby
mit
225
master
754
# encoding: utf-8 require_relative './spec_helper' describe ROXML::XMLRef do class Org include ROXML xml_accessor :fines, :in => 'policy/fines', :from => 'fine', :as => { :key => 'name', :value => 'desc' } end let(:org) do org = Org.new org...
github
Empact/roxml
https://github.com/Empact/roxml
spec/xml/attributes_spec.rb
Ruby
mit
225
master
2,074
require 'spec_helper' describe ROXML::XMLAttributeRef do before do @xml = ROXML::XML.parse_string %( <myxml> <node name="first" /> <node name="second" /> <node name="third" /> </myxml>) end context "plain vanilla" do before do @ref = ROXML::XMLAttributeRef.new(OpenStruct.new(:name => 'name',...
github
Empact/roxml
https://github.com/Empact/roxml
spec/xml/array_spec.rb
Ruby
mit
225
master
775
require 'spec_helper' module ArraySpec class Book include ROXML xml_reader :id, :as => Integer xml_reader :title end class Store include ROXML xml_reader :books, :from => 'books', :as => [Book] end class MyXml include ROXML xml_reader :store, :as => Store end end describe ":...
github
Empact/roxml
https://github.com/Empact/roxml
spec/xml/object_spec.rb
Ruby
mit
225
master
2,412
require 'spec_helper' describe ROXML::XMLObjectRef do class SubObject include ROXML xml_reader :value, :from => :attr def initialize(value = nil) @value = value end end before do @xml = ROXML::XML.parse_string %( <myxml> <node> <name value="first" /> <name value="second" />...
github
Empact/roxml
https://github.com/Empact/roxml
spec/xml/parser_spec.rb
Ruby
mit
225
master
556
require_relative './../spec_helper.rb' describe ROXML::XML do it "should escape invalid characters on output to text node" do node = ROXML::XML.new_node("entities") ROXML::XML.set_content(node, " < > ' \" & ") expect(node.to_s).to eq("<entities> &lt; &gt; ' \" &amp; </entities>") end it "should esap...