Skip to content

Instantly share code, notes, and snippets.

Dominic Cleal domcleal

View GitHub Profile
View parameters_each.rb
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"
View format_reset.rb
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"
View -
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 Apr 15, 2016 — forked from adamcooke/cloudapp-export.rb
Export all your drops from CloudApp using this quick Ruby script
View cloudapp-export.rb
#!/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
#
View test.rb
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
View clone_master.rb
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'
View reproducer.rb
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'
View -
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
View -
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
View -
5c5
< "seconds": 379,
---
> "seconds": 93,
8c8
< "uptime": "0:06 hours"
---
> "uptime": "0:01 hours"
12a13
> "puppetversion": "4.2.3",
You can’t perform that action at this time.