Skip to content

Commit 30db3e1

Browse files
committed
Makes code examples have color
By prefixing code snippets with the type of code, github formats with pretty colors.
1 parent 9cd3688 commit 30db3e1

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

README.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ Elasticsearch setup:
8080
Examples of more complicated resource names are left to the reader, but here we
8181
present a typical example that should work in most cases:
8282

83-
```
83+
```ruby
8484
elasticsearch_user 'default'
8585
elasticsearch_install 'default'
8686
elasticsearch_configure 'default'
@@ -98,11 +98,11 @@ a resource name may be omitted).
9898

9999
Examples:
100100

101-
```
101+
```ruby
102102
elasticsearch_user 'elasticsearch'
103103
```
104104

105-
```
105+
```ruby
106106
elasticsearch_user 'elasticsearch' do
107107
username 'elasticsearch'
108108
groupname 'elasticsearch'
@@ -133,19 +133,19 @@ them.
133133

134134
Examples:
135135

136-
```
136+
```ruby
137137
elasticsearch_install 'elasticsearch'
138138
```
139139

140-
```
140+
```ruby
141141
elasticsearch_install 'my_es_installation' do
142142
type :package # type of install
143143
version "1.7.2"
144144
action :install # could be :remove as well
145145
end
146146
```
147147

148-
```
148+
```ruby
149149
elasticsearch_install 'my_es_installation' do
150150
type :tarball # type of install
151151
dir '/usr/local' # where to install
@@ -158,15 +158,15 @@ elasticsearch_install 'my_es_installation' do
158158
end
159159
```
160160

161-
```
161+
```ruby
162162
elasticsearch_install 'my_es_installation' do
163163
type :tarball # type of install
164164
version '1.7.2'
165165
action :install # could be :remove as well
166166
end
167167
```
168168

169-
```
169+
```ruby
170170
elasticsearch_install 'my_es_installation' do
171171
type :package # type of install
172172
download_url "https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.7.2.deb"
@@ -201,12 +201,12 @@ for more.
201201
Examples:
202202

203203
With all defaults -
204-
```
204+
```ruby
205205
elasticsearch_configure 'elasticsearch'
206206
```
207207

208208
More complicated -
209-
```
209+
```ruby
210210
elasticsearch_configure 'my_elasticsearch' do
211211
# if you override one of these, you probably want to override all
212212
dir '/usr/local/awesome'
@@ -248,7 +248,7 @@ it to start on boot. You can override almost all of the relevant settings in
248248
such a way that you may run multiple instances. Most settings will be taken from
249249
a matching `elasticsearch_config` resource in the collection.
250250

251-
```
251+
```ruby
252252
elasticsearch_service 'elasticsearch'
253253
```
254254

@@ -267,7 +267,7 @@ NB: You [may encounter issues on certain distros](http://blog.backslasher.net/ja
267267

268268
Officially supported or commercial plugins require just the plugin name:
269269

270-
```
270+
```ruby
271271
elasticsearch_plugin 'analysis-icu' do
272272
action :install
273273
end
@@ -278,7 +278,7 @@ end
278278

279279
Plugins from GitHub require a URL of 'username/repository' or 'username/repository/version':
280280

281-
```
281+
```ruby
282282
elasticsearch_plugin 'kopf' do
283283
url 'lmenezes/elasticsearch-kopf'
284284
action :install
@@ -291,15 +291,15 @@ end
291291
```
292292

293293
Plugins from Maven Central or Sonatype require 'groupId/artifactId/version':
294-
```
294+
```ruby
295295
elasticsearch_plugin 'mapper-attachments' do
296296
url 'org.elasticsearch/elasticsearch-mapper-attachments/2.6.0'
297297
action :install
298298
end
299299
```
300300

301301
Plugins can be installed from a custom URL or file location as follows:
302-
```
302+
```ruby
303303
elasticsearch_plugin 'mapper-attachments' do
304304
url 'http://some.domain.name//my-plugin-1.0.0.zip'
305305
action :install
@@ -314,7 +314,7 @@ end
314314
To run multiple instances per machine, an explicit `plugin_dir` location
315315
has to be provided:
316316

317-
```
317+
```ruby
318318
elasticsearch_plugin 'mobz/elasticsearch-head' do
319319
plugin_dir '/usr/share/elasticsearch_foo/plugins'
320320
end
@@ -323,7 +323,7 @@ end
323323
If for some reason, you want to name the resource something else, you may
324324
provide the plugin name using the `name` parameter:
325325

326-
```
326+
```ruby
327327
elasticsearch_plugin 'xyzzy' do
328328
name 'kopf'
329329
url 'lmenezes/elasticsearch-kopf'

0 commit comments

Comments
 (0)