Skip to content

Instantly share code, notes, and snippets.

View pschyska's full-sized avatar
🤔
Aber das geht doch besser‽

Paul Schyska pschyska

🤔
Aber das geht doch besser‽
View GitHub Profile
def self.options_for(column,query)
case column
when 'mailing_list_address'
r=find(query)
(do stuff with r and return array)
else
[]
end
end
if (typeof console == 'undefined') {
console={}
console.info=function () {
}
console.log=console.info;
console.debug=console.info;
console.warn=console.info;
console.error=console.info;
console.assert=console.info;
console.clear=console.info;
class Netzke::Modules::Core::People < Netzke::ThemisGrid
def config
super.merge({
:title=>'Personen',
:model=>'Netzke::ModelExtensions::CorePerson',
:scope=>{:person_type=>'natürlich'},
:context_menu => nil,
:tbar=>[:search.ext_action],
:columns=>[:name,:first_name,:roles],
})
activesupport (3.0.0) lib/active_support/whiny_nil.rb:48:in `method_missing'
actionpack (3.0.0) lib/action_controller/caching/sweeping.rb:82:in `callback'
actionpack (3.0.0) lib/action_controller/caching/sweeping.rb:64:in `after'
activesupport (3.0.0) lib/active_support/callbacks.rb:331:in `around'
activesupport (3.0.0) lib/active_support/callbacks.rb:314:in `_callback_around_1521'
activesupport (3.0.0) lib/active_support/callbacks.rb:219:in `_conditional_callback_around_2432'
activesupport (3.0.0) lib/active_support/callbacks.rb:440:in `_run__536258684__process_action__878122263__callbacks'
activesupport (3.0.0) lib/active_support/callbacks.rb:409:in `_run_process_action_callbacks'
activesupport (3.0.0) lib/active_support/callbacks.rb:93:in `run_callbacks'
actionpack (3.0.0) lib/abstract_controller/callbacks.rb:17:in `process_action'
action :fax,
{
:text =>'Fax',
:icon =>:page_white_text,
:disabled =>true
}
When /^(?:|I )should really see "([^"]*)"(?: within "([^"]*)")?$/ do |text, scope|
page.wait_until{ page.evaluate_script("!Ext.Ajax.isLoading()") }
found=page.driver.browser.execute_script <<-JS
var found=false;
Ext.ComponentMgr.all.each(function(cp) {
if(cp.el) {
if(cp.el.getAttribute('textContent').indexOf('#{text}')!= -1) {
if(cp.el.isVisible()) {
found=true;
} else {
module WaitHelper
def wait
page.wait_until(5.seconds){ page.evaluate_script("!Netzke.isLoading()") }
page.wait_until(5.seconds){ page.evaluate_script("!Ext.Ajax.isLoading()") }
end
end
World(WaitHelper)
module TextClicker
def click_on_text text
guard 'shell' do
watch('^coffee/public/(.*)') {|m|
`mkdir -p public/`
filename=m[0].split('coffee/public/')[1]
unless filename.split('.').pop=='coffee'
tmp=filename.split('/')
tmp.pop
target_dir=tmp.join('/')
unless target_dir.empty?
puts "mkdir -p #{'public/' + target_dir}"
$ rspec spec/
No examples were matched by {:focus=>true}, running all
creating Makefile
fsevent_watch compiled
F....
Failures:
1) FSEvent should work when a lot of fs events are fired
Failure/Error: @results.count.should == 10000
expected: 10000,
Application.stores.users = new Ext.data.JsonStore
url: "/users"
restful: true
idProperty: '_id'
root: 'results'
totalProperty: 'total'
fields: [
{name: 'first_name', type: 'string', allowBlank: false}
{name: 'last_name', type: 'string', allowBlank: false}
{name: 'email', type: 'string', allowBlank: false}