Skip to content

Commit

Permalink
Merge pull request #14 from fabiokr/enabled_option_fix
Browse files Browse the repository at this point in the history
Append enabled_option
  • Loading branch information
fabiokr committed Apr 19, 2014
2 parents d884c99 + 47d9366 commit 1ad3f15
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## vagrant-sshfs 0.0.5 ##

* Allows to disable the plugin to run on demand.

*Stéphane Klein*

## vagrant-sshfs 0.0.4 (March 5, 2014) ##

* Allows to set a custom ssh username.
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ By default it will use the Vagrant ssh username. You can change that with the fo

`config.sshfs.username = "theusername"`

The plugin is enabled by default, so it will run everytime the machine starts. In case that is not desired, you can disabled that with the following configuration:

`config.sshfs.enabled = false`

## Contributing

If you have issues or ideas, please contribute! You can create an issue throught Github, or send a Pull Request.
Expand Down
5 changes: 2 additions & 3 deletions lib/vagrant-sshfs/actions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,11 @@ def i18n(key, *args)

class Up
def initialize(app, env)
@app = app
@machine = env[:machine]
@app = app
end

def call(env)
Builder.new(env).mount!
Builder.new(env).mount! if env[:machine].config.sshfs.enabled
end
end
end
Expand Down
2 changes: 2 additions & 0 deletions lib/vagrant-sshfs/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ module SshFS
class Config < Vagrant.plugin(2, :config)
attr_accessor :paths
attr_accessor :username
attr_accessor :enabled

def initialize
@paths = {}
@username = nil
@enabled = true
end

def merge(other)
Expand Down

0 comments on commit 1ad3f15

Please sign in to comment.