Skip to content

Commit

Permalink
Merge pull request #15 from yashi/master
Browse files Browse the repository at this point in the history
a few commands and remote file support
  • Loading branch information
endofunky committed Aug 24, 2015
2 parents f688d77 + c1a69e3 commit 0d0247a
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions bundler.el
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,24 @@
(message "Warning: couldn't read file \"%s\". BUNDLE_GEMFILE unchanged." gemfile))
(setenv "BUNDLE_GEMFILE")))

;;;###autoload
(defun bundle-outdated ()
"List installed gems with newer versions available."
(interactive)
(bundle-command "bundle outdated"))

;;;###autoload
(defun bundle-show ()
"Shows all gems that are part of the bundle, or the path to a given gem."
(interactive)
(bundle-command "bundle show"))

;;;###autoload
(defun bundle-version ()
"Prints version information."
(interactive)
(shell-command "bundle version"))

(defun bundle-command (cmd)
"Run cmd in an async buffer."
(async-shell-command cmd "*Bundler*"))
Expand All @@ -154,14 +172,16 @@ Gemfile could not be found, or nil if the Gem could not be
found."
(let ((bundler-stdout
(shell-command-to-string
(format "bundle show %s" (shell-quote-argument gem-name)))))
(format "bundle show %s" (shell-quote-argument gem-name))))
(remote (file-remote-p default-directory)))
(cond
((string-match "Could not locate Gemfile" bundler-stdout)
'no-gemfile)
((string-match "Could not find " bundler-stdout)
nil)
(t
(concat (replace-regexp-in-string
(concat remote
(replace-regexp-in-string
"Resolving dependencies...\\|\n" ""
bundler-stdout)
"/")))))
Expand Down

0 comments on commit 0d0247a

Please sign in to comment.
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy