I hereby claim:
- I am netbe on github.
- I am netbe (https://keybase.io/netbe) on keybase.
- I have a public key ASAg0Au1AyuVXsr2PDi8BAQHnUyDwLGnmoiyEU0QSAmx2go
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
Verifying that +fbenaiteau is my blockchain ID. https://onename.com/fbenaiteau |
before_script: bundle exec rake prepare_new_article_tweet |
require 'net/http' | |
desc "Tweet the newly published article" | |
task :tweet do | |
if File.exists?(TWEET_FILE) | |
message = File.read(TWEET_FILE) | |
puts "Tweeting #{message}" | |
`bundle exec t update "#{message}" -P .trc` | |
end | |
end |
TWEET_FILE="new-article.txt" | |
desc "Check if we have a new article and create the message" | |
task :prepare_new_article_tweet do | |
title, article_url = last_article | |
# Check if article already published | |
uri = URI(article_url) | |
res = Net::HTTP.get_response(uri) | |
if res.is_a?(Net::HTTPNotFound) | |
puts "If successful deployment, we should tweet" |
after_success: | |
- bundle exec rake tweet_last_article |
mv ~/.trc . | |
travis encrypt-file .trc --add | |
git add .trc.enc | |
mv .trc ~/.trc |
import Foundation | |
import UIKit | |
func isRunningTests() -> Bool { | |
let environment = NSProcessInfo.processInfo().environment | |
if let injectBundle = environment["XCInjectBundle"] as? NSString { | |
return injectBundle.pathExtension == "xctest" | |
} | |
return false |
// AppDelegate.swift | |
import UIKit | |
func isRunningTests() -> Bool { | |
let environment = NSProcessInfo.processInfo().environment | |
if let injectBundle = environment["XCInjectBundle"] as? NSString { | |
return injectBundle.pathExtension == "xctest" | |
} | |
return false |
// AppDelegate.m | |
@implementation AppDelegate | |
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
{ | |
if (isRunningTests()) return YES; | |
// ... | |
return YES; | |
} |