blazer 1.3.2 → 1.3.3
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of blazer might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/app/models/blazer/audit.rb +2 -2
- data/app/models/blazer/query.rb +1 -1
- data/lib/blazer/engine.rb +4 -3
- data/lib/blazer/version.rb +1 -1
- data/lib/blazer.rb +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d74bc946c7e95c76fa9144f6644dd1bb1000d2c7
|
4
|
+
data.tar.gz: 2f5b49ff2e8f20986286d08995d78641857b1140
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5ba9405ba682acaad4b98ae03563c9cd0c489ec35560b856089b453f4f068b400978e3645c1a8812249b5b50edc8bec35fbe1401aeecdcd95bb262f0645cc69
|
7
|
+
data.tar.gz: c0254f4a628a20e960f699fb79642213293f447b794a0d1052d8af1c8f686758eb6f2ca79b1f7aa3579e5794902ecf188dcd078e45e1e00441d077055ea98e1e
|
data/CHANGELOG.md
CHANGED
data/app/models/blazer/audit.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
module Blazer
|
2
2
|
class Audit < ActiveRecord::Base
|
3
|
-
belongs_to :user, class_name: Blazer.user_class.to_s
|
4
|
-
belongs_to :query,
|
3
|
+
belongs_to :user, Blazer::BELONGS_TO_OPTIONAL.merge(class_name: Blazer.user_class.to_s)
|
4
|
+
belongs_to :query, Blazer::BELONGS_TO_OPTIONAL
|
5
5
|
end
|
6
6
|
end
|
data/app/models/blazer/query.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
module Blazer
|
2
2
|
class Query < ActiveRecord::Base
|
3
|
-
belongs_to :creator, class_name: Blazer.user_class.to_s
|
3
|
+
belongs_to :creator, Blazer::BELONGS_TO_OPTIONAL.merge(class_name: Blazer.user_class.to_s) if Blazer.user_class
|
4
4
|
has_many :checks, dependent: :destroy
|
5
5
|
has_many :dashboard_queries, dependent: :destroy
|
6
6
|
has_many :dashboards, through: :dashboard_queries
|
data/lib/blazer/engine.rb
CHANGED
@@ -22,9 +22,10 @@ module Blazer
|
|
22
22
|
Blazer.check_schedules = Blazer.settings["check_schedules"] if Blazer.settings.key?("check_schedules")
|
23
23
|
|
24
24
|
if Blazer.user_class
|
25
|
-
Blazer::
|
26
|
-
Blazer::
|
27
|
-
Blazer::
|
25
|
+
options = Blazer::BELONGS_TO_OPTIONAL.merge(class_name: Blazer.user_class.to_s)
|
26
|
+
Blazer::Query.belongs_to :creator, options
|
27
|
+
Blazer::Dashboard.belongs_to :creator, options
|
28
|
+
Blazer::Check.belongs_to :creator, options
|
28
29
|
end
|
29
30
|
|
30
31
|
Blazer.cache ||= Rails.cache
|
data/lib/blazer/version.rb
CHANGED
data/lib/blazer.rb
CHANGED
@@ -30,6 +30,8 @@ module Blazer
|
|
30
30
|
"cancelled on user's request", # redshift
|
31
31
|
"system requested abort" # redshift
|
32
32
|
]
|
33
|
+
BELONGS_TO_OPTIONAL = {}
|
34
|
+
BELONGS_TO_OPTIONAL[:optional] = true if Rails::VERSION::MAJOR >= 5
|
33
35
|
|
34
36
|
def self.time_zone=(time_zone)
|
35
37
|
@time_zone = time_zone.is_a?(ActiveSupport::TimeZone) ? time_zone : ActiveSupport::TimeZone[time_zone.to_s]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blazer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kane
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|