Repository: ruby-git/ruby-git (Ruby)

Issue:
repo.status.pretty fails
### Subject of the issue
`repo.status.pretty` gives the following error:
`gems/git-1.4.0/lib/git/status.rb:114:in 'pretty_file': undefined method 'strip_heredoc' for #<String:0x00007ffee88a0c20> (NoMethodError)`

It appears that `.strip_heredoc` method (used [here](https://github.com/ruby-git/ruby-git/blob/master/lib/git/status.rb#L107)) is a rails method not ruby - https://apidock.com/rails/String/strip_heredoc

One solution to fix this might be Ruby 2.3 native support for this with the `<<~` operator. However, this has the obvious downside of limiting possible use of this library.
Or possibly to implement a method to achieve the same goal, e.g. copy paste this - https://github.com/rails/rails/blob/b422cda2ebfff4032f4c18271e96ad329c413dcc/activesupport/lib/active_support/core_ext/string/strip.rb

If you'd like I can put together a PR with either solution if you'd like?

### Your environment
```
$ git --version
git version 2.14.3 (Apple Git-98)
$ ruby --version
ruby 2.5.0p0 (2017-12-25) [x86_64-darwin16]
```

### Steps to reproduce
In a blank project with just this dependency this code will fail:
```ruby
repo = Git.clone("git@github.com:#{destination_repository}.git", destination_repository, path: path)
# make some changes to the repo
puts repo.status.pretty
```
### Expected behaviour
The method call would return a pretty string to describe the repo status
### Actual behaviour
An error is raised


Discussion:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.




Patch:
diff --git a/git.gemspec b/git.gemspec
index d223b702..27ca1476 100644
--- a/git.gemspec
+++ b/git.gemspec
@@ -11,7 +11,7 @@ Gem::Specification.new do |s|
   s.version = Git::VERSION
 
   s.require_paths = ['lib']
-  s.required_ruby_version = '>= 1.9'
+  s.required_ruby_version = '>= 2.3'
   s.required_rubygems_version = Gem::Requirement.new('>= 0') if s.respond_to?(:required_rubygems_version=)
   s.requirements = ['git 1.6.0.0, or greater']
 
diff --git a/lib/git/status.rb b/lib/git/status.rb
index 23050e08..fff67868 100644
--- a/lib/git/status.rb
+++ b/lib/git/status.rb
@@ -104,7 +104,7 @@ def pretty
     end
 
     def pretty_file(file)
-      <<-FILE.strip_heredoc
+      <<~FILE
         #{file.path}
         \tsha(r) #{file.sha_repo} #{file.mode_repo}
         \tsha(i) #{file.sha_index} #{file.mode_index}


Test patch:
diff --git a/tests/units/test_status.rb b/tests/units/test_status.rb
index 0cb863da..a32c378d 100644
--- a/tests/units/test_status.rb
+++ b/tests/units/test_status.rb
@@ -9,6 +9,20 @@ def setup
     set_file_paths
   end
 
+  def test_status_pretty
+    in_temp_dir do |path|
+      git = Git.clone(@wdir, 'test_dot_files_status')
+      string = "ex_dir/ex.txt\n\tsha(r)  \n\tsha(i) e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 " \
+               "100644\n\ttype   \n\tstage  0\n\tuntrac \nexample.txt\n\tsha(r)  \n\tsha(i) " \
+               "8dc79ae7616abf1e2d4d5d97d566f2b2f6cee043 100644\n\ttype   \n\tstage  0\n\tuntrac " \
+               "\nscott/newfile\n\tsha(r)  \n\tsha(i) 5d4606820736043f9eed2a6336661d6892c820a5 " \
+               "100644\n\ttype   \n\tstage  0\n\tuntrac \nscott/text.txt\n\tsha(r)  \n\tsha(i) " \
+               "3cc71b13d906e445da52785ddeff40dad1163d49 100644\n\ttype   \n\tstage  0\n\tuntrac \n\n"
+
+      assert_equal(git.status.pretty, string)
+    end
+  end
+
   def test_dot_files_status
     in_temp_dir do |path|
       git = Git.clone(@wdir, 'test_dot_files_status')