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
public class MyStringRequest extends StringRequest{ | |
public MyStringRequest(int method, String url, Response.Listener<String> listener, Response.ErrorListener errorListener) { | |
super(method, url, listener, errorListener); | |
} | |
@Override | |
public void deliverError(VolleyError error) { | |
if (error instanceof NoConnectionError) { | |
Cache.Entry entry = this.getCacheEntry(); | |
if(entry != null) { |
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
# LABEL was passed from an upstream job. It will be in 0, 1 or 2. | |
find ./spec -name "*_spec.rb" | awk "NR % 3 == ${LABEL} {print}" | xargs rspec |
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
# Gemfile | |
group :test do | |
gem "webmock" | |
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
echo "cookbook 'ssh_known_hosts', github: 'opscode-cookbooks/ssh_known_hosts'" >> Berksfile | |
berks install | |
berks upload | |
knife data bag create ssh_known_hosts | |
knife data bag from file ssh_known_hosts data_bags/ssh_known_hosts/github.json | |
knife data bag from file ssh_known_hosts data_bags/ssh_known_hosts/heroku.json | |
knife role from file roles/jenkins-slave.rb |
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
# spec/spec_helper.rb | |
RSpec.configure do |config| | |
config.before(:each) do | |
if Capybara.current_driver == :poltergeist | |
page.driver.headers = { 'Accept-Language' => "en" } | |
end | |
end | |
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
openssl rand -base64 512 > .chef/encrypted_data_bag_secret | |
echo 'encrypted_data_bag_secret "#{current_dir}/encrypted_data_bag_secret"' >> .chef/knife.rb | |
# knife bootstrap myhost -x user -N node-name -r 'role[somerole]' --sudo |
NewerOlder