Skip to content

Instantly share code, notes, and snippets.

begin
require "bundler/inline"
rescue LoadError => e
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
raise e
end
gemfile(true) do
source "https://rubygems.org"
gem "rails", github: "rails/rails"
begin
require "bundler/inline"
rescue LoadError => e
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
raise e
end
gemfile(true) do
source "https://rubygems.org"
gem "rails", github: "rails/rails"
require 'spec_helper'
describe 'gluster::client', :type => :class do
on_supported_os.each do |os, facts|
context "on #{os}" do
let(:facts) do
facts
end
context "with all defaults"
it { should compile.with_all_deps }
@domcleal
domcleal / cloudapp-export.rb
Last active April 15, 2016 06:59 — forked from adamcooke/cloudapp-export.rb
Export all your drops from CloudApp using this quick Ruby script
#!/usr/bin/env ruby
# A quick script to download all your files from CloudApp.
# To run this just run the script passing your e-mail & password
# to the script, for example:
#
# gem install cloudapp_api
# ruby cloudapp-export.rb adam@atechmedia.com mypassword
#
require 'minitest/autorun'
require 'minitest/spec'
describe "#parse(builder)" do
describe "without documentation" do
specify { false.must_equal true } # won't be run
end
specify { true.must_equal true } # always runs
end
begin
require 'bundler/inline'
rescue LoadError => e
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler'
raise e
end
gemfile(true) do
source 'https://rubygems.org'
gem 'rails', github: 'rails/rails'
begin
require 'bundler/inline'
rescue LoadError => e
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler'
raise e
end
gemfile(true) do
source 'https://rubygems.org'
gem 'rails', github: 'rails/rails'
@domcleal
domcleal / -
Created November 24, 2015 08:34
diff --git a/spec/rubocop/cop/style/stabby_lambda_parentheses_spec.rb b/spec/rubocop/cop/style/stabby_lambda_parentheses_spec.rb
index 89657ed..afa928c 100644
--- a/spec/rubocop/cop/style/stabby_lambda_parentheses_spec.rb
+++ b/spec/rubocop/cop/style/stabby_lambda_parentheses_spec.rb
@@ -28,6 +28,11 @@ describe RuboCop::Cop::Style::StabbyLambdaParentheses, :config do
inspect_source(cop, '-> { true }')
expect(cop.offenses).to be_empty
end
+
+ it 'does not check a method call named lambda' do
@domcleal
domcleal / -
Created November 18, 2015 08:24
diff --git a/app/controllers/api/v2/hosts_controller.rb b/app/controllers/api/v2/hosts_controller.rb
index 9e69f29..c2443f8 100644
--- a/app/controllers/api/v2/hosts_controller.rb
+++ b/app/controllers/api/v2/hosts_controller.rb
@@ -87,7 +87,10 @@ module Api
merge_interfaces(@host)
forward_request_url
- process_response @host.save
+ r = @host.save
@domcleal
domcleal / -
Created November 9, 2015 10:05
5c5
< "seconds": 379,
---
> "seconds": 93,
8c8
< "uptime": "0:06 hours"
---
> "uptime": "0:01 hours"
12a13
> "puppetversion": "4.2.3",