Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update creating_gem.en.html.md #579

Closed
wants to merge 2 commits into from
Closed

Conversation

Mth0158
Copy link

@Mth0158 Mth0158 commented Jun 8, 2021

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.

Making a proposal to update the wiki from this issue: rubygems/rubygems#4458

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.
The descriptions of the fields to complete come from Rubygems.

Mth0158
@Mth0158
Copy link
Author

Mth0158 commented Jun 8, 2021

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"

Copy link
Member

@olleolleolle olleolleolle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Helpful notes! ❤️

I suggested a formatting change, but more important: periods at the ends of sentences.

* *homepage:* The URL of your gem's home page, it can be the URL of its website or public repo
* *metadata["allowed_push_host"]:* The field allows you to restrict gem pushes to a single host. If you are not running your own gem server you should comment this line, otherwise you will not be able to push your gem to rubygems.org.
* *metadata["source_code_uri"]:* The URL of your gem's public repo
* *metadata["changelog_uri"]:* The URL of your gem's CHANGELOG.md
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* *metadata["changelog_uri"]:* The URL of your gem's CHANGELOG.md
* `metadata["changelog_uri"]`: The URL of your gem's CHANGELOG.md.

* *description (optional):* A long description of your gem. The description should be more detailed than the summary but not excessively long. A few paragraphs is a recommended length with no examples or formatting.
* *homepage:* The URL of your gem's home page, it can be the URL of its website or public repo
* *metadata["allowed_push_host"]:* The field allows you to restrict gem pushes to a single host. If you are not running your own gem server you should comment this line, otherwise you will not be able to push your gem to rubygems.org.
* *metadata["source_code_uri"]:* The URL of your gem's public repo
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* *metadata["source_code_uri"]:* The URL of your gem's public repo
* `metadata["source_code_uri"]`: The URL of your gem's public repo.

* Fields to complete:
* *summary:* A short summary of your gem's description.
* *description (optional):* A long description of your gem. The description should be more detailed than the summary but not excessively long. A few paragraphs is a recommended length with no examples or formatting.
* *homepage:* The URL of your gem's home page, it can be the URL of its website or public repo
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* *homepage:* The URL of your gem's home page, it can be the URL of its website or public repo
* `homepage`: The URL of your gem's home page, it can be the URL of its website or public repo.

@@ -83,6 +83,13 @@ extension and the _.bundle_ directory.
* **foodie.gemspec**: The Gem Specification file. This is
where we provide information for Rubygems' consumption such as the name, description and homepage
of our gem. This is also where we specify the dependencies our gem needs to run.
* Fields to complete:
* *summary:* A short summary of your gem's description.
* *description (optional):* A long description of your gem. The description should be more detailed than the summary but not excessively long. A few paragraphs is a recommended length with no examples or formatting.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* *description (optional):* A long description of your gem. The description should be more detailed than the summary but not excessively long. A few paragraphs is a recommended length with no examples or formatting.
* `description` (optional): A long description of your gem. The description should be more detailed than the summary but not excessively long. A few paragraphs is a recommended length with no examples or formatting.

@@ -83,6 +83,13 @@ extension and the _.bundle_ directory.
* **foodie.gemspec**: The Gem Specification file. This is
where we provide information for Rubygems' consumption such as the name, description and homepage
of our gem. This is also where we specify the dependencies our gem needs to run.
* Fields to complete:
* *summary:* A short summary of your gem's description.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* *summary:* A short summary of your gem's description.
* `summary`: A short summary of your gem's description.

* *summary:* A short summary of your gem's description.
* *description (optional):* A long description of your gem. The description should be more detailed than the summary but not excessively long. A few paragraphs is a recommended length with no examples or formatting.
* *homepage:* The URL of your gem's home page, it can be the URL of its website or public repo
* *metadata["allowed_push_host"]:* The field allows you to restrict gem pushes to a single host. If you are not running your own gem server you should comment this line, otherwise you will not be able to push your gem to rubygems.org.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

running your own gem server

That's really advanced stuff for beginner. Is there any chance to reword this to make it clear by allowing rubygems.org you'll be able to push to public (accessible by everyone) repository and this is needed for this guide to be able to publish in the end?

@deivid-rodriguez
Copy link
Member

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.

@indirect
Copy link
Member

indirect commented Jun 9, 2021

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. 😅

@deivid-rodriguez
Copy link
Member

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?

@indirect
Copy link
Member

indirect commented Jun 9, 2021

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" 😅

@deivid-rodriguez
Copy link
Member

@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.

@indirect
Copy link
Member

Great, let’s do it. 🙂

@deivid-rodriguez
Copy link
Member

@sonalkr132 beat me to it 😃

@tnir
Copy link
Collaborator

tnir commented Jul 15, 2022

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.

@Mth0158
Copy link
Author

Mth0158 commented Jul 19, 2022

Done @tnir ✌🏼

Comment on lines +91 to +92
* *metadata["source_code_uri"]:* The URL of your gem's public repo
* *metadata["changelog_uri"]:* The URL of your gem's CHANGELOG.md
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool addition.

Here's a small tweak:

Suggested change
* *metadata["source_code_uri"]:* The URL of your gem's public repo
* *metadata["changelog_uri"]:* The URL of your gem's CHANGELOG.md
* *metadata["source_code_uri"]:* The URL of your gem's public repo.
* *metadata["changelog_uri"]:* The URL of your gem's CHANGELOG.
  • Ending sentences in a period.
  • Avoiding deciding on what file format a changelog has.

@tnir
Copy link
Collaborator

tnir commented Jul 20, 2022

@Mth0158 Could you address file conflicts to get this ready? 🙏

@tnir
Copy link
Collaborator

tnir commented Jan 4, 2023

@Mth0158 Could you address file conflicts to get this ready? 🙏
This is a friendly reminder.

@Mth0158
Copy link
Author

Mth0158 commented Jan 5, 2023

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 Mth0158 closed this Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants