Skip to content

Commit 835ea07

Browse files
committed
Renames master to main
1 parent d12d812 commit 835ea07

File tree

15 files changed

+57
-57
lines changed

15 files changed

+57
-57
lines changed

.github/workflows/2.4.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ name: Ruby 2.4
22
on:
33
push:
44
branches:
5-
- master
5+
- main
66
pull_request:
77
branches:
8-
- master
8+
- main
99
workflow_dispatch:
1010
branches:
1111
- '*'

.github/workflows/2.5.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ name: Ruby 2.5
22
on:
33
push:
44
branches:
5-
- master
5+
- main
66
pull_request:
77
branches:
8-
- master
8+
- main
99
workflow_dispatch:
1010
branches:
1111
- '*'

.github/workflows/2.6.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ name: Ruby 2.6
22
on:
33
push:
44
branches:
5-
- master
5+
- main
66
pull_request:
77
branches:
8-
- master
8+
- main
99
workflow_dispatch:
1010
branches:
1111
- '*'

.github/workflows/2.7.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ name: Ruby 2.7
22
on:
33
push:
44
branches:
5-
- master
5+
- main
66
pull_request:
77
branches:
8-
- master
8+
- main
99
workflow_dispatch:
1010
branches:
1111
- '*'

.github/workflows/jruby.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ name: JRuby
22
on:
33
push:
44
branches:
5-
- master
5+
- main
66
pull_request:
77
branches:
8-
- master
8+
- main
99
workflow_dispatch:
1010
branches:
1111
- '*'

README.md

+13-13
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ gem 'elasticsearch-rails', github: 'elastic/elasticsearch-rails', branch: '5.x'
4040

4141
The libraries are compatible with Ruby 2.4 and higher.
4242

43-
The version numbers follow the Elasticsearch major versions. The `master` branch is compatible with the latest Elasticsearch stack stable release.
43+
The version numbers follow the Elasticsearch major versions. The `main` branch is compatible with the latest Elasticsearch stack stable release.
4444

4545
| Rubygem | | Elasticsearch |
4646
|:-------------:|:-:| :-----------: |
4747
| 0.1 || 1.x |
4848
| 2.x || 2.x |
4949
| 5.x || 5.x |
5050
| 6.x || 6.x |
51-
| master || 7.x |
51+
| main || 7.x |
5252

5353
Use a release that matches the major version of Elasticsearch in your stack. Each client version is backwards compatible with all minor versions of the same major version.
5454

