Closed erw7 closed 9 years ago
Thanks! I decided that it might be better to just ask Ruby to handle this for us, so I committed 4862bb4 in place of this fix. Let me know if you have any problems with my fix. :)
Thanks. Your code is more elegant than me code and work fine.
rinari-sql fails with (wrong-type-argument sequencep 5432), if defined port in database.yml. We need number-to-string.
--- a/rinari.el
+++ b/rinari.el
@@ -425,7 +425,7 @@ Looks up login information from your conf/database.sql file."
(when (string-match-p "sqlite" adapter)
;; Always expand sqlite DB filename relative to RAILS_ROOT
(setq sql-database (expand-file-name sql-database (rinari-root))))
- (set (make-local-variable 'sql-server) (if port (concat server ":" port) server))
+ (set (make-local-variable 'sql-server) (if port (concat server ":" (number-to-string port)) server))
(funcall
(intern (concat "sql-"
(cond
Done - thanks.
Corresponding to the parsing of the reference with the anchor/aliases rails 4.2 to generate the next database.yml
Fixed a bug that parsing is terminate by a comment line or empty line
rinari-parse-yaml return (("database" . "depot_development")), but (("database" . "depot_development") ("username" . "root")) is correct.
Fixed a bug that include comment and trailing spaces on the value
rinari-parse-yaml return (("database" . "depot_development # comment") ("username" . "root ")), but (("database" . "depot_development") ("username" . "root")) is correct.