decors 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,19 +1,21 @@
1
- require File.expand_path('../../lib/decors', __FILE__)
1
+ # frozen_string_literal: true
2
+
3
+ require File.expand_path('../lib/decors', __dir__)
2
4
 
3
5
  module SpecHelpers
4
- def stub_class(class_name, inherits: [], &class_eval)
5
- klass = stub_const(class_name.to_s, Class.new(*inherits))
6
- klass.class_eval(&class_eval) if class_eval
7
- klass
8
- end
6
+ def stub_class(class_name, inherits: [], &class_eval)
7
+ klass = stub_const(class_name.to_s, Class.new(*inherits))
8
+ klass.class_eval(&class_eval) if class_eval
9
+ klass
10
+ end
9
11
 
10
- def stub_module(module_name, &module_eval)
11
- mod = stub_const(module_name.to_s, Module.new)
12
- mod.module_eval(&module_eval) if module_eval
13
- mod
14
- end
12
+ def stub_module(module_name, &module_eval)
13
+ mod = stub_const(module_name.to_s, Module.new)
14
+ mod.module_eval(&module_eval) if module_eval
15
+ mod
16
+ end
15
17
  end
16
18
 
17
19
  RSpec.configure do |config|
18
- config.include SpecHelpers
20
+ config.include SpecHelpers
19
21
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decors
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vivien Meyet
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-24 00:00:00.000000000 Z
11
+ date: 2020-06-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry
@@ -80,8 +80,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
80
80
  - !ruby/object:Gem::Version
81
81
  version: '0'
82
82
  requirements: []
83
- rubyforge_project:
84
- rubygems_version: 2.5.1
83
+ rubygems_version: 3.1.2
85
84
  signing_key:
86
85
  specification_version: 4
87
86
  summary: Ruby implementation of Python method decorators / Java annotations