[DRE-commits] [ruby-rubocop-rspec] 12/14: Install default configuration files
Miguel Landaeta
nomadium at moszumanska.debian.org
Sun Nov 5 13:31:39 UTC 2017
This is an automated email from the git hooks/post-receive script.
nomadium pushed a commit to branch master
in repository ruby-rubocop-rspec.
commit 60e2f333fde6add9e8a9ec883b70fcf1601cf6c4
Author: Miguel Landaeta <nomadium at debian.org>
Date: Sun Nov 5 12:34:46 2017 +0000
Install default configuration files
---
debian/patches/02-modify-rubocop-rspec-homedir.patch | 17 +++++++++++++++++
debian/ruby-rubocop-rspec.install | 1 +
debian/ruby-rubocop-rspec.links | 1 +
debian/rules | 5 +++++
4 files changed, 24 insertions(+)
diff --git a/debian/patches/02-modify-rubocop-rspec-homedir.patch b/debian/patches/02-modify-rubocop-rspec-homedir.patch
new file mode 100644
index 0000000..e97fe80
--- /dev/null
+++ b/debian/patches/02-modify-rubocop-rspec-homedir.patch
@@ -0,0 +1,17 @@
+Description: Use right path for configuration in Debian systems
+Author: Miguel Landaeta <nomadium at debian.org>
+Forwarded: no
+Last-Update: 2017-11-05
+
+--- ruby-rubocop-rspec-1.19.0.orig/lib/rubocop/rspec.rb
++++ ruby-rubocop-rspec-1.19.0/lib/rubocop/rspec.rb
+@@ -2,7 +2,8 @@ module RuboCop
+ # RuboCop RSpec project namespace
+ module RSpec
+ PROJECT_ROOT = Pathname.new(__dir__).parent.parent.expand_path.freeze
+- CONFIG_DEFAULT = PROJECT_ROOT.join('config', 'default.yml').freeze
++ PROJECT_HOME = PROJECT_ROOT.parent.parent.join('share', 'rubocop-rspec').freeze
++ CONFIG_DEFAULT = PROJECT_HOME.join('config', 'default.yml').freeze
+ CONFIG = YAML.safe_load(CONFIG_DEFAULT.read).freeze
+
+ private_constant(:CONFIG_DEFAULT, :PROJECT_ROOT)
diff --git a/debian/ruby-rubocop-rspec.install b/debian/ruby-rubocop-rspec.install
new file mode 100644
index 0000000..732e273
--- /dev/null
+++ b/debian/ruby-rubocop-rspec.install
@@ -0,0 +1 @@
+config/* etc/rubocop/rspec
diff --git a/debian/ruby-rubocop-rspec.links b/debian/ruby-rubocop-rspec.links
new file mode 100644
index 0000000..f74b501
--- /dev/null
+++ b/debian/ruby-rubocop-rspec.links
@@ -0,0 +1 @@
+etc/rubocop/rspec usr/share/rubocop-rspec/config
diff --git a/debian/rules b/debian/rules
index 3454d59..910bc07 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,3 +4,8 @@ export GEM2DEB_TEST_RUNNER = --check-dependencies
%:
dh $@ --buildsystem=ruby --with ruby
+
+override_dh_link:
+ dh_link
+ cd ./debian/ruby-rubocop-rspec/usr/lib/ruby/vendor_ruby && \
+ patch -p2 < $(CURDIR)/debian/patches/02-modify-rubocop-rspec-homedir.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-rubocop-rspec.git
More information about the Pkg-ruby-extras-commits
mailing list