overrides_tracker 0.2.0 → 0.2.3

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: 43cf4d931371c4f3781a672310dc100f2a6ec14ebff9d75113c3d0d1b5c336fb
4
- data.tar.gz: ab49ef6c8b619543497708efd105451ad718450900a0d171ff2dde092b045239
3
+ metadata.gz: b86f564c126feb046fac5729c3f145c95012a7c13fb0e5aedffa8b54f6f69e48
4
+ data.tar.gz: 34d3666bd2e2561f033cc65c8cf25b830b7faab9dd1dd08bd1de7c06a86eaac8
5
5
  SHA512:
6
- metadata.gz: d84a9f391b0c4b25fe4f6c661fe001eb081265b8adb8d03913481382e9387e86598aa90dff56b16808ab5793a7f493cd88e0a86f3bd2ecdaefb8fc5b86d1f362
7
- data.tar.gz: 7fd010bfa2cc019ff906bbe192005deaf43234f9772f27c5eed835ac031ae7679cff57662f840b5a4a102257c4a6cbb8f9c9767af90e28c13d06763724f1f590
6
+ metadata.gz: 7dd9ae84a57ebd5eaf9a0e4486d88addbb715672564295345e34080840617b5c5d018539818fee703cbd31ba909bbcc5a9fd437dfa3c97fb6442a6727c3dd31a
7
+ data.tar.gz: faa22948fef3f19d057723ccd2263e814002b9f1188e14be2955d7ec6947540cb64dd5c4b2543b8b88b2d37721a7cdc9068c6352f60d35218caedf3a267c7f06
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- overrides_tracker (0.1.13)
4
+ overrides_tracker (0.2.0)
5
5
  activesupport
6
6
  method_source
7
7
 
@@ -1,3 +1,3 @@
1
1
  module OverridesTracker
2
- VERSION = '0.2.0'
2
+ VERSION = '0.2.3'
3
3
  end
@@ -5,7 +5,6 @@ require 'method_source'
5
5
 
6
6
  require 'overrides_tracker/version'
7
7
  require 'overrides_tracker/methods_collector'
8
- require 'overrides_tracker/file_observer'
9
8
  require 'overrides_tracker/string_colorizer'
10
9
  require 'overrides_tracker/util'
11
10
  require 'overrides_tracker/comparer'
@@ -20,18 +19,18 @@ if defined? OVERRIDES_TRACKER_TRACKING_ENABLED
20
19
  Object.class_eval do
21
20
  class << self
22
21
  def inherited(subclass)
22
+ puts "Reading...#{subclass.name}"
23
23
  subclass.class_eval do
24
- def self.overrides_tracker_finished_file
25
- clazz = ancestors.first
26
- save_methods_of_class(clazz)
24
+ TracePoint.trace(:end) do |t|
25
+ if subclass == t.self
26
+ save_methods_of_class(subclass)
27
+ t.disable
28
+ end
27
29
  end
28
30
  end
29
- subclass.extend OverridesTracker::FileObserver
30
31
  end
31
32
 
32
33
  def save_methods_of_class(clazz)
33
- puts "Reading...#{clazz.name}"
34
-
35
34
  inst_methods = clazz.instance_methods(false)
36
35
  inst_methods.each do |inst_method|
37
36
  method = clazz.instance_method(inst_method)
@@ -1 +1 @@
1
- {"version":"0.1.13","branch_name":"branch_name","author_name":"author_name","committer_name":"committer_name","branch_name_to_report":"master","last_commit_id":"last_commit_id","last_commit_name":"last_commit_name","last_commit_name_to_report":"last_commit_name_to_report","working_directory":"/Users/simonmeyborg/Documents/syborgstudios/projects/overrides_tracker","bundle_path":"/Library/Ruby/Gems/2.6.0","methods_collection":{"CustomClass":{"instance_methods":{"instance_test_method":{"sha":"3408e1f1736c6b83bc13f014e5338eec0c67393f","location":["/Users/simonmeyborg/Documents/syborgstudios/projects/overrides_tracker/spec/test_classes/custom_class.rb",10],"body":"def instance_test_method\n 'instance_test_method'\nend\n","is_part_of_app":true,"overriding_location":["/Users/simonmeyborg/Documents/syborgstudios/projects/overrides_tracker/spec/test_classes/custom_class.rb",14],"overriding_body":"def instance_override_test_method\n 'instance_override_test_method'\nend\n","overriding_sha":"75cf2b21c3033f33c155a329d8e9110ae3fb0290","overriding_is_part_of_app":true}},"singleton_methods":{},"added_instance_methods":{},"added_singleton_methods":{}}},"number_of_methods":1,"number_of_methods_in_app_path":1,"number_of_classes":1,"number_of_classes_in_app_path":1}
1
+ {"version":"0.2.0","branch_name":"branch_name","author_name":"author_name","committer_name":"committer_name","branch_name_to_report":"master","last_commit_id":"last_commit_id","last_commit_name":"last_commit_name","last_commit_name_to_report":"last_commit_name_to_report","working_directory":"/Users/simonmeyborg/Documents/syborgstudios/projects/overrides_tracker","bundle_path":"/Library/Ruby/Gems/2.6.0","methods_collection":{"CustomClass":{"instance_methods":{"instance_test_method":{"sha":"3408e1f1736c6b83bc13f014e5338eec0c67393f","location":["/Users/simonmeyborg/Documents/syborgstudios/projects/overrides_tracker/spec/test_classes/custom_class.rb",10],"body":"def instance_test_method\n 'instance_test_method'\nend\n","is_part_of_app":true,"overriding_location":["/Users/simonmeyborg/Documents/syborgstudios/projects/overrides_tracker/spec/test_classes/custom_class.rb",14],"overriding_body":"def instance_override_test_method\n 'instance_override_test_method'\nend\n","overriding_sha":"75cf2b21c3033f33c155a329d8e9110ae3fb0290","overriding_is_part_of_app":true}},"singleton_methods":{},"added_instance_methods":{},"added_singleton_methods":{}}},"number_of_methods":1,"number_of_methods_in_app_path":1,"number_of_classes":1,"number_of_classes_in_app_path":1}
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
8
8
  spec.authors = ['Simon Meyborg']
