public
Description: Tomtt's version of the minor mode for editing RubyOnRails code in Emacs
Homepage: http://rubyforge.org/projects/emacs-rails/
Clone URL: git://github.com/tomtt/emacs-rails.git
Adding some functionality to rails-lib, experimenting with elisp BDD 
framework, first test driven bug fix

I felt that tests were missing from the emacs rails package so I have
been experimenting a bit. There is now a behave-rails.el file which
contains contexts that can be used by Technomancy's behave BDD
framework. Although behave is old and no longer maintained it has some
nice features. I may go for a different framework in the end. To use
behave you can get it from git://github.com/tomtt/elisp_behave.git or
alternatively clone my entire emacslisp dir from
git://github.com/tomtt/tomtt_emacslisp.git.

The most interesting other framework out there seems to be 
el-expectations:
http://www.emacswiki.org/cgi-bin/wiki/EmacsLispExpectations
Tom ten Thij (author)
Tue May 13 23:08:47 -0700 2008
commit  91593a653d643e9492e791894dd44b4bf3735596
tree    87524b2b5321429ac6babf2b281643a08c666628
parent  16ae768634ee9371e9a2333d7e61f04cc1c241f3
...
109
110
111
112
 
113
114
115
...
346
347
348
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
349
350
351
...
109
110
111
 
112
113
114
115
...
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
0
@@ -109,7 +109,7 @@ If EXPR is not nil exeutes BODY.
0
      (replace-regexp-in-string
0
       "\\([A-Z]+\\)\\([A-Z][a-z]\\)" "\\1_\\2"
0
       (replace-regexp-in-string
0
- "\\([a-z\\d]\\)\\([A-Z]\\)" "\\1_\\2"
0
+ "\\([a-z0-9]\\)\\([A-Z]\\)" "\\1_\\2"
0
        string)))))
0
 
0
 (defun string-not-empty (str) ;(+)
0
@@ -346,6 +346,21 @@ as the value of the symbol, and the hook as the function definition."
0
          history ; hist
0
          (car history-value))))) ;def
0
 
0
+;; railsy-replace
0
+(defun camelized-p (string)
0
+ "Return nil unless string is in camelized format (first character is capital, there is at least on lower capital and all characters are letters of numbers"
0
+ (let ((case-fold-search nil))
0
+ (string-match "^[A-Z][A-Za-z0-9]*[a-z]+[A-Za-z0-9]*$" string)))
0
+
0
+(defun underscored-p (string)
0
+ "Return nil unless string is in underscored format (containing only lower case characters, numbers or underscores)"
0
+ (let ((case-fold-search nil))
0
+ (string-match "^[a-z][a-z0-9_]*$" string)))
0
+
0
+(defun replace-rails-variable ()
0
+ (interactive)
0
+)
0
+
0
 ;; MMM
0
 
0
 ;; (defvar mmm-indent-sandbox-finish-position nil)

Comments

    No one has commented yet.