Skip to content

Releases: jdee/pattern_patch

Release 1.0.0

14 May 00:39
Compare
Choose a tag to compare

Added Methods#patch_config to simplify configuration when including the Methods module.

include PatternPatch::Methods

patch_config do |c|
  c.patch_dir = File.expand_path '../assets/patches', __dir__
  c.trim_mode = '<>'
end

patch(:my_patch).apply '/path/to/target/file'

or

include PatternPatch::Methods

patch_config.patch_dir = File.expand_path '../assets/patches', __dir__
patch_config.trim_mode = '<>'

patch(:my_patch).apply '/path/to/target/file'

Some dependency updates.

Release 0.5.5

29 Dec 18:06
Compare
Choose a tag to compare
Release 0.5.5 Pre-release
Pre-release

Improved support for Ruby 2.0 & 2.1.

  • Added an explicit Ruby version requirement to the gemspec.
  • Pinned rubocop to 0.50.0 (the last version to support Ruby 2.0) and set TargetRubyVersion to 2.0 in .rubocop.yml.
  • Limited activesupport to ~> 4.2, since 5.x requires Ruby 2.2.

This is not an issue when using the Bundler, but with previous versions, gem install pattern_patch could fail unless you first gem install activesupport -v '~> 4.2'. Now this will be automatic.

..

Release 0.5.4

22 Nov 19:54
2dea522
Compare
Choose a tag to compare
Release 0.5.4 Pre-release
Pre-release

Added support for passing safe level and trim mode to ERb via options to Patch#apply and #revert, methods in the Methods module and attributes on the PatternPatch module.

Release 0.5.3

15 Nov 01:26
f4bb4a2
Compare
Choose a tag to compare
Release 0.5.3 Pre-release
Pre-release

You can now easily load patches by name from a specific folder:

PatternPatch.patch_dir = "/path/to/patches"
# Use /path/to/patches/patch_name.yml
PatternPatch.patch(:patch_name).apply file_path

Release 0.5.2

09 Nov 16:17
Compare
Choose a tag to compare
Release 0.5.2 Pre-release
Pre-release

Added RDoc comments for better documentation.

Release 0.5.1

08 Nov 16:44
Compare
Choose a tag to compare
Release 0.5.1 Pre-release
Pre-release

Removes debugging output left in from the last release.

Release 0.5.0

08 Nov 16:37
84485de
Compare
Choose a tag to compare
Release 0.5.0 Pre-release
Pre-release

Added support for regular expressions with modifiers in YAML.

Release 0.4.0

08 Nov 01:12
a92357e
Compare
Choose a tag to compare
Release 0.4.0 Pre-release
Pre-release

Added support for ERB in the text attribute or the contents of a text_file.

Release 0.3.0

07 Nov 17:30
49e6940
Compare
Choose a tag to compare
Release 0.3.0 Pre-release
Pre-release

Added a text_file attribute that is especially useful when inserting formatted multiline text from YAML.

Release 0.2.0

06 Nov 22:28
38b70ae
Compare
Choose a tag to compare
Release 0.2.0 Pre-release
Pre-release

This introduces a better API for the gem, via the PatternPatch::Patch class. This supports direct file patching and loading patches from YAML files.