Skip to content

Commit

Permalink
Use bash for syntax highlighting instead of shell
Browse files Browse the repository at this point in the history
shell does not provide syntax highlighting in GitHub's markdown.
Using bash will provide more accurate highlighting.
  • Loading branch information
jacobherrington committed Oct 3, 2018
1 parent 1cbef0f commit 894049c
Show file tree
Hide file tree
Showing 20 changed files with 71 additions and 71 deletions.
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,21 +60,21 @@ Run the `bundle` command to install.
After installing gems, you'll have to run the generators to create necessary
configuration files and migrations.

```shell
```bash
bundle exec rails g spree:install
bundle exec rails g solidus:auth:install
bundle exec rake railties:install:migrations
```

Run migrations to create the new models in the database.

```shell
```bash
bundle exec rake db:migrate
```

Finally start the rails server

```shell
```bash
bundle exec rails s
```

Expand Down Expand Up @@ -106,13 +106,13 @@ about.**
By default, the installation generator (`rails g spree:install`) will run
migrations as well as adding seed and sample data. This can be disabled using

```shell
```bash
rails g spree:install --migrate=false --sample=false --seed=false
```

You can always perform any of these steps later by using these commands.

```shell
```bash
bundle exec rake railties:install:migrations
bundle exec rake db:migrate
bundle exec rake db:seed
Expand Down Expand Up @@ -153,14 +153,14 @@ Developing Solidus

* Clone the Git repo

```shell
```bash
git clone git:https://github.com/solidusio/solidus.git
cd solidus
```

* Install the gem dependencies

```shell
```bash
bundle install
```

Expand All @@ -176,13 +176,13 @@ data already loaded.
* Create the sandbox application (`DB=mysql` or `DB=postgresql` can be specified
to override the default sqlite)

```shell
```bash
bundle exec rake sandbox
```

* Start the server

```shell
```bash
cd sandbox
rails server
```
Expand All @@ -207,29 +207,29 @@ required to run the frontend and backend test suites.

To execute all of the test specs, run the `build.sh` script at the root of the Solidus project:

```shell
```bash
bash build.sh
```

The `build.sh` script runs using PostgreSQL by default, but it can be overridden by setting the DB environment variable to `DB=sqlite` or `DB=mysql`. For example:

```shell
```bash
DB=mysql bash build.sh
```

#### Run an individual test suite

Each gem contains its own series of tests. To run the tests for the core project:

```shell
```bash
cd core
bundle exec rspec
```

By default, `rspec` runs the tests for SQLite 3. If you would like to run specs
against another database you may specify the database in the command:

```shell
```bash
DB=postgresql bundle exec rspec
```

