summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-03-28 16:46:13 +0100
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-07-10 23:23:17 +0200
commit8b9fbbb2df6f84ccc9f6558effe56ea59268ecc5 (patch)
tree49f3fe87b8a9e3a727a2eaf919a342a266718abe
parentef38c97fbf66563043b17eba09f78dffa415c094 (diff)
downloadbundler-improve_quality_specs.tar.gz
Check for straneous quotesimprove_quality_specs
And use single quotes consistenly.
-rw-r--r--README.md4
-rw-r--r--doc/POLICIES.md12
-rw-r--r--doc/contributing/BUG_TRIAGE.md2
-rw-r--r--doc/contributing/COMMUNITY.md4
-rw-r--r--doc/contributing/GETTING_HELP.md2
-rw-r--r--doc/contributing/HOW_YOU_CAN_HELP.md2
-rw-r--r--doc/contributing/README.md2
-rw-r--r--doc/development/NEW_FEATURES.md2
-rw-r--r--doc/documentation/README.md2
-rw-r--r--lib/bundler/templates/newgem/README.md.tt2
-rw-r--r--spec/quality_spec.rb25
11 files changed, 42 insertions, 17 deletions
diff --git a/README.md b/README.md
index da7fd7c275..13bc8f4ff1 100644
--- a/README.md
+++ b/README.md
@@ -48,7 +48,7 @@ If you'd like to contribute to Bundler, that's awesome, and we <3 you. We've put
If you'd like to request a substantial change to Bundler or to the Bundler documentation, refer to the [Bundler RFC process](https://github.com/bundler/rfcs) for more information.
-While some Bundler contributors are compensated by Ruby Together, the project maintainers make decisions independent of Ruby Together. As a project, we welcome contributions regardless of the author’s affiliation with Ruby Together.
+While some Bundler contributors are compensated by Ruby Together, the project maintainers make decisions independent of Ruby Together. As a project, we welcome contributions regardless of the author's affiliation with Ruby Together.
### Supporting
@@ -57,7 +57,7 @@ While some Bundler contributors are compensated by Ruby Together, the project ma
### Code of Conduct
-Everyone interacting in the Bundler project’s codebases, issue trackers, chat rooms, and mailing lists is expected to follow the [Bundler code of conduct](https://github.com/bundler/bundler/blob/master/CODE_OF_CONDUCT.md).
+Everyone interacting in the Bundler project's codebases, issue trackers, chat rooms, and mailing lists is expected to follow the [Bundler code of conduct](https://github.com/bundler/bundler/blob/master/CODE_OF_CONDUCT.md).
### License
diff --git a/doc/POLICIES.md b/doc/POLICIES.md
index 008883ab80..f01cfd6856 100644
--- a/doc/POLICIES.md
+++ b/doc/POLICIES.md
@@ -1,6 +1,6 @@
# Bundler Policies
-This document is an attempt to record the policies and processes that are used to govern the Bundler project--it’s not fixed or permanent, and will likely evolve as events warrant.
+This document is an attempt to record the policies and processes that are used to govern the Bundler project--it's not fixed or permanent, and will likely evolve as events warrant.
### Our Goals
@@ -9,7 +9,7 @@ This document is an attempt to record the policies and processes that are used t
2. Strive to empower Bundler contributors, as long as it does not harm users. For example, potential contributors should be able to set up a complete development and testing environment with a single command.
3. Strive to empower maintainers, as long as it does not harm contributors or users. For example, automating issue triage to reduce repetitive work for maintainers, as long as users with problems are not worse off.
-These policies are intended to be examples of how to apply these goals, and we realize that we can’t possibly cover every edge case or loophole. In any case where policies turn out to conflict with these goals, the goals should win.
+These policies are intended to be examples of how to apply these goals, and we realize that we can't possibly cover every edge case or loophole. In any case where policies turn out to conflict with these goals, the goals should win.
### Compatibility guidelines
@@ -62,16 +62,16 @@ Contributors who have contributed regularly for more than six months (or impleme
Bugfix releases should generally be cut as soon as possible. Multiple bugfix releases are preferable to waiting for a specific fix to land.
-Minor/feature releases can be cut anytime at least one new feature is ready, but don’t have to be. Minor version releases should include an update to the documentation website, allowing users to view the documentation for whatever minor version they happen to be using.
+Minor/feature releases can be cut anytime at least one new feature is ready, but don't have to be. Minor version releases should include an update to the documentation website, allowing users to view the documentation for whatever minor version they happen to be using.
Major version releases should be cut no more than once per year, ideally between Ruby's release on December 25 and February 15 of the next year. Releasing soon after Ruby helps us stay in sync with deprecated Ruby versions. Breaking changes other than dropping support for old Ruby versions should be avoided whenever possible, but may be included in major releases. In general, breaking changes should include at least one major version with a deprecation warning before the breaking change takes effect.
### Enforcement guidelines
-First off, Bundler’s policies and enforcement of those policies are subsidiary to [Bundler’s code of conduct](https://github.com/bundler/bundler/blob/master/CODE_OF_CONDUCT.md) in any case where they conflict. The first priority is treating human beings with respect and empathy, and figuring out project guidelines and sticking to them will always come after that.
+First off, Bundler's policies and enforcement of those policies are subsidiary to [Bundler's code of conduct](https://github.com/bundler/bundler/blob/master/CODE_OF_CONDUCT.md) in any case where they conflict. The first priority is treating human beings with respect and empathy, and figuring out project guidelines and sticking to them will always come after that.
-When it comes to carrying out our own policies, we’re all regular humans trying to do the best we can. There will probably be times when we don’t stick to our policies or goals. If you notice a discrepancy between real-life actions and these policies and goals, please bring it up! We want to make sure that our actions and our policies line up, and that our policies exemplify our goals.
+When it comes to carrying out our own policies, we're all regular humans trying to do the best we can. There will probably be times when we don't stick to our policies or goals. If you notice a discrepancy between real-life actions and these policies and goals, please bring it up! We want to make sure that our actions and our policies line up, and that our policies exemplify our goals.
-Policies are not set in stone, and may be revised if policy violations are found to be in the spirit of the project goals. Likewise, actions that violate the spirit of the project goals will be considered policy violations, and enforcement action will be taken. We’re not interested in rules-lawyering, and we will take action when needed to ensure that everyone feels safe and included.
+Policies are not set in stone, and may be revised if policy violations are found to be in the spirit of the project goals. Likewise, actions that violate the spirit of the project goals will be considered policy violations, and enforcement action will be taken. We're not interested in rules-lawyering, and we will take action when needed to ensure that everyone feels safe and included.
If you are comfortable reporting issues to the entire Bundler team, please send an email to team@bundler.io. If you are not comfortable reporting to the entire team, for any reason, please check the [maintainers team list](https://bundler.io/team) and use email, Twitter, or Slack to report to a single maintainer of your choice. Anyone violating a policy or goal is expected to cooperate with the team (and the reporter, if they request it) to resolve the issue in a way that follows the project goals.
diff --git a/doc/contributing/BUG_TRIAGE.md b/doc/contributing/BUG_TRIAGE.md
index fab584c7be..423e51ca24 100644
--- a/doc/contributing/BUG_TRIAGE.md
+++ b/doc/contributing/BUG_TRIAGE.md
@@ -41,7 +41,7 @@ Everyone is welcome and encouraged to fix any open bug, improve an error message
## Duplicates!
-Finally, the ticket may be a duplicate of another older ticket. If you notice a ticket is a duplicate, simply comment on the ticket noting the original ticket’s number. For example, you could say “This is a duplicate of issue #42, and can be closed”.
+Finally, the ticket may be a duplicate of another older ticket. If you notice a ticket is a duplicate, simply comment on the ticket noting the original ticket's number. For example, you could say “This is a duplicate of issue #42, and can be closed”.
## Stale issues
diff --git a/doc/contributing/COMMUNITY.md b/doc/contributing/COMMUNITY.md
index 7196ae7d1c..f39eb379e0 100644
--- a/doc/contributing/COMMUNITY.md
+++ b/doc/contributing/COMMUNITY.md
@@ -1,6 +1,6 @@
# Community
-Community is an important part of all we do. If you’d like to be part of the Bundler community, you can jump right in and start helping make Bundler better for everyone who uses it.
+Community is an important part of all we do. If you'd like to be part of the Bundler community, you can jump right in and start helping make Bundler better for everyone who uses it.
It would be tremendously helpful to have more people answering questions about Bundler (and often simply about [RubyGems](https://github.com/rubygems/rubygems) or Ruby itself) in our [issue tracker](https://github.com/bundler/bundler/issues) or on [Stack Overflow](http://stackoverflow.com/questions/tagged/bundler).
@@ -8,6 +8,6 @@ Additional documentation and explanation is always helpful, too. If you have any
Sharing your experiences and discoveries by writing them up is a valuable way to help others who have similar problems or experiences in the future. You can write a blog post, create an example and commit it to GitHub, take screenshots, or make videos.
-Publishing examples of how Bundler is used helps everyone, and we’ve discovered that people already use it in ways that we never imagined when we were writing it. If you’re still not sure what to write about, there are also several projects doing interesting things based on Bundler. They could probably use publicity too.
+Publishing examples of how Bundler is used helps everyone, and we've discovered that people already use it in ways that we never imagined when we were writing it. If you're still not sure what to write about, there are also several projects doing interesting things based on Bundler. They could probably use publicity too.
Finally, all contributors to the Bundler project must agree to the contributor [code of conduct](https://bundler.io/conduct.html). By participating in this project you agree to abide by its terms.
diff --git a/doc/contributing/GETTING_HELP.md b/doc/contributing/GETTING_HELP.md
index 11b5bf9b5e..139ea374cf 100644
--- a/doc/contributing/GETTING_HELP.md
+++ b/doc/contributing/GETTING_HELP.md
@@ -1,6 +1,6 @@
# Getting help
-If you have any questions after reading the documentation for contributing, please feel free to contact either [@indirect](https://github.com/indirect), [@segiddins](https://github.com/segiddins), or [@RochesterinNYC](https://github.com/RochesterinNYC). They are all happy to provide help working through your first bug fix or thinking through the problem you’re trying to resolve.
+If you have any questions after reading the documentation for contributing, please feel free to contact either [@indirect](https://github.com/indirect), [@segiddins](https://github.com/segiddins), or [@RochesterinNYC](https://github.com/RochesterinNYC). They are all happy to provide help working through your first bug fix or thinking through the problem you're trying to resolve.
The best ways to get in touch are:
diff --git a/doc/contributing/HOW_YOU_CAN_HELP.md b/doc/contributing/HOW_YOU_CAN_HELP.md
index 46cf33e65c..771d17e180 100644
--- a/doc/contributing/HOW_YOU_CAN_HELP.md
+++ b/doc/contributing/HOW_YOU_CAN_HELP.md
@@ -1,6 +1,6 @@
# How you can help: your first commits!
-If you’re interested in contributing to Bundler, that’s awesome! We’d love your help.
+If you're interested in contributing to Bundler, that's awesome! We'd love your help.
If at any point you get stuck, here's how to [get in touch with the Bundler team for help](GETTING_HELP.md).
diff --git a/doc/contributing/README.md b/doc/contributing/README.md
index a068ee5cb9..d08c7977b8 100644
--- a/doc/contributing/README.md
+++ b/doc/contributing/README.md
@@ -26,4 +26,4 @@ Here are the different ways you can start contributing to the Bundler project:
## Supporting Bundler
-[Ruby Together](https://rubytogether.org/) pays some Bundler maintainers for their work, funded directly by the Ruby community. If you’d like to support Bundler with a financial contribution, [become an individual sponsor](https://rubytogether.org/developers#plans). We also welcome financial [contributions from companies](https://rubytogether.org/companies#plans), too! (You can also support us through [Open Collective](https://opencollective.com/rubytogether).)
+[Ruby Together](https://rubytogether.org/) pays some Bundler maintainers for their work, funded directly by the Ruby community. If you'd like to support Bundler with a financial contribution, [become an individual sponsor](https://rubytogether.org/developers#plans). We also welcome financial [contributions from companies](https://rubytogether.org/companies#plans), too! (You can also support us through [Open Collective](https://opencollective.com/rubytogether).)
diff --git a/doc/development/NEW_FEATURES.md b/doc/development/NEW_FEATURES.md
index 9688ef8a42..d9ce212dbb 100644
--- a/doc/development/NEW_FEATURES.md
+++ b/doc/development/NEW_FEATURES.md
@@ -7,4 +7,4 @@ If you would like to add a new feature to Bundler, please follow these steps:
3. Commit the code and at least one test covering your changes to a feature branch in your fork.
4. Send us a [pull request](PULL_REQUESTS.md) from your feature branch.
-If you don't hear back immediately, don’t get discouraged! We all have day jobs, but we respond to most tickets within a day or two.
+If you don't hear back immediately, don't get discouraged! We all have day jobs, but we respond to most tickets within a day or two.
diff --git a/doc/documentation/README.md b/doc/documentation/README.md
index 0a9eceff8c..63e73b1491 100644
--- a/doc/documentation/README.md
+++ b/doc/documentation/README.md
@@ -18,7 +18,7 @@ If you are unsure where to begin, ping [@feministy](https://github.com/feministy
## [Writing docs for man pages](WRITING.md)
-If you’d like to submit a patch to the man pages, you're in the right place! Details on editing and previewing changes to man pages can be found [here](WRITING.md).
+If you'd like to submit a patch to the man pages, you're in the right place! Details on editing and previewing changes to man pages can be found [here](WRITING.md).
## [Documentation vision](VISION.md)
diff --git a/lib/bundler/templates/newgem/README.md.tt b/lib/bundler/templates/newgem/README.md.tt
index 22ddeaa91a..59218dd8ae 100644
--- a/lib/bundler/templates/newgem/README.md.tt
+++ b/lib/bundler/templates/newgem/README.md.tt
@@ -43,5 +43,5 @@ The gem is available as open source under the terms of the [MIT License](https:/
## Code of Conduct
-Everyone interacting in the <%= config[:constant_name] %> project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/<%= config[:github_username] %>/<%= config[:name] %>/blob/master/CODE_OF_CONDUCT.md).
+Everyone interacting in the <%= config[:constant_name] %> project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/<%= config[:github_username] %>/<%= config[:name] %>/blob/master/CODE_OF_CONDUCT.md).
<% end -%>
diff --git a/spec/quality_spec.rb b/spec/quality_spec.rb
index ead30022cc..39e50fbc07 100644
--- a/spec/quality_spec.rb
+++ b/spec/quality_spec.rb
@@ -59,6 +59,18 @@ RSpec.describe "The library itself" do
"#{filename} has spaces on the EOL on lines #{failing_lines.join(", ")}"
end
+ def check_for_straneous_quotes(filename)
+ return if File.expand_path(filename) == __FILE__
+
+ failing_lines = []
+ each_line(filename) do |line, number|
+ failing_lines << number + 1 if line =~ /’/
+ end
+
+ return if failing_lines.empty?
+ "#{filename} has an straneous quote on lines #{failing_lines.join(", ")}"
+ end
+
def check_for_expendable_words(filename)
failing_line_message = []
useless_words = %w[
@@ -106,6 +118,19 @@ RSpec.describe "The library itself" do
expect(error_messages.compact).to be_well_formed
end
+ it "has no estraneous quotes" do
+ exempt = /vendor|vcr_cassettes|LICENSE|rbreadline\.diff/
+ error_messages = []
+ Dir.chdir(root) do
+ files = ruby_core? ? `git ls-files -z -- lib/bundler lib/bundler.rb spec/bundler` : `git ls-files -z`
+ files.split("\x0").each do |filename|
+ next if filename =~ exempt
+ error_messages << check_for_straneous_quotes(filename)
+ end
+ end
+ expect(error_messages.compact).to be_well_formed
+ end
+
it "does not include any leftover debugging or development mechanisms" do
exempt = %r{quality_spec.rb|support/helpers|vcr_cassettes|\.md|\.ronn}
error_messages = []