9
9
  spec.email = ['meyborg@syborgstudios.com']
10
10
 
11
- spec.summary = 'Overrides Tracker keeps track of all overriding methods and their sources and allows for comparison across branches.'
12
- spec.description = 'Overrides Tracker keeps track of all overriding methods and their sources and allows for comparison across branches.'
11
+ spec.summary = 'Overrides Tracker tracks all monkey patches in your codebase and the methods they override. It allows for comparison between builds to reveal changes you might miss otherwise.'
12
+ spec.description = 'Overrides Tracker tracks all monkey patches in your codebase and the methods they override. It allows for comparison between builds to reveal changes you might miss otherwise. Use overrides.io to integrate overrides_tracker into your CI/CD pipeline. That way you will never miss an underlying code-change that might break a monkey patch.'
13
13
  spec.homepage = 'https://github.com/SyborgStudios/overrides_tracker'
14
14
  spec.license = 'MIT'
15
15
 
@@ -26,6 +26,4 @@ class CustomClass
26
26
  def self.overrides_tracker_finished_file
27
27
  @overrides_tracker_finished_file_called = true
28
28
  end
29
-
30
- extend OverridesTracker::FileObserver
31
29
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: overrides_tracker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simon Meyborg
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-05 00:00:00.000000000 Z
11
+ date: 2023-02-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -38,8 +38,11 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
- description: Overrides Tracker keeps track of all overriding methods and their sources
42
- and allows for comparison across branches.
41
+ description: Overrides Tracker tracks all monkey patches in your codebase and the
42
+ methods they override. It allows for comparison between builds to reveal changes
43
+ you might miss otherwise. Use overrides.io to integrate overrides_tracker into your
44
+ CI/CD pipeline. That way you will never miss an underlying code-change that might
45
+ break a monkey patch.
43
46
  email:
44
47
  - meyborg@syborgstudios.com
45
48
  executables:
@@ -66,7 +69,6 @@ files:
66
69
  - lib/overrides_tracker.rb
67
70
  - lib/overrides_tracker/api.rb
68
71
  - lib/overrides_tracker/comparer.rb
69
- - lib/overrides_tracker/file_observer.rb
70
72
  - lib/overrides_tracker/hash_decorator.rb
71
73
  - lib/overrides_tracker/methods_collector.rb
72
74
  - lib/overrides_tracker/string_colorizer.rb
@@ -76,7 +78,6 @@ files:
76
78
  - overrides_tracker/branch_name#last_commit_id.otf
77
79
  - spec/overrides_tracker/api_spec.rb
78
80
  - spec/overrides_tracker/comparer_spec.rb
79
- - spec/overrides_tracker/file_observer_spec.rb
80
81
  - spec/overrides_tracker/hash_decorator_spec.rb
81
82
  - spec/overrides_tracker/methods_collector_spec.rb
82
83
  - spec/overrides_tracker/string_colorizer_spec.rb
@@ -112,6 +113,7 @@ requirements: []
112
113
  rubygems_version: 3.0.3.1
113
114
  signing_key:
114
115
  specification_version: 4
115
- summary: Overrides Tracker keeps track of all overriding methods and their sources
116
- and allows for comparison across branches.
116
+ summary: Overrides Tracker tracks all monkey patches in your codebase and the methods
117
+ they override. It allows for comparison between builds to reveal changes you might
118
+ miss otherwise.
117
119
  test_files: []
@@ -1,10 +0,0 @@
1
- module OverridesTracker::FileObserver
2
- def self.extended(obj)
3
- TracePoint.trace(:end) do |t|
4
- if obj == t.self
5
- obj.overrides_tracker_finished_file
6
- t.disable
7
- end
8
- end
9
- end
10
- end
@@ -1,10 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'spec_helper'
4
- require_relative '../test_classes/custom_class'
5
-
6
- describe OverridesTracker::FileObserver do
7
- it 'calls the method overrides_tracker_finished_file when the file is finished' do
8
- expect(CustomClass.instance_variable_get(:@overrides_tracker_finished_file_called)).to eq(true)
9
- end
10
- end