Sha256: fb6b891e09f87a04e29503fbbdf923c24753899f7812a3094ee4c20d8aed66c0

Contents?: true

Size: 1.73 KB

Versions: 8

Compression:

Stored size: 1.73 KB

Contents

# Migrating from 0.3.x to 1.0

## DSL

### old
* `queue`         -> `command`  # adds command to queue
* `queue!`        -> `command`  # it will output the command if verbose is true
* `to`            -> `on`       # changes queue name
* `in_directory`  -> `in_path`  # wraps commands to be run in specified path
* `invoke :'task[param]'` -> `invoke :task, param`  # passes params to the task

### new
* `run`                         # runs commands on a specified backend, this has replaced old before and after hooks
* `comment`                     # adds a 'echo -----> #{command}' to queue

**Other commands have been removed!**

Remove `:environment` dependency on all your tasks!
```
task deploy: :environment do
  ...
--->
task :deploy do
  ...
```

## Setting variables

### same
* `set`                         # remained for setting variables

### new
* `fetch`                       # **ALL** variables now need to be fetched with `fetch`. Removed `method_missing`
* `set?`
* `ensure!`

## Deploy variables

* `shared_paths` -> separated into `shared_dirs` & `shared_files`

For example:

```rb
set :shared_dirs, fetch(:shared_dirs, []).push('somedir')
set :shared_files, fetch(:shared_files, []).push('config/database.yml', 'config/secrets.yml')
```

All `*_path` variables (`:current_path`, `:shared_path`, ...) now include `:deploy_to`
* `#{fetch(:deploy_to)}/#{fetch(:current_path)}` -> `fetch(:current_path)`

## Using new mina on old projects

* run `mina setup`
* if you do not want for bundle to install gems copy `current/vendor/bundle` to `/shared/vendor/bundle`
* if you do not want to precompile assets copy `current/public/assets` to `shared/public/assets`
* if you want to precompile you will need to run deploy with `force_asset_precompile=true`

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
mina-1.2.5 docs/migrating.md
mina-1.2.4 docs/migrating.md
mina-1.2.3 docs/migrating.md
mina-1.2.2 docs/migrating.md
mina-1.2.1 docs/migrating.md
mina-1.2.0 docs/migrating.md
mina-1.1.1 docs/migrating.md
mina-1.1.0 docs/migrating.md