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 'elasticsearch' | |
require 'time' # To get Time#iso8601. | |
#### Testing in development ### | |
# | |
# Install & configure: | |
# | |
# $ brew install elasticsearch logstash kibana |
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
@freezeTime('2015-10-10T10:00:00Z') | |
it('shows a list of the sessions that were passed in', function() { | |
// The test with frozen time. | |
} |
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
[31/07/2015 11:47:03] James C Russell: BTW "I knew this would be slow if it worked, but it ended up running the child processes async meaning the seeds would not finish before it tried to run the test. After a few hours of messing around I dropped this approach, instead aiming to focus on compartmentalizing the users so their actions would have no affect on each other." | |
[31/07/2015 11:47:11] James C Russell: https://philsturgeon.uk/api/2015/01/28/dredd-api-testing-documentation/ | |
[31/07/2015 11:47:16] James C Russell: Je to tak s tim async? | |
[31/07/2015 11:47:43] James C Russell: "For example, you can only have one request for each “URL” + “HTTP Method” combination. This has been a pain in the past when I have wanted to document multiple POST /oauth/tokens requests showing the various inputs and outputs for different OAuth grant types, but API Blueprint wouldn’t let me." | |
[31/07/2015 12:01:40] James C Russell: Chapu dobre ze nemuzu mit vice responses? Nejsem si presne jistej co tim mysli. |
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
s |
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
info: Beginning Dredd testing... | |
Spawning `ruby` hooks handler | |
Hook hadnler stdout: spec/hooks/app.rb | |
Hook handler stderr: /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- spec/hooks/app.rb (LoadError) | |
from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require' | |
from /Library/Ruby/Gems/2.0.0/gems/dredd_hooks-0.0.1/lib/dredd_hooks/file_loader.rb:14:in `block in load' | |
from /Library/Ruby/Gems/2.0.0/gems/dredd_hooks-0.0.1/lib/dredd_hooks/file_loader.rb:12:in `each' | |
from /Library/Ruby/Gems/2.0.0/gems/dredd_hooks-0.0.1/lib/dredd_hooks/file_loader.rb:12:in `load' | |
from /Library/Ruby/Gems/2.0.0/gems/dredd_hooks-0.0.1/bin/dredd-hooks-ruby:10:in `<top (required)>' |
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
'use strict'; | |
import {Link} from 'react-router'; | |
import React from 'react/addons'; | |
// <Link to="post" params={{slug: post.slug}} /> | |
export default class LinkToUnlessCurrent extends React.Component { | |
render() { | |
this.element = ( | |
<Link to={this.props.to} params={this.props.params}> |
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
'use strict'; | |
var mountFolder = function (connect, dir) { | |
return connect.static(require('path').resolve(dir)); | |
}; | |
var webpackDistConfig = require('./webpack.dist.config.js'), | |
webpackDevConfig = require('./webpack.config.js'); | |
module.exports = function (grunt) { |
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 | |
# This doesn't click 'More', so it's not the same as | |
# using the Meetup API, but fuck that, it's simple and | |
# works just fine. | |
require 'open-uri' | |
require 'nokogiri' | |
require 'pry' | |
URLS = { |
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 'terminal.com/api' | |
require 'date' | |
# Usage: ./qa.rb [production Terminal container_key] [how many Terminals to spin up] [Git ref] | |
def usage | |
abort("Usage: #{$0} [container_key] [x] [y]") | |
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
#!/usr/bin/env ruby | |
require 'terminal.com' | |
require 'date' | |
# Usage: ./billable-hours.rb 2015/9/1 | |
invoice_from = Date.parse(ARGV.shift).to_time | |
# response = Terminal.terminal_usage_history("user_token", "access_token") | |
response = JSON.parse(DATA.read) |