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
chef/supermarket
https://github.com/chef/supermarket
src/supermarket/engines/fieri/spec/spec_helper.rb
Ruby
apache-2.0
214
main
4,510
# This file was generated by the `rails generate rspec:install` command. Conventionally, all # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`. # The generated `.rspec` file contains `--require spec_helper` which will cause # this file to always be loaded, without a need to explicitly require ...
github
chef/supermarket
https://github.com/chef/supermarket
src/supermarket/engines/fieri/spec/rails_helper.rb
Ruby
apache-2.0
214
main
3,000
# This file is copied to spec/ when you run 'rails generate rspec:install' ENV["RAILS_ENV"] ||= "test" require File.expand_path("../spec/dummy/config/environment", __dir__) require File.expand_path("../../../lib/utils/file_format", __dir__) # Prevent database truncation if the environment is production abort("The Rails...
github
chef/supermarket
https://github.com/chef/supermarket
src/supermarket/engines/fieri/spec/dummy/Rakefile
Ruby
apache-2.0
214
main
245
# Add your own tasks in files placed in lib/tasks ending in .rake, # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. require File.expand_path("config/application", __dir__) Rails.application.load_tasks
github
chef/supermarket
https://github.com/chef/supermarket
src/supermarket/engines/fieri/spec/dummy/config/application.rb
Ruby
apache-2.0
214
main
1,229
require_relative "boot" require "rails" # Pick the frameworks you want: require "active_model/railtie" require "active_job/railtie" require "active_record/railtie" require "active_storage/engine" require "action_controller/railtie" require "action_mailer/railtie" require "action_view/railtie" # require "action_cable/e...
github
chef/supermarket
https://github.com/chef/supermarket
src/supermarket/engines/fieri/spec/dummy/config/environments/development.rb
Ruby
apache-2.0
214
main
2,173
Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # In the development environment your application's code is reloaded on # every request. This slows down response time but is perfect for development # since you don't have to restart the web serv...
github
chef/supermarket
https://github.com/chef/supermarket
src/supermarket/engines/fieri/spec/dummy/config/environments/test.rb
Ruby
apache-2.0
214
main
1,876
Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # The test environment is used exclusively to run your application's # test suite. You never need to work with it otherwise. Remember that # your test database is "scratch space" for the test suit...
github
chef/supermarket
https://github.com/chef/supermarket
src/supermarket/engines/fieri/spec/dummy/config/environments/production.rb
Ruby
apache-2.0
214
main
3,686
Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # Code is not reloaded between requests. config.cache_classes = true # Eager load code on boot. This eager loads most of Rails and # your application in memory, allowing both threaded web serve...
github
chef/supermarket
https://github.com/chef/supermarket
src/supermarket/engines/fieri/spec/dummy/db/schema.rb
Ruby
apache-2.0
214
main
770
# This file is auto-generated from the current state of the database. Instead # of editing this file, please use the migrations feature of Active Record to # incrementally modify your database, and then regenerate this schema definition. # # Note that this schema.rb definition is the authoritative source for your # dat...
github
chef/supermarket
https://github.com/chef/supermarket
src/supermarket/engines/fieri/spec/requests/fieri/fieri_jobs_spec.rb
Ruby
apache-2.0
214
main
1,757
require "rails_helper" RSpec.describe "Jobs", type: :request do describe "POST /fieri_jobs" do let(:valid_params) do { fieri_key: ENV["FIERI_KEY"], cookbook: { name: "redis", version: "1.2.0", artifact_url: "http://example.com/apache.tar.gz", } } end c...
github
chef/supermarket
https://github.com/chef/supermarket
src/supermarket/engines/fieri/spec/requests/fieri/fieri_status_spec.rb
Ruby
apache-2.0
214
main
1,196
require "rails_helper" require "sidekiq/api" RSpec.describe "Jobs", type: :request do describe "GET /status" do describe "when a valid job is posted" do let(:valid_params) do { fieri_key: ENV["FIERI_KEY"], cookbook: { name: "redis", version: "1.2.0", ar...
github
chef/supermarket
https://github.com/chef/supermarket
src/supermarket/engines/fieri/spec/controllers/fieri/jobs_controller_spec.rb
Ruby
apache-2.0
214
main
1,723
require "rails_helper" module Fieri RSpec.describe JobsController, type: :controller do routes { Fieri::Engine.routes } describe "#create" do let(:params) do { "fieri_key" => ENV["FIERI_KEY"], "cookbook" => { "name" => "apache2", "version" ...
github
chef/supermarket
https://github.com/chef/supermarket
src/supermarket/engines/fieri/spec/models/supermarket_api_runner_spec.rb
Ruby
apache-2.0
214
main
1,402
require "rails_helper" describe SupermarketApiRunner do let(:supermarket_runner) { SupermarketApiRunner.new } let(:cookbook_name) { "super_cookbook" } let(:cookbook_version) { "1.2" } let(:cookbook_uri) { "#{ENV["FIERI_SUPERMARKET_ENDPOINT"]}/api/v1/cookbooks/#{cookbook_name}" } let(:cookbook_json_response)...
github
chef/supermarket
https://github.com/chef/supermarket
src/supermarket/engines/fieri/spec/models/cookbook_artifact_spec.rb
Ruby
apache-2.0
214
main
3,343
require "rails_helper" describe CookbookArtifact do let(:artifact) { CookbookArtifact.new("http://example.com/apache.tar.gz", "somejobid") } describe "when checking cookbooks that have metadata.rb" do before do stub_request(:get, "http://example.com/apache.tar.gz") .to_return( body: Fi...
github
chef/supermarket
https://github.com/chef/supermarket
src/supermarket/engines/fieri/spec/models/contributing_file_worker_spec.rb
Ruby
apache-2.0
214
main
5,517
require "rails_helper" describe ContributingFileWorker do let(:cfw) { ContributingFileWorker.new } let(:cookbook_name) { "apache" } before do stub_request(:post, "#{ENV["FIERI_SUPERMARKET_ENDPOINT"]}/api/v1/quality_metrics/contributing_file_evaluation") .to_return(status: 200, body: "", headers: {}) ...
github
chef/supermarket
https://github.com/chef/supermarket
src/supermarket/engines/fieri/spec/models/version_tag_worker_spec.rb
Ruby
apache-2.0
214
main
7,662
require "rails_helper" describe VersionTagWorker do let(:vfw) { VersionTagWorker.new } let(:cookbook_name) { "apache" } let(:cookbook_version) { "2.9.16" } before do stub_request(:post, "#{ENV["FIERI_SUPERMARKET_ENDPOINT"]}/api/v1/quality_metrics/version_tag_evaluation") .to_return(status: 200, body...
github
chef/supermarket
https://github.com/chef/supermarket
src/supermarket/engines/fieri/spec/models/metrics_runner_spec.rb
Ruby
apache-2.0
214
main
3,237
require "rails_helper" describe MetricsRunner do let(:cookbook) do { "name" => "apache2", "version" => "1.2.0", "artifact_url" => "http://example.com/apache.tar.gz", } end let(:cookbook_json_response) { File.read("spec/support/cookbook_metrics_fixture.json") } let(:version_json_respo...
github
chef/supermarket
https://github.com/chef/supermarket
src/supermarket/engines/fieri/spec/models/no_binaries_worker_spec.rb
Ruby
apache-2.0
214
main
1,860
require "rails_helper" describe NoBinariesWorker do let(:valid_params) do { "artifact_url" => "http://example.com/apache.tar.gz", "name" => "apache2", "version" => "1.2.0" } end let(:test_evaluation_endpoint) do "#{ENV["FIERI_SUPERMARKET_ENDPOINT"]}/api/v1/quality_metrics/no_binaries_evaluat...
github
chef/supermarket
https://github.com/chef/supermarket
src/supermarket/engines/fieri/spec/models/testing_file_worker_spec.rb
Ruby
apache-2.0
214
main
3,648
require "rails_helper" describe TestingFileWorker do let(:tfw) { TestingFileWorker.new } let(:cookbook_json_response) { File.read("spec/support/cookbook_source_url_fixture.json") } let(:cookbook_name) { "apache" } before do stub_request(:post, "#{ENV["FIERI_SUPERMARKET_ENDPOINT"]}/api/v1/quality_metrics/t...
github
chef/supermarket
https://github.com/chef/supermarket
src/supermarket/engines/fieri/spec/models/source_repo_worker_spec.rb
Ruby
apache-2.0
214
main
1,641
require "rails_helper" describe SourceRepoWorker do context "when source_url is present and not null" do context "and source_url is a GitHub URL" do let(:cookbook_json) { File.read("spec/support/cookbook_source_url_fixture.json") } it "retrieves the source_url from the JSON API response" do ...
github
chef/supermarket
https://github.com/chef/supermarket
src/supermarket/engines/fieri/spec/models/cookstyle_worker_spec.rb
Ruby
apache-2.0
214
main
2,211
require "rails_helper" require "cookstyle" describe CookstyleWorker do let(:valid_params) do { "artifact_url" => "http://example.com/apache.tar.gz", "name" => "apache2", "version" => "1.2.0" } end let(:test_evaluation_endpoint) do "#{ENV["FIERI_SUPERMARKET_ENDPOINT"]}/api/v1/quality_metrics/...
github
chef/supermarket
https://github.com/chef/supermarket
src/supermarket/engines/fieri/spec/models/collaborator_worker_spec.rb
Ruby
apache-2.0
214
main
1,592
require "rails_helper" describe CollaboratorWorker do let(:cw) { CollaboratorWorker.new } let(:cookbook_name) { "apache" } before do stub_request(:post, "#{ENV["FIERI_SUPERMARKET_ENDPOINT"]}/api/v1/quality_metrics/collaborators_evaluation") .to_return(status: 200, body: "", headers: {}) end conte...
github
chef/supermarket
https://github.com/chef/supermarket
omnibus/Gemfile
Ruby
apache-2.0
214
main
1,063
source 'https://rubygems.org' # Install omnibus gem 'omnibus', git: 'https://github.com/chef/omnibus.git', branch: 'main' # Use Chef's software definitions. It is recommended that you write your own # software definitions, but you can clone/fork Chef's to get you started. gem 'omnibus-software', git: 'https://github....
github
chef/supermarket
https://github.com/chef/supermarket
omnibus/omnibus.rb
Ruby
apache-2.0
214
main
2,129
# # This file is used to configure the supermarket project. It contains # some minimal configuration examples for working with Omnibus. For a full list # of configurable options, please see the documentation for +omnibus/config.rb+. # # Build internally # ------------------------------ # By default, Omnibus uses syste...
github
chef/supermarket
https://github.com/chef/supermarket
omnibus/cookbooks/supermarket-builder/metadata.rb
Ruby
apache-2.0
214
main
338
name 'supermarket-builder' maintainer 'Chef Supermarket Team' maintainer_email 'supermarket@chef.io' license 'Apache-2.0' description 'Builds a Supermarket omnibus package for development/testing' version '1.0.0' depends 'yum-epel' depends 'omnibus' chef_vers...
github
chef/supermarket
https://github.com/chef/supermarket
omnibus/cookbooks/supermarket-builder/recipes/default.rb
Ruby
apache-2.0
214
main
1,431
# # Cookbook:: supermarket-builder # Recipe:: default # # Copyright:: 2018 Chef Software, 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...
github
chef/supermarket
https://github.com/chef/supermarket
omnibus/cookbooks/omnibus-supermarket/metadata.rb
Ruby
apache-2.0
214
main
348
name 'omnibus-supermarket' maintainer 'Chef Supermarket Team' maintainer_email 'supermarket@chef.io' license 'Apache-2.0' description 'Installs/Configures supermarket in an Omnibus installation' version '1.1.1' chef_version '>= 14.0' depends 'enterprise' depends ...
github
chef/supermarket
https://github.com/chef/supermarket
omnibus/cookbooks/omnibus-supermarket/Gemfile
Ruby
apache-2.0
214
main
512
source 'https://rubygems.org' # This gemfile is currently used in the omnibus build for the -ctl command # Why is it here? Great question. This needs to get refactored away with the # ctl command have its own gemspec. gem 'chef', '~> 16.14' gem 'chef-bin', '~> 16.14' gem 'inspec-core' gem 'inspec-core-bin' # gems fo...
github
chef/supermarket
https://github.com/chef/supermarket
omnibus/cookbooks/omnibus-supermarket/test/integration/default/inspec/controls/install-check.rb
Ruby
apache-2.0
214
main
4,835
require 'json' property = json('/etc/supermarket/supermarket-running.json') control 'supermarket-ctl-perms' do title 'Check that the -ctl commands error correctly' # run as someone other that the supermarket OS user describe command('supermarket-ctl console') do its(:stderr) { should include('supermarket-ctl...
github
chef/supermarket
https://github.com/chef/supermarket
omnibus/cookbooks/omnibus-supermarket/attributes/default.rb
Ruby
apache-2.0
214
main
27,254
# # Chef Supermarket configuration # # Attributes here will be applied to configure the application and the services # it uses. # # Most of the attributes in this file are things you will not need to ever # touch, but they are here in case you need them. # # A `supermarket-ctl reconfigure` should pick up any changes ma...
github
chef/supermarket
https://github.com/chef/supermarket
omnibus/cookbooks/omnibus-supermarket/spec/recipes/ssl_spec.rb
Ruby
apache-2.0
214
main
6,143
require 'spec_helper' describe 'omnibus-supermarket::ssl' do platform 'ubuntu', '18.04' automatic_attributes['memory']['total'] = '16000MB' # Shared Example Sets # - :create_directories - Creates the directories for SSL # - :create_certificates - When the recipe should create certs # - :create_dhparams - ...
github
chef/supermarket
https://github.com/chef/supermarket
omnibus/cookbooks/omnibus-supermarket/spec/recipes/config_spec.rb
Ruby
apache-2.0
214
main
1,211
require 'spec_helper' describe 'omnibus-supermarket::config' do platform 'ubuntu', '18.04' automatic_attributes['memory']['total'] = '16000MB' it 'creates the supermarket user' do expect(chef_run).to create_user('supermarket').with(shell: '/bin/false', system: true) end it 'creates the supermarket grou...
github
chef/supermarket
https://github.com/chef/supermarket
omnibus/cookbooks/omnibus-supermarket/spec/recipes/database_spec.rb
Ruby
apache-2.0
214
main
335
require 'spec_helper' describe 'omnibus-supermarket::database' do platform 'ubuntu', '18.04' automatic_attributes['memory']['total'] = '16000MB' before do stub_command("echo '\\dx' | psql supermarket | grep plpgsql").and_return('') stub_command("echo '\\dx' | psql supermarket | grep pg_trgm").and_return...
github
chef/supermarket
https://github.com/chef/supermarket
omnibus/cookbooks/omnibus-supermarket/spec/recipes/nginx_spec.rb
Ruby
apache-2.0
214
main
2,343
require 'spec_helper' describe 'omnibus-supermarket::nginx' do platform 'ubuntu', '18.04' automatic_attributes['memory']['total'] = '16000MB' it 'creates /var/log/supermarket/nginx' do expect(chef_run).to create_directory('/var/log/supermarket/nginx').with( user: 'supermarket', group: 'supermark...
github
chef/supermarket
https://github.com/chef/supermarket
omnibus/cookbooks/omnibus-supermarket/spec/recipes/postgresql_spec.rb
Ruby
apache-2.0
214
main
848
require 'spec_helper' describe 'omnibus-supermarket::postgresql' do platform 'ubuntu', '18.04' automatic_attributes['memory']['total'] = '16000MB' normal_attributes['sysctl']['conf_dir'] = '/var/log/supermarket/postgresql' before :each do stub_command("grep 'SUP:123456:respawn:/opt/supermarket/embedded/bi...
github
chef/supermarket
https://github.com/chef/supermarket
omnibus/cookbooks/omnibus-supermarket/spec/recipes/app_spec.rb
Ruby
apache-2.0
214
main
1,400
require 'spec_helper' describe 'omnibus-supermarket::app' do platform 'ubuntu', '18.04' automatic_attributes['memory']['total'] = '16000MB' it 'creates /var/opt/supermarket/etc/env' do expect(chef_run).to create_file('/var/opt/supermarket/etc/env').with( owner: 'supermarket', group: 'supermarket...
github
chef/supermarket
https://github.com/chef/supermarket
omnibus/cookbooks/omnibus-supermarket/spec/recipes/redis_spec.rb
Ruby
apache-2.0
214
main
1,520
require 'spec_helper' describe 'omnibus-supermarket::redis' do platform 'ubuntu', '18.04' automatic_attributes['memory']['total'] = '16000MB' before :each do stub_command("grep 'SUP:123456:respawn:/opt/supermarket/embedded/bin/runsvdir-start' /etc/inittab") end it 'creates /var/log/supermarket/redis' d...
github
chef/supermarket
https://github.com/chef/supermarket
omnibus/cookbooks/omnibus-supermarket/spec/libraries/config_spec.rb
Ruby
apache-2.0
214
main
12,761
require_relative '../../libraries/config' describe Supermarket::Config do describe 'environment_variables_from' do it 'creates environment varibles from attributes' do expect(described_class.environment_variables_from( 'test1' => 123, 'test2' => 'abc', 'test3' =...
github
chef/supermarket
https://github.com/chef/supermarket
omnibus/cookbooks/omnibus-supermarket/recipes/sidekiq.rb
Ruby
apache-2.0
214
main
1,069
# # Cookbook:: supermarket # Recipe:: sidekiq # # Copyright:: 2014 Chef Software, 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 # # U...
github
chef/supermarket
https://github.com/chef/supermarket
omnibus/cookbooks/omnibus-supermarket/recipes/config.rb
Ruby
apache-2.0
214
main
2,760
# # Cookbook:: supermarket # Recipe:: config # # Copyright:: 2014 Chef Software, 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 # # Un...
github
chef/supermarket
https://github.com/chef/supermarket
omnibus/cookbooks/omnibus-supermarket/recipes/nginx.rb
Ruby
apache-2.0
214
main
2,482
# # Cookbook:: supermarket # Recipe:: nginx # # Copyright:: 2014 Chef Software, 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 # # Unl...
github
chef/supermarket
https://github.com/chef/supermarket
omnibus/cookbooks/omnibus-supermarket/recipes/cookbook_test.rb
Ruby
apache-2.0
214
main
2,321
# # Cookbook:: omnibus-supermarket # Recipe:: cookbook_test # # Copyright:: 2014 Chef Software, 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/LIC...
github
chef/supermarket
https://github.com/chef/supermarket
omnibus/cookbooks/omnibus-supermarket/recipes/log_management.rb
Ruby
apache-2.0
214
main
1,580
# # Cookbook:: supermarket # Recipe:: log_management # # Copyright:: 2015 Chef Software, 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....
github
chef/supermarket
https://github.com/chef/supermarket
omnibus/cookbooks/omnibus-supermarket/recipes/app.rb
Ruby
apache-2.0
214
main
3,806
# # Cookbook:: supermarket # Recipe:: app # # Copyright:: 2014 Chef Software, 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 # # Unles...
github
chef/supermarket
https://github.com/chef/supermarket
omnibus/cookbooks/omnibus-supermarket/recipes/rails.rb
Ruby
apache-2.0
214
main
2,083
# # Cookbook:: supermarket # Recipe:: rails # # Copyright:: 2014 Chef Software, 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 # # Unl...
github
chef/supermarket
https://github.com/chef/supermarket
omnibus/cookbooks/omnibus-supermarket/recipes/default.rb
Ruby
apache-2.0
214
main
1,948
# # Cookbook:: supermarket # Recipe:: default # # Copyright:: 2014 Chef Software, 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 # # U...
github
chef/supermarket
https://github.com/chef/supermarket
omnibus/cookbooks/omnibus-supermarket/recipes/postgresql-external.rb
Ruby
apache-2.0
214
main
1,520
# # Cookbook:: supermarket # Recipe:: postgresql # # Copyright:: Chef Software, 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 # # Unl...
github
chef/supermarket
https://github.com/chef/supermarket
omnibus/cookbooks/omnibus-supermarket/recipes/postgresql.rb
Ruby
apache-2.0
214
main
1,599
# # Cookbook:: supermarket # Recipe:: postgresql # # Copyright:: 2014 Chef Software, 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 # ...
github
chef/supermarket
https://github.com/chef/supermarket
omnibus/cookbooks/omnibus-supermarket/recipes/database.rb
Ruby
apache-2.0
214
main
1,880
# # Cookbook:: supermarket # Recipe:: database # # Copyright:: 2014 Chef Software, 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 # # ...
github
chef/supermarket
https://github.com/chef/supermarket
omnibus/cookbooks/omnibus-supermarket/recipes/ssl.rb
Ruby
apache-2.0
214
main
2,601
# # Cookbook:: supermarket # Recipe:: ssl # # Copyright:: 2014 Chef Software, 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 # # Unles...
github
chef/supermarket
https://github.com/chef/supermarket
omnibus/cookbooks/omnibus-supermarket/recipes/show_config.rb
Ruby
apache-2.0
214
main
698
# # Cookbook:: supermarket # Recipe:: show_config # # Copyright:: 2014 Chef Software, 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 #...
github
chef/supermarket
https://github.com/chef/supermarket
omnibus/cookbooks/omnibus-supermarket/recipes/redis.rb
Ruby
apache-2.0
214
main
1,649
# # Cookbook:: supermarket # Recipe:: redis # # Copyright:: 2014 Chef Software, 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 # # Unl...
github
chef/supermarket
https://github.com/chef/supermarket
omnibus/cookbooks/omnibus-supermarket/libraries/du.rb
Ruby
apache-2.0
214
main
864
require 'mixlib/shellout' module Du # Calculate the disk space used by the given path. Requires that # `du` is in our PATH. # # @param path [String] Path to a directory on disk # @return [Integer] KB used by directory on disk # def self.du(path) # TODO(ssd) 2017-08-18: Do we need to worry about sparse...
github
chef/supermarket
https://github.com/chef/supermarket
omnibus/cookbooks/omnibus-supermarket/libraries/statfs.rb
Ruby
apache-2.0
214
main
2,263
require 'ffi' class Statfs # # Statfs provides a simple interface to the statvfs system call. # Since the statvfs struct varies a bit across platforms, this # likely only works on Linux and OSX at the moment. # extend FFI::Library ffi_lib FFI::Library::LIBC attach_function(:statvfs, %i(string pointer)...
github
chef/supermarket
https://github.com/chef/supermarket
omnibus/cookbooks/omnibus-supermarket/libraries/config.rb
Ruby
apache-2.0
214
main
7,500
require 'fileutils' require 'securerandom' # Manages configuration class Supermarket module Config class IncompleteConfig < StandardError; end class IncompatibleConfig < StandardError; end def self.load_or_create!(filename, node) create_directory!(filename) if File.exist?(filename) n...
github
chef/supermarket
https://github.com/chef/supermarket
omnibus/cookbooks/omnibus-supermarket/resources/pg_upgrade.rb
Ruby
apache-2.0
214
main
10,438
# # 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 # # Unless required by applicable law or agreed to...
github
chef/supermarket
https://github.com/chef/supermarket
omnibus/cookbooks/omnibus-supermarket/files/default/ctl-commands/make-admin.rb
Ruby
apache-2.0
214
main
930
require 'mixlib/shellout' # due to how things are being exec'ed, the CWD will be all wrong, # so we want to use the full path when loaded from omnibus-ctl, # but we need the local relative path for it to work with rspec begin require 'helpers/ctl_command_helper' rescue LoadError require '/opt/supermarket/embedded/s...
github
chef/supermarket
https://github.com/chef/supermarket
omnibus/cookbooks/omnibus-supermarket/files/default/ctl-commands/console.rb
Ruby
apache-2.0
214
main
606
# due to how things are being exec'ed, the CWD will be all wrong, # so we want to use the full path when loaded from omnibus-ctl, # but we need the local relative path for it to work with rspec begin require 'helpers/ctl_command_helper' rescue LoadError require '/opt/supermarket/embedded/service/omnibus-ctl/helpers...
github
chef/supermarket
https://github.com/chef/supermarket
omnibus/cookbooks/omnibus-supermarket/files/default/ctl-commands/quality-metrics.rb
Ruby
apache-2.0
214
main
3,302
require 'mixlib/shellout' require 'optparse' # due to how things are being exec'ed, the CWD will be all wrong, # so we want to use the full path when loaded from omnibus-ctl, # but we need the local relative path for it to work with rspec begin require 'helpers/ctl_command_helper' rescue LoadError require '/opt/sup...
github
chef/supermarket
https://github.com/chef/supermarket
omnibus/cookbooks/omnibus-supermarket/files/default/ctl-commands/test.rb
Ruby
apache-2.0
214
main
986
require 'mixlib/shellout' require 'optparse' add_command_under_category 'test', 'general', 'Run the Supermarket installation test suite', 2 do options = {} OptionParser.new do |opts| opts.on '-J', '--junit-xml PATH' do |junit_xml| options[:junit_xml] = junit_xml end opts.on '-v', '--verbose' do |...
github
chef/supermarket
https://github.com/chef/supermarket
omnibus/cookbooks/omnibus-supermarket/files/default/ctl-commands/reconfigure.rb
Ruby
apache-2.0
214
main
319
require 'mixlib/shellout' add_command_under_category 'reconfigure', 'general', 'Reconfigure the application.', 2 do status = run_chef("#{base_path}/embedded/cookbooks/dna.json", '--chef-license=accept-no-persist') if status.success? log "#{display_name} Reconfigured!" exit! 0 else exit! 1 end end
github
chef/supermarket
https://github.com/chef/supermarket
omnibus/cookbooks/omnibus-supermarket/files/default/ctl-commands/version.rb
Ruby
apache-2.0
214
main
945
# # Copyright:: Copyright (c) 2019 Chef Software, 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...
github
chef/supermarket
https://github.com/chef/supermarket
omnibus/cookbooks/omnibus-supermarket/files/default/ctl-commands/update-spdx-license.rb
Ruby
apache-2.0
214
main
1,839
require 'mixlib/shellout' require 'optparse' # due to how things are being exec'ed, the CWD will be all wrong, # so we want to use the full path when loaded from omnibus-ctl, # but we need the local relative path for it to work with rspec begin require 'helpers/ctl_command_helper' rescue LoadError require '/opt/sup...
github
chef/supermarket
https://github.com/chef/supermarket
omnibus/cookbooks/omnibus-supermarket/files/default/ctl-commands/helpers/ctl_command_helper.rb
Ruby
apache-2.0
214
main
1,077
class CtlCommandHelper attr_accessor :command_name def initialize(command_name) @command_name = command_name end def must_run_as(user) if Process.uid != Etc.getpwnam(user).uid exit_failure "supermarket-ctl #{command_name} should be run as the #{user} OS user." end rescue ArgumentError ...
github
chef/supermarket
https://github.com/chef/supermarket
omnibus/config/projects/supermarket.rb
Ruby
apache-2.0
214
main
2,024
# # Copyright:: Chef Software, 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 agreed to in wr...
github
chef/supermarket
https://github.com/chef/supermarket
omnibus/config/software/supermarket.rb
Ruby
apache-2.0
214
main
1,730
# # Copyright 2014 Chef Software, 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 agreed to in...
github
chef/supermarket
https://github.com/chef/supermarket
omnibus/config/software/file.rb
Ruby
apache-2.0
214
main
1,346
# # Copyright 2017, Chef Software, 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 agreed to i...
github
chef/supermarket
https://github.com/chef/supermarket
omnibus/config/software/supermarket-ctl.rb
Ruby
apache-2.0
214
main
1,301
# # Copyright 2014 Chef Software, 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 agreed to in...
github
chef/supermarket
https://github.com/chef/supermarket
omnibus/config/software/more-ruby-cleanup-supermarket.rb
Ruby
apache-2.0
214
main
1,627
# # Copyright:: Copyright (c) Chef Software 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 # #...
github
chef/supermarket
https://github.com/chef/supermarket
omnibus/config/software/supermarket-cookbooks.rb
Ruby
apache-2.0
214
main
2,110
# # Copyright 2014 Chef Software, 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 agreed to in...
github
chef/supermarket
https://github.com/chef/supermarket
omnibus/config/software/postgresql13.rb
Ruby
apache-2.0
214
main
2,741
# # Copyright:: Chef Software, 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 agreed to in wr...
github
xotahal/fastlane-plugin-semantic_release
https://github.com/xotahal/fastlane-plugin-semantic_release
fastlane-plugin-semantic_release.gemspec
Ruby
mit
214
master
1,358
lib = File.expand_path('lib', __dir__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'fastlane/plugin/semantic_release/version' Gem::Specification.new do |spec| spec.name = 'fastlane-plugin-semantic_release' spec.version = Fastlane::SemanticRelease::VERSION spec.author = '...
github
xotahal/fastlane-plugin-semantic_release
https://github.com/xotahal/fastlane-plugin-semantic_release
spec/spec_helper.rb
Ruby
mit
214
master
456
$LOAD_PATH.unshift(File.expand_path('../lib', __dir__)) require 'simplecov' # SimpleCov.minimum_coverage 95 SimpleCov.start # This module is only used to check the environment is currently a testing env module SpecHelper end require 'fastlane' # to import the Action super class require 'fastlane/plugin/semantic_rel...
github
xotahal/fastlane-plugin-semantic_release
https://github.com/xotahal/fastlane-plugin-semantic_release
spec/analyze_commits_spec.rb
Ruby
mit
214
master
38,230
require 'spec_helper' describe Fastlane::Actions::AnalyzeCommitsAction do describe "Analyze Commits" do before do end def test_analyze_commits(commits) # for simplicity, these two actions are grouped together because they need to be run for every test, # but require different commits to be p...
github
xotahal/fastlane-plugin-semantic_release
https://github.com/xotahal/fastlane-plugin-semantic_release
spec/conventional_changelog_spec.rb
Ruby
mit
214
master
22,800
require 'spec_helper' describe Fastlane::Actions::ConventionalChangelogAction do describe "Conventional Changelog" do before do Fastlane::Actions.lane_context[Fastlane::Actions::SharedValues::CONVENTIONAL_CHANGELOG_ACTION_FORMAT_PATTERN] = Fastlane::Helper::SemanticReleaseHelper.format_patterns["default"] ...
github
xotahal/fastlane-plugin-semantic_release
https://github.com/xotahal/fastlane-plugin-semantic_release
lib/fastlane/plugin/semantic_release.rb
Ruby
mit
214
master
488
require 'fastlane/plugin/semantic_release/version' module Fastlane module SemanticRelease # Return all .rb files inside the "actions" and "helper" directory def self.all_classes Dir[File.expand_path('**/{actions,helper}/*.rb', File.dirname(__FILE__))] end end end # By default we want to import a...
github
xotahal/fastlane-plugin-semantic_release
https://github.com/xotahal/fastlane-plugin-semantic_release
lib/fastlane/plugin/semantic_release/actions/analyze_commits.rb
Ruby
mit
214
master
18,801
require 'fastlane/action' require_relative '../helper/semantic_release_helper' module Fastlane module Actions module SharedValues RELEASE_ANALYZED = :RELEASE_ANALYZED RELEASE_IS_NEXT_VERSION_HIGHER = :RELEASE_IS_NEXT_VERSION_HIGHER RELEASE_IS_NEXT_VERSION_COMPATIBLE_WITH_CODEPUSH = :RELEASE_IS_...
github
xotahal/fastlane-plugin-semantic_release
https://github.com/xotahal/fastlane-plugin-semantic_release
lib/fastlane/plugin/semantic_release/actions/conventional_changelog.rb
Ruby
mit
214
master
9,979
require 'fastlane/action' require_relative '../helper/semantic_release_helper' module Fastlane module Actions module SharedValues end class ConventionalChangelogAction < Action def self.get_commits_from_hash(params) commits = Helper::SemanticReleaseHelper.git_log( pretty: '%s|%b|...
github
xotahal/fastlane-plugin-semantic_release
https://github.com/xotahal/fastlane-plugin-semantic_release
lib/fastlane/plugin/semantic_release/helper/semantic_release_helper.rb
Ruby
mit
214
master
4,583
require 'fastlane_core/ui/ui' module Fastlane UI = FastlaneCore::UI unless Fastlane.const_defined?("UI") module Helper class SemanticReleaseHelper FORMAT_PATTERNS = { "default" => /^(\w+)(?:\((.*)\))?(!?): (.*)/i, "angular" => /^(\w*)(?:\((.*)\))?(!?): (.*)/ }.freeze def sel...
github
vitalie/webshot
https://github.com/vitalie/webshot
Rakefile
Ruby
mit
214
master
301
# encoding: UTF-8 require "bundler/gem_tasks" require "rake/testtask" require "rdoc/task" desc "Default: run tests." task :default => :test desc "Run webshot unit tests." Rake::TestTask.new do |t| t.libs << "test" t.libs << "lib" t.test_files = Dir[ "test/*_test.rb" ] t.verbose = true end
github
vitalie/webshot
https://github.com/vitalie/webshot
webshot.gemspec
Ruby
mit
214
master
1,245
# coding: utf-8 lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'webshot/version' Gem::Specification.new do |spec| spec.name = "webshot" spec.version = Webshot::VERSION spec.authors = ["Vitalie Cherpec"] spec.email = ["vita...
github
vitalie/webshot
https://github.com/vitalie/webshot
test/webshot_test.rb
Ruby
mit
214
master
1,687
require "test_helper" class WebshotTest < Minitest::Test DATA_DIR = File.expand_path(File.dirname(__FILE__) + "/data") def setup FileUtils.mkdir_p(DATA_DIR) unless File.directory?(DATA_DIR) @webshot = Webshot::Screenshot.instance end def test_http %w(www.yahoo.com).each do |name| output = t...
github
vitalie/webshot
https://github.com/vitalie/webshot
lib/webshot.rb
Ruby
mit
214
master
1,227
require "mini_magick" require "capybara/dsl" require "capybara/poltergeist" require "active_support" require "active_support/core_ext" require "webshot/version" require "webshot/errors" require "webshot/screenshot" module Webshot ## Browser settings # Width mattr_accessor :width @@width = 1024 # Height m...
github
vitalie/webshot
https://github.com/vitalie/webshot
lib/webshot/screenshot.rb
Ruby
mit
214
master
3,071
require "singleton" module Webshot class Screenshot include Capybara::DSL include Singleton def initialize(opts = {}) Webshot.capybara_setup! width = opts.fetch(:width, Webshot.width) height = opts.fetch(:height, Webshot.height) user_agent = opts.fetch(:user_agent, Webshot.user_...
github
lukeredpath/betabuilder
https://github.com/lukeredpath/betabuilder
Rakefile
Ruby
mit
214
master
3,534
require "rubygems" require "rubygems/package_task" require "rdoc/task" SITE_ROOT = "/var/www/projects.lukeredpath.co.uk/betabuilder" task :default => :package # This builds the actual gem. For details of what all these options # mean, and other ones you can add, check the documentation here: # # http://rubygems.o...
github
lukeredpath/betabuilder
https://github.com/lukeredpath/betabuilder
betabuilder.gemspec
Ruby
mit
214
master
1,813
# -*- encoding: utf-8 -*- Gem::Specification.new do |s| s.name = "betabuilder" s.version = "0.7.4.1" s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.authors = ["Luke Redpath"] s.date = "2012-05-16" s.email = "luke@lukeredpath.co.uk" s.extra_rdoc_...
github
lukeredpath/betabuilder
https://github.com/lukeredpath/betabuilder
lib/beta_builder.rb
Ruby
mit
214
master
5,300
require 'rake/tasklib' require 'ostruct' require 'fileutils' require 'cfpropertylist' require 'beta_builder/archived_build' require 'beta_builder/deployment_strategies' require 'beta_builder/build_output_parser' module BetaBuilder class Tasks < ::Rake::TaskLib def initialize(namespace = :beta, &block) @con...
github
lukeredpath/betabuilder
https://github.com/lukeredpath/betabuilder
lib/beta_builder/deployment_strategies.rb
Ruby
mit
214
master
876
module BetaBuilder module DeploymentStrategies def self.valid_strategy?(strategy_name) strategies.keys.include?(strategy_name.to_sym) end def self.build(strategy_name, configuration) strategies[strategy_name.to_sym].new(configuration) end class Strategy def initialize(configura...
github
lukeredpath/betabuilder
https://github.com/lukeredpath/betabuilder
lib/beta_builder/build_output_parser.rb
Ruby
mit
214
master
2,515
module BetaBuilder class BuildOutputParser def initialize(output) @output = output end def build_output_dir # yes, this is truly horrible, but unless somebody else can find a better way... found = @output.split("\n").grep(/^Validate(.*)\/Xcode\/DerivedData\/(.*)-(.*)/).first if f...
github
lukeredpath/betabuilder
https://github.com/lukeredpath/betabuilder
lib/beta_builder/archived_build.rb
Ruby
mit
214
master
3,036
require 'uuid' require 'fileutils' require 'CFPropertyList' module BetaBuilder def self.archive(configuration) if configuration.xcode4_archive_mode Xcode4ArchivedBuild.new(configuration) else ArchivedBuild.new(configuration) end end class ArchivedBuild def initialize(configuration)...
github
lukeredpath/betabuilder
https://github.com/lukeredpath/betabuilder
lib/beta_builder/deployment_strategies/testflight.rb
Ruby
mit
214
master
2,554
require 'rest_client' require 'json' require 'tmpdir' require 'fileutils' module BetaBuilder module DeploymentStrategies class TestFlight < Strategy ENDPOINT = "https://testflightapp.com/api/builds.json" def extended_configuration_for_strategy proc do def generate_release_not...
github
lukeredpath/betabuilder
https://github.com/lukeredpath/betabuilder
lib/beta_builder/deployment_strategies/web.rb
Ruby
mit
214
master
3,739
module BetaBuilder module DeploymentStrategies class Web < Strategy def extended_configuration_for_strategy proc do def deployment_url File.join(deploy_to, target.downcase, ipa_name) end def manifest_url File.join(deploy_to, target.downcase, "ma...
github
lukeredpath/betabuilder
https://github.com/lukeredpath/betabuilder
website/_plugins/ultraviolet.rb
Ruby
mit
214
master
633
require 'restclient' module Jekyll class UltravioletTag < Liquid::Block def initialize(tag_name, syntax, tokens) super @syntax = syntax.strip end def render(context) Ultraviolence.convert(super.join, @syntax) rescue StandardError => e "Ultraviolence: Could not render! (#{...
github
kernow/shortcode
https://github.com/kernow/shortcode
shortcode.gemspec
Ruby
mit
214
master
1,339
lib = File.expand_path("lib", __dir__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require "shortcode/version" Gem::Specification.new do |spec| spec.name = "shortcode" spec.version = Shortcode::VERSION spec.authors = ["Jamie Dyer"] spec.email = ["jamie@kernowsoul.com"] ...
github
kernow/shortcode
https://github.com/kernow/shortcode
spec/shortcode_spec.rb
Ruby
mit
214
master
2,348
require "spec_helper" require "parslet/rig/rspec" require "pp" describe Shortcode do let(:simple_quote) { load_fixture :simple_quote } let(:simple_quote_output) { load_fixture :simple_quote_output, :html } let(:shortcode) { described_class.new } let(:configuration) { shortcode.configuration } before...
github
kernow/shortcode
https://github.com/kernow/shortcode
spec/transformer_spec.rb
Ruby
mit
214
master
4,441
require "spec_helper" require "parslet/rig/rspec" require "pp" describe Shortcode do let(:configuration) { described_class.new.tap { |s| s.setup do |config| config.template_path = File.join File.dirname(__FILE__), "support/templates/erb" config.block_tags = %i[quote collapsible_list item ti...
github
kernow/shortcode
https://github.com/kernow/shortcode
spec/spec_helper.rb
Ruby
mit
214
master
401
$LOAD_PATH.unshift File.dirname(__FILE__) if ENV["CI"] require "coveralls" Coveralls.wear! end require "rspec" require "rails" require "action_view" require "shortcode" require "support/fixtures" # Set slim's attribute quotes to use single quotes so it's the same as haml Slim::Engine.set_options attr_quote: "'" ...
github
kernow/shortcode
https://github.com/kernow/shortcode
spec/template_parsers_spec.rb
Ruby
mit
214
master
1,401
require "spec_helper" describe "template parsers", type: :feature do let(:simple_quote) { load_fixture :simple_quote } let(:simple_quote_output) { load_fixture :simple_quote_output, :html } let(:shortcode) { Shortcode.new } let(:configuration) { shortcode.configuration } context "with erb" do be...
github
kernow/shortcode
https://github.com/kernow/shortcode
spec/performance_spec.rb
Ruby
mit
214
master
769
require "spec_helper" require "parslet/rig/rspec" require "pp" require "benchmark" # Uncomment to run performace specs # describe Shortcode do # let(:long_text) { load_fixture :long_text } # let(:parser) { Shortcode::Parser.new } # let(:transformer) { Shortcode::Transformer.new } # context "parser" d...
github
kernow/shortcode
https://github.com/kernow/shortcode
spec/rails_helpers_spec.rb
Ruby
mit
214
master
1,856
require "spec_helper" module ShortcodeSpecViewHelper def wrap_in_p(content) content_tag :p, content end end describe "rails helpers", type: :feature do let(:template) { load_fixture :rails_helper } let(:erb_output) { load_fixture :rails_helper_output_erb, :html } let(:haml_output) { load_fixture...
github
kernow/shortcode
https://github.com/kernow/shortcode
spec/support/fixtures.rb
Ruby
mit
214
master
235
RSpec.configure do |_config| def load_fixture(name, type="txt") type = type.to_s string = File.read(File.join(File.dirname(__FILE__), "fixtures", "#{name}.#{type}")) type == "txt" ? string : string.delete("\n") end end