blazer 2.4.4 → 2.4.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2dea9967abfcc8db6f94dfb2b7ef522d367264aacd7b104259aaf48b3894035f
4
- data.tar.gz: 84fa8ea6616dbcf0be9c7af3fe85d22085f4b75bf8b87f04d6eb7c62225ea24e
3
+ metadata.gz: 256b02c0d10eeb150659e7ebc1ac2f954d80668d2c615dd70fbd17c059adc66b
4
+ data.tar.gz: 19e6f582ee5e62df742d1fd2be4495a6fd60a5f8f11c2b880deef70fa71e4ce9
5
5
  SHA512:
6
- metadata.gz: 4d1ca32f82a4d973c9cd3aaf89ce12af78c6147fc9a939280cb3f6edadf144dd190597d43f893e34b0b116cbdcec6d60eabe947cc719e1e4d9ecc641f3de0369
7
- data.tar.gz: 26983796db57b66e9de5f49c971d5b2d2c467aa449d2e632afa7119abd57153bbc39266eeba26a7ed40fdcf23a30323c871649e91be270e48673050c3cee2df3
6
+ metadata.gz: 8b02fd069ed3fdde9b1a59e1b13a29c63eca1977f6f8028f1b1270fb8f60ab4b1a5feefcd3e283c5d88968782a46f783e19cda44985f4381c1334770bed95d5a
7
+ data.tar.gz: b1ea01aaf738562070e1a5ffb7b02fd20f63f3734897b6a202aa7f193a2f914786f11b81fc0895718420e2798b1136ba0620aa3f2b91fbe6e5bbe6ac9433c502
data/CHANGELOG.md CHANGED
@@ -1,6 +1,10 @@
1
+ ## 2.4.5 (2021-09-15)
2
+
3
+ - Improved fix for some forked queries not appearing on home page
4
+
1
5
  ## 2.4.4 (2021-09-15)
2
6
 
3
- - Fixed issue with forked queries not appearing on home page
7
+ - Fixed issue with some forked queries not appearing on home page
4
8
 
5
9
  ## 2.4.3 (2021-07-27)
6
10
 
data/README.md CHANGED
@@ -975,14 +975,6 @@ override_csp: true
975
975
 
976
976
  ## Upgrading
977
977
 
978
- ### 2.4.4
979
-
980
- Due to a bug, newly forked queries stopped appearing on the home page when archiving was enabled. To restore them, run:
981
-
982
- ```ruby
983
- Blazer::Query.where(status: nil).update_all(status: "active")
984
- ```
985
-
986
978
  ### 2.3
987
979
 
988
980
  To archive queries, create a migration
@@ -71,7 +71,7 @@ module Blazer
71
71
  @sql_errors << error if error
72
72
  end
73
73
 
74
- @query.update!(status: "active") if @query.try(:status) == "archived"
74
+ @query.update!(status: "active") if @query.respond_to?(:status) && @query.status.in?(["archived", nil])
75
75
 
76
76
  Blazer.transform_statement.call(data_source, @statement) if Blazer.transform_statement
77
77
 
@@ -179,8 +179,8 @@ module Blazer
179
179
  if params[:commit] == "Fork"
180
180
  @query = Blazer::Query.new
181
181
  @query.creator = blazer_user if @query.respond_to?(:creator)
182
- @query.status = "active" if @query.respond_to?(:status)
183
182
  end
183
+ @query.status = "active" if @query.respond_to?(:status)
184
184
  unless @query.editable?(blazer_user)
185
185
  @query.errors.add(:base, "Sorry, permission denied")
186
186
  end
@@ -8,7 +8,7 @@ module Blazer
8
8
 
9
9
  validates :statement, presence: true
10
10
 
11
- scope :active, -> { column_names.include?("status") ? where(status: "active") : all }
11
+ scope :active, -> { column_names.include?("status") ? where(status: ["active", nil]) : all }
12
12
  scope :named, -> { where.not(name: "") }
13
13
 
14
14
  def to_param
@@ -1,3 +1,3 @@
1
1
  module Blazer
2
- VERSION = "2.4.4"
2
+ VERSION = "2.4.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blazer
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.4
4
+ version: 2.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane