libconfigure 0.3.1

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: bf519415091fb07b6eefc437aca3b76e57f7152d635c45db6e67a76e84ee7ec4
4
+ data.tar.gz: 4afd2048af4e7813a8ca32fa42ea84b46352b747b7c237db93bb73b2aa070463
5
+ SHA512:
6
+ metadata.gz: 6625c153d3705c87d2ed2a8db24a59b94cdcaf2cb1ce48ffcb7523705244fe2dcac868ea6dbfe9aa8549c1e170da4867167bf7ae3be7947c7048daf72a25f87f
7
+ data.tar.gz: 50682c3412bb6f5403652a150acca268198f284c65f3747672798d223be5aaed2a1ba14943f1c2552408d5ba3d30b563a07101bf8828baea18eb26b0f91ea411
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ lib_path = File.expand_path('../lib', __dir__)
5
+ $:.unshift(lib_path) if !$:.include?(lib_path)
6
+ require 'configure'
7
+
8
+ Configure.apply(true, File.expand_path(".configure", Dir.pwd))
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ lib_path = File.expand_path('../lib', __dir__)
5
+ $:.unshift(lib_path) if !$:.include?(lib_path)
6
+ require 'configure'
7
+
8
+ Configure.init()
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ lib_path = File.expand_path('../lib', __dir__)
5
+ $:.unshift(lib_path) if !$:.include?(lib_path)
6
+ require 'configure'
7
+
8
+ Configure.update(true, File.expand_path(".configure", Dir.pwd))
@@ -0,0 +1,10 @@
1
+ require 'ffi'
2
+
3
+ module Configure
4
+ extend FFI::Library
5
+ lib_name = File.join("ext", "configure", "configure.bundle")
6
+ ffi_lib File.expand_path(lib_name, __dir__)
7
+ attach_function :init, [], :void
8
+ attach_function :apply, [:bool, :string], :void
9
+ attach_function :update, [:bool, :string], :void
10
+ end
@@ -0,0 +1,23 @@
1
+ require 'mkmf'
2
+ require 'os'
3
+ require 'tempfile'
4
+ require_relative '../../version'
5
+
6
+ compilationDirectory = Dir.pwd
7
+ configureDirectory = File.dirname(File.absolute_path(__FILE__))
8
+ bundlePath = File.join(compilationDirectory, 'configure.' + RbConfig::CONFIG['DLEXT'])
9
+
10
+ puts "Downloading libconfigure"
11
+
12
+ FileUtils.cp(configureDirectory + "/makefile.example", compilationDirectory + "/Makefile")
13
+
14
+ if OS.mac? then
15
+ command = "curl https://github.com/Automattic/configure/releases/download/#{Configure::VERSION}/libconfigure.dylib -L --output #{bundlePath}"
16
+ system(command)
17
+ else
18
+ puts "Unsupported Operating System"
19
+ exit 1
20
+ end
21
+
22
+ puts "Done"
23
+ exit 0
metadata ADDED
@@ -0,0 +1,65 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: libconfigure
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.3.1
5
+ platform: ruby
6
+ authors:
7
+ - automattic
8
+ autorequire:
9
+ bindir: ruby-gem/bin
10
+ cert_chain: []
11
+ date: 2021-01-22 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: ffi
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.0'
27
+ description:
28
+ email: mobile@automattic.com
29
+ executables:
30
+ - configure_init
31
+ - configure_apply
32
+ - configure_update
33
+ extensions:
34
+ - ruby-gem/ext/configure/extconf.rb
35
+ extra_rdoc_files: []
36
+ files:
37
+ - ruby-gem/bin/configure_apply
38
+ - ruby-gem/bin/configure_init
39
+ - ruby-gem/bin/configure_update
40
+ - ruby-gem/configure.rb
41
+ - ruby-gem/ext/configure/extconf.rb
42
+ homepage: https://rubygems.org/gems/libconfigure
43
+ licenses:
44
+ - MIT
45
+ metadata: {}
46
+ post_install_message:
47
+ rdoc_options: []
48
+ require_paths:
49
+ - ruby-gem
50
+ required_ruby_version: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ required_rubygems_version: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ version: '0'
60
+ requirements: []
61
+ rubygems_version: 3.0.3
62
+ signing_key:
63
+ specification_version: 4
64
+ summary: A lightweight native-backed tool for working with configuration files
65
+ test_files: []