arg_scanner 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 630a4491a80316eccf60cecf3306b8a9efe9344d8604e552a39a8a2fd1616790
4
- data.tar.gz: 4365cc9d2dfe5a347423dd73c810d60957fec46bd092acda0e3cad08d358a1eb
3
+ metadata.gz: bf233aaf09930a6c6307a167a952cf19e5ddff4ccb8010d792a127c2136f4479
4
+ data.tar.gz: f7ea48b2b8ba0d598deb63cd7c061b71c7c7c92cb9203ec1e1b12084e0f91929
5
5
  SHA512:
6
- metadata.gz: 9cbfb9b78a501993d0fc8f42777cda5976e7c4d9dcfe79242991324371ed173baba0fb6f8f1f7238697996ffa27ddc0f623c83e5566bb56c5e439aef3eab69a5
7
- data.tar.gz: c3cc36ef3faa5c9c8e09bcc91b00ca1743d6a9ab2d3201f8bcbeb8350f7ffe5076e65f5024150ba1e5805eb3e57ba9b3efe16cbf0a898633706d72f56411cd13
6
+ metadata.gz: 9c80371429f9cb53ab8cd63976d665aa0b811e4180080a1d66b568ba0c635a310a25e3d4d7164dea0a8f1d44d33deaa1494666cca66e40cd3b37087a354399ec
7
+ data.tar.gz: 6095cc9f585d6ba3001e5e832b591d0dfb5c6f05ced2ccfaa49356b8b802dfb2a38f7288c07ef7a8b3254f5dab17a238d691dff723ca791c1ab2d3c898d43834
data/README.md CHANGED
@@ -9,40 +9,49 @@ deliver the following information:
9
9
  This information can be used then to calculate and use type contracts
10
10
  for the analysed methods.
11
11
 
12
- ## Requirements
13
-
14
- ##### libglib2.0-dev
15
-
16
- On Ubuntu run: ` $ sudo apt install libglib2.0-dev`
17
-
18
- ## Installation
19
-
20
12
  `arg_scanner` is meant to be used as a binary to run any other ruby executable
21
13
  manually so including it in the `Gemfile` is not necessary.
22
14
 
23
- The recommended way to install it is to install manually:
15
+ ## Installation
24
16
 
