readme.md in vfs-0.3.13 vs readme.md in vfs-0.3.14
- old
+ new
@@ -30,36 +30,27 @@
```
## Code samples:
``` ruby
-gem 'vfs' # Virtual File System
-require 'vfs'
+require 'vfs' # Virtual File System
+require 'vos' # Virtual Operating System
-gem 'vos' # Virtual Operating System
-require 'vos'
-```
-
# Connections, let's deploy our 'cool_app' project from our local box to remote server
-``` ruby
server = Box.new('cool_app.com') # it will use id_rsa, or You can add {user: 'me', password: 'secret'}
me = '~'.to_dir # handy shortcut for local FS
deploy_dir = server['apps/cool_app']
projects = me['projects']
-```
# Working with dirs, copying dir from any source to any destination (local/remote/custom_storage_type)
-``` ruby
projects['cool_app'].copy_to deploy_dir
-```
# Working with files
-``` ruby
dbc = deploy_dir.file('config/database.yml') # <= the 'config' dir not exist yet
dbc.write("user: root\npassword: secret") # <= now the 'database.yml' and parent 'config' has been created
dbc.content =~ /database/ # => false, we forgot to add the database
dbc.append("\ndatabase: mysql") # let's do it
@@ -72,19 +63,23 @@
```
There are also streaming support (read/write/append) with &block, please go to specs for details
# Checks
+
+``` ruby
deploy_dir['config'].exist? # => true
deploy_dir.dir('config').exist? # => true
deploy_dir.file('config').exist? # => false
deploy_dir['config'].dir? # => true
deploy_dir['config'].file? # => false
+```
-
# Navigation
+
+``` ruby
config = deploy_dir['config']
config.parent # => </apps/cool_app>
config['../..'] # => </>
config['../..'].dir? # => true
@@ -113,12 +108,12 @@
is to provide 1-to-1 clone of underlying OS API, instead of provididing handy tool.
And if you want to use remote FS - things are getting even worse and more complicated (Net::SSH & Net::SFTP use a little
different API than local FS, and you has to remember all thouse little quirks).
-Copyright (c) Alexey Petrushin http://petrush.in, released under the MIT license.
+## License
-## Please let me know about bugs and Your proposals, there's the 'Issues' tab at the top, feel free to submit.
+Copyright (c) Alexey Petrushin http://petrush.in, released under the MIT license.
[vos]: http://github.com/alexeypetrushin/vos
[cluster_management]: http://github.com/alexeypetrushin/cluster_management
[my_cluster]: http://github.com/alexeypetrushin/my_cluster
\ No newline at end of file