dissociated_introspection 0.4.1 → 0.5.0

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: a85114518e8f37294a6b2e18da38ddf9453e0b7b
4
- data.tar.gz: 9674c329f7c23e83f7f9fc2cddd602d3158615e6
3
+ metadata.gz: caddb3eab986b9c628d086662b2694a3485f2bd0
4
+ data.tar.gz: dba363070d4bcbf74c7a0ce03007ca885f009418
5
5
  SHA512:
6
- metadata.gz: d363290654c25c50c1449b56386089c3b4c259ccdaadb06fba2235b13ae924eb49d2102f2a2335786927507d45a061fac549bb8ec4440e91fc3ef2b9311c010e
7
- data.tar.gz: e43b3bff9385825a81729712aafb4e0baa0c9090b6d89f88dd37ce1838ca7452edffc9c3ae7d00f5946cc4e82227a06220d01643ea006613083cc6636183326e
6
+ metadata.gz: ac8d89c506185c591453feb85496a463f0697f1f1a042105c7a200a1be7373496145eae2c9384bcaac5c8ae88d03810376b6943afc9e88b80e6cc47b445f8797
7
+ data.tar.gz: 45e2f7fed615fc9fda1fecf63eb8e1d48cdd6f94f2901999dc5b61162ca24a708b5da1ba7e8fa9d3a018ceed3ed9b60d72f09240c745dc72082057e79c2927df
data/.travis.yml CHANGED
@@ -1,8 +1,8 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.1.7
4
- - 2.2.3
5
- - 2.3.0
3
+ - 2.1.8
4
+ - 2.2.5
5
+ - 2.3.1
6
6
  addons:
7
7
  code_climate:
8
8
  repo_token: 9ee4de0c2f9b045b414b79b67a56bc98d1f365aee5e54ca9a119319b59d8ae52
data/CHANGELOG.md CHANGED
@@ -1,18 +1,23 @@
1
1
  # Changelog
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
- ## 0.4.1 - 2015-01-18
4
+ ## 0.5 - 2016-04-30
5
+ ### Enhancement
6
+ - `DissociatedIntrospection.listen_to_defined_class_methods=` In addition to ruby methods like
7
+ attr_reader other DSL class methods can be recorded if specified.
8
+
9
+ ## 0.4.1 - 2016-01-18
5
10
  ### Fix
6
11
  - `RubyClass#module_nesting` could return modules that were nested inside of a class.
7
12
 
8
- ## 0.4.0 - 2015-01-18
13
+ ## 0.4.0 - 2016-01-18
9
14
  ### Enhancement
10
15
  - `RubyClass#module_nesting` returns an array of symbols representing the module namespacing that the class is within.
11
16
 
12
17
  ### Fix
13
18
  - If a class was not found it could return all given code.
14
19
 
15
- ## 0.3.1 - 2015-01-17
20
+ ## 0.3.1 - 2016-01-17
16
21
  ### Enhancement
17
22
  - `DissociatedIntrospection::RubyClass` now can take a `DissociatedIntrospection::RubyCode` which is build with `#build_from_ast`, `#build_from_source`.
18
23
  - `DissociatedIntrospection::WrapInModules` given a instance of `DissociatedIntrospection::RubyCode` it will nest any depth of module namespacing.
@@ -8,3 +8,27 @@ require 'dissociated_introspection/ruby_code'
8
8
  require 'dissociated_introspection/ruby_class'
9
9
  require 'dissociated_introspection/ruby_class/def'
10
10
  require 'dissociated_introspection/inspection'
11
+
12
+ module DissociatedIntrospection
13
+ LISTEN_TO_CLASS_METHODS = [
14
+ :attr_reader,
15
+ :attr_writer,
16
+ :attr_accessor,
17
+ :prepend,
18
+ :include,
19
+ :extend,
20
+ :alias_attribute,
21
+ :alias_method,
22
+ :alias_method_chain
23
+ ]
24
+
25
+ class << self
26
+ def listen_to_defined_class_methods=(*methods)
27
+ listen_to_defined_class_methods.concat(methods)
28
+ end
29
+
30
+ def listen_to_defined_class_methods
31
+ @listen_to_defined_class_methods ||= LISTEN_TO_CLASS_METHODS
32
+ end
33
+ end
34
+ end
@@ -50,6 +50,6 @@ class RecordingParent < BasicObject
50
50
  end
51
51
  end
52
52
 
53
- listen_to_defined_macros :attr_reader, :attr_writer, :attr_accessor, :prepend, :include, :extend
53
+ listen_to_defined_macros *DissociatedIntrospection.listen_to_defined_class_methods
54
54
  end
55
55
 
@@ -1,3 +1,3 @@
1
1
  module DissociatedIntrospection
2
- VERSION = "0.4.1"
2
+ VERSION = "0.5.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dissociated_introspection
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dustin Zeisler
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-01-19 00:00:00.000000000 Z
11
+ date: 2016-05-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parser