blazer 0.0.6 → 0.0.7

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
  SHA1:
3
- metadata.gz: 9be524f1594e55ef7af3dd5205b614f6f7d3d1cf
4
- data.tar.gz: d3b1dd938c4087a1148f7788a984677085653e5e
3
+ metadata.gz: 67ee6e1cfb35a8d4629d04a7628f5ed381aa6404
4
+ data.tar.gz: 1d678a64b0674a896d7fb55a972707fdff578f47
5
5
  SHA512:
6
- metadata.gz: 540b05d40528718574d620ccc116738741e219dbf83ea48b0294cf33bcf81541998b45404d93ce607cadabf6cf5f67f11261634e60744c38778f1e43da97f2e3
7
- data.tar.gz: cfd2266e647e7b8ae7dbd7577bfb3cf417b0b12aa1d456ee906352d9841e1ee275df0e418957ee43b8dab29ad33f0fcbb2666de22d002be24177f82b886234d0
6
+ metadata.gz: 6f53f4290b16da1acd024ed52e310ee664badc3fe5d88e78d441b4283b799e96eb17080d31245d75b194cc3baa4958da6672323115abb23c70efe8be6f96572a
7
+ data.tar.gz: 254440602381a960167d8697d041a412d3c5c01674935abd33cd78a7bbfce0b6c6e21d48973375af35df8d48eadfb9b3241545ab392a4edf00f21b5e267aae56
@@ -1,3 +1,9 @@
1
+ ## 0.0.7
2
+
3
+ - Fixed error when no `User` class
4
+ - Fixed forking a query with variables
5
+ - Set time zone after Rails initializes
6
+
1
7
  ## 0.0.6
2
8
 
3
9
  - Added fork button
data/README.md CHANGED
@@ -6,7 +6,7 @@ Blazer eliminates the need for many admin pages
6
6
 
7
7
  [Play around with the demo](https://blazerme.herokuapp.com) - data from [MovieLens](http://grouplens.org/datasets/movielens/)
8
8
 
9
- ![Screenshot](https://blazerme.herokuapp.com/assets/screenshot-d9ba1e4394901e7233ce462c0c8dc8f5.png)
9
+ [![Screenshot](https://blazerme.herokuapp.com/assets/screenshot-18d79092e635b4b220f57ff7a1ecea41.png)](https://blazerme.herokuapp.com)
10
10
 
11
11
  Works with PostgreSQL and MySQL
12
12
 
@@ -36,7 +36,7 @@ module Blazer
36
36
  end
37
37
 
38
38
  def show
39
- @statement = @query.statement
39
+ @statement = @query.statement.dup
40
40
  process_vars(@statement)
41
41
 
42
42
  @smart_vars = {}
@@ -1,7 +1,5 @@
1
1
  module Blazer
2
2
  class Query < ActiveRecord::Base
3
- belongs_to :creator, class_name: Blazer.user_class.to_s if Blazer.user_class
4
-
5
3
  validates :name, presence: true
6
4
  validates :statement, presence: true
7
5
 
@@ -14,7 +14,7 @@
14
14
  <%= link_to "Fork", new_query_path(statement: @query.statement), class: "btn btn-info" %>
15
15
 
16
16
  <% if !@error and @success %>
17
- <%= button_to "Download", run_queries_path(statement: @query.statement, query_id: @query.id, format: "csv"), class: "btn btn-primary" %>
17
+ <%= button_to "Download", run_queries_path(statement: @statement, query_id: @query.id, format: "csv"), class: "btn btn-primary" %>
18
18
  <% end %>
19
19
  </div>
20
20
  </div>
@@ -129,7 +129,7 @@
129
129
  </form>
130
130
  <% end %>
131
131
 
132
- <pre><code><%= @query.statement %></code></pre>
132
+ <pre><code><%= @statement %></code></pre>
133
133
 
134
134
  <% if @success %>
135
135
  <div id="results">
@@ -137,7 +137,7 @@
137
137
  </div>
138
138
 
139
139
  <script>
140
- $.post("<%= run_queries_path %>", <%= json_escape({statement: @query.statement, query_id: @query.id}.to_json).html_safe %>, function (data) {
140
+ $.post("<%= run_queries_path %>", <%= json_escape({statement: @statement, query_id: @query.id}.to_json).html_safe %>, function (data) {
141
141
  $("#results").html(data);
142
142
  $("#results table").stupidtable().stickyTableHeaders({fixedOffset: 60});
143
143
  });
@@ -14,10 +14,8 @@ module Blazer
14
14
  self.audit = true
15
15
  self.user_name = :name
16
16
  self.timeout = 15
17
- self.user_class = "User"
18
17
 
19
18
  def self.time_zone=(time_zone)
20
19
  @time_zone = time_zone.is_a?(ActiveSupport::TimeZone) ? time_zone : ActiveSupport::TimeZone[time_zone.to_s]
21
20
  end
22
- self.time_zone = Time.zone
23
21
  end
@@ -2,9 +2,13 @@ module Blazer
2
2
  class Engine < ::Rails::Engine
3
3
  isolate_namespace Blazer
4
4
 
5
- initializer "precompile" do |app|
5
+ initializer "blazer" do |app|
6
6
  # use a proc instead of a string
7
7
  app.config.assets.precompile << proc { |path| path =~ /\Ablazer\/application\.(js|css)\z/ }
8
+
9
+ Blazer.time_zone ||= Time.zone
10
+ Blazer.user_class ||= User rescue nil
11
+ Blazer::Query.belongs_to :creator, class_name: Blazer.user_class.to_s if Blazer.user_class
8
12
  end
9
13
  end
10
14
  end
@@ -1,3 +1,3 @@
1
1
  module Blazer
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
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: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-18 00:00:00.000000000 Z
11
+ date: 2015-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails