rbkit 0.1.6 → 0.1.8

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
  SHA1:
3
- metadata.gz: 739b3af12258b89ecfdae05d06c03889329d496d
4
- data.tar.gz: c7144822b77d0173352ef6c184c7c8ddaa046311
3
+ metadata.gz: 0f3fe90d0fbe0c4ea2b6d0497dbdd6678f41c2a5
4
+ data.tar.gz: 2b68eb7654f30a5d5b503bc25934978569b5112f
5
5
  SHA512:
6
- metadata.gz: b46dc7d9c12bd100c59177e0afc0d0021ede93328d4e5444f4cbefac70bfd960046f88e20ebd4aa2cdde458a9a9caa01f5e9697a4a8e542e43df7840476f7889
7
- data.tar.gz: d8e462c46b173086ce21f04d1350ebdaae5023a6da9407c50841a2dfb8755d2b281908450136db079570a3ab3ea6f53789039e5391ad3bf30cf51406407f51fa
6
+ metadata.gz: fd9dd0b5b7800a0bf3e5e5ef6faf63101d0a77fc6b73433176ac5ebde98e0d7c011da05ca0765dab24cc548b20c64ceef6428428a4c6b4f2858eea6517833b9f
7
+ data.tar.gz: 06dd9cb6b2d02352e2c11b3ba0fd181ae80d75ebfce21dadfeb999746c91cb9849a7165a8b11c2eb2cff3a9dffb0020544e14d0bc0104155fa66875bd7f75061
data/ext/extconf.rb CHANGED
@@ -37,7 +37,7 @@ def download_and_install_zeromq_from_source
37
37
  system("tar zxvf #{filename}")
38
38
  Dir.chdir(basename) do
39
39
  system("./configure CPPFLAGS='-fPIC' --prefix='#{dist_path}'")
40
- system("make && make install")
40
+ system("cd src && make && make install")
41
41
  end
42
42
  end
43
43
  FileUtils.cp "#{dist_path}/lib/libzmq.a", "#{CWD}/libzmq.a"
@@ -56,7 +56,7 @@ def download_and_install_msgpack_from_source
56
56
  system("tar zxvf #{filename}")
57
57
  Dir.chdir(basename) do
58
58
  system("./configure CFLAGS='-fPIC' --prefix='#{dist_path}'")
59
- system("make && make install")
59
+ system("cd src && make && make install")
60
60
  end
61
61
  end
62
62
 
@@ -20,7 +20,7 @@ static const char * make_unique_str(st_table *tbl, const char *str, long len) {
20
20
  st_get_key(tbl, (st_data_t)str, (st_data_t *)&result);
21
21
  }
