blazer 0.0.6 → 0.0.7
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.
Potentially problematic release.
This version of blazer might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +1 -1
- data/app/controllers/blazer/queries_controller.rb +1 -1
- data/app/models/blazer/query.rb +0 -2
- data/app/views/blazer/queries/show.html.erb +3 -3
- data/lib/blazer.rb +0 -2
- data/lib/blazer/engine.rb +5 -1
- data/lib/blazer/version.rb +1 -1
- 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: 67ee6e1cfb35a8d4629d04a7628f5ed381aa6404
|
4
|
+
data.tar.gz: 1d678a64b0674a896d7fb55a972707fdff578f47
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f53f4290b16da1acd024ed52e310ee664badc3fe5d88e78d441b4283b799e96eb17080d31245d75b194cc3baa4958da6672323115abb23c70efe8be6f96572a
|
7
|
+
data.tar.gz: 254440602381a960167d8697d041a412d3c5c01674935abd33cd78a7bbfce0b6c6e21d48973375af35df8d48eadfb9b3241545ab392a4edf00f21b5e267aae56
|
data/CHANGELOG.md
CHANGED
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
|
-
](https://blazerme.herokuapp.com)
|
10
10
|
|
11
11
|
Works with PostgreSQL and MySQL
|
12
12
|
|
data/app/models/blazer/query.rb
CHANGED
@@ -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: @
|
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><%= @
|
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: @
|
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
|
});
|
data/lib/blazer.rb
CHANGED
@@ -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
|
data/lib/blazer/engine.rb
CHANGED
@@ -2,9 +2,13 @@ module Blazer
|
|
2
2
|
class Engine < ::Rails::Engine
|
3
3
|
isolate_namespace Blazer
|
4
4
|
|
5
|
-
initializer "
|
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
|
data/lib/blazer/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2015-07-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|