showoff 0.9.10.3 → 0.9.10.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/showoff.rb +20 -20
  3. data/lib/showoff/version.rb +2 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e762a266993707880dc1eae62fa79e31123e462e
4
- data.tar.gz: 7f94df77801f964db8a43212bc666c0cce17fdc3
3
+ metadata.gz: 6cdefcb7407782277dabcbaeb10989d48ee5cafa
4
+ data.tar.gz: 0fd28be0033c2252c2b10cd6d9258b886d360fa9
5
5
  SHA512:
6
- metadata.gz: 4d8532752720e21fc485f3f1e108122ae07d3a494bfc01e3189cff9de3bc5d7341b79316375d8451a63e3bcba725d26795370e98d67208dca6915aa918a4410f
7
- data.tar.gz: fdbb66639a9e39d159b59f4c070ab118edb3f28638f0e5d0ba9dba812defc3672e0bcd9ebeec9a8ecf949a9bd0c9b2f87f96619b9405fa688de7c2afc2579053
6
+ metadata.gz: 2a44ba78cfdc72aeaba84b1c890bf923443a3f4de4ee94f3bed25164abb5b9e3d34221384ed6f0fd64e2f1009cad1bd2132ec80a9062532a70115a8799e47a16
7
+ data.tar.gz: 3e30d8accc301fbff29777316f0595fe73664801b93eae5fb57d13ce29bbf08f5256ebc628a2052bb42be62280b301ad1bc2e5d89af61b527350d7d730ae7915
data/lib/showoff.rb CHANGED
@@ -53,26 +53,6 @@ class ShowOff < Sinatra::Application
53
53
  set :showoff_config, {}
54
54
  set :encoding, nil
55
55
 
56
- FileUtils.mkdir settings.statsdir unless File.directory? settings.statsdir
57
-
58
- # Page view time accumulator. Tracks how often slides are viewed by the audience
59
- begin
60
- @@counter = JSON.parse(File.read("#{settings.statsdir}/#{settings.viewstats}"))
61
- rescue
62
- @@counter = Hash.new
63
- end
64
-
65
- # keeps track of form responses. In memory to avoid concurrence issues.
66
- begin
67
- @@forms = JSON.parse(File.read("#{settings.statsdir}/#{settings.forms}"))
68
- rescue
69
- @@forms = Hash.new
70
- end
71
-
72
- @@downloads = Hash.new # Track downloadable files
73
- @@cookie = nil # presenter cookie. Identifies the presenter for control messages
74
- @@current = Hash.new # The current slide that the presenter is viewing
75
-
76
56
  def initialize(app=nil)
77
57
  super(app)
78
58
  @logger = Logger.new(STDOUT)
@@ -115,6 +95,26 @@ class ShowOff < Sinatra::Application
115
95
  # Default asset path
116
96
  @asset_path = "./"
117
97
 
98
+ # Create stats directory
99
+ FileUtils.mkdir settings.statsdir unless File.directory? settings.statsdir
100
+
101
+ # Page view time accumulator. Tracks how often slides are viewed by the audience
102
+ begin
103
+ @@counter = JSON.parse(File.read("#{settings.statsdir}/#{settings.viewstats}"))
104
+ rescue
105
+ @@counter = Hash.new
106
+ end
107
+
108
+ # keeps track of form responses. In memory to avoid concurrence issues.
109
+ begin
110
+ @@forms = JSON.parse(File.read("#{settings.statsdir}/#{settings.forms}"))
111
+ rescue
112
+ @@forms = Hash.new
113
+ end
114
+
115
+ @@downloads = Hash.new # Track downloadable files
116
+ @@cookie = nil # presenter cookie. Identifies the presenter for control messages
117
+ @@current = Hash.new # The current slide that the presenter is viewing
118
118
 
119
119
  # Initialize Markdown Configuration
120
120
  MarkdownConfig::setup(settings.pres_dir)
@@ -1,3 +1,4 @@
1
1
  # No namespace here since ShowOff is a class and I'd have to inherit from
2
2
  # Sinatra::Application (which we don't want to load here)
3
- SHOWOFF_VERSION = '0.9.10.3'
3
+ SHOWOFF_VERSION = '0.9.10.4'
4
+
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: showoff
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.10.3
4
+ version: 0.9.10.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Chacon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-08 00:00:00.000000000 Z
11
+ date: 2014-12-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sinatra