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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9281021c31b4e885f3e8c8ca7fbd1fd83e713202950776c910f9b0951891a5c6
4
- data.tar.gz: 8f4969657c64c2016724fabadd8d2cbddf063e6ffc3dd0298fb2e9e0b06e688a
3
+ metadata.gz: 948143d874eac4049767af92dacd5f8175ad016a951b93e95e05e3a3585eaf70
4
+ data.tar.gz: 98981a823c9fa4dd0c20259003766ecf789dd44f7ad0e7bd8983223338f5a550
5
5
  SHA512:
6
- metadata.gz: 94cc63d4de19ffdc4cea5a5e331af21ab458f26f5333a6ceb4b84c7b3ba13edb44ebee7c0379c555d1ea7f390e8a31cb159c35c8d181cd8dec4a16cb049507ab
7
- data.tar.gz: 2f490f1e01f4e05351cbde8ee6fe328e200c020dcbb0d83a1f627983a47c192f4c4ab8f5c3b3878bd58e7a026003d0bd79a5995044987b275b59b6d9902f478b
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
 
@@ -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
@@ -1,3 +1,3 @@
1
1
  module CircuitSwitch
2
- VERSION = '0.2.1'
2
+ VERSION = '0.2.2'
3
3
  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.1
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-19 00:00:00.000000000 Z
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