rbconfig-update 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 31bf3e791b4cbd92839ac8af3cc426a0fed2ec2730fff5749d086a128ce05b23
4
+ data.tar.gz: dab886caca235bcfe0773de863c331f1b429cca7da1b1fb44f81af3ef83b22c0
5
+ SHA512:
6
+ metadata.gz: a98619606c0cdea32b6e60ee7e58185764166f64c8a2273ba71e6156b3f866c5533034f402cdec01c627f7ebd5a06b0721133a25cb5d8cc43b94ea3b9cc45624
7
+ data.tar.gz: 1901b68735c855f93e522e67691ad651ba9b962919d801b314dbde857ea2825ef13c7feb94ea01e4e70c960aeb6eaf4b18b528f0cdc4e9bc30ef9cfc289c068c
checksums.yaml.gz.sig ADDED
Binary file
data.tar.gz.sig ADDED
Binary file
data/README.md ADDED
@@ -0,0 +1,38 @@
1
+ # rbconfig-update
2
+ This gem updates `RbConfig::CONFIG` information.
3
+
4
+ ## How to use
5
+
6
+ ### Update `rbconfig.rb` file itself
7
+
8
+ Once you update the file, you don't have to keep this gem installed.
9
+
10
+ * Run `ruby bin/update-rbconfig.rb --standard`
11
+
12
+ You may need to prefix by `sudo`, to modify the system-wide
13
+ `rbconfig.rb` file.
14
+
15
+ * Or run `ruby bin/update-rbconfig.rb /path/to/rbconfig.rb`
16
+
17
+ You can modify arbitrary `rbconfig.rb` script files other than the
18
+ standard path.
19
+
20
+ ### Update the content on the fly
21
+
22
+ If you don't want to, or can't, modify the standard file, load
23
+ `rbconfig/update` by:
24
+
25
+ * Add `require 'rbconfig/update'` to your source.
26
+ * Or add `-rrbconfig/update` to `RUBYOPT` environment variable.
27
+
28
+ ## What will be chaned
29
+
30
+ ### To be added
31
+
32
+ * `LIBRUBY_SONAME` soname of ruby shared library
33
+ * `SOEXT` shared library file suffix
34
+
35
+ ### To be updated
36
+
37
+ * `LIBURYB_SO` to use `$(SOEXT)`
38
+ * `LIBRUBY_ALIASES` to use `$(LIBRUBY_SONAME)`
@@ -0,0 +1,28 @@
1
+ #!/usr/bin/ruby -p
2
+ BEGIN {
3
+ if ARGV.empty?
4
+ abort <<MSG
5
+ usage: #$0 path/to/rbconfig.rb
6
+
7
+ this script adds:
8
+ LIBRUBY_SONAME: soname of ruby shared library
9
+ SOEXT: shared library file suffix
10
+ and updates:
11
+ LIBURYB_SO: to use $(SOEXT)
12
+ LIBRUBY_ALIASES: to use $(LIBRUBY_SONAME)
13
+ MSG
14
+ end
15
+ if ARGV[0] == '--standard'
16
+ require 'rbconfig'
17
+ ARGV[0] = $".find {|n| File.basename(n) == 'rbconfig.rb'}
18
+ end
19
+ $-i = ".bak"
20
+ }
21
+ case
22
+ when $_.sub!(/^(\s*CONFIG\["LIBRUBY_SO"\]\s*=\s*".*\.)((?!\d)\w+)/, '\1$(SOEXT)')
23
+ soext = $2
24
+ when $_.sub!(/^((\s*CONFIG\["LIBRUBY_)ALIASES("\]\s*=\s*"))([^\s"]+)/, '\1$(LIBRUBY_SONAME)')
25
+ $_ += "#{$2}SONAME#{$3}#{$4}\"\n"
26
+ when soext && /^(\s*CONFIG)\["DLEXT"\](\s*=\s*)/ =~ $_
27
+ $_ += "#{$1}[\"SOEXT\"]#{$2}#{soext.dump}\n"
28
+ end
@@ -0,0 +1,16 @@
1
+ require 'rbconfig'
2
+
3
+ module RbConfig
4
+ conf = CONFIG
5
+ mkconf = MAKEFILE_CONFIG
6
+ so = ["LIBRUBY_SO"]
7
+ if so
8
+ name = "SOEXT"
9
+ soext = conf[name] ||= so[/\.((?!\d)\w+)(?=(?:\.\d+)*)\z/, 1]
10
+ mkconf[name] ||= soext
11
+ end
12
+ name = "LIBRUBY_SONAME"
13
+ first = /\S+/
14
+ conf[name] ||= conf[name][first]
15
+ mkconf[name] ||= mkconf[name][first]
16
+ end
metadata ADDED
@@ -0,0 +1,68 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rbconfig-update
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
5
+ platform: ruby
6
+ authors:
7
+ - Nobu Nakada
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain:
11
+ - |
12
+ -----BEGIN CERTIFICATE-----
13
+ MIIDcDCCAligAwIBAgIBATANBgkqhkiG9w0BAQUFADA/MQ0wCwYDVQQDDARub2J1
14
+ MRkwFwYKCZImiZPyLGQBGRYJcnVieS1sYW5nMRMwEQYKCZImiZPyLGQBGRYDb3Jn
15
+ MB4XDTE3MDgxNjA0MzMxMloXDTE4MDgxNjA0MzMxMlowPzENMAsGA1UEAwwEbm9i
16
+ dTEZMBcGCgmSJomT8ixkARkWCXJ1YnktbGFuZzETMBEGCgmSJomT8ixkARkWA29y
17
+ ZzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALjOZHHpyKLfbXxk7bzj
18
+ cLzb2logMjA7lmMN2iYfxT7aA/rIrwjtGU7gOS1q1pgpG2WmjrzzhBFX12v+2QGo
19
+ AeR8RmhXrfTLnzYNkU8RZLVdOzVbaOdF6SdZY7XBgXj9T4mIc4u6qdAam0tmeMKA
20
+ wxl5RgYa4BKpyUy0h0YNjZ668dK7m54um0ucMZb/mOZujawaVRl5oa+VrNlr6RWl
21
+ wNVST+Pcv4p+NwCxMbQFy5tASbx2haHk4GX/tnc4hkd7ID2c26YcwofQkqUeed6b
22
+ pYznVUOqvc2m4RAJpFRMMnooLe5hxo5xJ1yWzxB0RVuos7nfeIQvJNAjm3Dk5oAz
23
+ RLcCAwEAAaN3MHUwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0OBBYEFGPa
24
+ g+T14bdooswoqd1Bvc5tcHEuMB0GA1UdEQQWMBSBEm5vYnVAcnVieS1sYW5nLm9y
25
+ ZzAdBgNVHRIEFjAUgRJub2J1QHJ1YnktbGFuZy5vcmcwDQYJKoZIhvcNAQEFBQAD
26
+ ggEBAEY7Q36G17mGbUmTlbY3uNWBMNVo/AIH+0k5ZPqByfdUpygP5eUv2a3rjnjH
27
+ S/HO9pd+aivyEMRjxtPR++gneyAgNyYi55a5QDqdFpGIMvOqbBYh5BpJrI46tc6I
28
+ 8b2JYqE3mzWM3AQX2KRNgW+x1fsFnZ2jGcoofd4YSwPmVJYSyvmOp6czIxWe4seC
29
+ ZGoIv9EYNzeWUow3MMXgzC7pypEotkxKtiaKATwzAHqBBaSVJVbNg2bSRHciuOL8
30
+ IwDU/lf7WZG4aXeGH8BI6et+xstfLgNO77m1ue80wndbp/SjeO729ZqBTsp398Sn
31
+ xd1NfeEMFYUK4z3fovrMXKIZYsI=
32
+ -----END CERTIFICATE-----
33
+ date: 2017-10-14 00:00:00.000000000 Z
34
+ dependencies: []
35
+ description: Update/add new info to `RbConfig::CONFIG`.
36
+ email: nobu@ruby-lang.org
37
+ executables: []
38
+ extensions: []
39
+ extra_rdoc_files: []
40
+ files:
41
+ - README.md
42
+ - bin/update-rbconfig.rb
43
+ - lib/rbconfig/update.rb
44
+ homepage: https://github.com/ruby/ruby
45
+ licenses:
46
+ - BSD-2-Clause
47
+ metadata: {}
48
+ post_install_message:
49
+ rdoc_options: []
50
+ require_paths:
51
+ - lib
52
+ required_ruby_version: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ version: '0'
57
+ required_rubygems_version: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '2.6'
62
+ requirements: []
63
+ rubyforge_project:
64
+ rubygems_version: 2.6.14
65
+ signing_key:
66
+ specification_version: 4
67
+ summary: Update RbConfig
68
+ test_files: []
metadata.gz.sig ADDED
@@ -0,0 +1,2 @@
1
+ &�7 ��a\�9"�ֲ�6�<P�nș��p�籲�2��F]E��oȊ��I��-�^�����H��ȶ~�F�s�v�����`��!@� �s���sEt��`Z��F����
2
+ f x9u��%V��g�۶��fDM�`�7J��.X�p�92]u���J$hΏ]��ݳ 7I�@�v�2���ފ�,Lm�B.�J�EqEP?���w:ƚe@��J� i|�g�T$X�2���kR��&6���^��b�a�+