This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# converts URIs in vcr cassettes from uri-based basic auth | |
# to header-based basic auth to be compatible with webmock 2.0. | |
# it will create a basic auth header with an ERB tag | |
# to keep user and password be editable. | |
# | |
# Authorization: Basic <%= Base64.encode64("user:password").chomp %> | |
# | |
# may not work if using VCR's filter_sensitive_data. | |
# in that case use https://gist.github.com/ujh/594c99385b6cbe92e32b1bbfa8578a45 | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# PostgreSQL enums support (adapted from https://coderwall.com/p/azi3ka) | |
# Should be fixed in Rails >= 4.2 (https://github.com/rails/rails/pull/13244) | |
# put this code in an initializer file | |
raise "Remove this patch!" if Rails.version >= "4.2.0" | |
module ActiveRecord | |
module ConnectionAdapters | |
class PostgreSQLAdapter | |
module OID | |
class Enum < Type | |
def type_cast(value) |