super_module 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -1
- data/README.md +2 -2
- data/VERSION +1 -1
- data/lib/super_module/v1/module_body_method_call_recorder.rb +3 -4
- data/spec/support/v1/fake_active_model.rb +2 -2
- data/super_module.gemspec +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6f7d062de77d91c8bd5fd0e87e4c140fcadfc3ae81f6a91a0673a133aa26cd99
|
4
|
+
data.tar.gz: 80d078ac51cd2a8d3f89dd37941a84de73b2c790f36b3d4fdadf2d4d2d63ed79
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e2701d71b39ed35ff6005d48c7ad076205bee6c6f3540aa76c8d48fd4f04ae8d6a73f230a7c1ab6dbfb092341c48fb2d05413954eb7800f3e760a0215c19bab3
|
7
|
+
data.tar.gz: 9ef86a39a120bd5ba2e65e8026b6672234705ae6833b79ae8ef460d70121eb28bf1c05708a1dcfe820dfe67c82327d6f01352256da34c4e981bead9d8d82b783
|
data/CHANGELOG.md
CHANGED
@@ -1,11 +1,15 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## 1.3.1
|
4
|
+
|
5
|
+
- Fixed issue with super module containing class methods with default arguments
|
6
|
+
|
3
7
|
## 1.3.0
|
4
8
|
|
5
9
|
- Dropped support for SuperModule 2 Beta syntax, reverting to V1 syntax as the default
|
6
10
|
- Added `included_super_module` method to allow modules to call it if they need to redefine `self.included` for meta-programming.
|
7
11
|
|
8
|
-
##
|
12
|
+
## v2 Beta (v1.2.2)
|
9
13
|
|
10
14
|
* Relaxed dependency on `method_source` gem version
|
11
15
|
|
data/README.md
CHANGED
@@ -104,7 +104,7 @@ In other words, [SuperModule](https://rubygems.org/gems/super_module) furthers R
|
|
104
104
|
|
105
105
|
<b>Using [Bundler](http://bundler.io/)</b>
|
106
106
|
|
107
|
-
Add the following to Gemfile: <pre>gem 'super_module', '1.3.
|
107
|
+
Add the following to Gemfile: <pre>gem 'super_module', '1.3.1'</pre>
|
108
108
|
|
109
109
|
And run the following command: <pre>bundle</pre>
|
110
110
|
|
@@ -293,7 +293,7 @@ Avoid hooking into `self.included(base)` at all costs.
|
|
293
293
|
|
294
294
|
## Change Log
|
295
295
|
|
296
|
-
[CHANGELOG.md](https://
|
296
|
+
[CHANGELOG.md](https://github.com/AndyObtiva/super_module/blob/master/CHANGELOG.md)
|
297
297
|
|
298
298
|
## Feedback and Contribution
|
299
299
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.3.
|
1
|
+
1.3.1
|
@@ -31,12 +31,11 @@ module SuperModule
|
|
31
31
|
def __singleton_method_call_recorder(method_name, method_args)
|
32
32
|
unless __super_module_singleton_methods_excluded_from_call_recording.include?(method_name)
|
33
33
|
method_call_recorder_args = "'#{method_name}'"
|
34
|
-
method_call_recorder_args << ", #{method_args}" unless method_args.to_s.strip == ''
|
35
|
-
"
|
34
|
+
method_call_recorder_args << ", #{method_args}" unless method_args.to_s.strip == ''
|
35
|
+
method_call_recorder_args = method_call_recorder_args.split(",").each_with_index.map {|arg, i| i == 0 ? arg : arg.split("=").first}.join(",")
|
36
|
+
"self.__record_method_call(#{method_call_recorder_args})"
|
36
37
|
end
|
37
38
|
end
|
38
39
|
end
|
39
40
|
end
|
40
41
|
end
|
41
|
-
|
42
|
-
|
@@ -4,7 +4,8 @@ module V1::FakeActiveModel
|
|
4
4
|
|
5
5
|
include SuperModule
|
6
6
|
|
7
|
-
|
7
|
+
# Test default options specified
|
8
|
+
def self.validates(attribute, options = {})
|
8
9
|
validations << [attribute, options]
|
9
10
|
end
|
10
11
|
|
@@ -13,4 +14,3 @@ module V1::FakeActiveModel
|
|
13
14
|
end
|
14
15
|
|
15
16
|
end
|
16
|
-
|
data/super_module.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: super_module 1.3.
|
5
|
+
# stub: super_module 1.3.1 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "super_module".freeze
|
9
|
-
s.version = "1.3.
|
9
|
+
s.version = "1.3.1"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib".freeze]
|
13
13
|
s.authors = ["Andy Maleh".freeze]
|
14
|
-
s.date = "2020-03-
|
14
|
+
s.date = "2020-03-28"
|
15
15
|
s.description = "SuperModule allows defining class methods and method invocations the same way a super class does without using def included(base). This also succeeds ActiveSupport::Concern by offering lighter syntax".freeze
|
16
16
|
s.extra_rdoc_files = [
|
17
17
|
"CHANGELOG.md",
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: super_module
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Maleh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-03-
|
11
|
+
date: 2020-03-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: method_source
|