This file contains 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
# Proposal for a Simulated::Transactions API, "A Simulated Transaction Log and Rollback API" | |
# The example shows how this common API could be used for Mongo DB and Mongoid, both transactionless persistence stores? | |
# This API could be used in testing frameworks such as rspec, test-unit, cucumber and the like | |
# in order to ensure running a test doesn't have side effects, even in the context of a transactionless persistence store | |
class DocA | |
include MongoMapper::Document | |
# include specific Simulated::Transactions model |
This file contains 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
---- | |
# To make it possible to switch Model between persistence solutions, fx from Active Record to Mongoid and back | |
MODEL: | |
Person: &Person | |
_inherits: Being # polymorphic or mongoid | |
name: string(index:required) # index | |
age: integer(numeric) # short = num | |
_associations: | |
one_belonging: *User | |
many_belonging: *Post |
This file contains 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
Obsolete projects: | |
Cucumber-rails3-patched, Rspec-rails3-gen, Rails3-generator-gem-generator (use Gskelgen instead!), Trace-util-adv, Txt-file-mutator | |
Hobo-dryml-logging, Hobo-dryml-uncovered, trace-hobo, advanced-trace-util, Hobo DRYML extensions | |
Gems that work: Thor, Paperclip, Thortask_generator, Require-magic, Cucumber-rails, Rspec-rails, Formtastic | |
Gems that mostly work: | |
Translate routes - not sure how to fix the Routes segments stuff! | |
Gems to be tested: Rails, GSkelgen |
This file contains 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 thor tasks as thor-wrapper to build set of development scripts! | |
Use octopi API to access github! | |
This file contains 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
TODO for May 2010 | |
=================== | |
Require-me | |
---------- | |
Works now, but needs a cleanup and refactoring of the code into more files and modules etc. | |
Remove redundancy! Do it using existing test-suite! | |
Ruby code Query and Manipulation Language (RQML) | |
---------- |
This file contains 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
Ruby Rails stack | |
---------------- | |
Use cases | |
--------- | |
Authentication and Authorization | |
- Devise (User only) | |
- Cancan (roles and permissions) |
This file contains 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
# Rails thor Gemfile action helpers | |
# Cleans up a Gemfile by inserting missing newlines between gem statements | |
# Fixes old 'bug', where gem statements would be inserted into Gemfile without newlines | |
# ==== Examples | |
# | |
# cleanup_gemfile | |
def cleanup_gemfile | |
# add newline between each gem statement in Gemfile | |
gsub_file 'Gemfile', /('|")gem/, "\1\ngem" |
This file contains 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
From https://mongohq.com/pricing | |
Free MongoDB hosting | |
"museo-sans-1","museo-sans-2",Tahoma,Arial,sans-serif; |
This file contains 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
CSS rules on Nokogiri nodes | |
module Nokogiri | |
module XML | |
module NodeCssExt | |
attr_accessor :rules | |
attr_accessor :styles | |
# merge rules by specificity | |
def merge_rules! |
This file contains 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
Ruby Query and Manipulation Language | |
--- | |
Finally the DSL is getting pretty stable. Latest ideas in the TODO of ruby_traverser ;) | |