@@ -58,13 +58,13 @@ Check out [Elastic product end of life dates](https://www.elastic.co/support/eol
5858

5959
This project is split into three separate gems:
6060

61-
* [**`elasticsearch-model`**](https://github.com/elastic/elasticsearch-rails/tree/master/elasticsearch-model),
61+
* [**`elasticsearch-model`**](https://github.com/elastic/elasticsearch-rails/tree/main/elasticsearch-model),
6262
which contains search integration for Ruby/Rails models such as ActiveRecord::Base and Mongoid,
6363

64-
* [**`elasticsearch-persistence`**](https://github.com/elastic/elasticsearch-rails/tree/master/elasticsearch-persistence),
64+
* [**`elasticsearch-persistence`**](https://github.com/elastic/elasticsearch-rails/tree/main/elasticsearch-persistence),
6565
which provides a standalone persistence layer for Ruby/Rails objects and models
6666

67-
* [**`elasticsearch-rails`**](https://github.com/elastic/elasticsearch-rails/tree/master/elasticsearch-rails),
67+
* [**`elasticsearch-rails`**](https://github.com/elastic/elasticsearch-rails/tree/main/elasticsearch-rails),
6868
which contains various features for Ruby on Rails applications
6969

7070
Example of a basic integration into an ActiveRecord-based model:
@@ -87,7 +87,7 @@ Article.import
8787
```
8888

8989
You can generate a simple Ruby on Rails application with a single command
90-
(see the [other available templates](https://github.com/elastic/elasticsearch-rails/tree/master/elasticsearch-rails#rails-application-templates)). You'll need to have an Elasticsearch cluster running on your system before generating the app. The easiest way of getting this set up is by running it with Docker with this command:
90+
(see the [other available templates](https://github.com/elastic/elasticsearch-rails/tree/main/elasticsearch-rails#rails-application-templates)). You'll need to have an Elasticsearch cluster running on your system before generating the app. The easiest way of getting this set up is by running it with Docker with this command:
9191

9292
```bash
9393
docker run \
@@ -103,7 +103,7 @@ You can generate a simple Ruby on Rails application with a single command
103103
Once Elasticsearch is running, you can generate the simple app with this command:
104104

105105
```bash
106-
rails new searchapp --skip --skip-bundle --template https://raw.github.com/elasticsearch/elasticsearch-rails/master/elasticsearch-rails/lib/rails/templates/01-basic.rb
106+
rails new searchapp --skip --skip-bundle --template https://raw.github.com/elasticsearch/elasticsearch-rails/main/elasticsearch-rails/lib/rails/templates/01-basic.rb
107107
```
108108

109109
Example of using Elasticsearch as a repository for a Ruby domain object:
@@ -125,21 +125,21 @@ repository.save Article.new(title: 'Test')
125125

126126
### Model
127127

128-
* [[README]](https://github.com/elastic/elasticsearch-rails/blob/master/elasticsearch-model/README.md)
128+
* [[README]](https://github.com/elastic/elasticsearch-rails/blob/main/elasticsearch-model/README.md)
129129
* [[Documentation]](http://rubydoc.info/gems/elasticsearch-model/)
130-
* [[Test Suite]](https://github.com/elastic/elasticsearch-rails/tree/master/elasticsearch-model/spec/elasticsearch/model)
130+
* [[Test Suite]](https://github.com/elastic/elasticsearch-rails/tree/main/elasticsearch-model/spec/elasticsearch/model)
131131

132132
### Persistence
133133

134-
* [[README]](https://github.com/elastic/elasticsearch-rails/blob/master/elasticsearch-persistence/README.md)
134+
* [[README]](https://github.com/elastic/elasticsearch-rails/blob/main/elasticsearch-persistence/README.md)
135135
* [[Documentation]](http://rubydoc.info/gems/elasticsearch-persistence/)
136-
* [[Test Suite]](https://github.com/elastic/elasticsearch-rails/tree/master/elasticsearch-persistence/spec)
136+
* [[Test Suite]](https://github.com/elastic/elasticsearch-rails/tree/main/elasticsearch-persistence/spec)
137137

138138
### Rails
139139

140-
* [[README]](https://github.com/elastic/elasticsearch-rails/blob/master/elasticsearch-rails/README.md)
140+
* [[README]](https://github.com/elastic/elasticsearch-rails/blob/main/elasticsearch-rails/README.md)
141141
* [[Documentation]](http://rubydoc.info/gems/elasticsearch-rails)
142-
* [[Test Suite]](https://github.com/elastic/elasticsearch-rails/tree/master/elasticsearch-rails/spec)
142+
* [[Test Suite]](https://github.com/elastic/elasticsearch-rails/tree/main/elasticsearch-rails/spec)
143143

144144
## Development
145145

elasticsearch-model/README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ It aims to simplify integration of Ruby classes ("models"), commonly found e.g.
88

99
This library is compatible with Ruby 2.4 and higher.
1010

11-
The library version numbers follow the Elasticsearch major versions. The `master` branch is compatible with the latest Elasticsearch stack stable release.
11+
The library version numbers follow the Elasticsearch major versions. The `main` branch is compatible with the latest Elasticsearch stack stable release.
1212

1313
| Rubygem | | Elasticsearch |
1414
|:-------------:|:-:| :-----------: |
1515
| 0.1 || 1.x |
1616
| 2.x || 2.x |
1717
| 5.x || 5.x |
1818
| 6.x || 6.x |
19-
| master || 7.x |
19+
| main || 7.x |
2020

2121
## Installation
2222

@@ -116,7 +116,7 @@ See the `Elasticsearch::Model` module documentation for technical information.
116116

117117
### The Elasticsearch client
118118

119-
The module will set up a [client](https://github.com/elastic/elasticsearch-ruby/tree/master/elasticsearch),
119+
The module will set up a [client](https://github.com/elastic/elasticsearch-ruby/tree/main/elasticsearch),
120120
connected to `localhost:9200`, by default. You can access and use it as any other `Elasticsearch::Client`:
121121

122122
```ruby
@@ -139,7 +139,7 @@ Elasticsearch::Model.client = Elasticsearch::Client.new log: true
139139
You might want to do this during your application bootstrap process, e.g. in a Rails initializer.
140140

141141
Please refer to the
142-
[`elasticsearch-transport`](https://github.com/elastic/elasticsearch-ruby/tree/master/elasticsearch-transport)
142+
[`elasticsearch-transport`](https://github.com/elastic/elasticsearch-ruby/tree/main/elasticsearch-transport)
143143
library documentation for all the configuration options, and to the
144144
[`elasticsearch-api`](http://rubydoc.info/gems/elasticsearch-api) library documentation
145145
for information about the Ruby client API.
@@ -248,7 +248,7 @@ response.records.order(:title).to_a
248248
The `records` method returns the real instances of your model, which is useful when you want to access your
249249
model methods -- at the expense of slowing down your application, of course.
250250
In most cases, working with `results` coming from Elasticsearch is sufficient, and much faster. See the
251-
[`elasticsearch-rails`](https://github.com/elastic/elasticsearch-rails/tree/master/elasticsearch-rails)
251+
[`elasticsearch-rails`](https://github.com/elastic/elasticsearch-rails/tree/main/elasticsearch-rails)
252252
library for more information about compatibility with the Ruby on Rails framework.
253253

254254
When you want to access both the database `records` and search `results`, use the `each_with_hit`
@@ -343,7 +343,7 @@ response.results.first.title
343343
# => "Quick brown fox"
344344
```
345345

346-
Also, you can use the [**`elasticsearch-dsl`**](https://github.com/elastic/elasticsearch-ruby/tree/master/elasticsearch-dsl) library, which provides a specialized Ruby API for the Elasticsearch Query DSL:
346+
Also, you can use the [**`elasticsearch-dsl`**](https://github.com/elastic/elasticsearch-ruby/tree/main/elasticsearch-dsl) library, which provides a specialized Ruby API for the Elasticsearch Query DSL:
347347

348348
```ruby
349349
require 'elasticsearch/dsl'

elasticsearch-persistence/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ Persistence layer for Ruby domain objects in Elasticsearch, using the Repository
66

77
This library is compatible with Ruby 2.4 and higher.
88

9-
The library version numbers follow the Elasticsearch major versions. The `master` branch is compatible with the latest Elasticsearch stack stable release.
9+
The library version numbers follow the Elasticsearch major versions. The `main` branch is compatible with the latest Elasticsearch stack stable release.
1010

1111
| Rubygem | | Elasticsearch |
1212
|:-------------:|:-:| :-----------: |
1313
| 0.1 || 1.x |
1414
| 2.x || 2.x |
1515
| 5.x || 5.x |
1616
| 6.x || 6.x |
17-
| master || 7.x |
17+
| main || 7.x |
1818

1919
## Installation
2020

elasticsearch-rails/README.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# Elasticsearch::Rails
22

33
The `elasticsearch-rails` library is a companion for the
4-
the [`elasticsearch-model`](https://github.com/elastic/elasticsearch-rails/tree/master/elasticsearch-model)
4+
the [`elasticsearch-model`](https://github.com/elastic/elasticsearch-rails/tree/main/elasticsearch-model)
55
library, providing features suitable for Ruby on Rails applications.
66

77
## Compatibility
88

99
This library is compatible with Ruby 1.9.3 and higher.
1010

11-
The library version numbers follow the Elasticsearch major versions, and the `master` branch
11+
The library version numbers follow the Elasticsearch major versions, and the `main` branch
1212
is compatible with the Elasticsearch `master` branch, therefore, with the next major version.
1313

1414
| Rubygem | | Elasticsearch |
@@ -18,7 +18,7 @@ is compatible with the Elasticsearch `master` branch, therefore, with the next m
1818
| 5.x || 5.x |
1919
| 6.x || 6.x |
2020
| 7.x || 7.x |
21-
| master || master |
21+
| main || master |
2222

2323
## Installation
2424

@@ -101,30 +101,30 @@ You should see the duration of the request to Elasticsearch as part of each log
101101
You can generate a fully working example Ruby on Rails application, with an `Article` model and a search form,
102102
to play with (it generates the application skeleton and leaves you with a _Git_ repository to explore the
103103
steps and the code) with the
104-
[`01-basic.rb`](https://github.com/elastic/elasticsearch-rails/blob/master/elasticsearch-rails/lib/rails/templates/01-basic.rb) template:
104+
[`01-basic.rb`](https://github.com/elastic/elasticsearch-rails/blob/main/elasticsearch-rails/lib/rails/templates/01-basic.rb) template:
105105

106106
```bash
107-
rails new searchapp --skip --skip-bundle --template https://raw.github.com/elastic/elasticsearch-rails/master/elasticsearch-rails/lib/rails/templates/01-basic.rb
107+
rails new searchapp --skip --skip-bundle --template https://raw.github.com/elastic/elasticsearch-rails/main/elasticsearch-rails/lib/rails/templates/01-basic.rb
108108
```
109109

110110
Run the same command again, in the same folder, with the
111-
[`02-pretty`](https://github.com/elastic/elasticsearch-rails/blob/master/elasticsearch-rails/lib/rails/templates/02-pretty.rb)
111+
[`02-pretty`](https://github.com/elastic/elasticsearch-rails/blob/main/elasticsearch-rails/lib/rails/templates/02-pretty.rb)
112112
template to add features such as a custom `Article.search` method, result highlighting and
113113
[_Bootstrap_](http://getbootstrap.com) integration:
114114

115115
```bash
116-
rails new searchapp --skip --skip-bundle --template https://raw.github.com/elastic/elasticsearch-rails/master/elasticsearch-rails/lib/rails/templates/02-pretty.rb
116+
rails new searchapp --skip --skip-bundle --template https://raw.github.com/elastic/elasticsearch-rails/main/elasticsearch-rails/lib/rails/templates/02-pretty.rb
117117
```
118118

119-
Run the same command with the [`03-expert.rb`](https://github.com/elastic/elasticsearch-rails/blob/master/elasticsearch-rails/lib/rails/templates/03-expert.rb)
119+
Run the same command with the [`03-expert.rb`](https://github.com/elastic/elasticsearch-rails/blob/main/elasticsearch-rails/lib/rails/templates/03-expert.rb)
120120
template to refactor the application into a more complex use case,
121121
with couple of hundreds of The New York Times articles as the example content.
122122
The template will extract the Elasticsearch integration into a `Searchable` "concern" module,
123123
define complex mapping, custom serialization, implement faceted navigation and suggestions as a part of
124124
a complex query, and add a _Sidekiq_-based worker for updating the index in the background.
125125

126126
```bash
127-
rails new searchapp --skip --skip-bundle --template https://raw.github.com/elastic/elasticsearch-rails/master/elasticsearch-rails/lib/rails/templates/03-expert.rb
127+
rails new searchapp --skip --skip-bundle --template https://raw.github.com/elastic/elasticsearch-rails/main/elasticsearch-rails/lib/rails/templates/03-expert.rb
128128
```
129129

130130
## License

elasticsearch-rails/elasticsearch-rails.gemspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Gem::Specification.new do |s|
3131
s.license = 'Apache 2'
3232
s.metadata = {
3333
'homepage_uri' => 'https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/ruby_on_rails.html',
34-
'changelog_uri' => 'https://github.com/elastic/elasticsearch-rails/blob/master/CHANGELOG.md',
34+
'changelog_uri' => 'https://github.com/elastic/elasticsearch-rails/blob/main/CHANGELOG.md',
3535
'source_code_uri' => 'https://github.com/elastic/elasticsearch-rails/',
3636
'bug_tracker_uri' => 'https://github.com/elastic/elasticsearch-rails/issues'
3737
}

elasticsearch-rails/lib/rails/templates/01-basic.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
# Usage:
3333
# ------
3434
#
35-
# $ rails new searchapp --skip --skip-bundle --template https://raw.github.com/elasticsearch/elasticsearch-rails/master/elasticsearch-rails/lib/rails/templates/01-basic.rb
35+
# $ rails new searchapp --skip --skip-bundle --template https://raw.github.com/elasticsearch/elasticsearch-rails/main/elasticsearch-rails/lib/rails/templates/01-basic.rb
3636
#
3737
# =====================================================================================================
3838

@@ -112,7 +112,7 @@
112112
search engine with the {Ruby On Rails}[http://rubyonrails.org] web framework.
113113
114114
It has been generated by application templates available at
115-
https://github.com/elasticsearch/elasticsearch-rails/tree/master/elasticsearch-rails/lib/rails/templates.
115+
https://github.com/elasticsearch/elasticsearch-rails/tree/main/elasticsearch-rails/lib/rails/templates.
116116
117117
## [1] Basic
118118

elasticsearch-rails/lib/rails/templates/02-pretty.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18-
# $ rails new searchapp --skip --skip-bundle --template https://raw.github.com/elasticsearch/elasticsearch-rails/master/elasticsearch-rails/lib/rails/templates/02-pretty.rb
18+
# $ rails new searchapp --skip --skip-bundle --template https://raw.github.com/elasticsearch/elasticsearch-rails/main/elasticsearch-rails/lib/rails/templates/02-pretty.rb
1919

2020
unless File.read('README.md').include? '## [1] Basic'
2121
say_status "ERROR", "You have to run the 01-basic.rb template first.", :red

0 commit comments

Comments
 (0)