circuit_switch 0.2.1 → 0.2.2
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 +4 -4
- data/CHANGELOG.md +11 -1
- data/circuit_switch.gemspec +1 -0
- data/lib/circuit_switch/configuration.rb +6 -0
- data/lib/circuit_switch/version.rb +1 -1
- data/lib/generators/circuit_switch/templates/initializer.rb +3 -0
- metadata +16 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 948143d874eac4049767af92dacd5f8175ad016a951b93e95e05e3a3585eaf70
|
|
4
|
+
data.tar.gz: 98981a823c9fa4dd0c20259003766ecf789dd44f7ad0e7bd8983223338f5a550
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 317208a17b15dfcc29e333c217ee7320b0133a721a918d2917cd3d172615a86ffe73394e74d407454b9ff8e16fa2be702d6d22cc91467793a9260a84bae792ad
|
|
7
|
+
data.tar.gz: 3ec9b0893cca1eaee59e1aa40c7c3be95348b90760aff1a5fef59053e7dbeb72c627b93940e04b14d0b3c2c2d5159beb00dc13b6b6145b340871734346138428
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
## 0.2.2
|
|
2
|
+
|
|
3
|
+
### New features
|
|
4
|
+
|
|
5
|
+
* Add `key_column_name` to configuration for aliasing `circuit_switches.key`.
|
|
6
|
+
|
|
7
|
+
### Changes
|
|
8
|
+
|
|
9
|
+
* Declare dependent on ActiveSupport instead of implicitly dependent.
|
|
10
|
+
|
|
1
11
|
## 0.2.1
|
|
2
12
|
|
|
3
13
|
### New features
|
|
@@ -7,7 +17,7 @@
|
|
|
7
17
|
To migrate, run next.
|
|
8
18
|
|
|
9
19
|
```
|
|
10
|
-
rails generate circuit_switch:migration add_key
|
|
20
|
+
rails generate circuit_switch:migration circuit_switch add_key
|
|
11
21
|
rails db:migrate
|
|
12
22
|
```
|
|
13
23
|
|
data/circuit_switch.gemspec
CHANGED
|
@@ -25,6 +25,7 @@ Gem::Specification.new do |spec|
|
|
|
25
25
|
|
|
26
26
|
spec.add_dependency 'activejob'
|
|
27
27
|
spec.add_dependency 'activerecord'
|
|
28
|
+
spec.add_dependency 'activesupport'
|
|
28
29
|
spec.add_development_dependency 'byebug'
|
|
29
30
|
spec.add_development_dependency 'sqlite3'
|
|
30
31
|
spec.add_development_dependency 'test-unit'
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
require 'active_support/core_ext/module/aliasing'
|
|
2
|
+
|
|
1
3
|
module CircuitSwitch
|
|
2
4
|
class Configuration
|
|
3
5
|
CIRCUIT_SWITCH = 'circuit_switch'.freeze
|
|
@@ -25,6 +27,10 @@ module CircuitSwitch
|
|
|
25
27
|
report_if.respond_to?(:call) ? report_if.call : !!report_if
|
|
26
28
|
end
|
|
27
29
|
|
|
30
|
+
def key_column_name=(key)
|
|
31
|
+
::CircuitSwitch::CircuitSwitch.alias_attribute :key, key
|
|
32
|
+
end
|
|
33
|
+
|
|
28
34
|
def due_date
|
|
29
35
|
@due_date ||= Date.today + 10
|
|
30
36
|
end
|
|
@@ -16,6 +16,9 @@ CircuitSwitch.configure do |config|
|
|
|
16
16
|
# Excluded paths to report
|
|
17
17
|
# config.silent_paths = [CIRCUIT_SWITCH]
|
|
18
18
|
|
|
19
|
+
# Alias column name for circuit_switches.key through alias_attribute
|
|
20
|
+
# config.key_column_name = :key
|
|
21
|
+
|
|
19
22
|
# Notifier to notify circuit_switch's due_date come and it's time to clean code!
|
|
20
23
|
# Specify proc to call your report tool: like;
|
|
21
24
|
# config.due_date_notifier = -> (message) { Slack::Web::Client.new.chat_postMessage(channel: '#your_channel', text: message) }
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: circuit_switch
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- makicamel
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-10-
|
|
11
|
+
date: 2021-10-31 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activejob
|
|
@@ -38,6 +38,20 @@ dependencies:
|
|
|
38
38
|
- - ">="
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
40
|
version: '0'
|
|
41
|
+
- !ruby/object:Gem::Dependency
|
|
42
|
+
name: activesupport
|
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
|
44
|
+
requirements:
|
|
45
|
+
- - ">="
|
|
46
|
+
- !ruby/object:Gem::Version
|
|
47
|
+
version: '0'
|
|
48
|
+
type: :runtime
|
|
49
|
+
prerelease: false
|
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
+
requirements:
|
|
52
|
+
- - ">="
|
|
53
|
+
- !ruby/object:Gem::Version
|
|
54
|
+
version: '0'
|
|
41
55
|
- !ruby/object:Gem::Dependency
|
|
42
56
|
name: byebug
|
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|