bundler-site icon indicating copy to clipboard operation
bundler-site copied to clipboard

Update creating_gem.en.html.md

Open Mth0158 opened this issue 3 years ago β€’ 11 comments

Making a proposal to update the wiki from this issue: Issue 4458

The descriptions of the fields to complete come from Rubygems.

Mth0158

What was the end-user problem that led to this PR?

If metadata["allowed_push_host"] is not commented and you are not using your own ruby gem server you will not be able to push your gem to rubygems.org. This causes an error that is not displayed on the CLI and is very confusing.

What was your diagnosis of the problem?

The diagnosis was previously made on the issue.

What is your fix for the problem, implemented in this PR?

To explicitly write in the wiki to comment this line in gemspec file if you do not use your own gem server.

Why did you choose this fix out of the possible options?

Making the tutorial a bit more user-friendy.

Mth0158 avatar Jun 08 '21 09:06 Mth0158

It also might be a plus to change the line in the gemspec for people that skip the tutorial.

spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"

=> spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com' or comment this line if your are not using a gem server to push your gem"

Mth0158 avatar Jun 08 '21 10:06 Mth0158

Should we comment out this line, or even remove it? It seems like a small feature only useful for private gems that makes things more inconvenient for the rest of the world.

deivid-rodriguez avatar Jun 09 '21 07:06 deivid-rodriguez

For what it's worth, we added this line because there was a high support load of helping people remove private gems that they didn't mean to push to rubygems.org.

It's very confusing that the error is silent, but I don't know if just letting people accidentally publish code they need our help to remove is better. πŸ˜…

indirect avatar Jun 09 '21 18:06 indirect

Right, I missed that context. Suggestion retired then :)

I think changing the line from http://mygemserver.com to https://mygemserver.com might do the trick, then?

deivid-rodriguez avatar Jun 09 '21 18:06 deivid-rodriguez

Hmmm.... maybe we could make the private config line an option? "DO YOU WANT ALL GEMS YOU MAKE TO BE PUBLIC Y/N IF YOU DO THIS WE WILL NOT HELP YOU WHEN YOU ACCIDENTALLY PUBLISH YOUR COMPANY'S PRIVATE CODE" πŸ˜…

indirect avatar Jun 09 '21 19:06 indirect

@indirect A setting to configure whether to generate the allowed_push_host setting or not sounds good to me! But using https in the current placeholder would also alleviate the issue in any case, and is straightforward, so I would start with that.

deivid-rodriguez avatar Jun 10 '21 21:06 deivid-rodriguez

Great, let’s do it. πŸ™‚

indirect avatar Jun 10 '21 21:06 indirect

@sonalkr132 beat me to it :smiley:

deivid-rodriguez avatar Jun 14 '21 07:06 deivid-rodriguez

Hi @Mth0158. In #625, I moved the target file source/localizable/v2.2/guides/creating_gem.en.html.md to source/localizable/guides/creating_gem.en.html.md, so could you mind updating your change? You can do it just move the file to source/localizable/guides.

tnir avatar Jul 15 '22 06:07 tnir

Done @tnir ✌🏼

Mth0158 avatar Jul 19 '22 17:07 Mth0158

@Mth0158 Could you address file conflicts to get this ready? πŸ™

tnir avatar Jul 20 '22 05:07 tnir

@Mth0158 Could you address file conflicts to get this ready? πŸ™ This is a friendly reminder.

tnir avatar Jan 04 '23 01:01 tnir

Hi @tnir,

I have rebased the branch onto master, but pushed a new PR. I am closing this one so we can finish the work on the newly created one.

Let me know if further changes are needed, or if you need any help on other subjects,

Mth0158 avatar Jan 05 '23 10:01 Mth0158