repo
stringlengths
5
92
file_url
stringlengths
80
287
file_path
stringlengths
5
197
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:37:27
2026-01-04 17:58:21
truncated
bool
2 classes
encrypt-to/encrypt.to
https://github.com/encrypt-to/encrypt.to/blob/aae7f3fed63a727d96e2f8540db77bf7e48237e3/db/migrate/20140812184133_add_stripe.rb
db/migrate/20140812184133_add_stripe.rb
class AddStripe < ActiveRecord::Migration def change add_column :users, :customer_id, :string add_column :users, :last_4_digits, :string end end
ruby
MIT
aae7f3fed63a727d96e2f8540db77bf7e48237e3
2026-01-04T17:40:35.738039Z
false
encrypt-to/encrypt.to
https://github.com/encrypt-to/encrypt.to/blob/aae7f3fed63a727d96e2f8540db77bf7e48237e3/db/migrate/20131221100528_create_users.rb
db/migrate/20131221100528_create_users.rb
class CreateUsers < ActiveRecord::Migration def change create_table :users do |t| t.string :username t.text :public_key t.timestamps end end end
ruby
MIT
aae7f3fed63a727d96e2f8540db77bf7e48237e3
2026-01-04T17:40:35.738039Z
false
encrypt-to/encrypt.to
https://github.com/encrypt-to/encrypt.to/blob/aae7f3fed63a727d96e2f8540db77bf7e48237e3/db/migrate/20131201205058_create_messages.rb
db/migrate/20131201205058_create_messages.rb
class CreateMessages < ActiveRecord::Migration def change create_table :messages do |t| t.timestamps end end end
ruby
MIT
aae7f3fed63a727d96e2f8540db77bf7e48237e3
2026-01-04T17:40:35.738039Z
false
encrypt-to/encrypt.to
https://github.com/encrypt-to/encrypt.to/blob/aae7f3fed63a727d96e2f8540db77bf7e48237e3/db/migrate/20140818182804_add_thanks_message.rb
db/migrate/20140818182804_add_thanks_message.rb
class AddThanksMessage < ActiveRecord::Migration def change add_column :users, :thanks_message, :string end end
ruby
MIT
aae7f3fed63a727d96e2f8540db77bf7e48237e3
2026-01-04T17:40:35.738039Z
false
encrypt-to/encrypt.to
https://github.com/encrypt-to/encrypt.to/blob/aae7f3fed63a727d96e2f8540db77bf7e48237e3/test/test_helper.rb
test/test_helper.rb
ENV["RAILS_ENV"] = "test" require File.expand_path('../../config/environment', __FILE__) require 'rails/test_help' class ActiveSupport::TestCase # Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order. # # Note: You'll currently still have to declare fixtures explicitly in integrati...
ruby
MIT
aae7f3fed63a727d96e2f8540db77bf7e48237e3
2026-01-04T17:40:35.738039Z
false
encrypt-to/encrypt.to
https://github.com/encrypt-to/encrypt.to/blob/aae7f3fed63a727d96e2f8540db77bf7e48237e3/test/performance/browsing_test.rb
test/performance/browsing_test.rb
require 'test_helper' require 'rails/performance_test_help' class BrowsingTest < ActionDispatch::PerformanceTest # Refer to the documentation for all available options # self.profile_options = { :runs => 5, :metrics => [:wall_time, :memory] # :output => 'tmp/performance', :formats => [:f...
ruby
MIT
aae7f3fed63a727d96e2f8540db77bf7e48237e3
2026-01-04T17:40:35.738039Z
false
encrypt-to/encrypt.to
https://github.com/encrypt-to/encrypt.to/blob/aae7f3fed63a727d96e2f8540db77bf7e48237e3/test/unit/user_test.rb
test/unit/user_test.rb
require 'test_helper' class UserTest < ActiveSupport::TestCase # test "the truth" do # assert true # end end
ruby
MIT
aae7f3fed63a727d96e2f8540db77bf7e48237e3
2026-01-04T17:40:35.738039Z
false
encrypt-to/encrypt.to
https://github.com/encrypt-to/encrypt.to/blob/aae7f3fed63a727d96e2f8540db77bf7e48237e3/test/unit/message_test.rb
test/unit/message_test.rb
require 'test_helper' class MessageTest < ActiveSupport::TestCase # test "the truth" do # assert true # end end
ruby
MIT
aae7f3fed63a727d96e2f8540db77bf7e48237e3
2026-01-04T17:40:35.738039Z
false
encrypt-to/encrypt.to
https://github.com/encrypt-to/encrypt.to/blob/aae7f3fed63a727d96e2f8540db77bf7e48237e3/test/unit/helpers/messages_helper_test.rb
test/unit/helpers/messages_helper_test.rb
require 'test_helper' class MessagesHelperTest < ActionView::TestCase end
ruby
MIT
aae7f3fed63a727d96e2f8540db77bf7e48237e3
2026-01-04T17:40:35.738039Z
false
encrypt-to/encrypt.to
https://github.com/encrypt-to/encrypt.to/blob/aae7f3fed63a727d96e2f8540db77bf7e48237e3/test/unit/helpers/users_helper_test.rb
test/unit/helpers/users_helper_test.rb
require 'test_helper' class UsersHelperTest < ActionView::TestCase end
ruby
MIT
aae7f3fed63a727d96e2f8540db77bf7e48237e3
2026-01-04T17:40:35.738039Z
false
encrypt-to/encrypt.to
https://github.com/encrypt-to/encrypt.to/blob/aae7f3fed63a727d96e2f8540db77bf7e48237e3/test/functional/messages_controller_test.rb
test/functional/messages_controller_test.rb
require 'test_helper' class MessagesControllerTest < ActionController::TestCase setup do @message = messages(:one) end test "should get index" do get :index assert_response :success assert_not_nil assigns(:messages) end test "should get new" do get :new assert_response :success en...
ruby
MIT
aae7f3fed63a727d96e2f8540db77bf7e48237e3
2026-01-04T17:40:35.738039Z
false
encrypt-to/encrypt.to
https://github.com/encrypt-to/encrypt.to/blob/aae7f3fed63a727d96e2f8540db77bf7e48237e3/test/functional/message_mailer_test.rb
test/functional/message_mailer_test.rb
require 'test_helper' class MessageMailerTest < ActionMailer::TestCase # test "the truth" do # assert true # end end
ruby
MIT
aae7f3fed63a727d96e2f8540db77bf7e48237e3
2026-01-04T17:40:35.738039Z
false
encrypt-to/encrypt.to
https://github.com/encrypt-to/encrypt.to/blob/aae7f3fed63a727d96e2f8540db77bf7e48237e3/test/functional/users_controller_test.rb
test/functional/users_controller_test.rb
require 'test_helper' class UsersControllerTest < ActionController::TestCase setup do @user = users(:one) end test "should get index" do get :index assert_response :success assert_not_nil assigns(:users) end test "should get new" do get :new assert_response :success end test "s...
ruby
MIT
aae7f3fed63a727d96e2f8540db77bf7e48237e3
2026-01-04T17:40:35.738039Z
false
encrypt-to/encrypt.to
https://github.com/encrypt-to/encrypt.to/blob/aae7f3fed63a727d96e2f8540db77bf7e48237e3/spec/rails_helper.rb
spec/rails_helper.rb
# This file is copied to spec/ when you run 'rails generate rspec:install' ENV["RAILS_ENV"] ||= 'test' require File.expand_path("../../config/environment", __FILE__) require 'rspec/rails' require "capybara/rspec" require 'webmock/rspec' # Requires supporting ruby files with custom matchers and macros, etc, # in spec/s...
ruby
MIT
aae7f3fed63a727d96e2f8540db77bf7e48237e3
2026-01-04T17:40:35.738039Z
false
encrypt-to/encrypt.to
https://github.com/encrypt-to/encrypt.to/blob/aae7f3fed63a727d96e2f8540db77bf7e48237e3/spec/spec_helper.rb
spec/spec_helper.rb
# 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 ...
ruby
MIT
aae7f3fed63a727d96e2f8540db77bf7e48237e3
2026-01-04T17:40:35.738039Z
false
encrypt-to/encrypt.to
https://github.com/encrypt-to/encrypt.to/blob/aae7f3fed63a727d96e2f8540db77bf7e48237e3/spec/routing/message_routes_spec.rb
spec/routing/message_routes_spec.rb
require 'rails_helper' describe "routing to profiles", type: :routing do it "routes /:uid to messages#new for email" do email = "hello@encrypt.to" expect(:get => "/#{email}").to route_to( :controller => "messages", :action => "new", :uid => email ) end it "routes /:uid to messag...
ruby
MIT
aae7f3fed63a727d96e2f8540db77bf7e48237e3
2026-01-04T17:40:35.738039Z
false
encrypt-to/encrypt.to
https://github.com/encrypt-to/encrypt.to/blob/aae7f3fed63a727d96e2f8540db77bf7e48237e3/spec/factories/users.rb
spec/factories/users.rb
FactoryBot.define do factory :user do |f| f.username { "mail" } f.email { "mail@encrypt.to" } f.password { "password" } f.public_key { "-----BEGIN PGP PUBLIC KEY BLOCK-----\nVersion: SKS 1.1.4\nComment: Hostname: pgpkey.org\n\nmQENBFKyxokBCADIWV1KBbDnvGapdNIM2CSQjDnjfkVyvCGAhcyjlnlmLT23q61OPJasS+D...
ruby
MIT
aae7f3fed63a727d96e2f8540db77bf7e48237e3
2026-01-04T17:40:35.738039Z
false
encrypt-to/encrypt.to
https://github.com/encrypt-to/encrypt.to/blob/aae7f3fed63a727d96e2f8540db77bf7e48237e3/spec/controllers/messages_controller_spec.rb
spec/controllers/messages_controller_spec.rb
require "rails_helper" email = "hello@encrypt.to" expired_email = "expired@encrypt.to" unknown_email = "unknown@encrypt.to" invalid_email = "test@encrypt.to.to" short_keyid = "0x11489a1f" long_keyid = "0x0caf1e5b11489a1f" invalid_keyid = "0x0x11489a1f" vindex_response = "info:1:2\npub:11489A1F:1:2048:1387447945:158744...
ruby
MIT
aae7f3fed63a727d96e2f8540db77bf7e48237e3
2026-01-04T17:40:35.738039Z
false
encrypt-to/encrypt.to
https://github.com/encrypt-to/encrypt.to/blob/aae7f3fed63a727d96e2f8540db77bf7e48237e3/spec/controllers/users_controller_spec.rb
spec/controllers/users_controller_spec.rb
require "rails_helper" describe UsersController, type: :controller do let(:user) { create :user } context "anonymous user" do describe "edit user" do it "has a 302 status code if user logged out" do user = build(:user) get :edit, uid: user.username, context: "publickey" exp...
ruby
MIT
aae7f3fed63a727d96e2f8540db77bf7e48237e3
2026-01-04T17:40:35.738039Z
false
encrypt-to/encrypt.to
https://github.com/encrypt-to/encrypt.to/blob/aae7f3fed63a727d96e2f8540db77bf7e48237e3/spec/controllers/home_controller_spec.rb
spec/controllers/home_controller_spec.rb
require "rails_helper" describe HomeController, type: :controller do describe "GET index" do it "has a 200 status code" do get :index expect(response.status).to eq(200) end end describe "GET terms" do it "has a 200 status code" do get :terms expect(response.status).to eq...
ruby
MIT
aae7f3fed63a727d96e2f8540db77bf7e48237e3
2026-01-04T17:40:35.738039Z
false
encrypt-to/encrypt.to
https://github.com/encrypt-to/encrypt.to/blob/aae7f3fed63a727d96e2f8540db77bf7e48237e3/spec/models/user_spec.rb
spec/models/user_spec.rb
require 'rails_helper' describe User, type: :model do it "has a valid factory" do expect(create(:user)).to be_valid end it "is invalid without a username" do expect(build(:user, username: nil)).not_to eq(be_valid) end it "is invalid without a password" do expect(build(:user, password: nil)).not_t...
ruby
MIT
aae7f3fed63a727d96e2f8540db77bf7e48237e3
2026-01-04T17:40:35.738039Z
false
encrypt-to/encrypt.to
https://github.com/encrypt-to/encrypt.to/blob/aae7f3fed63a727d96e2f8540db77bf7e48237e3/spec/api/v1/keyserver_controller_spec.rb
spec/api/v1/keyserver_controller_spec.rb
require "rails_helper" public_key = "-----BEGIN PGP PUBLIC KEY BLOCK-----\\nVersion: SKS 1.1.4\\nComment: Hostname: pgpkey.org\\n\\nmQENBFKyxokBCADIWV1KBbDnvGapdNIM2CSQjDnjfkVyvCGAhcyjlnlmLT23q61OPJasS+DE\\nA0ujZtsPa2aGZK3o8ETSgwTREXxeG3n7tlTyXrqkTN/rh00YY/CIubmkeIKQfPDaLD2UDqGL\\nn7gwFeSCtrfPkXFZsVN1GwiW3QsQfGH/c2CMt...
ruby
MIT
aae7f3fed63a727d96e2f8540db77bf7e48237e3
2026-01-04T17:40:35.738039Z
false
encrypt-to/encrypt.to
https://github.com/encrypt-to/encrypt.to/blob/aae7f3fed63a727d96e2f8540db77bf7e48237e3/lib/keyserver.rb
lib/keyserver.rb
class Keyserver require 'net/http' def self.get_keyids_by_email(email) result = self.get_users_by_email(email) return if result.nil? modified_string = result.gsub(/\s+/, '').strip uids = modified_string.split("pub:") found = [] for uid in uids found << "0x" + uid.split(":")[0].do...
ruby
MIT
aae7f3fed63a727d96e2f8540db77bf7e48237e3
2026-01-04T17:40:35.738039Z
false
encrypt-to/encrypt.to
https://github.com/encrypt-to/encrypt.to/blob/aae7f3fed63a727d96e2f8540db77bf7e48237e3/lib/util.rb
lib/util.rb
class Util def self.is_email?(email) !email.scan(/\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,8}\b/i).empty? end def self.get_emails(str) str.scan(/\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,8}\b/i) end end
ruby
MIT
aae7f3fed63a727d96e2f8540db77bf7e48237e3
2026-01-04T17:40:35.738039Z
false
encrypt-to/encrypt.to
https://github.com/encrypt-to/encrypt.to/blob/aae7f3fed63a727d96e2f8540db77bf7e48237e3/config/application.rb
config/application.rb
require File.expand_path('../boot', __FILE__) require 'rails/all' if defined?(Bundler) # If you precompile assets before deploying to production, use this line Bundler.require(*Rails.groups(:assets => %w(development test))) # If you want your assets lazily compiled in production, use this line # Bundler.requi...
ruby
MIT
aae7f3fed63a727d96e2f8540db77bf7e48237e3
2026-01-04T17:40:35.738039Z
false
encrypt-to/encrypt.to
https://github.com/encrypt-to/encrypt.to/blob/aae7f3fed63a727d96e2f8540db77bf7e48237e3/config/environment.rb
config/environment.rb
# Load the rails application require File.expand_path('../application', __FILE__) # Initialize the rails application Encryptto::Application.initialize!
ruby
MIT
aae7f3fed63a727d96e2f8540db77bf7e48237e3
2026-01-04T17:40:35.738039Z
false
encrypt-to/encrypt.to
https://github.com/encrypt-to/encrypt.to/blob/aae7f3fed63a727d96e2f8540db77bf7e48237e3/config/routes.rb
config/routes.rb
Encryptto::Application.routes.draw do # api namespace :api do namespace :v1 do resources :keyserver do collection do get 'lookup' end end end end mount StripeEvent::Engine => '/stripe' get 'index' => 'home#index' get 'terms' => 'home#terms' get 'priva...
ruby
MIT
aae7f3fed63a727d96e2f8540db77bf7e48237e3
2026-01-04T17:40:35.738039Z
false
encrypt-to/encrypt.to
https://github.com/encrypt-to/encrypt.to/blob/aae7f3fed63a727d96e2f8540db77bf7e48237e3/config/boot.rb
config/boot.rb
require 'rubygems' # Set up gems listed in the Gemfile. ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
ruby
MIT
aae7f3fed63a727d96e2f8540db77bf7e48237e3
2026-01-04T17:40:35.738039Z
false
encrypt-to/encrypt.to
https://github.com/encrypt-to/encrypt.to/blob/aae7f3fed63a727d96e2f8540db77bf7e48237e3/config/initializers/session_store.rb
config/initializers/session_store.rb
# Be sure to restart your server when you modify this file. Encryptto::Application.config.session_store :cookie_store, key: '_encryptto_session' # Use the database for sessions instead of the cookie-based default, # which shouldn't be used to store highly confidential information # (create the session table with "rai...
ruby
MIT
aae7f3fed63a727d96e2f8540db77bf7e48237e3
2026-01-04T17:40:35.738039Z
false
encrypt-to/encrypt.to
https://github.com/encrypt-to/encrypt.to/blob/aae7f3fed63a727d96e2f8540db77bf7e48237e3/config/initializers/devise.rb
config/initializers/devise.rb
# Use this hook to configure devise mailer, warden hooks and so forth. # Many of these configuration options can be set straight in your model. Devise.setup do |config| # The secret key used by Devise. Devise uses this key to generate # random tokens. Changing this key will render invalid all existing # confirmat...
ruby
MIT
aae7f3fed63a727d96e2f8540db77bf7e48237e3
2026-01-04T17:40:35.738039Z
false
encrypt-to/encrypt.to
https://github.com/encrypt-to/encrypt.to/blob/aae7f3fed63a727d96e2f8540db77bf7e48237e3/config/initializers/wrap_parameters.rb
config/initializers/wrap_parameters.rb
# Be sure to restart your server when you modify this file. # # This file contains settings for ActionController::ParamsWrapper which # is enabled by default. # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. ActiveSupport.on_load(:action_controller) do wrap_parameters ...
ruby
MIT
aae7f3fed63a727d96e2f8540db77bf7e48237e3
2026-01-04T17:40:35.738039Z
false
encrypt-to/encrypt.to
https://github.com/encrypt-to/encrypt.to/blob/aae7f3fed63a727d96e2f8540db77bf7e48237e3/config/initializers/inflections.rb
config/initializers/inflections.rb
# Be sure to restart your server when you modify this file. # Add new inflection rules using the following format # (all these examples are active by default): # ActiveSupport::Inflector.inflections do |inflect| # inflect.plural /^(ox)$/i, '\1en' # inflect.singular /^(ox)en/i, '\1' # inflect.irregular 'person', ...
ruby
MIT
aae7f3fed63a727d96e2f8540db77bf7e48237e3
2026-01-04T17:40:35.738039Z
false
encrypt-to/encrypt.to
https://github.com/encrypt-to/encrypt.to/blob/aae7f3fed63a727d96e2f8540db77bf7e48237e3/config/initializers/stripe.rb
config/initializers/stripe.rb
Stripe.api_key = APP_CONFIG['stripe_api_key'] STRIPE_PUBLIC_KEY = APP_CONFIG['stripe_public_key'] StripeEvent.setup do subscribe 'customer.subscription.deleted' do |event| user = User.find_by_customer_id(event.data.object.customer) user.expire end end
ruby
MIT
aae7f3fed63a727d96e2f8540db77bf7e48237e3
2026-01-04T17:40:35.738039Z
false
encrypt-to/encrypt.to
https://github.com/encrypt-to/encrypt.to/blob/aae7f3fed63a727d96e2f8540db77bf7e48237e3/config/initializers/backtrace_silencers.rb
config/initializers/backtrace_silencers.rb
# Be sure to restart your server when you modify this file. # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } # You can also remove all the silencers if you're trying to debug a probl...
ruby
MIT
aae7f3fed63a727d96e2f8540db77bf7e48237e3
2026-01-04T17:40:35.738039Z
false
encrypt-to/encrypt.to
https://github.com/encrypt-to/encrypt.to/blob/aae7f3fed63a727d96e2f8540db77bf7e48237e3/config/initializers/mime_types.rb
config/initializers/mime_types.rb
# Be sure to restart your server when you modify this file. # Add new mime types for use in respond_to blocks: # Mime::Type.register "text/richtext", :rtf # Mime::Type.register_alias "text/html", :iphone
ruby
MIT
aae7f3fed63a727d96e2f8540db77bf7e48237e3
2026-01-04T17:40:35.738039Z
false
encrypt-to/encrypt.to
https://github.com/encrypt-to/encrypt.to/blob/aae7f3fed63a727d96e2f8540db77bf7e48237e3/config/environments/test.rb
config/environments/test.rb
APP_CONFIG = YAML.load_file("#{Rails.root}/config/config.test.yml") Encryptto::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. ...
ruby
MIT
aae7f3fed63a727d96e2f8540db77bf7e48237e3
2026-01-04T17:40:35.738039Z
false
encrypt-to/encrypt.to
https://github.com/encrypt-to/encrypt.to/blob/aae7f3fed63a727d96e2f8540db77bf7e48237e3/config/environments/development.rb
config/environments/development.rb
APP_CONFIG = YAML.load_file("#{Rails.root}/config/config.yml")[Rails.env] Encryptto::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 ...
ruby
MIT
aae7f3fed63a727d96e2f8540db77bf7e48237e3
2026-01-04T17:40:35.738039Z
false
encrypt-to/encrypt.to
https://github.com/encrypt-to/encrypt.to/blob/aae7f3fed63a727d96e2f8540db77bf7e48237e3/config/environments/production.rb
config/environments/production.rb
APP_CONFIG = YAML.load_file("#{Rails.root}/config/config.yml")[Rails.env] Encryptto::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 # Full error reports are disabled and caching is...
ruby
MIT
aae7f3fed63a727d96e2f8540db77bf7e48237e3
2026-01-04T17:40:35.738039Z
false
GBH/letmein
https://github.com/GBH/letmein/blob/d6ef31748d3984d09a54bdd3e2f709c83fe3a2be/test/letmein_test.rb
test/letmein_test.rb
require 'test/unit' require 'rails' require 'letmein' require 'sqlite3' $stdout_orig = $stdout $stdout = StringIO.new ActiveRecord::Base.establish_connection(:adapter => 'sqlite3', :database => ':memory:') ActiveRecord::Base.logger = Logger.new($stdout) class User < ActiveRecord::Base ; end class Admin < ActiveRecor...
ruby
MIT
d6ef31748d3984d09a54bdd3e2f709c83fe3a2be
2026-01-04T17:40:44.562367Z
false
GBH/letmein
https://github.com/GBH/letmein/blob/d6ef31748d3984d09a54bdd3e2f709c83fe3a2be/lib/letmein.rb
lib/letmein.rb
require 'active_record' require 'bcrypt' module LetMeIn Error = Class.new StandardError class Railtie < Rails::Railtie config.to_prepare do LetMeIn.initialize end end # Configuration class with some defaults. Can be changed like this: # LetMeIn.configure do |conf| # conf.model ...
ruby
MIT
d6ef31748d3984d09a54bdd3e2f709c83fe3a2be
2026-01-04T17:40:44.562367Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/tools/purge_zone.rb
tools/purge_zone.rb
#!/usr/bin/env ruby require "json" require "pp" require "aws-sdk" # it happens that you end up with a HostedZone with no Chef Server entry, and destroying it manually is # tedious, because you have to delete all the ResourceRecordSets. this script will handle that for you. doomed_zones = ARGV doomed_zones.each do |d...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/spec/aws_support.rb
spec/aws_support.rb
# # Provides a `with_aws` method that when used in your tests will create a new # context pointed at the user's chosen driver, and helper methods to create # AWS objects and clean them up. # module AWSSupport require "cheffish/rspec/chef_run_support" def self.extended(other) other.extend Cheffish::RSpec::ChefRu...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/spec/spec_helper.rb
spec/spec_helper.rb
begin require "simplecov" SimpleCov.start rescue LoadError; end # Bring in the RSpec monkeypatch before we do *anything*, so that builtin matchers # will get the module. Not strictly necessary, but cleaner that way. require "aws_support/deep_matcher/rspec_monkeypatches" require "chef/mixin/shell_out" require "che...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/spec/aws_support/delayed_stream.rb
spec/aws_support/delayed_stream.rb
require "timeout" module AWSSupport class DelayedStream def initialize(delay_before_streaming, *streams) @streams = streams.flatten.reject(&:nil?) if delay_before_streaming > 0 @buffer = StringIO.new @thread = Thread.new do sleep delay_before_streaming start_stream...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/spec/aws_support/aws_resource_run_wrapper.rb
spec/aws_support/aws_resource_run_wrapper.rb
require "cheffish/rspec/recipe_run_wrapper" module AWSSupport class AWSResourceRunWrapper < Cheffish::RSpec::RecipeRunWrapper def initialize(example, resource_type, name, &properties) super(example.chef_config) do if properties && !properties.parameters.empty? public_send(resource_type, n...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/spec/aws_support/deep_matcher.rb
spec/aws_support/deep_matcher.rb
module AWSSupport # # Include this and override `match_failure_messages`, and your class becomes # a matcher which will have `matches?` call `match_failure_messages` and # cache the result, which is then returned verbatim from failure_message. # module DeepMatcher require "aws_support/deep_matcher/match...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/spec/aws_support/deep_matcher/rspec_monkeypatches.rb
spec/aws_support/deep_matcher/rspec_monkeypatches.rb
# FIRST thing we do in a desperate attempt to get our module in before RSpec loads module AWSSupport module DeepMatcher module MatchValuesFailureMessages end end end module RSpec module Matchers module Composable include AWSSupport::DeepMatcher::MatchValuesFailureMessages end end end re...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/spec/aws_support/deep_matcher/matchable_array.rb
spec/aws_support/deep_matcher/matchable_array.rb
module AWSSupport module DeepMatcher # # If a module implements this, it signifies that # module MatchableArray # # TODO allow the user to return a new object that actually implements the # enumerable, in case the class in question is non-standard. # def self.matchable_c...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/spec/aws_support/deep_matcher/match_values_failure_messages.rb
spec/aws_support/deep_matcher/match_values_failure_messages.rb
module AWSSupport module DeepMatcher module MatchValuesFailureMessages require "set" require "rspec/matchers" require "rspec/matchers/composable" require "aws_support/deep_matcher" require "aws_support/deep_matcher/matchable_object" require "aws_support/deep_matcher/matchable_a...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/spec/aws_support/deep_matcher/matchable_object.rb
spec/aws_support/deep_matcher/matchable_object.rb
module AWSSupport module DeepMatcher # # If a module implements this, or is added to `matchable_classes`, # RSpec's `match` will match its attributes up to hashes a la: # # ```ruby # expect(my_object).to match({ a: 1, b: 2 }) # ``` # # Which will compare my_object.a to 1 and my_obj...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/spec/aws_support/deep_matcher/fuzzy_match_objects.rb
spec/aws_support/deep_matcher/fuzzy_match_objects.rb
module AWSSupport module DeepMatcher # # This gets mixed into RSpec::Support::FuzzyMatch, adding the ability to # fuzzy match objects against hashes, a la: # # values_match({ a: 1, b: 2, 'c.d.e' => 3 }, # <non-hash object with a, b and c methods> # end # module FuzzyMatchObjects ...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/spec/aws_support/matchers/have_aws_object_tags.rb
spec/aws_support/matchers/have_aws_object_tags.rb
require "rspec/matchers" require "chef/provisioning" require "aws_support/deep_matcher" module AWSSupport module Matchers class HaveAWSObjectTags include RSpec::Matchers::Composable include AWSSupport::DeepMatcher def initialize(example, resource_class, name, expected_tags) @example = ...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/spec/aws_support/matchers/destroy_an_aws_object.rb
spec/aws_support/matchers/destroy_an_aws_object.rb
require "rspec/matchers" require "chef/provisioning" require "aws_support/deep_matcher" module AWSSupport module Matchers class DestroyAnAWSObject include RSpec::Matchers::Composable include AWSSupport::DeepMatcher def initialize(example, resource_class, name) @example = example ...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/spec/aws_support/matchers/create_an_aws_object.rb
spec/aws_support/matchers/create_an_aws_object.rb
require "rspec/matchers" require "chef/provisioning" require "aws_support/deep_matcher" module AWSSupport module Matchers class CreateAnAWSObject include RSpec::Matchers::Composable include AWSSupport::DeepMatcher # @param custom_matcher [Block] A block with 1 argument that will be provided th...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/spec/aws_support/matchers/match_an_aws_object.rb
spec/aws_support/matchers/match_an_aws_object.rb
require "rspec/matchers" require "chef/provisioning" require "aws_support/deep_matcher" module AWSSupport module Matchers # This matcher doesn't try to validate that an example was created/updated/destroyed # it just checks that the object exists and posses the attributes you specify # It also doesn't cl...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/spec/aws_support/matchers/update_an_aws_object.rb
spec/aws_support/matchers/update_an_aws_object.rb
require "rspec/matchers" require "aws_support/deep_matcher" module AWSSupport module Matchers class UpdateAnAWSObject include RSpec::Matchers::Composable include AWSSupport::DeepMatcher require "chef/provisioning" # @param custom_matcher [Block] A block with 1 argument that will be prov...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/spec/integration/aws_server_certificate_spec.rb
spec/integration/aws_server_certificate_spec.rb
require "spec_helper" describe Chef::Resource::AwsServerCertificate do extend AWSSupport # http://openssl.6102.n7.nabble.com/create-certificate-chain-td44046.html # Follow those instructions except the chain should be `ca-int.crt` only # instead of concatenated intermediate and root when_the_chef_12_server...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/spec/integration/aws_auto_scaling_group_spec.rb
spec/integration/aws_auto_scaling_group_spec.rb
require "spec_helper" describe Chef::Resource::AwsAutoScalingGroup do extend AWSSupport when_the_chef_12_server "exists", organization: "foo", server_scope: :context do with_aws "When connected to AWS" do # Select an amazon linux ami based upon region ami = { "eu-west-1" => "ami-3850624c",...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/spec/integration/aws_nat_gateway_spec.rb
spec/integration/aws_nat_gateway_spec.rb
require "spec_helper" require "chef/resource/aws_nat_gateway" describe Chef::Resource::AwsNatGateway do extend AWSSupport when_the_chef_12_server "exists", organization: "foo", server_scope: :context do with_aws "with a VPC" do purge_all setup_public_vpc aws_eip_address "test_eip" de...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/spec/integration/aws_elasticsearch_domain_spec.rb
spec/integration/aws_elasticsearch_domain_spec.rb
require "spec_helper" def policy(user) <<EOF { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Sid": "test-policy", "Principal": { "AWS": "#{user}" }, "Action": "es:*", "Resource": "*" } ] } EOF end def all_options_domain(name) aws_elasticsea...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/spec/integration/aws_s3_bucket_spec.rb
spec/integration/aws_s3_bucket_spec.rb
require "spec_helper" require "securerandom" def mk_bucket_name bucket_postfix = SecureRandom.hex(8) "chef.provisioning.test.#{bucket_postfix}" end describe Chef::Resource::AwsS3Bucket do extend AWSSupport when_the_chef_12_server "exists", organization: "foo", server_scope: :context do with_aws "when con...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/spec/integration/aws_eip_address_spec.rb
spec/integration/aws_eip_address_spec.rb
require "spec_helper" describe Chef::Resource::AwsEipAddress do extend AWSSupport when_the_chef_12_server "exists", organization: "foo", server_scope: :context do with_aws "when connected to AWS" do it "aws_eip_address 'test_eip' creates an elastic ip" do expect_recipe do aws_eip_addre...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/spec/integration/machine_batch_spec.rb
spec/integration/machine_batch_spec.rb
require "spec_helper" describe Chef::Resource::MachineBatch do extend AWSSupport when_the_chef_12_server "exists", organization: "foo", server_scope: :context do with_aws "with a VPC and a public subnet" do before :all do chef_config[:log_level] = :warn end purge_all setup_pub...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/spec/integration/aws_rds_instance_spec.rb
spec/integration/aws_rds_instance_spec.rb
require "spec_helper" describe Chef::Resource::AwsRdsInstance do extend AWSSupport when_the_chef_12_server "exists", organization: "foo", server_scope: :context do with_aws "with a connection to AWS, a VPC, two subnets, a db subnet group, and a db parameter group" do azs = [] driver.ec2.describe_a...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/spec/integration/aws_route53_hosted_zone_spec.rb
spec/integration/aws_route53_hosted_zone_spec.rb
require "spec_helper" describe Chef::Resource::AwsRoute53HostedZone do extend AWSSupport when_the_chef_12_server "exists", organization: "foo", server_scope: :context do with_aws "when connected to AWS" do context "aws_route53_hosted_zone" do # for the occasional spec where the test zone won't b...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/spec/integration/aws_route_table_spec.rb
spec/integration/aws_route_table_spec.rb
require "spec_helper" describe Chef::Resource::AwsRouteTable do extend AWSSupport when_the_chef_12_server "exists", organization: "foo", server_scope: :context do with_aws "with a VPC with an internet gateway" do purge_all setup_public_vpc aws_network_interface "test_network_interface" do ...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/spec/integration/aws_rds_parameter_group_spec.rb
spec/integration/aws_rds_parameter_group_spec.rb
require "spec_helper" describe Chef::Resource::AwsRdsParameterGroup do extend AWSSupport when_the_chef_12_server "exists", organization: "foo", server_scope: :context do with_aws "no required pre-existing objects" do it "creates an empty parameter group" do expect_recipe do aws_rds_para...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/spec/integration/machine_spec.rb
spec/integration/machine_spec.rb
require "spec_helper" require "openssl" describe Chef::Resource::Machine do extend AWSSupport when_the_chef_12_server "exists", organization: "foo", server_scope: :context do with_aws "with a VPC and a public subnet" do before :all do chef_config[:log_level] = :warn end purge_all ...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/spec/integration/aws_network_interface_spec.rb
spec/integration/aws_network_interface_spec.rb
describe "AwsNetworkInterface" do extend AWSSupport when_the_chef_12_server "exists", organization: "foo", server_scope: :context do with_aws "when connected to AWS" do context "setting up public VPC" do purge_all setup_public_vpc context "with machines", :super_slow do ...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/spec/integration/aws_internet_gateway_spec.rb
spec/integration/aws_internet_gateway_spec.rb
require "spec_helper" describe Chef::Resource::AwsInternetGateway do extend AWSSupport when_the_chef_12_server "exists", organization: "foo", server_scope: :context do with_aws "with a VPC" do purge_all aws_vpc "test_vpc_igw_a" do cidr_block "10.0.0.0/24" end aws_vpc "test_vpc...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/spec/integration/load_balancer_spec.rb
spec/integration/load_balancer_spec.rb
require "spec_helper" require "securerandom" describe Chef::Resource::LoadBalancer do extend AWSSupport when_the_chef_12_server "exists", organization: "foo", server_scope: :context do with_aws "with a VPC and a public subnet" do purge_all setup_public_vpc bucket_name = "chef.provisioning.t...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/spec/integration/aws_dhcp_options_spec.rb
spec/integration/aws_dhcp_options_spec.rb
describe "AwsDhcpOptions" do extend AWSSupport when_the_chef_12_server "exists", organization: "foo", server_scope: :context do with_aws "when connected to AWS" do it "creates an aws_dhcp_options resource with maximum attributes" do expect_recipe do aws_dhcp_options "test-dhcp-options" ...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/spec/integration/aws_iam_instance_profile_spec.rb
spec/integration/aws_iam_instance_profile_spec.rb
require "spec_helper" require "securerandom" def mk_role_name name_postfix = SecureRandom.hex(8) "chef_provisioning_test_iam_role_#{name_postfix}" end def ec2_principal <<EOF { "Version": "2012-10-17", "Statement": [ { "Action": "sts:AssumeRole", "Principal": { "Service": "ec2.amazon...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/spec/integration/aws_subnet_spec.rb
spec/integration/aws_subnet_spec.rb
require "spec_helper" describe Chef::Resource::AwsSubnet do extend AWSSupport when_the_chef_12_server "exists", organization: "foo", server_scope: :context do with_aws "with a VPC with an internet gateway, route table and network acl" do aws_vpc "test_vpc" do cidr_block "10.0.0.0/24" int...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/spec/integration/aws_vpc_spec.rb
spec/integration/aws_vpc_spec.rb
require "spec_helper" describe Chef::Resource::AwsVpc do extend AWSSupport when_the_chef_12_server "exists", organization: "foo", server_scope: :context do with_aws "When AWS has a DHCP options" do # Empty DHCP options for the purposes of associating aws_dhcp_options "test_dhcp_options" con...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/spec/integration/aws_rds_subnet_group_spec.rb
spec/integration/aws_rds_subnet_group_spec.rb
require "spec_helper" require "aws-sdk" require "set" describe Chef::Resource::AwsRdsSubnetGroup do extend AWSSupport when_the_chef_12_server "exists", organization: "foo", server_scope: :context do with_aws "with a VPC with an internet gateway and subnet" do # region = ENV['AWS_TEST_DRIVER'][5..-1] ...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/spec/integration/aws_security_group_spec.rb
spec/integration/aws_security_group_spec.rb
require "spec_helper" require "chef/resource/aws_security_group" require "chef/provisioning/aws_driver/exceptions" describe Chef::Resource::AwsSecurityGroup do extend AWSSupport def set_ip_pemissions_mock_object(options = {}) mock_object = Aws::EC2::Types::IpPermission.new( from_port: options[:from_port...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
true
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/spec/integration/aws_cache_subnet_group_spec.rb
spec/integration/aws_cache_subnet_group_spec.rb
require "spec_helper" describe Chef::Resource::AwsCacheSubnetGroup do extend AWSSupport when_the_chef_12_server "exists", organization: "foo", server_scope: :context do with_aws "with a VPC with an internet gateway and subnet" do aws_vpc "test_vpc" do cidr_block "10.0.0.0/24" internet_ga...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/spec/integration/aws_vpc_peering_connection_spec.rb
spec/integration/aws_vpc_peering_connection_spec.rb
require "spec_helper" describe Chef::Resource::AwsVpcPeeringConnection do extend AWSSupport when_the_chef_12_server "exists", organization: "foo", server_scope: :context do with_aws "with 2 VPCs" do aws_vpc "test_vpc" do cidr_block "10.0.0.0/24" internet_gateway false end aw...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/spec/integration/aws_cloudsearch_domain_spec.rb
spec/integration/aws_cloudsearch_domain_spec.rb
require "spec_helper" describe Chef::Resource::AwsCloudsearchDomain do extend AWSSupport when_the_chef_12_server "exists", organization: "foo", server_scope: :context do with_aws "when connected to AWS" do # Cloudsearch can take forevvvver to delete so we need to randomize our names time = DateTime...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/spec/integration/machine_image_spec.rb
spec/integration/machine_image_spec.rb
require "spec_helper" describe Chef::Resource::MachineImage do extend AWSSupport when_the_chef_12_server "exists", organization: "foo", server_scope: :context do with_aws "with a VPC and a public subnet" do before :all do chef_config[:log_level] = :warn chef_config[:include_output_after_...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/spec/integration/aws_launch_configuration_spec.rb
spec/integration/aws_launch_configuration_spec.rb
require "spec_helper" describe Chef::Resource::AwsLaunchConfiguration do extend AWSSupport when_the_chef_12_server "exists", organization: "foo", server_scope: :context do with_aws "when connected to AWS" do let(:image_filters) do { filters: [ { name: "image-t...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/spec/integration/aws_iam_role_spec.rb
spec/integration/aws_iam_role_spec.rb
require "spec_helper" require "securerandom" def ec2_principal <<-EOF { "Version": "2012-10-17", "Statement": [ { "Action": "sts:AssumeRole", "Principal": { "Service": "ec2.amazonaws.com" }, "Effect": "Allow", "Sid": "" } ] } EOF end def rds_principal <<-EOF {...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/spec/integration/aws_cloudwatch_alarm_spec.rb
spec/integration/aws_cloudwatch_alarm_spec.rb
require "spec_helper" describe Chef::Resource::AwsCloudwatchAlarm do extend AWSSupport when_the_chef_12_server "exists", organization: "foo", server_scope: :context do with_aws "When connected to AWS" do aws_sns_topic "mytesttopic1" aws_sns_topic "mytesttopic2" it "creates an aws_cloudwatch...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/spec/integration/aws_key_pair_spec.rb
spec/integration/aws_key_pair_spec.rb
require "spec_helper" describe Chef::Resource::AwsKeyPair do extend AWSSupport when_the_chef_12_server "exists", organization: "foo", server_scope: :context do with_aws "when connected to AWS" do before :each do driver.ec2.delete_key_pair(key_name: "test_key_pair") end it "aws_key_p...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/spec/integration/aws_ebs_volume_spec.rb
spec/integration/aws_ebs_volume_spec.rb
require "spec_helper" describe Chef::Resource::AwsEbsVolume do extend AWSSupport when_the_chef_12_server "exists", organization: "foo", server_scope: :context do with_aws "when connected to AWS" do it "aws_ebs_volume 'test_volume' creates an ebs volume" do expect_recipe do aws_ebs_volu...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/spec/integration/aws_network_acl_spec.rb
spec/integration/aws_network_acl_spec.rb
require "spec_helper" describe Chef::Resource::AwsNetworkAcl do extend AWSSupport when_the_chef_12_server "exists", organization: "foo", server_scope: :context do with_aws "with a VPC" do aws_vpc "test_vpc" do cidr_block "10.0.0.0/24" internet_gateway true end it "aws_networ...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/spec/integration/aws_cache_cluster_spec.rb
spec/integration/aws_cache_cluster_spec.rb
require "spec_helper" describe Chef::Resource::AwsCacheCluster, :super_slow do extend AWSSupport when_the_chef_12_server "exists", organization: "foo", server_scope: :context do with_aws "with a VPC, subnet, subnet_group and security_group" do after(:context) do # Cache Cluster takes around 7 mi...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/spec/unit/chef/provisioning/aws_driver/credentials_spec.rb
spec/unit/chef/provisioning/aws_driver/credentials_spec.rb
require "spec_helper" describe Chef::Provisioning::AWSDriver::Credentials do context "loading config INI files" do let(:personal_credentials) do { region: "us-west-2", aws_access_key_id: "AKIAPERSONALKEY", aws_secret_access_key: "personalsecretaccesskey", name: "personal" } end ...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/spec/unit/chef/provisioning/aws_driver/driver_spec.rb
spec/unit/chef/provisioning/aws_driver/driver_spec.rb
require "chef/provisioning/aws_driver/driver" require "chef/provisioning/aws_driver/credentials2" describe Chef::Provisioning::AWSDriver::Driver do let(:driver) { Chef::Provisioning::AWSDriver::Driver.new("aws::us-east-1", {}) } let(:aws_credentials) do double("credentials", default: { aws_access_...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/spec/unit/chef/provisioning/aws_driver/route53_spec.rb
spec/unit/chef/provisioning/aws_driver/route53_spec.rb
require "chef/provisioning/aws_driver/driver" describe ::Aws::Route53::Types::ResourceRecordSet do it "returns the correct RecordSet unique key" it "returns the correct AWS change struct" end describe Chef::Resource::AwsRoute53RecordSet do let(:resource_name) { "test_resource" } let(:zone_name) { "blerf.net" ...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/docs/examples/load_balancer.rb
docs/examples/load_balancer.rb
# A simple load balancer for HTTP on port 80 load_balancer "test-elb" do machines %w{machine1 machine2} load_balancer_options listeners: [{ port: 80, protocol: :http, instance_port: 80, instance_protocol: :http }] end # A more complex load balancer. # This creates 10 t2.micro instances, and then ...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/docs/examples/aws_vpc.rb
docs/examples/aws_vpc.rb
require "chef/provisioning/aws_driver" with_driver "aws::eu-west-1" aws_vpc "provisioning-vpc" do cidr_block "10.0.0.0/24" internet_gateway true main_routes "0.0.0.0/0" => :internet_gateway end aws_subnet "provisioning-vpc-subnet-a" do vpc "provisioning-vpc" cidr_block "10.0.0.0/26" availability_zone "eu...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/docs/examples/iam_credentials.rb
docs/examples/iam_credentials.rb
require "chef/provisioning/aws_driver" iam = AWS::Core::CredentialProviders::EC2Provider.new with_driver( "aws:IAM:us-east-1", aws_credentials: { "IAM" => iam.credentials } ) machine "iam-machine-1" do machine_options bootstrap_options: { # subnet_id: 'ref-subnet', # security_group_ids: 'ref-sg1', ...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/docs/examples/aws_network_interface.rb
docs/examples/aws_network_interface.rb
require "chef/provisioning/aws_driver" require "retryable" with_driver "aws::us-west-2" aws_key_pair "ref-key-pair-eni" aws_dhcp_options "ref-dhcp-options-eni" aws_vpc "ref-vpc-eni" do cidr_block "10.0.0.0/24" internet_gateway true main_routes "0.0.0.0/0" => :internet_gateway dhcp_options "ref-dhcp-options-...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/docs/examples/ref_elasticache.rb
docs/examples/ref_elasticache.rb
require "chef/provisioning/aws_driver" with_driver "aws::us-east-1" aws_vpc "test" do cidr_block "10.0.0.0/24" end aws_subnet "public-test" do vpc "test" availability_zone "us-east-1a" cidr_block "10.0.0.0/24" end aws_cache_subnet_group "test-ec" do description "My awesome group" subnets ["public-test"] ...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/docs/examples/aws_sg.rb
docs/examples/aws_sg.rb
require "chef/provisioning/aws_driver" with_driver "aws::eu-west-1" vpc = aws_vpc "test-vpc" do cidr_block "10.0.0.0/24" internet_gateway true end # Empty aws_security_group "test-sg" do vpc "test-vpc" action :delete end aws_security_group "test-sg" do vpc "test-vpc" end aws_security_group "test-sg" do ...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/docs/examples/aws_tags.rb
docs/examples/aws_tags.rb
require "chef/provisioning/aws_driver" with_driver "aws::us-west-2" machine "ref-machine-1" do action :allocate end machine "ref-machine-1" do machine_options aws_tags: { marco: "polo", happyhappy: "joyjoy" } converge false end machine "ref-machine-1" do machine_options aws_tags: { othercustomtags: "byebye"...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/docs/examples/ref_destroy.rb
docs/examples/ref_destroy.rb
require "chef/provisioning/aws_driver" with_driver "aws::us-west-1" aws_elasticsearch_domain "ref-es-domain" do action :destroy end aws_cloudsearch_domain "ref-cs-domain" do action :destroy end aws_rds_instance "ref-rds-instance" do action :destroy end aws_rds_subnet_group "ref-db-subnet-group" do action :...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false
chef-boneyard/chef-provisioning-aws
https://github.com/chef-boneyard/chef-provisioning-aws/blob/c8c8d930f01d81c88ff2b791a447d4a452c784ab/docs/examples/aws_cloudwatch_alarm.rb
docs/examples/aws_cloudwatch_alarm.rb
# A simple alarm publishing notifications to an SNS topic # which could potentially have email, sms or other subscriptions topic = aws_sns_topic "my-test-topic" aws_cloudwatch_alarm "Test Alert" do namespace "AWS/EC2" metric_name "MyTestMetric" comparison_operator "GreaterThanThreshold" evaluation_periods 1 ...
ruby
Apache-2.0
c8c8d930f01d81c88ff2b791a447d4a452c784ab
2026-01-04T17:40:35.446867Z
false