debase 0.2.2.beta3 → 0.2.2.beta4

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
  SHA1:
3
- metadata.gz: e783c3d7dbe46b855cb1d5405a8a7a688832fa7d
4
- data.tar.gz: a6e2e176ab8aa8f43fda15bf44d902264a5435e1
3
+ metadata.gz: 8a81bc135091d39348889ace2c4b733a8b932384
4
+ data.tar.gz: 8424f71e91a83cd50292443e1a5e58b31b0289ce
5
5
  SHA512:
6
- metadata.gz: 96588d5f13dff2238fb6eda79b2828544b362b4255f76b108cac98f412fff55d825916aaa43be864b04a9899643dcf63a9d884fb624cd6823cd8b8f6597b80d1
7
- data.tar.gz: 043b548b36ccf5e9953cb2308d0a73b3dc14874e952afdd3ca6886ec0cc46f8650853be56db200019b731397c5a43c2f003385a74df55eda7ad73ccdbdf8fa26
6
+ metadata.gz: d951d612c4b0e9e0cc257d55a24a29b8ac00709e2606b2418565ef643da21a9fb4c2d84ff4614a98b0696b69b12099a32c539bf4cc764df426fd080d05bc1bf2
7
+ data.tar.gz: 6b997603b7567135b63a1c28ed0018da5b3540a6e0cc7bf7025e96d0c19c6f5d67721cb7a63ce005e4d8a558f35c523ec305db78c5c122c75214484d3f717195
@@ -10,6 +10,7 @@ static VALUE locker = Qnil;
10
10
  static VALUE contexts;
11
11
  static VALUE catchpoints;
12
12
  static VALUE breakpoints;
13
+ static VALUE file_filter_enabled = Qfalse;
13
14
 
14
15
  static VALUE tpLine;
15
16
  static VALUE tpCall;
@@ -37,6 +38,7 @@ print_debug(const char *message, ...)
37
38
  static VALUE
38
39
  is_path_accepted(VALUE path) {
39
40
  VALUE filter;
41
+ if (file_filter_enabled == Qfalse) return Qtrue;
40
42
  filter = rb_funcall(mDebase, idFileFilter, 0, NULL);
41
43
  return rb_funcall(filter, idAccept, 1, path);
42
44
  }
@@ -99,7 +101,7 @@ try_disable_trace_points()
99
101
 
100
102
  if (RARRAY_LEN(breakpoints) != 0) return;
101
103
  print_debug("disable_tps: no breakpoints\n");
102
- if (RHASH_EMPTY_P(catchpoints)) return;
104
+ if (!RHASH_EMPTY_P(catchpoints)) return;
103
105
  print_debug("disable_tps: no catchpoints\n");
104
106
  if (rb_tracepoint_enabled_p(tpLine) == Qfalse) return;
105
107
  print_debug("disable_tps: tps are enabled\n");
@@ -605,6 +607,19 @@ Debase_set_verbose(VALUE self, VALUE value)
605
607
  return value;
606
608
  }
607
609
 
610
+ /*
611
+ * call-seq:
612
+ * Debase.enable_file_filtering(bool)
613
+ *
614
+ * Enables/disables file filtering.
615
+ */
616
+ static VALUE
617
+ Debase_enable_file_filtering(VALUE self, VALUE value)
618
+ {
619
+ file_filter_enabled = RTEST(value) ? Qtrue : Qfalse;
620
+ return value;
621
+ }
622
+
608
623
  /*
609
624
  * Document-class: Debase
610
625
  *
@@ -627,6 +642,7 @@ Init_debase_internals()
627
642
  rb_define_module_function(mDebase, "started?", Debase_started, 0);
628
643
  rb_define_module_function(mDebase, "verbose?", Debase_verbose, 0);
629
644
  rb_define_module_function(mDebase, "verbose=", Debase_set_verbose, 1);
645
+ rb_define_module_function(mDebase, "enable_file_filtering", Debase_enable_file_filtering, 1);
630
646
  rb_define_module_function(mDebase, "enable_trace_points", Debase_enable_trace_points, 0);
631
647
 
632
648
  idAlive = rb_intern("alive?");
data/lib/debase.rb CHANGED
@@ -98,10 +98,12 @@ module Debase
98
98
 
99
99
  def enable
100
100
  @enabled = true
101
+ Debase.enable_file_filtering(@enabled);
101
102
  end
102
103
 
103
104
  def disable
104
105
  @enabled = false
106
+ Debase.enable_file_filtering(@enabled);
105
107
  end
106
108
 
107
109
  def accept?(file_path)
@@ -1,3 +1,3 @@
1
1
  module Debase
2
- VERSION = "0.2.2.beta3" unless defined? VERSION
2
+ VERSION = "0.2.2.beta4" unless defined? VERSION
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: debase
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2.beta3
4
+ version: 0.2.2.beta4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dennis Ushakov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-11 00:00:00.000000000 Z
11
+ date: 2015-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: debase-ruby_core_source