stat_board 0.1.4 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +6 -0
- data/app/assets/stylesheets/stat_board/bootstrap.css +1 -1
- data/app/views/stat_board/stats/_chart.html.erb +1 -1
- data/app/views/stat_board/stats/_graph.html.erb +1 -1
- data/app/views/stat_board/stats/index.html.erb +3 -1
- data/lib/stat_board/reports/monthly_report.rb +1 -1
- data/lib/stat_board/reports/overall_report.rb +6 -2
- data/lib/stat_board/reports/report.rb +1 -1
- data/lib/stat_board/reports/weekly_report.rb +1 -1
- data/lib/stat_board/version.rb +1 -1
- data/lib/stat_board.rb +4 -1
- metadata +2 -2
data/README.markdown
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
StatBoard
|
2
2
|
=========
|
3
3
|
|
4
|
+
[![Code Climate](https://codeclimate.com/github/vigetlabs/stat_board.png)](https://codeclimate.com/github/vigetlabs/stat_board)
|
5
|
+
|
4
6
|
A simple dashboard of records created this week, this month, and all time, mountable as a Rails Engine.
|
5
7
|
|
6
8
|
<img src="https://raw.github.com/vigetlabs/stat_board/master/screenshot.png" />
|
@@ -35,6 +37,10 @@ In `config/initializers/stat_board.rb`:
|
|
35
37
|
StatBoard.username = "user"
|
36
38
|
StatBoard.password = "pass"
|
37
39
|
|
40
|
+
3. Displaying Data Graphically (true by default)
|
41
|
+
|
42
|
+
StatBoard.display_graph = true
|
43
|
+
|
38
44
|
## Issues
|
39
45
|
|
40
46
|
* Models can be specified as strings rather than constants
|
@@ -3,7 +3,9 @@
|
|
3
3
|
<%= render :partial => "chart", :collection => @reports, :as => :report %>
|
4
4
|
</div>
|
5
5
|
|
6
|
-
|
6
|
+
<% if StatBoard.display_graph %>
|
7
|
+
<%= render "graph" %>
|
8
|
+
<% end %>
|
7
9
|
|
8
10
|
<% else %>
|
9
11
|
Please specify some models by setting <code>StatBoard.models</code>
|
data/lib/stat_board/version.rb
CHANGED
data/lib/stat_board.rb
CHANGED
@@ -5,5 +5,8 @@ require "stat_board/reports/monthly_report"
|
|
5
5
|
require "stat_board/reports/weekly_report"
|
6
6
|
|
7
7
|
module StatBoard
|
8
|
-
mattr_accessor :models, :title, :username, :password
|
8
|
+
mattr_accessor :models, :title, :display_graph, :username, :password
|
9
|
+
|
10
|
+
# Display graph by default. Can be disabled in initializers/stat_board.rb.
|
11
|
+
@@display_graph = true
|
9
12
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stat_board
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-11-
|
12
|
+
date: 2013-11-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|