Skip to content

Instantly share code, notes, and snippets.

View kristianmandrup's full-sized avatar

Kristian Mandrup kristianmandrup

  • Freelancer
  • Copenhagen
View GitHub Profile
function install_mpfr {
lib_name=$1
if [ ! -d $lib_name ]
then
if [ ! -f $lib_name.tar.bz2 ]; then
curl -O http://www.mpfr.org/mpfr-current/$lib_name.tar.bz2
fi
tar xjf $lib_name.tar.bz2
cd $lib_name
./configure
DRAFT
-----
The idea is to find the fingerprint over every type of 'application' and sign the app with a signature, using configurable application matchers.
An application can have multiple application signatures.
Fx a client-server app My-Blog could consist of
- client app = Sproutcore
- server app = Rails app
The My-Blog app would then contain both a Sproutcore and Rails signature file
Example - Upgrade an old Rails 2 app to Rails 3 app.
---
Copy existing project (just in case!)
Use Rails template approach combined with Rails generators and a special Code refactoring library with Code refactoring operations.
- define different types of artifacts
- rails ruby file (*.rb)
- model file (app/models/**/*.rb)
- view file (app/views/**/*.rb)
- environment (config/environment.rb)
# So far using patches/suggestions by tmilker
# IMPORTANT: This file is generated by cucumber-rails - edit at your own peril.
# It is recommended to regenerate this file in the future when you upgrade to a
# newer version of cucumber-rails. Consider adding your own code to a new file
# instead of editing this one. Cucumber will automatically load all features/**/*.rb
# files.
ENV["RAILS_ENV"] ||= 'test'
Capybara is very framework agnostic, it's all built on pure Rack. Check out this file, which contains all the rails specific code in Capybara:
http://github.com/jnicklas/capybara/blob/master/lib/capybara/rails.rb
As you can see, it's not a lot. Some changes would be necessary to that file for Rails 3 support, I think, since the Rack app for Rails has changed.
/jonasn
--
require 'capybara/rails'
require 'capybara/cucumber'
require 'capybara/session'
require 'cucumber/rails/capybara_javascript_emulation' # Lets you click links with onclick javascript handlers without using @culerity or @javascript
# Capybara defaults to XPath selectors rather than Webrat's default of CSS3. In
# order to ease the transition to Capybara we set the default here. If you'd
# prefer to use XPath just remove this line and adjust any selectors in your
# steps to use the XPath syntax.
Capybara.default_selector = :css
Create Rails 3 app
------------------------------
$ rails cucumber-rails3-demo
$ cd cucumber-rails3-demo
------------------------------
Use Rspec as testing framework
------------------------------
$ mate config/application.rb
Use cases:
- See all rails applications
- See all ruby applications
- See all Gems apps
- See all My rails 2 apps
- See all rails apps forked from github
- See all developer screencasts
- See all ruby screencasts
- See all rails 3 screencasts
- See all binaries
---
TEMPLATES:
apps: &app-origins
- foreign $DIR # apps created by others
-
mine: &maturity
- github_forked $DIR # forked rails apps from github
maturity:
YAML structure for a complete Application developement structure for a select set of languages and frameworks.
Can be easily be extended to support more languages and frameworks using the same patterns!
---
TEMPLATES:
frameworks-root: &frameworks-root
_tags:
category: &frameworks-root-categories
- games