agilibox 1.3.4 → 1.3.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/app/helpers/agilibox/text_helper.rb +1 -1
- data/app/libs/agilibox/collection_update.rb +1 -1
- data/app/libs/agilibox/fcm/request.rb +1 -1
- data/app/libs/agilibox/monkey.rb +39 -0
- data/lib/agilibox/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 66337e184cad2e838e45b87d65dc32fba8939e49d57651c0116aa52940ae14ff
|
4
|
+
data.tar.gz: 01b1e3d2c551d68b8a5e7f69bb4e48200bd8db63d07cd43eb482e3cf7d3958d4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b9211f2cf491df7db05981879b35c466a4b13217c18c76d612585d2d83a951d0d88967f499fec90bdf63d940fa269ca40e9b6f70589c523fa098de284b67146
|
7
|
+
data.tar.gz: a56c82f2d46b32db501e31a1e684f76db80c7742b5a498d7e579916ab72092ec9f9bc601b22fcd7aec4c85af9c954bc1ca6dcb64965378e66f9c446fa8b69bb1
|
data/CHANGELOG.md
CHANGED
@@ -0,0 +1,39 @@
|
|
1
|
+
module Agilibox::Monkey
|
2
|
+
extend ActiveSupport::Concern
|
3
|
+
|
4
|
+
class_methods do
|
5
|
+
def prepend_instances(&block)
|
6
|
+
m = Module.new(&block)
|
7
|
+
send(:prepend, m)
|
8
|
+
end
|
9
|
+
|
10
|
+
def prepend_class(&block)
|
11
|
+
m = Module.new(&block)
|
12
|
+
singleton_class.send(:prepend, m)
|
13
|
+
end
|
14
|
+
|
15
|
+
def prepend_instance_method(name, &block)
|
16
|
+
check_instance_method_exist!(name)
|
17
|
+
|
18
|
+
m = Module.new
|
19
|
+
m.send(:define_method, name, &block)
|
20
|
+
send(:prepend, m)
|
21
|
+
end
|
22
|
+
|
23
|
+
def prepend_class_method(name, &block)
|
24
|
+
check_class_method_exist!(name)
|
25
|
+
|
26
|
+
m = Module.new
|
27
|
+
m.send(:define_method, name, &block)
|
28
|
+
singleton_class.send(:prepend, m)
|
29
|
+
end
|
30
|
+
|
31
|
+
def check_instance_method_exist!(name)
|
32
|
+
raise "instance method `#{name}` does not exist" unless instance_methods.include?(name)
|
33
|
+
end
|
34
|
+
|
35
|
+
def check_class_method_exist!(name)
|
36
|
+
raise "class method `#{name}` does not exist" unless methods.include?(name)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
data/lib/agilibox/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: agilibox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- agilidée
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-10-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails-i18n
|
@@ -114,6 +114,7 @@ files:
|
|
114
114
|
- app/libs/agilibox/initialize_with.rb
|
115
115
|
- app/libs/agilibox/mini_model_serializer/serialize.rb
|
116
116
|
- app/libs/agilibox/mini_model_serializer/serializer.rb
|
117
|
+
- app/libs/agilibox/monkey.rb
|
117
118
|
- app/libs/agilibox/phone_number_sanitizer.rb
|
118
119
|
- app/libs/agilibox/sortable_uuid_generator.rb
|
119
120
|
- app/libs/agilibox/token_generator.rb
|