mimicheck 0.2.0 → 0.3.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: bf1ea7209f7c7a85813c7686322e236f0eecdd94
4
- data.tar.gz: f2bc610779dd89fa9b1cbd8b2b3f7c013dabf9f0
3
+ metadata.gz: 4e8c2eae01f74c0dd20700bf77f5403316a06e4b
4
+ data.tar.gz: b6fd710c0266f2da0ba8f845aea807bbc46713fe
5
5
  SHA512:
6
- metadata.gz: f9b0b3352c2051c806b487de6e164bcf0342cac63e0f6585712d44a7f7d5c02932ca75b41102963c8b161bc31e81dd4dafa50f6b80e6d18ed42f4251958ba115
7
- data.tar.gz: 2b3b38ac902852af30d70bfc04b7ca7a3e498cb1e1b75fe3b374e9f29ff58fc04f53ae34fdc02eb463ff8c7ec969049637c7b8b10cc36e49462d7562befab03e
6
+ metadata.gz: a44d567520e8fed365ca59047b86aa9395a2e1d43cf37e792ac582972497c304870d1e24b08e65aa39240f800f87068dacfcee53db67af4048e6e2f14aa3f303
7
+ data.tar.gz: 72162a1c6cafdde4ca42d633bf32178eee5eaa9410b9a83d94c1511acf3ed89f07b66b3235885daa848210ffee9c2b7921d03e4cb78e46d4aad223e753ddf3fa
data/Gemfile.lock CHANGED
@@ -7,19 +7,13 @@ PATH
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- byebug (4.0.5)
11
- columnize (= 0.9.0)
12
10
  coderay (1.1.0)
13
- columnize (0.9.0)
14
11
  diff-lcs (1.2.5)
15
12
  method_source (0.8.2)
16
13
  pry (0.10.1)
17
14
  coderay (~> 1.1.0)
18
15
  method_source (~> 0.8.1)
19
16
  slop (~> 3.4)
20
- pry-byebug (3.1.0)
21
- byebug (~> 4.0)
22
- pry (~> 0.10)
23
17
  pry-doc (0.8.0)
24
18
  pry (~> 0.9)
25
19
  yard (~> 0.8)
@@ -46,7 +40,6 @@ PLATFORMS
46
40
  DEPENDENCIES
47
41
  bundler (~> 1.10)
48
42
  mimicheck!
49
- pry-byebug (~> 3.0)
50
43
  pry-doc (~> 0.8)
51
44
  rake (~> 10.0)
52
45
  rspec (~> 3.0)
@@ -0,0 +1,22 @@
1
+ module MimiCheck
2
+ module Extensions
3
+ def method_missing(name, *args, &block)
4
+ if (match = name.to_s.match(/(.+)Gen$/))
5
+ gen_name = match[1]
6
+ gen_class = MimiCheck::Generator.const_get(gen_name)
7
+
8
+ self.class.send :define_method, name do |*argx|
9
+ gen_class.new(*argx)
10
+ end
11
+
12
+ send(name, *args)
13
+ else
14
+ super
15
+ end
16
+ end
17
+
18
+ def respond_to_missing?(name, include_private = false)
19
+ name.to_s.match(/(.+)Gen$/) || super
20
+ end
21
+ end
22
+ end
@@ -1,3 +1,3 @@
1
1
  module MimiCheck
2
- VERSION = '0.2.0'
2
+ VERSION = '0.3.0'
3
3
  end
data/lib/mimicheck.rb CHANGED
@@ -2,6 +2,7 @@ require_relative 'mimicheck/tail_call_optimization'
2
2
  require_relative 'mimicheck/result'
3
3
  require_relative 'mimicheck/checker'
4
4
  require_relative 'mimicheck/generator'
5
+ require_relative 'mimicheck/extensions'
5
6
  require_relative 'mimicheck/version'
6
7
  require_relative 'mimicheck/rspec_helper'
7
8
 
data/mimicheck.gemspec CHANGED
@@ -27,6 +27,5 @@ Gem::Specification.new do |spec|
27
27
  spec.add_development_dependency 'rake', '~> 10.0'
28
28
  spec.add_development_dependency 'rspec', '~> 3.0'
29
29
 
30
- spec.add_development_dependency 'pry-byebug', '~> 3.0'
31
30
  spec.add_development_dependency 'pry-doc', '~> 0.8'
32
31
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mimicheck
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - renan-ranelli
@@ -66,20 +66,6 @@ dependencies:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '3.0'
69
- - !ruby/object:Gem::Dependency
70
- name: pry-byebug
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: '3.0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: '3.0'
83
69
  - !ruby/object:Gem::Dependency
84
70
  name: pry-doc
85
71
  requirement: !ruby/object:Gem::Requirement
@@ -114,6 +100,7 @@ files:
114
100
  - bin/setup
115
101
  - lib/mimicheck.rb
116
102
  - lib/mimicheck/checker.rb
103
+ - lib/mimicheck/extensions.rb
117
104
  - lib/mimicheck/generator.rb
118
105
  - lib/mimicheck/generator/array.rb
119
106
  - lib/mimicheck/generator/bool.rb