super_module 1.3.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 70513ad566652aaf58d9da92fe22c598be383f3df25700a25245b0862e9b5580
4
- data.tar.gz: 3002cb8ce8d0e853b1228f29f952034a7f9c2520c9635806860bde0959fe448b
3
+ metadata.gz: 6f7d062de77d91c8bd5fd0e87e4c140fcadfc3ae81f6a91a0673a133aa26cd99
4
+ data.tar.gz: 80d078ac51cd2a8d3f89dd37941a84de73b2c790f36b3d4fdadf2d4d2d63ed79
5
5
  SHA512:
6
- metadata.gz: e20a35408bb4be154120310d932fe679d0ddc1224817886c1235cfdcb89750a6fd9655d9b0432e9f5441504122d714042da22527ac8ebb1316f3f3e6b1359021
7
- data.tar.gz: 04db18d5c5991a8342d868a56aa8143b71b4775dd7f7f4a4cb919f9fb0c1073775602441fe41e0d19630bac5f690f52ce9c4cca5170d58bc3af1fafda87a862e
6
+ metadata.gz: e2701d71b39ed35ff6005d48c7ad076205bee6c6f3540aa76c8d48fd4f04ae8d6a73f230a7c1ab6dbfb092341c48fb2d05413954eb7800f3e760a0215c19bab3
7
+ data.tar.gz: 9ef86a39a120bd5ba2e65e8026b6672234705ae6833b79ae8ef460d70121eb28bf1c05708a1dcfe820dfe67c82327d6f01352256da34c4e981bead9d8d82b783
@@ -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
- ## 1.2.2
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.0'</pre>
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://raw.githubusercontent.com/AndyObtiva/super_module/master/CHANGELOG.md)
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.0
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
- "self.__record_method_call(#{method_call_recorder_args})"
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
- def self.validates(attribute, options)
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
-
@@ -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.0 ruby lib
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.0"
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-24"
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.0
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-24 00:00:00.000000000 Z
11
+ date: 2020-03-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: method_source