Skip to content

Commit f79217f

Browse files
committed
Updated the Bundler instructions and Github URLs in the READMEs
1 parent 3cc92cd commit f79217f

File tree

4 files changed

+22
-34
lines changed

4 files changed

+22
-34
lines changed

README.md

+3-15
Original file line numberDiff line numberDiff line change
@@ -39,23 +39,11 @@ gem install elasticsearch-model
3939
gem install elasticsearch-rails
4040
```
4141

42-
To use an unreleased version, either add it to your `Gemfile` for [Bundler](http://gembundler.com):
42+
To use an unreleased version, add it to your `Gemfile` for [Bundler](http://bundler.io):
4343

4444
```ruby
45-
gem 'elasticsearch-model', git: 'git://github.com/elasticsearch/elasticsearch-rails.git'
46-
gem 'elasticsearch-rails', git: 'git://github.com/elasticsearch/elasticsearch-rails.git'
47-
```
48-
49-
or install it from a source code checkout:
50-
51-
```bash
52-
git clone https://github.com/elasticsearch/elasticsearch-rails.git
53-
cd elasticsearch-model
54-
bundle install
55-
rake install
56-
cd elasticsearch-rails
57-
bundle install
58-
rake install
45+
gem 'elasticsearch-model', github: 'elastic/elasticsearch-rails', branch: '5.x'
46+
gem 'elasticsearch-rails', github: 'elastic/elasticsearch-rails', branch: '5.x'
5947
```
6048

6149
## Usage

elasticsearch-model/README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ Install the package from [Rubygems](https://rubygems.org):
2929

3030
To use an unreleased version, either add it to your `Gemfile` for [Bundler](http://bundler.io):
3131

32-
gem 'elasticsearch-model', git: 'git://github.com/elasticsearch/elasticsearch-rails.git'
32+
gem 'elasticsearch-model', git: 'git://github.com/elastic/elasticsearch-rails.git', branch: '5.x'
3333

3434
or install it from a source code checkout:
3535

36-
git clone https://github.com/elasticsearch/elasticsearch-rails.git
36+
git clone https://github.com/elastic/elasticsearch-rails.git
3737
cd elasticsearch-rails/elasticsearch-model
3838
bundle install
3939
rake install
@@ -121,7 +121,7 @@ See the `Elasticsearch::Model` module documentation for technical information.
121121

122122
### The Elasticsearch client
123123

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

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

146146
Please refer to the
147-
[`elasticsearch-transport`](https://github.com/elasticsearch/elasticsearch-ruby/tree/master/elasticsearch-transport)
147+
[`elasticsearch-transport`](https://github.com/elastic/elasticsearch-ruby/tree/master/elasticsearch-transport)
148148
library documentation for all the configuration options, and to the
149149
[`elasticsearch-api`](http://rubydoc.info/gems/elasticsearch-api) library documentation
150150
for information about the Ruby client API.
@@ -253,7 +253,7 @@ response.records.order(:title).to_a
253253
The `records` method returns the real instances of your model, which is useful when you want to access your
254254
model methods -- at the expense of slowing down your application, of course.
255255
In most cases, working with `results` coming from Elasticsearch is sufficient, and much faster. See the
256-
[`elasticsearch-rails`](https://github.com/elasticsearch/elasticsearch-rails/tree/master/elasticsearch-rails)
256+
[`elasticsearch-rails`](https://github.com/elastic/elasticsearch-rails/tree/master/elasticsearch-rails)
257257
library for more information about compatibility with the Ruby on Rails framework.
258258

259259
When you want to access both the database `records` and search `results`, use the `each_with_hit`

elasticsearch-persistence/README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ Install the package from [Rubygems](https://rubygems.org):
2424

2525
To use an unreleased version, either add it to your `Gemfile` for [Bundler](http://bundler.io):
2626

27-
gem 'elasticsearch-persistence', git: 'git://github.com/elasticsearch/elasticsearch-rails.git'
27+
gem 'elasticsearch-persistence', git: 'git://github.com/elastic/elasticsearch-rails.git', branch: '5.x'
2828

2929
or install it from a source code checkout:
3030

31-
git clone https://github.com/elasticsearch/elasticsearch-rails.git
31+
git clone https://github.com/elastic/elasticsearch-rails.git
3232
cd elasticsearch-rails/elasticsearch-persistence
3333
bundle install
3434
rake install
@@ -112,7 +112,7 @@ repository.delete(note)
112112

113113
The repository module provides a number of features and facilities to configure and customize the behavior:
114114

115-
* Configuring the Elasticsearch [client](https://github.com/elasticsearch/elasticsearch-ruby#usage) being used
115+
* Configuring the Elasticsearch [client](https://github.com/elastic/elasticsearch-ruby#usage) being used
116116
* Setting the index name, document type, and object class for deserialization
117117
* Composing mappings and settings for the index
118118
* Creating, deleting or refreshing the index
@@ -263,7 +263,7 @@ puts repository.find(1).attributes['image']
263263

264264
##### Client
265265

266-
The repository uses the standard Elasticsearch [client](https://github.com/elasticsearch/elasticsearch-ruby#usage),
266+
The repository uses the standard Elasticsearch [client](https://github.com/elastic/elasticsearch-ruby#usage),
267267
which is accessible with the `client` getter and setter methods:
268268

269269
```ruby
@@ -622,7 +622,7 @@ puts results.response.aggregations.authors.buckets.each { |b| puts "#{b['key']}
622622

623623
#### The Elasticsearch Client
624624

625-
The module will set up a [client](https://github.com/elasticsearch/elasticsearch-ruby/tree/master/elasticsearch),
625+
The module will set up a [client](https://github.com/elastic/elasticsearch-ruby/tree/master/elasticsearch),
626626
connected to `localhost:9200`, by default.
627627

628628
To use a client with different configuration:
@@ -688,7 +688,7 @@ rails generate scaffold Person name:String email:String birthday:Date --orm=elas
688688
A fully working Ruby on Rails application can be generated with the following command:
689689

690690
```bash
691-
rails new music --force --skip --skip-bundle --skip-active-record --template https://raw.githubusercontent.com/elasticsearch/elasticsearch-rails/master/elasticsearch-persistence/examples/music/template.rb
691+
rails new music --force --skip --skip-bundle --skip-active-record --template https://raw.githubusercontent.com/elastic/elasticsearch-rails/master/elasticsearch-persistence/examples/music/template.rb
692692
```
693693

694694
The application demonstrates:

elasticsearch-rails/README.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ Install the package from [Rubygems](https://rubygems.org):
2626

2727
To use an unreleased version, either add it to your `Gemfile` for [Bundler](http://bundler.io):
2828

29-
gem 'elasticsearch-rails', git: 'git://github.com/elasticsearch/elasticsearch-rails.git'
29+
gem 'elasticsearch-rails', git: 'git://github.com/elastic/elasticsearch-rails.git', branch: '5.x'
3030

3131
or install it from a source code checkout:
3232

33-
git clone https://github.com/elasticsearch/elasticsearch-rails.git
33+
git clone https://github.com/elastic/elasticsearch-rails.git
3434
cd elasticsearch-rails/elasticsearch-rails
3535
bundle install
3636
rake install
@@ -99,30 +99,30 @@ You should see the duration of the request to Elasticsearch as part of each log
9999
You can generate a fully working example Ruby on Rails application, with an `Article` model and a search form,
100100
to play with (it even downloads _Elasticsearch_ itself, generates the application skeleton and leaves you with
101101
a _Git_ repository to explore the steps and the code) with the
102-
[`01-basic.rb`](https://github.com/elasticsearch/elasticsearch-rails/blob/master/elasticsearch-rails/lib/rails/templates/01-basic.rb) template:
102+
[`01-basic.rb`](https://github.com/elastic/elasticsearch-rails/blob/master/elasticsearch-rails/lib/rails/templates/01-basic.rb) template:
103103

104104
```bash
105-
rails new searchapp --skip --skip-bundle --template https://raw.github.com/elasticsearch/elasticsearch-rails/master/elasticsearch-rails/lib/rails/templates/01-basic.rb
105+
rails new searchapp --skip --skip-bundle --template https://raw.github.com/elastic/elasticsearch-rails/master/elasticsearch-rails/lib/rails/templates/01-basic.rb
106106
```
107107

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

113113
```bash
114-
rails new searchapp --skip --skip-bundle --template https://raw.github.com/elasticsearch/elasticsearch-rails/master/elasticsearch-rails/lib/rails/templates/02-pretty.rb
114+
rails new searchapp --skip --skip-bundle --template https://raw.github.com/elastic/elasticsearch-rails/master/elasticsearch-rails/lib/rails/templates/02-pretty.rb
115115
```
116116

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

124124
```bash
125-
rails new searchapp --skip --skip-bundle --template https://raw.github.com/elasticsearch/elasticsearch-rails/master/elasticsearch-rails/lib/rails/templates/03-expert.rb
125+
rails new searchapp --skip --skip-bundle --template https://raw.github.com/elastic/elasticsearch-rails/master/elasticsearch-rails/lib/rails/templates/03-expert.rb
126126
```
127127

128128
## License

0 commit comments

Comments
 (0)