Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mateuszkubuszok/backupdsl
Small and simple DSL in Scala intended for some specific backup/restore operations
https://github.com/mateuszkubuszok/backupdsl
elevation scala
Last synced: 3 months ago
JSON representation
Small and simple DSL in Scala intended for some specific backup/restore operations
- Host: GitHub
- URL: https://github.com/mateuszkubuszok/backupdsl
- Owner: MateuszKubuszok
- License: mit
- Created: 2015-11-03T10:33:15.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-11-03T14:48:47.000Z (over 9 years ago)
- Last Synced: 2023-04-07T02:31:29.252Z (almost 2 years ago)
- Topics: elevation, scala
- Language: Scala
- Homepage: https://bitbucket.org/MateuszKubuszok/backupdsl/issues/
- Size: 625 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Backup DSL
[![Build status](https://api.shippable.com/projects/561d0f141895ca44741d627e/badge/master)](https://app.shippable.com/projects/561d0f141895ca44741d627e)
Project of a DSL for performing backup and restore of some specific parts of
the system.## Example script
Simple backup script looks like this:
package example
import pl.combosolutions.backup.dsl.Script
object ExampleScript extends Script("Test script") {
configuration forThis { config =>
config.selectFiles forThis { selection =>
selection.files += "README.md"
selection.files += "ROADMAP.md"
selection.backupFiles
}
}
}One can run it with `sbt "runMain example.ExampleScript backup"` and
`sbt "runMain example.ExampleScript restore"`. Script will try to copy
`README.md` and `ROADMAP.md` files into default backup directory.Using [SBT script runner](http://www.scala-sbt.org/0.13/docs/Scripts.html) you
might try to publish artifacts (`sbt publishLocal`) and then create backup
configuration like this one:#!/usr/bin/env scalas
/***
scalaVersion := "2.11.7"
libraryDependencies += "pl.combosolutions" %% "backup-dsl" % "0.2.0-SNAPSHOT"
*/
import pl.combosolutions.backup.dsl.Script
object ExampleScript extends Script("Test script") {
configuration forThis { config =>
config.selectFiles forThis { selection =>
selection.files += "README.md"
selection.files += "ROADMAP.md"
selection.backupFiles
}
}
}## Development
Build process requires [SBT](www.scala-sbt.org) or
[Activator](https://www.typesafe.com/activator/download) installed. Code is
automatically formatted on compile task by scalariform plugin.Components that have no clear idea behind them yet (prototypes) can go untested
until good API is figured out. Then they should be completely unit tested with
emphasis on corner cases.Platform Specific Model module development requires some specific guidelines
- read more [here](PSM-DEVELOPMENT.md).## Roadmap
See roadmap [here](ROADMAP.md)
## License
MIT license, see [License](LICENSE).