25
- $ gem install arg_scanner
26
-
27
- If you want to compile the gem from sources, just run
17
+ The recommended way to install it is to execute command:
18
+
19
+ ```
20
+ gem install arg_scanner
21
+ ```
22
+ **You will possibly need to install [native dependencies](#dependencies)**
28
23
 
29
- $ bundle install
30
- $ bundle exec rake install
24
+ ## Building from sources
25
+
26
+ If you want to compile the gem from sources, just run the following commands:
27
+
28
+ ```
29
+ bundle install
30
+ bundle exec rake install
31
+ ```
31
32
 
32
33
  If you have problems with native extension compilation, make sure you have
33
- actual version of [ruby-core-source gem](https://github.com/os97673/debase-ruby_core_source).
34
+ actual version of [ruby-core-source gem](https://github.com/os97673/debase-ruby_core_source) and
35
+ have [native dependencies](#dependencies) installed.
36
+
37
+ ## Dependencies
38
+
39
+ ##### [Glib](https://developer.gnome.org/glib/)
40
+
41
+ macOS: `brew install glib`
42
+ Debian/Ubuntu: `sudo apt install libglib2.0-dev`
43
+ Arch Linux: `sudo pacman -S glib2`
34
44
 
35
45
  ## Usage
36
46
 
37
- `arg_scanner` provides binary `arg-scanner` which receives any number of
47
+ `arg_scanner` provides the `arg-scanner` binary which receives any number of
38
48
  arguments and executes the given command in type tracking mode,
39
49
  for example:
40
50
 
41
- $ arg-scanner bundle exec rake spec
42
-
43
- The gem will need to send the obtained data though TCP socket on **port 7777**.
44
- See [global readme](../README.md) for instructions on how to run server
45
- to receive and process that data.
51
+ ```
52
+ arg-scanner --type-tracker --pipe-file-path=[pipe_file_path] bundle exec rake spec
53
+ ```
54
+ `pipe_file_path` here is path to pipe file which is printed by server's stdout
46
55
 
47
56
  ## Contributing
48
57
 
@@ -30,8 +30,9 @@ Gem::Specification.new do |spec|
30
30
  spec.require_paths = ["lib"]
31
31
  spec.extensions = ["ext/arg_scanner/extconf.rb"]
32
32
 
33
- spec.add_development_dependency "bundler", "~> 1.13"
34
- spec.add_development_dependency "rake", "~> 12.0"
33
+ spec.add_development_dependency "bundler", ">= 1.13"
34
+ spec.add_development_dependency "rake", ">= 12.0"
35
35
  spec.add_development_dependency "rake-compiler"
36
- spec.add_development_dependency "debase-ruby_core_source", ">= 0.10.0"
36
+ spec.add_development_dependency "debase-ruby_core_source", ">= 0.10.4"
37
+ spec.add_development_dependency "native-package-installer", ">= 1.0.0"
37
38
  end
@@ -5,7 +5,6 @@
5
5
  #include "vm_core.h"
6
6
  #include "version.h"
7
7
  #include "iseq.h"
8
- #include "vm_insnhelper.h"
9
8
  #include "method.h"
10
9
 
11
10
  #endif /* ARG_SCANNER_H */
@@ -3,6 +3,43 @@ require "mkmf"
3
3
  RbConfig::MAKEFILE_CONFIG['CC'] = ENV['CC'] if ENV['CC']
4
4
 
5
5
  require "debase/ruby_core_source"
6
+ require "native-package-installer"
7
+
8
+ class NilClass
9
+ def empty?; true; end
10
+ end
11
+
12
+ # Just a replacement of have_header because have_header searches not recursively :(
13
+ def real_have_header(header_name)
14
+ if (have_header(header_name))
15
+ return true
16
+ end
17
+ yes_msg = "checking for #{header_name}... yes"
18
+ no_msg = "checking for #{header_name}... no"
19
+
20
+ include_env = ENV["C_INCLUDE_PATH"]
21
+ if !include_env.empty? && !Dir.glob("#{include_env}/**/#{header_name}").empty?
22
+ puts yes_msg
23
+ return true
24
+ end
25
+ if !Dir.glob("/usr/include/**/#{header_name}").empty?
26
+ puts yes_msg
27
+ return true
28
+ end
29
+ puts no_msg
30
+ return false
31
+ end
32
+
33
+ if !real_have_header('glib.h') &&
34
+ !NativePackageInstaller.install(:alt_linux => "glib2-devel",
35
+ :debian => "libglib2.0-dev",
36
+ :redhat => "glib2-devel",
37
+ :arch_linux => "glib2",
38
+ :homebrew => "glib",
39
+ :macports => "glib2",
40
+ :msys2 => "glib2")
41
+ exit(false)
42
+ end
6
43
 
7
44
  hdrs = proc {
8
45
  have_header("vm_core.h") and
@@ -1,3 +1,3 @@
1
1
  module ArgScanner
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arg_scanner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nickolay Viuginov
@@ -10,34 +10,34 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2019-02-15 00:00:00.000000000 Z
13
+ date: 2019-09-12 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler
17
17
  requirement: !ruby/object:Gem::Requirement
18
18
  requirements:
19
- - - "~>"
19
+ - - ">="
20
20
  - !ruby/object:Gem::Version
21
21
  version: '1.13'
22
22
  type: :development
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
- - - "~>"
26
+ - - ">="
27
27
  - !ruby/object:Gem::Version
28
28
  version: '1.13'
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: rake
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
- - - "~>"
33
+ - - ">="
34
34
  - !ruby/object:Gem::Version
35
35
  version: '12.0'
36
36
  type: :development
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
- - - "~>"
40
+ - - ">="
41
41
  - !ruby/object:Gem::Version
42
42
  version: '12.0'
43
43
  - !ruby/object:Gem::Dependency
@@ -60,14 +60,28 @@ dependencies:
60
60
  requirements:
61
61
  - - ">="
62
62
  - !ruby/object:Gem::Version
63
- version: 0.10.0
63
+ version: 0.10.4
64
+ type: :development
65
+ prerelease: false
66
+ version_requirements: !ruby/object:Gem::Requirement
67
+ requirements:
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ version: 0.10.4
71
+ - !ruby/object:Gem::Dependency
72
+ name: native-package-installer
73
+ requirement: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - ">="
76
+ - !ruby/object:Gem::Version
77
+ version: 1.0.0
64
78
  type: :development
65
79
  prerelease: false
66
80
  version_requirements: !ruby/object:Gem::Requirement
67
81
  requirements:
68
82
  - - ">="
69
83
  - !ruby/object:Gem::Version
70
- version: 0.10.0
84
+ version: 1.0.0
71
85
  description:
72
86
  email:
73
87
  - viuginov.nickolay@gmail.com
@@ -124,7 +138,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
124
138
  version: '0'
125
139
  requirements: []
126
140
  rubyforge_project:
127
- rubygems_version: 2.7.7
141
+ rubygems_version: 2.7.9
128
142
  signing_key:
129
143
  specification_version: 4
130
144
  summary: Program execution tracker to retrieve data types information