kungfuig 0.5.6 → 0.5.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +21 -2
  3. data/lib/kungfuig/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e999acc1963d5ffd0ffdf1674e2ff0deb77bbcc5
4
- data.tar.gz: 1a6fb95a6bfa7d8c7b3b6945f18b9a894db8bf41
3
+ metadata.gz: 710529a449153af8d6165ab4048a8027d0ac2297
4
+ data.tar.gz: efe992810bda32c01e2669ba81fab5925dda3a6c
5
5
  SHA512:
6
- metadata.gz: 943bfe719a7c249e4011a4c6fa6c33f46b76a88c5ac6fcef1b2c7f2d1fb33901af17219bed336e1c7570a15d97a6e0fb4095f88fc56c4b32885e2db041ccde3d
7
- data.tar.gz: 7203a220aabfd53cb84067cc9c25092203f21acf93200c1d566d9960905f01331038e9de030c9870a6fb5248937663aeca9e3135992287439893e1fc76752b03
6
+ metadata.gz: c730db342199e07d7601f77e120f278b3b0888870f86d3d252a7ace86d381f61e4b984e2e5257d6ff195939ff1a9cf32b3e60be2da948a6b51816c7afd1e6c29
7
+ data.tar.gz: 95523cd9b5e349c8109b443991b59f2f9a929e29abe0bfb47e28040d9192ae6aa5f6746139df4a38b022cf79923dd69f5461061904f6dd2f49fd7295ae7eca35
data/README.md CHANGED
@@ -4,7 +4,25 @@
4
4
 
5
5
  [![Build Status](https://travis-ci.org/am-kantox/kungfuig.svg\?branch\=master)](https://travis-ci.org/am-kantox/kungfuig)
6
6
 
7
- Configuration is thread-safe (starting with `0.2.0`).
7
+ ## Config on steroids
8
+
9
+ This gem allows to (including but not limited to):
10
+
11
+ * easily attach a configuration to any class and/or instance;
12
+ * attach basic [aspects](https://en.wikipedia.org/wiki/Aspect-oriented_programming)
13
+ to any existing method on `before` and `after` pointcuts;
14
+ * bulk attach aspects as defined by `yaml` configuration file
15
+ (see [Bulk aspects assignment](#bulk-aspects-assignment).)
16
+ * bulk attach sidekiq jobs as aspects as defined by `yaml` configuration file
17
+ (see [Bulk jobs assignment](#bulk-jobs-assignment).)
18
+ * thread-safe configure nested / derived classes / instances.
19
+
20
+ ## Eastern eggs:
21
+
22
+ * easy way to handle console colors:
23
+ * `Color.to_xterm256('Hello, world!', :info)`
24
+ * `Color.to_xterm256('Hello, world!', :success)`
25
+ * `Color.to_xterm256('Hello, world!', '#FFFF00')`
8
26
 
9
27
  ## Usage
10
28
 
@@ -44,7 +62,7 @@ class MyApp
44
62
  end
45
63
 
46
64
  MyApp.kungfuigure do
47
- aspect :report do |result|
65
+ aspect :report do |result| # or just MyApp.aspect :report do |result|
48
66
  puts "MyApp#report returned #{result}"
49
67
  end
50
68
  end
@@ -105,6 +123,7 @@ job.perform_async(receiver, method, result, *args)
105
123
  instance as by `Sidekiq` convention.)
106
124
 
107
125
  ```ruby
126
+ respond_to = ->(m, r) { r.respond_to? m.to_sym }
108
127
  r = case receiver
109
128
  when Hash, Array, String then receiver
110
129
  when respond_to.curry[:to_hash] then receiver.to_hash
@@ -1,3 +1,3 @@
1
1
  module Kungfuig
2
- VERSION = "0.5.6"
2
+ VERSION = "0.5.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kungfuig
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.6
4
+ version: 0.5.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kantox LTD