Expand All @@ -238,7 +238,7 @@ DB=postgresql bundle exec rspec
If you want to run the [SimpleCov](https://github.com/colszowka/simplecov) code
coverage report:

```shell
```bash
COVERAGE=true bundle exec rspec
```

Expand Down
2 changes: 1 addition & 1 deletion api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ API contains the controllers and rabl views implementing the REST API of Solidus

Run the API tests:

```shell
```bash
bundle exec rspec
```
4 changes: 2 additions & 2 deletions backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ When running the application there is a styleguide available at:

Run the tests

```shell
```bash
bundle exec rspec
```

Run the JavaScript tests (must have [ChromeDriver](https://sites.google.com/a/chromium.org/chromedriver/) installed)

```shell
```bash
bundle exec teaspoon
```
2 changes: 1 addition & 1 deletion core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,6 @@ Developer notes

Run the tests:

```shell
```bash
bundle exec rspec
```
8 changes: 4 additions & 4 deletions frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ Solidus provides a generator to help with copying the right view into your host

Simply call the generator to copy all views into your host app.

```shell
```bash
$ bundle exec rails g solidus:views:override
```

If you only want to copy certain views into your host app, you can provide the `--only` argument:

```shell
```bash
$ bundle exec rails g solidus:views:override --only products/show
```

The argument to `--only` can also be a substring of the name of the view from the `app/views/spree` folder:

```shell
```bash
$ bundle exec rails g solidus:views:override --only product
```

Expand All @@ -37,6 +37,6 @@ After upgrading Solidus to a new version run the generator again and follow on s

Run the tests

```shell
```bash
bundle exec rspec
```
4 changes: 2 additions & 2 deletions guides/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ Usage

3. Start the Middleman server. Note that this will also invoke Webpack via the external pipeline.

```shell
```bash
$ bundle exec middleman server
```

4. To build HTML and assets for production, run:

```shell
```bash
$ bundle exec middleman build
```
5. Set proper `base_url` in config.rb
6 changes: 3 additions & 3 deletions guides/source/developers/api/endpoints.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ If you want to quickly check for an API endpoint, you can do so locally.

First, ensure you are in your project directory:

```shell
```bash
cd my_solidus_application
```

Then, you can filter a `rails routes` command using grep:

```shell
```bash
bundle exec rails routes | grep '/api'
```

Expand All @@ -29,6 +29,6 @@ each route accepts.

You can filter the list of routes being returned with more specific grep input:

```shell
```bash
bundle exec rails routes | grep '/api/products'
```
4 changes: 2 additions & 2 deletions guides/source/developers/api/overview.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ role of `admin`.
To make a request to the API, pass a `X-Spree-Token` header and a Spree API key
along with the request:

```shell
```bash
curl --header "X-Spree-Token: <key>" http:https://yourstore.com/api/products/1
```

Alternatively, you can pass through the token as a URL parameter if you are
unable to pass it through a header:

```shell
```bash
curl http:https://example.com/api/products/1?token=<key>
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ end
You can replace all of the `ActiveRecord::Migration` occurrences automatically
with `sed`:

```shell
```bash
sed -i 's/ActiveRecord::Migration/SolidusSupport::Migration[4.2]/' db/migrate/*.rb
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ exactly the same way you'd build any other Rails engine.
However, it is recommended that you use the [`solidus_cmd`](https://github.com/solidusio-contrib/solidus_cmd)
gem.

```shell
```bash
gem install solidus_cmd
```

Expand All @@ -35,7 +35,7 @@ Once you've installed `solidus_cmd`, you will have access to the `solidus`
command. Using `solidus extension` will generate a new Solidus extension
template in your current directory.

```shell
```bash
solidus extension extension_name
```

Expand Down
20 changes: 10 additions & 10 deletions guides/source/developers/getting-started/develop-solidus.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ pull request, please [read the contributing guidelines][contributing] first.
Getting your Solidus development environment set up is easy. First, clone the
Solidus GitHub repo:

```shell
```bash
git clone git:https://github.com/solidusio/solidus.git
```

Then enter the directory you just downloaded and install Solidus's dependencies:

```shell
```bash
cd solidus
bundle install
```
Expand All @@ -26,21 +26,21 @@ typical Solidus store you can use for testing.
By default, the sandbox includes [`solidus_auth_devise`][solidus-auth-devise],
and the generator seeds the database and loads sample data.

```shell
```bash
bundle exec rake sandbox
```

You can prepend `DB=mysql` or `DB=postgresql` to the command in order use those
databases instead of the default SQLite 3 database. For example:

```shell
```bash
DB=postgresql bundle exec rake sandbox
```

After the sandbox has been generated, you can change into its directory and
start the server:

```shell
```bash
cd sandbox
rails server
```
Expand Down Expand Up @@ -71,15 +71,15 @@ You can see the build statuses [on our CircleCI status page][circleci].
To execute all of the test specs, run the `build.sh` script at the root of the
Solidus project:

```shell
```bash
bash build.sh
```

The `build.sh` script runs using PostgreSQL by default, but it can be overridden
by setting the `DB` environment variable to `DB=sqlite` or `DB=mysql`. For
example:

```shell
```bash
DB=mysql bash build.sh
```

Expand All @@ -90,15 +90,15 @@ Note that this will fail if you have not installed ChromeDriver on your system.
Each gem contains its own test suite. For example, you can run only the
`solidus_core` gem tests within the `/core` directory:

```shell
```bash
cd core
bundle exec rspec
```

By default, the tests run against the default SQLite 3 database. You can instead
specify `DB=mysql` or `DB=postgresql` by prepending it to the command:

```shell
```bash
DB=postgresql bundle exec rspec
```

Expand All @@ -107,7 +107,7 @@ DB=postgresql bundle exec rspec
You can generate a [SimpleCov][simplecov] code
coverage report by prepending `COVERAGE=true` to the `rspec` command:

```shell
```bash
COVERAGE=true bundle exec rspec
```

Expand Down
Loading

0 comments on commit 894049c

Please sign in to comment.