Skip to content

Instantly share code, notes, and snippets.

View scytacki's full-sized avatar

Scott Cytacki scytacki

  • Concord Consortium
  • Medford, MA
View GitHub Profile
require "rubygems"
require "selenium/client"
# browser = Selenium::Client::Driver.new(
# :host => 'localhost',
# :port => 4444,
# :browser => '*safari',
# :url => "http://testswarm.dev.concord.org",
# :timeout_in_seconds => 90)
@scytacki
scytacki / remote.rb
Created March 1, 2011 19:53
put this in features/support to enable remote running of cucumber selenium tests
# HOST_OF_SELENIUM_BROWSER_SERVER=10.0.2.2
# HOST_OF_APP_BEING_TESTED=33.33.33.10
if ENV['HOST_OF_SELENIUM_BROWSER_SERVER'] and ENV['HOST_OF_APP_BEING_TESTED']
# if capybara supported this type of approach: http://selenium-client-factory.infradna.com/
# this code could be removed
require 'selenium-webdriver'
profile = Selenium::WebDriver::Firefox::Profile.new
profile["network.http.use-cache"] = false
@scytacki
scytacki / gist:911380
Created April 9, 2011 12:59
Log of cucumber run against IE (not sure yet which version)
bundle exec cucumber features
Using the default profile...
Executing rake task or running in test/cucumber env: skipping Admin::Project.create_or_update_default_project_from_settings_yml
Overriding ActionMailer config and setting test mode
Started observers
..
......................................................................F------......F-------------......................F---------......................F------.................................F..................................F-..................................................................................................................................................---.....----.....---...................----..................---.----...........................................................................................................................................................................Recording for Spreadsheet::Workbook : first investigation exists. delete /vagrant/features/recorded_objects/spreadsheet__workbookfirst_investigation.
[deploy@otto current]$ RAILS_ENV=production rake app:import:re_import_ccp_itsi_units_to_itsi_su
(in /web/itsisu.dev.concord.org/releases/20110503064710)
Executing rake task or running in test/cucumber env: skipping Admin::Project.create_or_update_default_project_from_settings_yml
Started observers
importing 80 ITSISU Units ...
creating: HS Physics: Magnetic Fields:
which: no ifconfig in (/web/itsisu.dev.concord.org/shared/bundle/ruby/1.8/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/deploy/bin)
made Blank Activity (2) (3524)
processing introduction main_content
processing introduction text_response
@scytacki
scytacki / gist:953301
Created May 3, 2011 13:10
ITSI: 1192 - Temperature of Mixing Water import
made Blank Activity (2) (3652)
processing introduction main_content
processing introduction text_response
process_text_response: introduction
Importer: no such method process_text_response
processing introduction text_response
skipping introduction text_response -- diy_attribute is false
processing introduction drawing_response
processing standards main_content
processing career_stem main_content
- ot_sensor_data_proxy = capture_haml do
- probe_type = data_collector.probe_type
%OTSensorDataProxy{ :local_id => ot_local_id_for(data_collector, :data_proxy) }
%request
%OTExperimentRequest{ :period => probe_type.period.to_s }
%sensorRequests
%OTSensorRequest{ :stepSize => probe_type.step_size.to_s,
:type => probe_type.ptype.to_s,
:unit => probe_type.unit,
:port => probe_type.port.to_s,
@scytacki
scytacki / gist:1103474
Created July 25, 2011 02:57
diff all-otrunk-snapshot-0.1.0-20110616.184752.f.jnlp all-otrunk-snapshot-0.1.0-20110719.152024.f.jnlp
2c2
< <jnlp spec="1.0+" codebase="http://jnlp.concord.org/dev3" href="http://jnlp.concord.org/dev3/org/concord/maven-jnlp/all-otrunk-snapshot/all-otrunk-snapshot-0.1.0-20110616.184752.jnlp">
---
> <jnlp spec="1.0+" codebase="http://jnlp.concord.org/dev3" href="http://jnlp.concord.org/dev3/org/concord/maven-jnlp/all-otrunk-snapshot/all-otrunk-snapshot-0.1.0-20110719.152024.jnlp">
57,58c57,58
< <jar href="org/concord/datagraph/datagraph.jar" version="0.2.0-20110616.183756-457"/>
< <jar href="org/concord/data/data.jar" version="0.2.0-20110616.183540-342"/>
---
> <jar href="org/concord/datagraph/datagraph.jar" version="0.2.0-20110719.032615-458"/>
> <jar href="org/concord/data/data.jar" version="0.2.0-20110719.032329-343"/>
<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0+" codebase="http://jnlp.concord.org/dev3" href="http://jnlp.concord.org/dev3/org/concord/maven-jnlp/all-otrunk-snapshot/all-otrunk-snapshot-0.1.0-20110719.152024.jnlp">
<information>
<title>All OTrunk snapshot</title>
<vendor>Concord Consortium</vendor>
<homepage href="index.html"/>
<description>Preview Basic Pas</description>
<offline-allowed/>
</information>
<security>
@scytacki
scytacki / stack trace
Created August 9, 2011 14:33
Stack Trace of error in Wise 4.3
Aug 9, 2011 7:25:50 AM org.hibernate.util.JDBCExceptionReporter logExceptions
SEVERE: Data truncation: Data too long for column 'data' at row 1
org.hibernate.exception.DataException: could not insert: [vle.domain.work.StepWork]
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:77)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:40)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2163)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2643)
at org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:51)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)
@scytacki
scytacki / photosynthesis-rules.js
Created August 31, 2011 15:39
Custom rules for photosynthesis
/*globals MySystem rules nodes suggestions*/
// sun is connected to chloroplast and/or sun is connected to plant then chloroplast
if(!(rules.objectAt(0).check(nodes) ||
(rules.objectAt(2).check(nodes) &&
rules.objectAt(3).check(nodes) &&
rules.objectAt(4).check(nodes)))){
suggestions.pushObject(rules.objectAt(0).get('suggestion'));
}