extconf_compile_commands_json 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 92e4b4fbb8bb8e86e7039716f5ea508d2384890760e5eac2b4e0aa2d4e7acc5a
4
- data.tar.gz: a9a7564118dba73159f3888a84cc1d5177561480005584b6a538e5ee7d2ec207
3
+ metadata.gz: 4ce6710866c4f07c500ab2585fd1fa1d40dcf7f5d8e00ecba008f8336de88dc4
4
+ data.tar.gz: 2ac4f1f733c16de18a0e255c42346fbc6ded34cff9af1addb7d5409790feb792
5
5
  SHA512:
6
- metadata.gz: 549e9d2def77550934c972edca5c86d0edab4211d5175099f312d6319eaf9ce03aba745863a8097e7d64d3825f4e509596a49798e653a44e23b020e7abcf492f
7
- data.tar.gz: 6ae64693bf58886d3670d3bc7032520d0db565d4eeabb7ae90ab376deb357db0e4cd330619cec29dad0d192b6223e5b4f2623c3b201934cbc84b6b1b207c1b95
6
+ metadata.gz: 94e624a0c3922c37081847ab63d8f59fa355046bbdbee9c244db6e596b346eaabd417ab75b4106dd38efb36bf23d57861cddcd465eeb81353028f03473a15b94
7
+ data.tar.gz: 124ebd14ce40fa8ac4ec560611a08e2d687ecfa19be0e48af5952885e72436e3f63cf9f09f925676ee61ebe5d63ae141144d06d87c492a388933cede3604bb8d
@@ -11,18 +11,16 @@ require "mkmf"
11
11
  # needing to muck about with $LOAD_PATH or Bundler.
12
12
  require_relative "../extconf_compile_commands_json"
13
13
 
14
- module ExtconfCompileCommandsJson
15
- module AutoloadPatch
16
- def create_makefile(*args)
17
- super
18
- ExtconfCompileCommandsJson.generate!
19
- ExtconfCompileCommandsJson.symlink!
20
- end
14
+ # We have to patch MakeMakefile directly, rather than prepending to it, because
15
+ # requiring mkmf includes it into the toplevel main object straight away. So prepending
16
+ # here would be too late.
17
+
18
+ module MakeMakefile
19
+ alias_method :__extconfcc_orig_create_makefile, :create_makefile
20
+ def create_makefile(*args)
21
+ r = __extconfcc_orig_create_makefile(*args)
22
+ ExtconfCompileCommandsJson.generate!
23
+ ExtconfCompileCommandsJson.symlink!
24
+ r
21
25
  end
22
26
  end
23
-
24
- MakeMakefile.prepend ExtconfCompileCommandsJson::AutoloadPatch
25
- # We have to patch the toplevel binding directly as well, because requiring
26
- # mkmf includes it into main straight away. So, prepending to MakeMakefile
27
- # will be ignored if someone calls "create_makefile" in their extconf.rb
28
- prepend ExtconfCompileCommandsJson::AutoloadPatch
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: extconf_compile_commands_json
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - KJ Tsanaktsidis