puppet-classroom-manager 0.0.4 → 0.0.5

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 79fd3d3fa437580cfd5c850e7a1c3b2300ab952a
4
- data.tar.gz: 0ff0471bd323d9b7f02b1a1ed91675b8cc0b7a4d
3
+ metadata.gz: 2badb82ee10345078986a6281ee1216970316201
4
+ data.tar.gz: 5f1ad77ef0b245f26c304c112afab0835c273414
5
5
  SHA512:
6
- metadata.gz: 7d239af624e0ab698c0df470deba2afb803d0b8ffef0657fe67c407fa4db763641b5ed0f48c5a015c2c02fa9bd821c20429a261832c5d819d3baeacd042f258c
7
- data.tar.gz: af092cb9e071d9bb0d136b396214a6cb6930a63d85f12f10160c792a866e42e3a8525bfcc52913e452f88ff374da35c412f7031908075b87cfc90802e67d7200
6
+ metadata.gz: 297e53087172e7c9a0c97fe6bceff396403b4234a0d62e3bb3f269f2f0243566323f9a0110c5e6544bb5c7715357c8d9a8b1967c4c5dabf86bdddb4e1845d16d
7
+ data.tar.gz: 92ed4f3cb0ba3fd68f2e58326d396610ce129e61cab996e4a8a61ddbe33863300bfab8af54f359d049091ae8eb44b1cdde94f33ac4287ef20fde019c3550040c
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## v0.0.5
2
+ * Corrected undefined variable allowing stats submission
3
+
1
4
  ## v0.0.4
2
5
  * Corrected page & submit behaviour
3
6
  * Allowed for paging even when the classroom isn't yet configured
data/lib/classroom.rb CHANGED
@@ -48,6 +48,7 @@ class Classroom
48
48
 
49
49
  data['event_id'] ||= Time.now.to_i
50
50
  data['course'] ||= File.basename(presentation.strip)
51
+ data['path'] ||= presentation
51
52
  data
52
53
  end
53
54
 
@@ -6,6 +6,7 @@ class Classroom
6
6
  config = showoff_config
7
7
  event_id = config['event_id']
8
8
  course = config['course']
9
+ location = config['path']
9
10
 
10
11
  print 'Enter your Puppet email address: '
11
12
  email = STDIN.gets.strip
@@ -33,7 +34,7 @@ class Classroom
33
34
 
34
35
  filename = "classroom-stats-#{course}-#{email}-#{event_id}.tar.gz"
35
36
  fullpath = "/var/cache/#{filename}"
36
- system("tar -cf #{fullpath} #{presentation}/stats/")
37
+ system("tar -cf #{fullpath} #{location}/stats/")
37
38
  obj = s3.bucket('classroom-statistics').object(filename)
38
39
  obj.upload_file(fullpath)
39
40
  FileUtils.rm(fullpath)
@@ -46,9 +47,9 @@ class Classroom
46
47
 
47
48
  # clean up for next delivery
48
49
  system("puppet resource service showoff-courseware ensure=stopped > /dev/null")
49
- FileUtils.rm_rf("#{presentation}/stats")
50
- FileUtils.rm_f("#{presentation}/courseware.yaml")
51
- FileUtils.rm_f("#{presentation}/_files/share/nearby_events.html")
50
+ FileUtils.rm_rf("#{location}/stats")
51
+ FileUtils.rm_f("#{location}/courseware.yaml")
52
+ FileUtils.rm_f("#{location}/_files/share/nearby_events.html")
52
53
  system("puppet resource service showoff-courseware ensure=running > /dev/null")
53
54
 
54
55
  end
@@ -1,3 +1,3 @@
1
1
  class Classroom
2
- VERSION = '0.0.4'
2
+ VERSION = '0.0.5'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puppet-classroom-manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Ford
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-08 00:00:00.000000000 Z
11
+ date: 2018-02-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk