1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

22 commits

Author SHA1 Message Date
Haroon Ahmed
db1ae8cbb4 remove reference to global rails command and replace with bin/rails 2019-12-27 19:32:37 +00:00
Bart de Water
eb5fea40a4 Enable Start/EndWith and RegexpMatch cops
In cases where the MatchData object is not used, this provides a speed-up:
https://github.com/JuanitoFatas/fast-ruby/#stringmatch-vs-stringmatch-vs-stringstart_withstringend_with-code-start-code-end
2018-07-28 17:37:17 -04:00
Alberto Almagro
40b209db53 Recommend use of rails over bin/rails
As discussed in #33203 rails command already looks for, and runs,
bin/rails if it is present.

We were mixing recommendations within guides and USAGE guidelines,
in some files we recommended using rails, in others bin/rails and
in some cases we even had both options mixed together.
2018-07-06 22:46:35 +02:00
Stefan Wrobel
76e545546c
Fix secrets command deprecation message 2017-12-11 21:39:41 -08:00
Kasper Timm Hansen
bb30f05f38
Deprecate encrypted secrets in favor of credentials.
Allow edits of existing encrypted secrets generated on Rails 5.1,
but refer to credentials when attempting to setup.

This also removes the need for any of the setup code, so the
generator can be ripped out altogether.
2017-11-12 17:50:09 +01:00
Akira Matsuda
6a728491b6 [Railties] require_relative => require
This basically reverts 618268b4b9
2017-10-21 22:48:26 +09:00
Pat Allan
acea68de02 Adding frozen_string_literal pragma to Railties. 2017-08-14 19:08:09 +02:00
yuuji.yaginuma
af5368eeff Add rails secrets:show command
When secrets confirmed with the `secrets:edit` command, `secrets.yml.enc`
will change without updating the secrets.

Therefore, even if only want to check secrets, the difference will come
out. This is a little inconvenient.

In order to solve this problem, added the `secrets:show` command.
If just want to check secrets, no difference will occur use this command.
2017-07-07 07:22:01 +09:00
Akira Matsuda
618268b4b9 [Railties] require => require_relative 2017-07-01 18:35:43 +09:00
Kasper Timm Hansen
f81f840c02 Access EDITOR through Ruby's cross-platform ENV.
Fix the mistake of not using Ruby's ENV hash from the get go and get
windows support.
2017-06-11 12:22:39 +02:00
Kasper Timm Hansen
0338c81dc2 Reorder first secrets edit flow.
Setup config/secrets.yml.enc with template contents for people to edit.

Then generate encryption key and encrypt the initial secrets.
2017-05-25 15:56:55 +02:00
Kasper Timm Hansen
f504717519 Remove needless waiting message.
Needed back when we attempted to wait for editors, but now we expect
users to pass a -w flag to their $EDITOR.
2017-05-23 21:48:05 +02:00
Kasper Timm Hansen
9f9e57339b Merge pull request #28182 from y-yagi/show_correct_rails_commands
Show correct commands in help
2017-03-09 20:27:39 +01:00
Kasper Timm Hansen
b16dcc872b [ci skip] Document read_encrypted_secrets config.
Mostly just that it's there.

Closes #28193.
2017-03-09 20:21:52 +01:00
yuuji.yaginuma
54ee15a203 Show correct commands in help
Currently rails' help shows only namespace. However, the secrets command
needs to specify command. Therefore, I fixed the command to display in help.
2017-03-03 08:18:51 +09:00
yuuji.yaginuma
3279394c45 Convert ENV["EDITOR"] to string before check
In order to avoid `NoMethodError` when it is nil.

Follow up to 82f7dc6178
2017-03-02 19:08:15 +09:00
Kasper Timm Hansen
84bc9a50d3 Put it to me straight: just say it.
Prefer Thor's say method to Kernel's plain puts.
2017-03-01 20:44:35 +01:00
Kasper Timm Hansen
82f7dc6178 Tell users how to assign a $EDITOR.
In case there's no $EDITOR assigned users would see a cryptic:

```
% EDITOR= bin/rails secrets:edit
Waiting for secrets file to be saved. Abort with Ctrl-C.
sh: /var/folders/wd/xnncwqp96rj0v1y2nms64mq80000gn/T/secrets.yml.enc: Permission denied
New secrets encrypted and saved.
```

That error is misleading, so give a hint in this easily detectable case.

Fixes #28143.
2017-03-01 20:44:17 +01:00
Kasper Timm Hansen
9fdf326a5f Yank the intricate immediately-exiting editor recognition.
Most editors support a wait flag of some kind which prevents their
process from exiting until the file or window is closed.

Prefer people to assign that themselves than us mucking around
with File mtimes or other such things.

Example of an editor config:

```
export EDITOR="atom --wait"
```
2017-02-23 18:47:23 +01:00
Kasper Timm Hansen
fbee4e3ce3 Revert "Revert "Add encrypted secrets"" 2017-02-23 18:15:28 +01:00
David Heinemeier Hansson
039380e3ee Revert "Add encrypted secrets" (#28127) 2017-02-23 15:55:15 +01:00
Kasper Timm Hansen
1166094569 Add encrypted secrets (#28038) 2017-02-23 15:01:02 +01:00