Skip to content

Commit

Permalink
Rename project to "rambo"
Browse files Browse the repository at this point in the history
  • Loading branch information
voronkovich committed Dec 25, 2021
1 parent bf166ad commit 96ef12d
Show file tree
Hide file tree
Showing 14 changed files with 92 additions and 92 deletions.
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Jimbo
# Rambo: first backup

[![CI](https://github.com/PopArtDesign/jimbo/actions/workflows/ci.yaml/badge.svg)](https://github.com/PopArtDesign/jimbo/actions/workflows/ci.yaml)
[![GitHub license](https://img.shields.io/github/license/PopArtDesign/jimbo)](https://github.com/PopArtDesign/jimbo/blob/main/LICENSE)
[![CI](https://github.com/PopArtDesign/rambo/actions/workflows/ci.yaml/badge.svg)](https://github.com/PopArtDesign/rambo/actions/workflows/ci.yaml)
[![GitHub license](https://img.shields.io/github/license/PopArtDesign/rambo)](https://github.com/PopArtDesign/rambo/blob/main/LICENSE)

Simple backup tool for web sites (Joomla!, WordPress and etc.)

Expand All @@ -10,32 +10,32 @@ Simple backup tool for web sites (Joomla!, WordPress and etc.)
Local (`~/.local`):

```sh
git clone --depth=1 https://github.com/PopArtDesign/jimbo ~/.local/lib/jimbo && ln -s ~/.local/lib/jimbo/bin/jimbo ~/.local/bin/jimbo
git clone --depth=1 https://github.com/PopArtDesign/rambo ~/.local/lib/rambo && ln -s ~/.local/lib/rambo/bin/rambo ~/.local/bin/rambo
```

Global (`/opt`):

```sh
sudo git clone --depth=1 https://github.com/PopArtDesign/jimbo /opt/jimbo && sudo ln -s /opt/jimbo/bin/jimbo /usr/local/bin/jimbo
sudo git clone --depth=1 https://github.com/PopArtDesign/rambo /opt/rambo && sudo ln -s /opt/rambo/bin/rambo /usr/local/bin/rambo
```

## Usage

Jimbo backups all site's data into a one `.zip` archive. Thanks to it's [plugins](./plugin) it can detect site's configuration like database, cache folders and etc. and include or exclude some data from the final backup.
Rambo backups all site's data into a one `.zip` archive. Thanks to it's [plugins](./plugin) it can detect site's configuration like database, cache folders and etc. and include or exclude some data from the final backup.

In simple case you can just run:

```sh
jimbo backup /path/to/site /path/to/backup.zip
rambo backup /path/to/site /path/to/backup.zip
```

To get more information about available commands try `--help`

```sh
jimbo --help
rambo --help
```

### Local config file (`.jimbo.conf`)
### Local config file (`.rambo.conf`)

To customize site backup process you can create a special config file in your site's root folder:

Expand All @@ -46,14 +46,14 @@ To customize site backup process you can create a special config file in your si
# You can use any prefix you want or just omit it.
#

cat > xA4di35ie.jimbo.conf <<CONFIG
cat > xA4di35ie.rambo.conf <<CONFIG
# Also available: 'wordpress' and 'joomla'
# Try "jimbo plugins" to see all available plugins
# Try "rambo plugins" to see all available plugins
plugin: default
exclude: .git/* .zip
# Jimbo can backup only one database
# Rambo can backup only one database
database_name: dbname
database_user: dbuser
database_password: dbpass
Expand All @@ -62,10 +62,10 @@ CONFIG

### Main config file

If you don't want to store Jimbo's config in your site's root, you can create config file outside:
If you don't want to store Rambo's config in your site's root, you can create config file outside:

```sh
cat > /etc/jimbo/mysite.conf <<CONFIG
cat > /etc/rambo/mysite.conf <<CONFIG
root: /var/www/mysite
plugin: default
include: index.html upload/*
Expand All @@ -75,21 +75,21 @@ CONFIG
Then you should specify path to config file instead of site's root:

```sh
jimbo backup /etc/jimbo/mysite.conf mysite.zip
rambo backup /etc/rambo/mysite.conf mysite.zip
```

## Uninstall

Local (`~/.local`):

```sh
unlink ~/.local/bin/jimbo; rm -rf ~/.local/lib/jimbo
unlink ~/.local/bin/rambo; rm -rf ~/.local/lib/rambo
```

Global (`/opt`):

```sh
sudo unlink /usr/local/bin/jimbo; sudo rm -rf /opt/jimbo
sudo unlink /usr/local/bin/rambo; sudo rm -rf /opt/rambo
```

## License
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion lib/site.bash
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ app::site::load_main_config() {

site_path="$(app::util::realpath "${site_path}")"

site_config[local_config_file_suffix]='.jimbo.conf'
site_config[local_config_file_suffix]='.rambo.conf'
site_config[database_dump_suffix]='.dump.sql'

if [[ -d "${site_path}" ]]; then
Expand Down
20 changes: 10 additions & 10 deletions spec/bin/jimbo_spec.sh
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
#shellcheck shell=bash

Describe 'jimbo'
Describe 'rambo'
It 'fails when invoked without arguments'
When call jimbo
When call rambo

The status should be failure
The error should include 'Missing argument: command. Try --help for more information'
End

It 'fails when command not found'
When call jimbo hello
When call rambo hello

The status should be failure
The error should include 'Unknown command: hello'
End

It 'fails when invalid option specified'
When call jimbo --hello
When call rambo --hello

The status should be failure
The error should include 'Unknown option: --hello'
End

It 'shows help when -h option specified'
When call jimbo -h
When call rambo -h

The status should be success
The output should start with 'jimbo: simple backup tool for web sites'
The output should start with 'rambo: simple backup tool for web sites'
End

It 'shows help when --help option specified'
When call jimbo --help
When call rambo --help

The status should be success
The output should start with 'jimbo: simple backup tool for web sites'
The output should start with 'rambo: simple backup tool for web sites'
End

It 'executes specified command'
When call jimbo help
When call rambo help

The status should be success
The output should start with 'jimbo: simple backup tool for web sites'
The output should start with 'rambo: simple backup tool for web sites'
End
End
30 changes: 15 additions & 15 deletions spec/command/backup_spec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,51 +8,51 @@ backup_content() {
zipinfo -1 "${backup_file}" | sort
}

Describe 'jimbo backup'
Describe 'rambo backup'
It 'fails when invoked without arguments'
When call jimbo backup
When call rambo backup

The status should be failure
The error should include 'Missing argument: path to site or config file'
End

It 'fails when invalid option specified'
When call jimbo backup --hello
When call rambo backup --hello

The status should be failure
The error should include 'Unknown option: --hello'
End

It 'fails when too many arguments specified'
When call jimbo backup foo bar baz
When call rambo backup foo bar baz

The status should be failure
The error should include 'Too many arguments. Expected: 2'
End

It 'fails when backup file has no .zip extension'
When call jimbo backup my-site my-backup
When call rambo backup my-site my-backup

The status should be failure
The error should match pattern '*Backup file must have .zip extension: */my-backup*'
End

It 'fails when backup file already exists'
When call jimbo backup ./lib ./fixture/empty.zip
When call rambo backup ./lib ./fixture/empty.zip

The status should be failure
The error should match pattern '*Backup file already exists: */fixture/empty.zip*'
End

It 'shows help message if -h option specified'
When call jimbo backup -h
When call rambo backup -h

The status should be success
The output should start with 'Backup site'
End

It 'shows help message if --help option specified'
When call jimbo backup --help
When call rambo backup --help

The status should be success
The output should start with 'Backup site'
Expand All @@ -63,7 +63,7 @@ Describe 'jimbo backup'

backup_file="$(backup_file_name)"

When call jimbo backup "${empty_dir}" "${backup_file}"
When call rambo backup "${empty_dir}" "${backup_file}"

The status should be success
The output should end with "Done: ${backup_file}"
Expand All @@ -74,7 +74,7 @@ Describe 'jimbo backup'
It "backups all site's files if no configuration provided"
backup_file="$(backup_file_name)"

When call jimbo backup ./fixture/simple-site "${backup_file}"
When call rambo backup ./fixture/simple-site "${backup_file}"

The status should be success
The output should end with "Done: ${backup_file}"
Expand All @@ -90,7 +90,7 @@ Describe 'jimbo backup'
#|exclude: *.css
End

When call jimbo backup /dev/stdin "${backup_file}"
When call rambo backup /dev/stdin "${backup_file}"

The status should be success
The output should end with "Done: ${backup_file}"
Expand All @@ -106,7 +106,7 @@ Describe 'jimbo backup'
#|include: *.html
End

When call jimbo backup /dev/stdin "${backup_file}"
When call rambo backup /dev/stdin "${backup_file}"

The status should be success
The output should end with "Done: ${backup_file}"
Expand All @@ -125,7 +125,7 @@ Describe 'jimbo backup'
#|include: */index.html
End

When call jimbo backup /dev/stdin "${backup_file}"
When call rambo backup /dev/stdin "${backup_file}"

files="$(backup_content)"

Expand Down Expand Up @@ -153,7 +153,7 @@ Describe 'jimbo backup'
#|database_dump_suffix: .dump.sql
End

When call jimbo backup /dev/stdin "${backup_file}"
When call rambo backup /dev/stdin "${backup_file}"

The status should be success
The output should end with "Done: ${backup_file}"
Expand All @@ -178,7 +178,7 @@ Describe 'jimbo backup'
#|database_dump_suffix: .dump.sql
End

When call jimbo backup /dev/stdin "${backup_file}"
When call rambo backup /dev/stdin "${backup_file}"

The status should be success
The output should end with "Done: ${backup_file}"
Expand Down
12 changes: 6 additions & 6 deletions spec/command/db_cli_spec.sh
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
#shellcheck shell=bash

Describe 'jimbo db:cli'
Describe 'rambo db:cli'
It 'fails when invoked without arguments'
When call jimbo db:cli
When call rambo db:cli

The status should be failure
The error should include 'Missing argument: path to site or config file'
End

It 'fails when invalid option specified'
When call jimbo db:cli --hello
When call rambo db:cli --hello

The status should be failure
The error should include 'Unknown option: --hello'
End

It 'fails when too many arguments specified'
When call jimbo db:cli foo bar baz
When call rambo db:cli foo bar baz

The status should be failure
The error should include 'Too many arguments. Expected: 1'
End

It 'shows help message if -h option specified'
When call jimbo db:cli -h
When call rambo db:cli -h

The status should be success
The output should start with 'Launch database client'
End

It 'shows help message if --help option specified'
When call jimbo db:cli --help
When call rambo db:cli --help

The status should be success
The output should start with 'Launch database client'
Expand Down
12 changes: 6 additions & 6 deletions spec/command/db_dump_spec.sh
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
#shellcheck shell=bash

Describe 'jimbo db:dump'
Describe 'rambo db:dump'
It 'fails when invoked without arguments'
When call jimbo db:dump
When call rambo db:dump

The status should be failure
The error should include 'Missing argument: path to site or config file'
End

It 'fails when invalid option specified'
When call jimbo db:dump --hello
When call rambo db:dump --hello

The status should be failure
The error should include 'Unknown option: --hello'
End

It 'fails when too many arguments specified'
When call jimbo db:dump foo bar baz
When call rambo db:dump foo bar baz

The status should be failure
The error should include 'Too many arguments. Expected: 1'
End

It 'shows help message if -h option specified'
When call jimbo db:dump -h
When call rambo db:dump -h

The status should be success
The output should start with "Dump site's database"
End

It 'shows help message if --help option specified'
When call jimbo db:dump --help
When call rambo db:dump --help

The status should be success
The output should start with "Dump site's database"
Expand Down
Loading

0 comments on commit 96ef12d

Please sign in to comment.