Skip to content

Instantly share code, notes, and snippets.

<% if !@band_install.last_scraped and
@is_owner and
@artist.concerts.empty? and
@band_install.created_at > Time.now - 5.minutes %>
<center>
Checking your MySpace profile for tour dates...
Check back in a few minutes.
</center>
<% elsif @artist.concerts.empty? and @is_owner %>
<center>
using GLib;
using Gee;
namespace Gtk.Mate {
public class Marker : Object {
}
public class Scanner : Object, Iterable<Marker> {
public class Iterator<Marker> : Object, Gee.Iterator<Marker> {
// Vala string utility functions
// Started: 30 Aug 08
using GLib;
public class StringHelper {
// Replace all occurences of match_string with replacement_string inside start_string.
// Uses GLib.Regex.replace_literal internally. Returns the empty string if there was
// a RegexError.
public static string gsub(string start_string, string match_string, string replacement_string) {
require 'gtk2'
require 'gtksourceview2'
sv = Gtk::SourceView.new
win = Gtk::Window.new
win.set_size_request(800, 600)
win.add(sv)
sv.modify_base(Gtk::StateType::NORMAL, Gdk::Color.parse("#00FF00")); # doesn't work here
win.show_all
# put this into ~/.irbrc
require 'irb/completion'
ARGV.concat [ "--readline", "--prompt-mode", "simple" ]
IRB.conf[:EVAL_HISTORY] = 1000
IRB.conf[:SAVE_HISTORY] = 1000
IRB.conf[:HISTORY_FILE] = File::expand_path("~/.irbhistory")
# if you get readline missing errors you will need to install readline for your OS, then
# recompile Ruby with readline enabled in the ruby_src/ext/Setup file.
module Cucumber
module Formatters
class FailedFilesFormatter < ProgressFormatter
def initialize(step, _1, _2)
@bad_files = []
puts "Recording fails in bad_features"
@bad_files_io = File.open("bad_features", "w")
super(step)
end
def make_event_button(window, x, y, button, type)
case type
when :press
event_button = Gdk::EventButton.new(Gdk::Event::BUTTON_PRESS)
when :release
event_button = Gdk::EventButton.new(Gdk::Event::BUTTON_RELEASE)
end
event_button.x = x
event_button.y = y
# make dialog respond
dialog.response(dialog.get_response(button))
# run events forward til non left
Gtk.main_iteration while Gtk.events_pending?
# check non are left
p Gtk.events_pending?
#=> false (good)
Scenario: Prompt for save new tab and click Save As shows dialog
When I press "Ctrl+T"
And I type "new tab"
And I press "Ctrl+W"
And I click the button "Save As" in the dialog "unsaved changes"
And I set the "Save As" dialog's filename to "plugins/edit_tab/features/fixtures/new_file.rb"
And I click the button "Save" in the dialog "Save As"
Then there should be no dialog called "Save As"
And the file "plugins/edit_tab/features/fixtures/new_file.rb" should contain "new tab"
$ REDCAR_DEBUG=1 ./bin/redcar ../gutkumber/ --log
exporting dbus service: default
loaded bundle preferences in 0.00666s
built bundle menus in 0.092249s
starting Gui.main (in thread #<Thread:0xb6955298>)
redcar_start: 1.090248 seconds
[App] new window
[Keymap] received key: "Delete"
[Keymap] clean key: "Delete"
[Keymap] 2 candidate commands