README.adoc in pragmater-7.1.0 vs README.adoc in pragmater-7.2.0

- old
+ new

@@ -34,16 +34,16 @@ * Ensures duplicate pragmas never exist. * Ensures pragmas are consistently formatted. == Screencasts -[link=https://www.alchemists.io/screencasts/pragmater.html] -image::https://www.alchemists.io/images/screencasts/pragmater/cover-original.png[Screencast,role=focal_point] +[link=https://www.alchemists.io/screencasts/pragmater] +image::https://www.alchemists.io/images/screencasts/pragmater/cover.svg[Screencast,600,240,role=focal_point] == Requirements -. https://www.ruby-lang.org[Ruby 2.7.x] +. https://www.ruby-lang.org[Ruby] == Setup === Production @@ -100,12 +100,12 @@ ---- pragmater --add --comments "# frozen_string_literal: true" --includes "Gemfile" "Guardfile" "Rakefile" ".gemspec" "config.ru" "bin/**/*" "**/*.rake" "**/*.rb" ---- The `--add` and `--remove` commands default to the current working directory so a path isn’t -necessary unless you want to run Pragmater on a directory structure _other than_ your current -working directory. +necessary unless you want to run Pragmater on a directory structure other than your current working +directory. === Customization This gem can be configured via a global configuration: `$HOME/.config/pragmater/configuration.yml` @@ -122,12 +122,11 @@ :remove: :comments: [] :includes: [] ---- -Feel free to take this default configuration, modify, and save as your own custom -`configuration.yml`. +Feel free to take the above configuration, modify, and save as your own custom `configuration.yml`. The `configuration.yml` file can be configured as follows: * `add`: Defines global/local comments and/or file include lists when adding pragmas. The `comments` and `includes` options can be either a single string or an array. @@ -269,10 +268,28 @@ rule in which the use of `+String#-@+` was http://bit.ly/2DGAjgG[enhanced in Ruby 2.5.0] to _deduplicate_ all instances of the same string thus reducing your memory footprint. This can be valuable in situations where you are not using the frozen string comment and need to selectively freeze strings. +=== Consistency + +As an added bonus, this gem ensures pragmas for all analyzed files are formatted in a consistent +style. This means there is always a space after the octothorpe (`#`). Here are multiple pragmas +presented together for a visual comparison: + +[source,ruby] +---- +#! /usr/bin/env ruby +# encoding: UTF-8 +# coding: UTF-8 +# frozen_string_literal: true +# warn_indent: true +---- + +One oddity to the above is the use of `# !/usr/bin/env ruby` is not allowed but `#! /usr/bin/env +ruby` is which is why spacing is slightly different for shell pragmas. + == Tests To test, run: [source,bash] @@ -305,6 +322,6 @@ Read link:CHANGES.adoc[CHANGES] for details. == Credits -Engineered by link:https://www.alchemists.io/team/brooke_kuhlmann.html[Brooke Kuhlmann]. +Engineered by link:https://www.alchemists.io/team/brooke_kuhlmann[Brooke Kuhlmann].