Skip to content

Commit beec6fa

Browse files
committed
ELPA integration
- updated headers - added Rake tast to export to ELPA - submitting updated versions of rinari and ruby-compilation to ELPA
1 parent b036e2f commit beec6fa

File tree

8 files changed

+104
-142
lines changed

8 files changed

+104
-142
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
*~
22
*.elc
3+
ELPA

Rakefile

+18
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,24 @@ MYDIR = File.dirname(__FILE__)
55
DOCDIR = "#{MYDIR}/doc"
66
TESTDIR = "#{MYDIR}/test"
77

8+
desc "extract and clean files for submission to ELPA"
9+
task :elpa do
10+
elpa_dir = File.join(MYDIR, "ELPA")
11+
FileUtils.rm_rf(elpa_dir) if File.exists?(elpa_dir)
12+
FileUtils.mkdir(elpa_dir)
13+
["rinari.el",
14+
File.join("util", "ruby-mode.el"),
15+
File.join("util", "inf-ruby.el"),
16+
File.join("util", "ruby-compilation.el")].each do |file|
17+
FileUtils.cp(file, elpa_dir)
18+
file = File.join(elpa_dir, File.basename(file))
19+
contents = File.read(file)
20+
File.open(file, 'w') do |f|
21+
f.write(contents.gsub(/;;;\#\#\#begin-elpa-ignore[\s\S]+;;;\#\#\#end-elpa-ignore[\r\n]/m, ''))
22+
end
23+
end
24+
end
25+
826
namespace "test" do
927

1028
desc "Run tests using `emacs-snapshot'"

TODO

+29-43
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# -*- mode: org -*-
2-
#
32
#+TITLE: TODO
43
#+SEQ_TODO: TODO WAITING | DONE CANCELLED MAYBE PARTIAL
54
#+DRAWERS: SNIP
65
#+CATEGORY: rinari
76

8-
List of pending/completed tasks for rinari
7+
List of tasks for rinari
98

9+
for documentation see [[http://rinari.rubyforge.org/]]
1010
for background see http://groups.google.com/group/emacs-on-rails
1111

1212
* TODO full test coverage (ERT) [0/2]
@@ -25,30 +25,7 @@ for background see http://groups.google.com/group/emacs-on-rails
2525

2626
switch from using elunit.el to ert.el for testing
2727

28-
* TODO create a screencast
29-
promotion!!
30-
31-
- [[http://www.emacswiki.org/cgi-bin/wiki/EmacsScreencasts]]
32-
33-
** script
34-
1) download rinari
35-
2) install rinari (with changes to .init file)
36-
1) this should probably be on a fresh emacs install which has had
37-
some of the required modes (yaml, javascript, etc...) put into
38-
place
39-
2) should this example be made using the emacs starter kit?
40-
3)
41-
42-
** tools
43-
- http://www.emacswiki.org/emacs/CommandLogMode
44-
- probably want to produce this on the mac
45-
46-
** where to post
47-
probably would be best either on github, or on rubyforge.
48-
49-
I don't think this is possible to do on rubyforge
50-
51-
* TODO Merb support [1/4]
28+
* TODO Merb support [2/4]
5229
:PROPERTIES:
5330
:suggested-by: Jorge Calás Lozano
5431
:END:
@@ -59,7 +36,7 @@ I think it's better to rely on config/init.rb that file should be on
5936
every merb project, merb.thor doesn't, in fact my "library" project
6037
doesn't have it.
6138

62-
** TODO pull into rinari-merb
39+
** DONE pull into rinari-merb
6340
rinari-merb (minami? why not just rinari-merb? what if someone create a
6441
rinari version for sinatra? sinasi?)
6542

@@ -87,7 +64,16 @@ In the current merb you don't don't have spec/controllers or spec/views
8764
(although you can, of course) but spec/requests is encourage. So
8865
app/controllers/assets.rb should map spec/requests/assets_spec.rb
8966

90-
* TODO add find-by context
67+
* DONE submit to ELPA
68+
get rinari (and all of it's dependencies) into [[http://tromey.com/elpa/][ELPA]] the Emacs Lisp
69+
Package Archive
70+
71+
* DONE create a screencast
72+
promotion!!
73+
74+
now up with the online documentation [[http://rinari.rubyforge.org/]]
75+
76+
* DONE add find-by context
9177
:PROPERTIES:
9278
:suggested-by: vylu
9379
:END:
@@ -108,7 +94,7 @@ Follow any of the following within two lines (up or down)
10894
- submit_tag
10995
- render
11096

111-
* TODO improvements to finders
97+
* DONE improvements to finders
11298
:PROPERTIES:
11399
:suggested-by: vylu
114100
:END:
@@ -175,7 +161,7 @@ Thanks for the suggestion -- Eric
175161
need to add =git submodule init; git submodule update= to clone the
176162
submodules as well
177163

178-
* PARTIAL windows support
164+
* MAYBE windows support
179165
:PROPERTIES:
180166
:tested-by: Darren Syzling
181167
:END:
@@ -223,18 +209,7 @@ comp-buffer-name) (let* ... ...)) comp-buffer-name)
223209
call-interactively(rinari-rake)
224210
#+END_EXAMPLE
225211

226-
* PARTIAL bundles
227-
** DONE rhtml (from original rinari)
228-
see
229-
- [[http://rinari.rubyforge.org/rhtml_002dMode.html#rhtml_002dMode]]
230-
- [[http://github.com/eschulte/rhtml/tree/master]]
231-
232-
** rdebug
233-
- [[http://bashdb.sourceforge.net/ruby-debug.html#SEC_Top]]
234-
** DONE snippets
235-
see http://github.com/eschulte/yasnippets-rails/tree/master
236-
237-
* MAYBE inf-ruby enhancement
212+
* MAYBE inf-ruby missing errors
238213

239214
found an example of an error that the
240215
`inferior-ruby-error-regexp-alist' in inf-ruby.el doesn't match
@@ -245,7 +220,7 @@ this was the error line
245220
SyntaxError: /home/eschulte/united/org/work/arf/arf/lib/cluster.rb:35: syntax error, unexpec
246221
:END:
247222

248-
* MAYBE ruby-compilation enhancement
223+
* MAYBE ruby-compilation missing errors
249224

250225
found a line which didn't match the error-regexp-alist
251226

@@ -544,6 +519,17 @@ easy enough
544519

545520

546521
LocalWords: elsif elseif keybinding
522+
523+
* CANCELLED bundles
524+
** DONE rhtml (from original rinari)
525+
see
526+
- [[http://rinari.rubyforge.org/rhtml_002dMode.html#rhtml_002dMode]]
527+
- [[http://github.com/eschulte/rhtml/tree/master]]
528+
529+
** rdebug
530+
- [[http://bashdb.sourceforge.net/ruby-debug.html#SEC_Top]]
531+
** DONE snippets
532+
see http://github.com/eschulte/yasnippets-rails/tree/master
547533
* CANCELLED adjust eshell/shell environment to highlight ruby errors
548534
not sure this is possible, at least not easily
549535

rinari.el

+19-16
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,11 @@
44

55
;; Authors: Phil Hagelberg, Eric Schulte
66
;; URL: http://rinari.rubyforge.org
7-
;; Version: 2.0
7+
;; Version: 2.1
88
;; Created: 2006-11-10
99
;; Keywords: ruby, rails, project, convenience, web
1010
;; EmacsWiki: Rinari
11-
;; Package-Requires: ((ruby-mode "1.0")
12-
;; (inf-ruby "2.0")
13-
;; (ruby-compilation "0.5")
14-
;; (jump "2.0"))
11+
;; Package-Requires: ((ruby-mode "1.1") (inf-ruby "2.1") (ruby-compilation "0.7") (jump "2.0"))
1512

1613
;; This file is NOT part of GNU Emacs.
1714

@@ -40,27 +37,32 @@
4037
;; aimed towards making Emacs into a top-notch Ruby and Rails
4138
;; development environment.
4239

43-
;; Copy the directory containing this file into your Emacs lisp
44-
;; directory, assumed here to be ~/.emacs.d. Add these lines of code
45-
;; to your .emacs file:
40+
;; Rinari can be installed through ELPA (see http://tromey.com/elpa/)
41+
42+
;; To install from source, copy the directory containing this file
43+
;; into your Emacs lisp directory, assumed here to be ~/.emacs.d. Add
44+
;; these lines of code to your .emacs file:
4645

47-
;; ;; ido
48-
;; (require 'ido)
49-
;; (ido-mode t)
5046
;; ;; rinari
5147
;; (add-to-list 'load-path "~/.emacs.d/rinari")
5248
;; (require 'rinari)
5349

54-
;; Note: if you cloned this from a git repo, you probably have to grab
55-
;; the submodules which can be done simply with the following commands
56-
;; from the root of the rinari directory
50+
;; Whether installed through ELPA or from source you probably want to
51+
;; add the following lines to your .emacs file:
52+
53+
;; ;; ido
54+
;; (require 'ido)
55+
;; (ido-mode t)
56+
57+
;; Note: if you cloned this from a git repo, you will have to grab the
58+
;; submodules which can be done by running the following commands from
59+
;; the root of the rinari directory
5760

5861
;; git submodule init
5962
;; git submodule update
6063

61-
;; See TODO file in this directory.
62-
6364
;;; Code:
65+
;;;###begin-elpa-ignore
6466
(let* ((this-dir (file-name-directory (or load-file-name buffer-file-name)))
6567
(util-dir (file-name-as-directory
6668
(expand-file-name "util" this-dir)))
@@ -69,6 +71,7 @@
6971
(add-to-list 'load-path this-dir)
7072
(add-to-list 'load-path util-dir)
7173
(add-to-list 'load-path jump-dir))
74+
;;;###end-elpa-ignore
7275
(require 'ruby-mode)
7376
(require 'inf-ruby)
7477
(require 'ruby-compilation)

util/inf-ruby.el

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
;; URL: http://www.emacswiki.org/cgi-bin/wiki/RubyMode
77
;; Created: 8 April 1998
88
;; Keywords: languages ruby
9-
;; Version: 2.0
10-
;; Package-Requires: (("ruby-mode"))
9+
;; Version: 2.1
10+
;; Package-Requires: ((ruby-mode "1.1"))
1111

1212
;;; Commentary:
1313
;;
@@ -186,7 +186,7 @@ run)."
186186
(run-ruby command impl)))
187187

188188
;;;###autoload
189-
(defun run-ruby (command &optional name)
189+
(defun run-ruby (&optional command name)
190190
"Run an inferior Ruby process, input and output via buffer *ruby*.
191191
If there is a process already running in `*ruby*', switch to that buffer.
192192
With argument, allows you to edit the command line (default is value

util/pcmpl-rake.el

-71
This file was deleted.

util/ruby-compilation.el

+27-3
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
;; Author: Eric Schulte
66
;; URL: http://www.emacswiki.org/cgi-bin/emacs/ruby-compilation.el
7-
;; Version: 0.5
7+
;; Version: 0.7
88
;; Created: 2008-08-23
99
;; Keywords: test convenience
10-
;; Package-Requires: (("ruby-mode") ("inf-ruby"))
10+
;; Package-Requires: ((ruby-mode "1.1") (inf-ruby "2.1"))
1111

1212
;;; License:
1313

@@ -49,7 +49,7 @@
4949
;;; Code:
5050

5151
(require 'ansi-color)
52-
(require 'pcmpl-rake)
52+
(require 'pcomplete)
5353
(require 'compile)
5454
(require 'inf-ruby)
5555
(require 'which-func)
@@ -75,6 +75,30 @@
7575
(defvar ruby-compilation-reuse-buffers t
7676
"Whether to re-use the same comint buffer for focussed tests.")
7777

78+
;;;###autoload
79+
(defun pcomplete/rake ()
80+
(pcomplete-here (pcmpl-rake-tasks)))
81+
82+
(defun pcmpl-rake-tasks ()
83+
"Return a list of all the rake tasks defined in the current
84+
projects. I know this is a hack to put all the logic in the
85+
exec-to-string command, but it works and seems fast"
86+
(delq nil (mapcar '(lambda(line)
87+
(if (string-match "rake \\([^ ]+\\)" line) (match-string 1 line)))
88+
(split-string (shell-command-to-string "rake -T") "[\n]"))))
89+
90+
;;;###autoload
91+
(defun pcomplete/cap ()
92+
(pcomplete-here (pcmpl-cap-tasks)))
93+
94+
(defun pcmpl-cap-tasks ()
95+
"Return a list of all the cap tasks defined in the current
96+
project. I know this is a hack to put all the logic in the
97+
exec-to-string command, but it works and seems fast"
98+
(delq nil (mapcar '(lambda(line)
99+
(if (string-match "cap \\([^ ]+\\)" line) (match-string 1 line)))
100+
(split-string (shell-command-to-string "cap -T") "[\n]"))))
101+
78102
;;;###autoload
79103
(defun ruby-compilation-run (cmd)
80104
"Run a ruby process dumping output to a ruby compilation buffer."

0 commit comments

Comments
 (0)