This file contains hidden or 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
| { | |
| "AWSTemplateFormatVersion": "2010-09-09", | |
| "Description": "Example stack", | |
| "Parameters": { | |
| "Env": { | |
| "Type": "String", | |
| "Description": "The deploy environment" | |
| } | |
| }, | |
| "Resources": { |
This file contains hidden or 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
| stack = Humidifier::Stack.new(aws_template_format_version: '2010-09-09', name: 'example-stack', description: 'Example stack') | |
| stack.add_parameter('Env', description: 'The deploy environment', type: 'String') | |
| stack.add('LoadBalancer', Humidifier::ElasticLoadBalancing::LoadBalancer.new( | |
| scheme: 'internet-facing', | |
| listeners: [{ LoadBalancerPort: 80, Protocol: 'http', InstancePort: 80, InstanceProtocol: 'http' }], | |
| availability_zones: ['us-east-1a'] | |
| )) | |
| stack.add('AutoScalingGroup', Humidifier::AutoScaling::AutoScalingGroup.new( |
This file contains hidden or 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
| require ‘thor’ | |
| require ‘thor/hollaback’ | |
| module MyProgram | |
| class Error < StandardError | |
| end | |
| class CLI | |
| class_option :debug, desc: 'Sets up debug mode', aliases: ['-d'], type: :boolean | |
| class_around :safe_execute |
This file contains hidden or 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
| CHANGES=$(git --no-pager diff --name-only FETCH_HEAD $(git merge-base FETCH_HEAD master)) | |
| [ -n "$(grep '^rails' <<< "$CHANGES")" ] && testRails |
This file contains hidden or 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
| script: | |
| - bundle exec rake | |
| - bundle exec rubocop |
This file contains hidden or 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
| # Ensure we have loaded the adapter | |
| require 'odbc_adapter' | |
| # Individual ActiveRecord (and ODBC) adapters get required when they are referenced, | |
| # so we need to explicitly require the PostgreSQL adapter here so we can subclass it | |
| require 'odbc_adapter/adapters/postgresql_odbc_adapter' | |
| # Register a dynamically-defined adapter that will subclass the PostgreSQL adapter, | |
| # and tell ODBCAdapter to use it when the connected-to DBMS reports back a name | |
| # matching the given pattern (in this case vertica). |
This file contains hidden or 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
| #!/usr/bin/env ruby | |
| require 'bundler/inline' | |
| gemfile do | |
| source 'https://rubygems.org' | |
| gem 'cogito', '0.2.0' | |
| gem 'aws-sdk', '~> 2.9' | |
| gem 'rubyzip', '>= 1.0.0' | |
| end |
This file contains hidden or 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
| require 'active_record/connection_adapters/odbc_adapter' | |
| require 'odbc_adapter/adapters/postgresql_odbc_adapter' | |
| ODBCAdapter.register(/snowflake/, ODBCAdapter::Adapters::PostgreSQLODBCAdapter) do | |
| # Explicitly turning off prepared statements as they are not yet working with | |
| # snowflake + the ODBC ActiveRecord adapter | |
| def prepared_statements | |
| false | |
| end |
This file contains hidden or 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
| run: odbc | |
| ./odbc $(DSN) | |
| odbc: | |
| gcc -lodbc odbc.c -o odbc |
This file contains hidden or 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
| #!/usr/bin/env ruby | |
| require 'bundler/inline' | |
| gemfile(true) do | |
| source 'https://rubygems.org' | |
| gem 'activerecord', '5.0.3' | |
| gem 'odbc_adapter', '5.0.3' | |
| end | |
| require 'active_record' |
OlderNewer