Skip to content

Commit

Permalink
Add version command to CLI
Browse files Browse the repository at this point in the history
`suspenders --version` in the CLI, Suspenders responds with the message
"No value provided for required arguments 'app_path'".

This changeset adds `-v` and `--version` options to `bin/suspenders.rb`.
Those commands will now return the proper suspenders version in the CLI.

[closes #638]
  • Loading branch information
Fourfingerz authored and tute committed Oct 31, 2015
1 parent 0a4dfa2 commit e1a5b2f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions NEWS.md
@@ -1,3 +1,7 @@
1.34.0 (unreleased)

* Suspenders command line responds to `-v` and `--version` options

1.33.0 (October 23, 2015)

* Add `quiet_assets` as development dependency
Expand Down
5 changes: 5 additions & 0 deletions bin/suspenders
Expand Up @@ -6,6 +6,11 @@ $LOAD_PATH << source_path

require 'suspenders'

if ['-v', '--version'].include? ARGV[0]
puts Suspenders::VERSION
exit 0
end

templates_root = File.expand_path(File.join("..", "templates"), File.dirname(__FILE__))
Suspenders::AppGenerator.source_root templates_root
Suspenders::AppGenerator.source_paths << Rails::Generators::AppGenerator.source_root << templates_root
Expand Down

0 comments on commit e1a5b2f

Please sign in to comment.