You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+29-14Lines changed: 29 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -77,39 +77,54 @@ See the [Spotlight wiki](https://github.com/projectblacklight/spotlight/wiki) fo
77
77
* The `main` branch is for development of the upcoming 5.0 release.
78
78
* The `4.x` series is on the [release-4.x](https://github.com/projectblacklight/spotlight/tree/release-4.x) branch for backports of features and bug fixes.
79
79
80
-
## Spotlight
80
+
## Tooling
81
81
82
-
* is a Rails engine and needs to be used in the context of a Rails application. We use [engine_cart](https://github.com/cbeer/engine_cart) to create an internal test application at .internal_test_app/
83
-
*uses Solr as part of its integration tests. We use [solr_wrapper](https://github.com/cbeer/solr_wrapper)to manage the Solr instance used for development and test.
82
+
*Spotlight is a Rails engine and needs to be used in the context of a Rails application. We use [engine_cart](https://github.com/cbeer/engine_cart) to create an internal test application at .internal_test_app/
83
+
*Spotlight relies on Solr for its integration tests and to run a development instance. [solr_wrapper](https://github.com/cbeer/solr_wrapper)allows us to provide terse commands for development and testing. For more granular control you can run Solr in Docker, then execute services and processes individually.
84
84
85
85
See more detailed instructions for development environment setup at ["Contributing to Spotlight"](https://github.com/projectblacklight/spotlight/wiki/Contributing-to-Spotlight)
86
86
87
87
## Run a development server
88
88
89
-
### With EngineCart
90
-
```
91
-
$ rake spotlight:server
92
-
```
89
+
After following one of the instructions below, visit http://localhost:3000. A Solr instance will be running on port 8983. When using importmap (the default configuration), JavaScript changes in development should not require [bundling](#updating-the-javascript-bundle) or a server restart.
93
90
94
-
Then visit http://localhost:3000. A Solr instance will be running on port 8983. When using importmap (the default configuration), JavaScript changes in development should not require [bundling](#updating-the-javascript-bundle) or a server restart.
91
+
### With solr_wrapper
92
+
```sh
93
+
rake spotlight:server
94
+
```
95
95
96
96
### With Docker
97
97
98
98
```sh
99
-
# because of how docker compose handles named images, running `docker compose up --build` will error when the Rails images have not been built locally
100
-
docker compose build
101
-
docker compose up
99
+
docker compose up -d
100
+
rake engine_cart:generate
101
+
rake spotlight:fixtures
102
+
cd .internal_test_app
103
+
rake spotlight:seed_admin_user
104
+
bin/dev
102
105
```
103
106
104
107
## Tests
105
108
106
-
### Run all the tests:
109
+
### With solr_wrapper
107
110
111
+
```sh
112
+
rake
108
113
```
109
-
$ rake
114
+
115
+
This runs rubocop style enforcement and then all tests, starting solr and building the testing rails app automatically.
116
+
117
+
### With Docker
118
+
119
+
```sh
120
+
docker compose up -d
121
+
rake engine_cart:generate
122
+
rake spotlight:fixtures
123
+
cd .internal_test_app && rake spec:prepare &&cd -
124
+
rspec
110
125
```
111
126
112
-
This utilizes Solr and the testing rails app automatically.
127
+
Using rspec directly allows you to run individual test files / lines.
0 commit comments