Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/raquellima7/first_challenge

The task to write a small ruby function that orders strings.
https://github.com/raquellima7/first_challenge

rspec ruby

Last synced: about 5 hours ago
JSON representation

The task to write a small ruby function that orders strings.

Awesome Lists containing this project

README

        

## First Challenge


The task is to write a small ruby function that orders strings according to the following examples:

1 - Example 1

Input: ["BA2 / 1.1", "BA1 / 1.1"]

Output: ["BA1 / 1.1", "BA2 / 1.1"]


2 - Example 2

Input: ["BA1 / 1.10", "BA1 / 1.2", "BA1 / 1.1"]

Output: ["BA1 / 1.1", "BA1 / 1.2", "BA1 / 1.10"]


3 - Example 3

Input: ["BA1 / 1.10.c", "BA1 / 1.1.x", "BA1 / 1.10.a"]

Output: ["BA1 / 1.1.x", "BA1 / 1.10.a", "BA1 / 1.10.c"]


## Stack the Project

- **Ruby**
- **Rspec**


## Run Locally

Clone the project

```bash
git clone https://github.com/RaquelLima7/first_challenge.git
```

Go to the project directory

```bash
cd first_challenge
```

## Running Tests

To run tests, run the following command

```bash
rake
```