22
22
  else {
23
- result = (char *)ruby_xmalloc(len+1);
23
+ result = (char *)malloc(len+1);
24
24
  strncpy(result, str, len);
25
25
  result[len] = 0;
26
26
  st_add_direct(tbl, (st_data_t)result, 1);
@@ -41,7 +41,7 @@ static void delete_unique_str(st_table *tbl, const char *str) {
41
41
  st_lookup(tbl, (st_data_t)str, &n);
42
42
  if (n == 1) {
43
43
  st_delete(tbl, (st_data_t *)&str, 0);
44
- ruby_xfree((char *)str);
44
+ free((char *)str);
45
45
  }
46
46
  else {
47
47
  st_insert(tbl, (st_data_t)str, n-1);
@@ -68,7 +68,7 @@ rbkit_allocation_info * new_rbkit_allocation_info(rb_trace_arg_t *tparg, st_tabl
68
68
  delete_unique_str(str_table, info->class_path);
69
69
  }
70
70
  else {
71
- info = (rbkit_allocation_info *)ruby_xmalloc(sizeof(rbkit_allocation_info));
71
+ info = (rbkit_allocation_info *)malloc(sizeof(rbkit_allocation_info));
72
72
  }
73
73
 
74
74
  info->path = path_cstr;
@@ -86,6 +86,6 @@ void delete_rbkit_allocation_info(rb_trace_arg_t *tparg, VALUE obj, st_table *st
86
86
  st_delete(object_table, (st_data_t *)&obj, (st_data_t *)&info);
87
87
  delete_unique_str(str_table, info->path);
88
88
  delete_unique_str(str_table, info->class_path);
89
- ruby_xfree(info);
89
+ free(info);
90
90
  }
91
91
  }
data/ext/rbkit_tracer.c CHANGED
@@ -248,12 +248,12 @@ static VALUE stop_stat_tracing() {
248
248
 
249
249
 
250
250
  static int free_keys_i(st_data_t key, st_data_t value, void *data) {
251
- ruby_xfree((void *)key);
251
+ free((void *)key);
252
252
  return ST_CONTINUE;
253
253
  }
254
254
 
255
255
  static int free_values_i(st_data_t key, st_data_t value, void *data) {
256
- ruby_xfree((void *)value);
256
+ free((void *)value);
257
257
  return ST_CONTINUE;
258
258
  }
259
259
 
data/lib/rbkit/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Rbkit
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.8"
3
3
  end
data/rbkit.gemspec CHANGED
@@ -28,7 +28,7 @@ Gem::Specification.new do |s|
28
28
  s.licenses = ["MIT"]
29
29
  s.require_paths = ["lib"]
30
30
  s.summary = %q{Ruby profiler for rest of us}
31
- s.add_development_dependency("rspec")
32
- s.add_development_dependency("rake")
33
- s.add_development_dependency("simplecov")
31
+ s.add_development_dependency("rspec", "~> 3.0.0")
32
+ s.add_development_dependency("rake", "~> 10.3.2")
33
+ s.add_development_dependency("simplecov", "~> 0.9.0")
34
34
  end
data/setup.rb CHANGED
@@ -22,16 +22,30 @@ class Setup
22
22
  end
23
23
 
24
24
  def copy_files
25
- FileUtils.cp_r "lib/.", site_lib_dir, verbose: true
26
25
  ext_path =
27
26
  File.absolute_path "ext/rbkit_tracer.#{RbConfig::MAKEFILE_CONFIG['DLEXT']}"
27
+
28
+ cleanup
29
+ FileUtils.cp_r "lib/.", site_lib_dir, verbose: true
28
30
  FileUtils.cp_r ext_path, site_arch_dir, verbose: true
29
31
  end
32
+
33
+ def cleanup
34
+ puts "Removing existing installation"
35
+ FileUtils.rm_r site_lib_dir + "/rbkit", force: true
36
+ FileUtils.rm_r site_lib_dir + "/rbkit.rb", force: true
37
+ FileUtils.rm_r site_arch_dir + "/rbkit_tracer.#{RbConfig::MAKEFILE_CONFIG['DLEXT']}", force: true
38
+ end
30
39
  end
31
40
 
32
41
  if __FILE__ == $0
33
- Setup.new.tap do |setup|
34
- setup.compile
35
- setup.copy_files
42
+ cmd_arg = ARGV[0].strip
43
+ setup_script = Setup.new
44
+ case cmd_arg
45
+ when "remove"
46
+ setup_script.cleanup
47
+ else
48
+ setup_script.compile
49
+ setup_script.copy_files
36
50
  end
37
51
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hemant Kumar
@@ -10,50 +10,50 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-01-08 00:00:00.000000000 Z
13
+ date: 2015-01-14 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rspec
17
17
  requirement: !ruby/object:Gem::Requirement
18
18
  requirements:
19
- - - ">="
19
+ - - "~>"
20
20
  - !ruby/object:Gem::Version
21
- version: '0'
21
+ version: 3.0.0
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
- version: '0'
28
+ version: 3.0.0
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
- version: '0'
35
+ version: 10.3.2
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
- version: '0'
42
+ version: 10.3.2
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: simplecov
45
45
  requirement: !ruby/object:Gem::Requirement
46
46
  requirements:
47
- - - ">="
47
+ - - "~>"
48
48
  - !ruby/object:Gem::Version
49
- version: '0'
49
+ version: 0.9.0
50
50
  type: :development
51
51
  prerelease: false
52
52
  version_requirements: !ruby/object:Gem::Requirement
53
53
  requirements:
54
- - - ">="
54
+ - - "~>"
55
55
  - !ruby/object:Gem::Version
56
- version: '0'
56
+ version: 0.9.0
57
57
  description: Something small for process management
58
58
  email: hemant@codemancers.com emil@codemancers.com kashyap@codemancers.com
59
59
  executables: []
@@ -141,16 +141,5 @@ rubygems_version: 2.2.2
141
141
  signing_key:
142
142
  specification_version: 4
143
143
  summary: Ruby profiler for rest of us
144
- test_files:
145
- - spec/gc_stat_spec.rb
146
- - spec/hash_event_spec.rb
147
- - spec/obj_created_spec.rb
148
- - spec/obj_destroyed_spec.rb
149
- - spec/object_space_dump_spec.rb
150
- - spec/rbkit_helpful_messages_spec.rb
151
- - spec/spec_helper.rb
152
- - spec/start_server_spec.rb
153
- - spec/status_spec.rb
154
- - spec/support/foo_bar_sample_class.rb
155
- - spec/support/have_message_matcher.rb
144
+ test_files: []
156
145
  has_rdoc: