ruby_captivate 1.0.10 → 1.0.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (105) hide show
  1. data/.autotest +23 -0
  2. data/History.txt +6 -0
  3. data/Manifest.txt +8 -0
  4. data/README.txt~ +59 -0
  5. data/Rakefile +22 -0
  6. data/Rakefile~ +22 -0
  7. data/bin/initializer_generator.rb +1 -0
  8. data/bin/initializer_generator.rb~ +5 -0
  9. data/bin/install.rb +1 -0
  10. data/bin/install.rb~ +5 -0
  11. data/lib/generators/install_generator.rb +24 -0
  12. data/lib/generators/install_generator.rb~ +0 -0
  13. data/lib/generators/ruby_captivate/initializer_generator.rb +6 -0
  14. data/lib/generators/ruby_captivate/initializer_generator.rb~ +0 -0
  15. data/lib/generators/ruby_captivate/install/install_generator.rb +21 -0
  16. data/lib/generators/ruby_captivate/install/install_generator.rb~ +27 -0
  17. data/lib/ruby_captivate.rb~ +20 -0
  18. data/pkg/ruby_captivate-1.0.0/.autotest +23 -0
  19. data/pkg/ruby_captivate-1.0.0/.gemtest +0 -0
  20. data/pkg/ruby_captivate-1.0.0/History.txt +6 -0
  21. data/pkg/ruby_captivate-1.0.0/Manifest.txt +8 -0
  22. data/pkg/ruby_captivate-1.0.0/README.txt +59 -0
  23. data/pkg/ruby_captivate-1.0.0/Rakefile +22 -0
  24. data/pkg/ruby_captivate-1.0.0/bin/ruby_captivate +11 -0
  25. data/pkg/ruby_captivate-1.0.0/lib/ruby_captivate.rb +20 -0
  26. data/pkg/ruby_captivate-1.0.0/test/test_ruby_captivate.rb +8 -0
  27. data/pkg/ruby_captivate-1.0.0.gem +0 -0
  28. data/pkg/ruby_captivate-1.0.1/.autotest +23 -0
  29. data/pkg/ruby_captivate-1.0.1/.gemtest +0 -0
  30. data/pkg/ruby_captivate-1.0.1/History.txt +6 -0
  31. data/pkg/ruby_captivate-1.0.1/Manifest.txt +8 -0
  32. data/pkg/ruby_captivate-1.0.1/README.txt +59 -0
  33. data/pkg/ruby_captivate-1.0.1/Rakefile +22 -0
  34. data/pkg/ruby_captivate-1.0.1/bin/ruby_captivate +11 -0
  35. data/pkg/ruby_captivate-1.0.1/lib/ruby_captivate.rb +20 -0
  36. data/pkg/ruby_captivate-1.0.1/test/test_ruby_captivate.rb +8 -0
  37. data/pkg/ruby_captivate-1.0.1.gem +0 -0
  38. data/pkg/ruby_captivate-1.0.2/.autotest +23 -0
  39. data/pkg/ruby_captivate-1.0.2/.gemtest +0 -0
  40. data/pkg/ruby_captivate-1.0.2/History.txt +6 -0
  41. data/pkg/ruby_captivate-1.0.2/Manifest.txt +8 -0
  42. data/pkg/ruby_captivate-1.0.2/README.txt +59 -0
  43. data/pkg/ruby_captivate-1.0.2/Rakefile +22 -0
  44. data/pkg/ruby_captivate-1.0.2/bin/ruby_captivate +11 -0
  45. data/pkg/ruby_captivate-1.0.2/lib/ruby_captivate.rb +20 -0
  46. data/pkg/ruby_captivate-1.0.2/test/test_ruby_captivate.rb +8 -0
  47. data/pkg/ruby_captivate-1.0.2.gem +0 -0
  48. data/pkg/ruby_captivate-1.0.3/.autotest +23 -0
  49. data/pkg/ruby_captivate-1.0.3/.gemtest +0 -0
  50. data/pkg/ruby_captivate-1.0.3/History.txt +6 -0
  51. data/pkg/ruby_captivate-1.0.3/Manifest.txt +8 -0
  52. data/pkg/ruby_captivate-1.0.3/README.txt +59 -0
  53. data/pkg/ruby_captivate-1.0.3/Rakefile +22 -0
  54. data/pkg/ruby_captivate-1.0.3/bin/ruby_captivate +11 -0
  55. data/pkg/ruby_captivate-1.0.3/lib/ruby_captivate.rb +20 -0
  56. data/pkg/ruby_captivate-1.0.3/test/test_ruby_captivate.rb +8 -0
  57. data/pkg/ruby_captivate-1.0.3.gem +0 -0
  58. data/pkg/ruby_captivate-1.0.4/.autotest +23 -0
  59. data/pkg/ruby_captivate-1.0.4/.gemtest +0 -0
  60. data/pkg/ruby_captivate-1.0.4/History.txt +6 -0
  61. data/pkg/ruby_captivate-1.0.4/Manifest.txt +8 -0
  62. data/pkg/ruby_captivate-1.0.4/README.txt +59 -0
  63. data/pkg/ruby_captivate-1.0.4/Rakefile +22 -0
  64. data/pkg/ruby_captivate-1.0.4/bin/ruby_captivate +11 -0
  65. data/pkg/ruby_captivate-1.0.4/lib/ruby_captivate.rb +20 -0
  66. data/pkg/ruby_captivate-1.0.4/test/test_ruby_captivate.rb +8 -0
  67. data/pkg/ruby_captivate-1.0.4.gem +0 -0
  68. data/pkg/ruby_captivate-1.0.5/.autotest +23 -0
  69. data/pkg/ruby_captivate-1.0.5/.gemtest +0 -0
  70. data/pkg/ruby_captivate-1.0.5/History.txt +6 -0
  71. data/pkg/ruby_captivate-1.0.5/Manifest.txt +8 -0
  72. data/pkg/ruby_captivate-1.0.5/README.txt +59 -0
  73. data/pkg/ruby_captivate-1.0.5/Rakefile +22 -0
  74. data/pkg/ruby_captivate-1.0.5/bin/ruby_captivate +11 -0
  75. data/pkg/ruby_captivate-1.0.5/lib/ruby_captivate.rb +20 -0
  76. data/pkg/ruby_captivate-1.0.5/test/test_ruby_captivate.rb +8 -0
  77. data/pkg/ruby_captivate-1.0.5.gem +0 -0
  78. data/pkg/ruby_captivate-1.0.6/.autotest +23 -0
  79. data/pkg/ruby_captivate-1.0.6/.gemtest +0 -0
  80. data/pkg/ruby_captivate-1.0.6/History.txt +6 -0
  81. data/pkg/ruby_captivate-1.0.6/Manifest.txt +8 -0
  82. data/pkg/ruby_captivate-1.0.6/README.txt +59 -0
  83. data/pkg/ruby_captivate-1.0.6/Rakefile +22 -0
  84. data/pkg/ruby_captivate-1.0.6/bin/ruby_captivate +11 -0
  85. data/pkg/ruby_captivate-1.0.6/lib/ruby_captivate.rb +20 -0
  86. data/pkg/ruby_captivate-1.0.6/test/test_ruby_captivate.rb +8 -0
  87. data/pkg/ruby_captivate-1.0.6.gem +0 -0
  88. data/pkg/ruby_captivate-1.0.7/.autotest +23 -0
  89. data/pkg/ruby_captivate-1.0.7/.gemtest +0 -0
  90. data/pkg/ruby_captivate-1.0.7/History.txt +6 -0
  91. data/pkg/ruby_captivate-1.0.7/Manifest.txt +8 -0
  92. data/pkg/ruby_captivate-1.0.7/README.txt +59 -0
  93. data/pkg/ruby_captivate-1.0.7/Rakefile +22 -0
  94. data/pkg/ruby_captivate-1.0.7/bin/ruby_captivate +11 -0
  95. data/pkg/ruby_captivate-1.0.7/lib/ruby_captivate.rb +20 -0
  96. data/pkg/ruby_captivate-1.0.7/test/test_ruby_captivate.rb +8 -0
  97. data/pkg/ruby_captivate-1.0.7.gem +0 -0
  98. data/ruby_captivate-1.0.10.gem +0 -0
  99. data/ruby_captivate-1.0.11.gem +0 -0
  100. data/ruby_captivate-1.0.12.gem +0 -0
  101. data/ruby_captivate-1.0.8.gem +0 -0
  102. data/ruby_captivate-1.0.9.gem +0 -0
  103. data/ruby_captivate.gemspec +19 -0
  104. data/ruby_captivate.gemspec~ +19 -0
  105. metadata +110 -4
data/.autotest ADDED
@@ -0,0 +1,23 @@
1
+ # -*- ruby -*-
2
+
3
+ require 'autotest/restart'
4
+
5
+ # Autotest.add_hook :initialize do |at|
6
+ # at.extra_files << "../some/external/dependency.rb"
7
+ #
8
+ # at.libs << ":../some/external"
9
+ #
10
+ # at.add_exception 'vendor'
11
+ #
12
+ # at.add_mapping(/dependency.rb/) do |f, _|
13
+ # at.files_matching(/test_.*rb$/)
14
+ # end
15
+ #
16
+ # %w(TestA TestB).each do |klass|
17
+ # at.extra_class_map[klass] = "test/test_misc.rb"
18
+ # end
19
+ # end
20
+
21
+ # Autotest.add_hook :run_command do |at|
22
+ # system "rake build"
23
+ # end
data/History.txt ADDED
@@ -0,0 +1,6 @@
1
+ === 1.0.0 / 2012-01-28
2
+
3
+ * 1 major enhancement
4
+
5
+ * Birthday!
6
+
data/Manifest.txt ADDED
@@ -0,0 +1,8 @@
1
+ .autotest
2
+ History.txt
3
+ Manifest.txt
4
+ README.txt
5
+ Rakefile
6
+ bin/ruby_captivate
7
+ lib/ruby_captivate.rb
8
+ test/test_ruby_captivate.rb
data/README.txt~ ADDED
@@ -0,0 +1,59 @@
1
+ = ruby_captivate
2
+
3
+ https://github.com/Leveton/ruby_captivate
4
+
5
+ == DESCRIPTION:
6
+
7
+ Process Adobe Captivate SWF files with Ruby. Creates a "captivate_results" directory in the "doc" directory of your project. In "captivate_results", XML files containing the Captivate quiz results will be appear after a quiz completed. Creates the necessary route and controller upon calling "rails generate ruby_captivate:install"
8
+
9
+ == FEATURES/PROBLEMS:
10
+
11
+ In your Captivate instance, you must specify a target URL of http://www.<yourdomain.com>/ruby_captivate
12
+
13
+ More detailed instructions on how to set up the reporting of results at the Captivate end can be found here: https://tv.adobe.com/watch/publish-and-track-results/reporting-using-lms-or-internal-server/
14
+
15
+ == SYNOPSIS:
16
+ Creates a "captivate_results" directory in the "doc" directory of your project. In "captivate_results", XML files containing the Captivate quiz results will be appear after a quiz completed. Creates the necessary route and controller upon calling "rails generate ruby_captivate:install"
17
+ After installation, take a Captivate quiz and check for a generated XML file in 'doc/captivate_results/'. You can then use the Nokogiri gem to parse the results. http://rubygems.org/gems/nokogiri
18
+
19
+ == REQUIREMENTS:
20
+
21
+ Tested on rails >= 3.0
22
+
23
+ == INSTALL:
24
+
25
+ rails generate ruby_captivate:install
26
+
27
+ == DEVELOPERS:
28
+
29
+ After checking out the source, run:
30
+
31
+ $ rake newb
32
+
33
+ This task will install any missing dependencies, run the tests/specs,
34
+ and generate the RDoc.
35
+
36
+ == LICENSE:
37
+
38
+ (The MIT License)
39
+
40
+ Copyright (c) 2012 Michael Leveton
41
+
42
+ Permission is hereby granted, free of charge, to any person obtaining
43
+ a copy of this software and associated documentation files (the
44
+ 'Software'), to deal in the Software without restriction, including
45
+ without limitation the rights to use, copy, modify, merge, publish,
46
+ distribute, sublicense, and/or sell copies of the Software, and to
47
+ permit persons to whom the Software is furnished to do so, subject to
48
+ the following conditions:
49
+
50
+ The above copyright notice and this permission notice shall be
51
+ included in all copies or substantial portions of the Software.
52
+
53
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
54
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
55
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
56
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
57
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
58
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
59
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile ADDED
@@ -0,0 +1,22 @@
1
+ # -*- ruby -*-
2
+
3
+ require 'rubygems'
4
+ require 'hoe'
5
+
6
+ # Hoe.plugin :compiler
7
+ # Hoe.plugin :gem_prelude_sucks
8
+ # Hoe.plugin :inline
9
+ # Hoe.plugin :racc
10
+ # Hoe.plugin :rubyforge
11
+
12
+ Hoe.spec 'ruby_captivate' do
13
+ # HEY! If you fill these out in ~/.hoe_template/Rakefile.erb then
14
+ # you'll never have to touch them again!
15
+ # (delete this comment too, of course)
16
+
17
+ developer('Michael Leveton', 'mleveton@prepcloud.com')
18
+
19
+ # self.rubyforge_name = 'ruby_captivatex' # if different than 'ruby_captivate'
20
+ end
21
+
22
+ # vim: syntax=ruby
data/Rakefile~ ADDED
@@ -0,0 +1,22 @@
1
+ # -*- ruby -*-
2
+
3
+ require 'rubygems'
4
+ require 'hoe'
5
+
6
+ # Hoe.plugin :compiler
7
+ # Hoe.plugin :gem_prelude_sucks
8
+ # Hoe.plugin :inline
9
+ # Hoe.plugin :racc
10
+ # Hoe.plugin :rubyforge
11
+
12
+ Hoe.spec 'ruby_captivate' do
13
+ # HEY! If you fill these out in ~/.hoe_template/Rakefile.erb then
14
+ # you'll never have to touch them again!
15
+ # (delete this comment too, of course)
16
+
17
+ # developer('Michael Leveton', 'mleveton@prepcloud.com')
18
+
19
+ # self.rubyforge_name = 'ruby_captivatex' # if different than 'ruby_captivate'
20
+ end
21
+
22
+ # vim: syntax=ruby
@@ -1,3 +1,4 @@
1
+ #!/usr/bin/env ruby
1
2
  class InitializerGenerator < Rails::Generators::Base
2
3
  def create_initializer_file
3
4
  create_file "config/initializers/initializer.rb", "# Add initialization content here"
@@ -0,0 +1,5 @@
1
+ class InitializerGenerator < Rails::Generators::Base
2
+ def create_initializer_file
3
+ create_file "config/initializers/initializer.rb", "# Add initialization content here"
4
+ end
5
+ end
data/bin/install.rb CHANGED
@@ -1,3 +1,4 @@
1
+ #!/usr/bin/env ruby
1
2
  class InitializerGenerator < Rails::Generators::Base
2
3
  def create_initializer_file
3
4
  create_file "config/initializers/initializer.rb", "# Add initialization content here"
data/bin/install.rb~ ADDED
@@ -0,0 +1,5 @@
1
+ class InitializerGenerator < Rails::Generators::Base
2
+ def create_initializer_file
3
+ create_file "config/initializers/initializer.rb", "# Add initialization content here"
4
+ end
5
+ end
@@ -0,0 +1,24 @@
1
+ require 'securerandom'
2
+
3
+ module ruby_captivate
4
+ module Generators
5
+ class InstallGenerator < Rails::Generators::Base
6
+ source_root File.expand_path("../../templates", __FILE__)
7
+
8
+ desc "Creates a ruby_captivate initializer and copies locale files to your application."
9
+ class_option :orm
10
+
11
+ def copy_initializer
12
+ template "ruby_captivate.rb", "config/initializers/devise.rb"
13
+ end
14
+
15
+ def copy_locale
16
+ copy_file "../../../config/locales/en.yml", "config/locales/ruby_captivate.en.yml"
17
+ end
18
+
19
+ def show_readme
20
+ readme "README" if behavior == :invoke
21
+ end
22
+ end
23
+ end
24
+ end
File without changes
@@ -0,0 +1,6 @@
1
+
2
+ class InitializerGenerator < Rails::Generators::Base
3
+ def create_initializer_file
4
+ create_file "config/initializers/initializer.rb", "# Add initialization content here"
5
+ end
6
+ end
@@ -0,0 +1,21 @@
1
+ module RubyCaptivate
2
+
3
+ class InstallGenerator < Rails::Generators::Base
4
+ source_root File.expand_path('../../../templates', __FILE__)
5
+ class_option :template_engine
6
+
7
+ if ::Rails::VERSION::MAJOR == 3 && ::Rails::VERSION::MINOR >= 1
8
+
9
+ desc "Copies a config initializer to config/initializers/formtastic.rb"
10
+ def copy_files
11
+ copy_file 'ruby_captivate.rb', 'config/initializers/ruby_captivate.rb'
12
+ end
13
+ else
14
+
15
+ desc "Copies some CSS files to public/stylesheets/ and a config initializer to config/initializers/formtastic.rb"
16
+
17
+ end
18
+
19
+
20
+ end
21
+ end
@@ -0,0 +1,27 @@
1
+ module RubyCaptivate
2
+ # Copies formtastic.css to public/stylesheets/ (Rails 3.0.x only) and a config initializer
3
+ # to config/initializers/formtastic.rb (all Rails versions).
4
+ #
5
+ # @example
6
+ # $ rails generate formtastic:install
7
+ #
8
+ # @todo Test with Rails 3.0
9
+ class InstallGenerator < Rails::Generators::Base
10
+ source_root File.expand_path('../../../templates', __FILE__)
11
+ class_option :template_engine
12
+
13
+ if ::Rails::VERSION::MAJOR == 3 && ::Rails::VERSION::MINOR >= 1
14
+ # Rails 3.1 has the asset pipeline, no need to copy CSS files any more
15
+ desc "Copies a config initializer to config/initializers/formtastic.rb"
16
+ def copy_files
17
+ copy_file 'ruby_captivate.rb', 'config/initializers/ruby_captivate.rb'
18
+ end
19
+ else
20
+ # Rails 3.0 doesn't have an asset pipeline, so we copy in CSS too
21
+ desc "Copies some CSS files to public/stylesheets/ and a config initializer to config/initializers/formtastic.rb"
22
+
23
+ end
24
+
25
+
26
+ end
27
+ end
@@ -0,0 +1,20 @@
1
+ class RubyCaptivate
2
+ VERSION = '1.0.6'
3
+
4
+ def process_captivate_results
5
+ company_name = params[:CompanyName]
6
+ department_name = params[:DepartmentName]
7
+ course_name = params[:CourseName]
8
+ file_name = params[:Filename]
9
+ file_data = params[:Filedata]
10
+ file_path = File.join("#{Rails.root}/doc", "CaptivateResults", company_name, department_name, course_name)
11
+ FileUtils.mkdir_p(file_path)
12
+ file_path = File.join(file_path, file_name)
13
+ handle = File.open(file_path, 'w' )
14
+ handle << file_data
15
+ handle.close
16
+ #file_save = File.open(handle)
17
+ end
18
+
19
+
20
+ end
@@ -0,0 +1,23 @@
1
+ # -*- ruby -*-
2
+
3
+ require 'autotest/restart'
4
+
5
+ # Autotest.add_hook :initialize do |at|
6
+ # at.extra_files << "../some/external/dependency.rb"
7
+ #
8
+ # at.libs << ":../some/external"
9
+ #
10
+ # at.add_exception 'vendor'
11
+ #
12
+ # at.add_mapping(/dependency.rb/) do |f, _|
13
+ # at.files_matching(/test_.*rb$/)
14
+ # end
15
+ #
16
+ # %w(TestA TestB).each do |klass|
17
+ # at.extra_class_map[klass] = "test/test_misc.rb"
18
+ # end
19
+ # end
20
+
21
+ # Autotest.add_hook :run_command do |at|
22
+ # system "rake build"
23
+ # end
File without changes
@@ -0,0 +1,6 @@
1
+ === 1.0.0 / 2012-01-28
2
+
3
+ * 1 major enhancement
4
+
5
+ * Birthday!
6
+
@@ -0,0 +1,8 @@
1
+ .autotest
2
+ History.txt
3
+ Manifest.txt
4
+ README.txt
5
+ Rakefile
6
+ bin/ruby_captivate
7
+ lib/ruby_captivate.rb
8
+ test/test_ruby_captivate.rb
@@ -0,0 +1,59 @@
1
+ = ruby_captivate
2
+
3
+ https://github.com/Leveton/ruby_captivate
4
+
5
+ == DESCRIPTION:
6
+
7
+ Process Adobe Captivate SWF files with Ruby.
8
+
9
+ == FEATURES/PROBLEMS:
10
+
11
+ In your Captivate instance, you must specify a target URL of http://www.<yourdomain.com>/ruby_captivate
12
+
13
+ More detailed instructions on how to set up the reporting of results at the Captivate end can be found here: https://tv.adobe.com/watch/publish-and-track-results/reporting-using-lms-or-internal-server/
14
+
15
+ == SYNOPSIS:
16
+ Creates a "captivate_results" directory in the "doc" directory of your project. In "captivate_results", XML files containing the Captivate quiz results will be appear after a quiz completed. Creates the necessary route and controller upon calling "rails generate ruby_captivate:install"
17
+ After installation, take a Captivate quiz and check for a generated XML file in 'doc/captivate_results/'. You can then use the Nokogiri gem to parse the results. http://rubygems.org/gems/nokogiri
18
+
19
+ == REQUIREMENTS:
20
+
21
+ Tested on rails >= 3.0
22
+
23
+ == INSTALL:
24
+
25
+ rails generate ruby_captivate:install
26
+
27
+ == DEVELOPERS:
28
+
29
+ After checking out the source, run:
30
+
31
+ $ rake newb
32
+
33
+ This task will install any missing dependencies, run the tests/specs,
34
+ and generate the RDoc.
35
+
36
+ == LICENSE:
37
+
38
+ (The MIT License)
39
+
40
+ Copyright (c) 2012 Michael Leveton
41
+
42
+ Permission is hereby granted, free of charge, to any person obtaining
43
+ a copy of this software and associated documentation files (the
44
+ 'Software'), to deal in the Software without restriction, including
45
+ without limitation the rights to use, copy, modify, merge, publish,
46
+ distribute, sublicense, and/or sell copies of the Software, and to
47
+ permit persons to whom the Software is furnished to do so, subject to
48
+ the following conditions:
49
+
50
+ The above copyright notice and this permission notice shall be
51
+ included in all copies or substantial portions of the Software.
52
+
53
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
54
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
55
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
56
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
57
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
58
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
59
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,22 @@
1
+ # -*- ruby -*-
2
+
3
+ require 'rubygems'
4
+ require 'hoe'
5
+
6
+ # Hoe.plugin :compiler
7
+ # Hoe.plugin :gem_prelude_sucks
8
+ # Hoe.plugin :inline
9
+ # Hoe.plugin :racc
10
+ # Hoe.plugin :rubyforge
11
+
12
+ Hoe.spec 'ruby_captivate' do
13
+ # HEY! If you fill these out in ~/.hoe_template/Rakefile.erb then
14
+ # you'll never have to touch them again!
15
+ # (delete this comment too, of course)
16
+
17
+ developer('Michael Leveton', 'mleveton@prepcloud.com')
18
+
19
+ # self.rubyforge_name = 'ruby_captivatex' # if different than 'ruby_captivate'
20
+ end
21
+
22
+ # vim: syntax=ruby
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env ruby
2
+ require 'ruby_captivate'
3
+ #puts RubyCaptivate.hola(ARGV[0])
4
+
5
+ class InitializerGenerator < Rails::Generators::Base
6
+ def create_initializer_file
7
+ create_file "config/initializers/initializer.rb", "# Add initialization content here"
8
+ end
9
+ end
10
+
11
+ abort "you need to write me"
@@ -0,0 +1,20 @@
1
+ class RubyCaptivate
2
+ VERSION = '1.0.7'
3
+
4
+ def process_captivate_results
5
+ company_name = params[:CompanyName]
6
+ department_name = params[:DepartmentName]
7
+ course_name = params[:CourseName]
8
+ file_name = params[:Filename]
9
+ file_data = params[:Filedata]
10
+ file_path = File.join("#{Rails.root}/doc", "CaptivateResults", company_name, department_name, course_name)
11
+ FileUtils.mkdir_p(file_path)
12
+ file_path = File.join(file_path, file_name)
13
+ handle = File.open(file_path, 'w' )
14
+ handle << file_data
15
+ handle.close
16
+ #file_save = File.open(handle)
17
+ end
18
+
19
+
20
+ end
@@ -0,0 +1,8 @@
1
+ require "test/unit"
2
+ require "ruby_captivate"
3
+
4
+ class TestRubyCaptivate < Test::Unit::TestCase
5
+ def test_sanity
6
+ flunk "write tests or I will kneecap you"
7
+ end
8
+ end
Binary file
@@ -0,0 +1,23 @@
1
+ # -*- ruby -*-
2
+
3
+ require 'autotest/restart'
4
+
5
+ # Autotest.add_hook :initialize do |at|
6
+ # at.extra_files << "../some/external/dependency.rb"
7
+ #
8
+ # at.libs << ":../some/external"
9
+ #
10
+ # at.add_exception 'vendor'
11
+ #
12
+ # at.add_mapping(/dependency.rb/) do |f, _|
13
+ # at.files_matching(/test_.*rb$/)
14
+ # end
15
+ #
16
+ # %w(TestA TestB).each do |klass|
17
+ # at.extra_class_map[klass] = "test/test_misc.rb"
18
+ # end
19
+ # end
20
+
21
+ # Autotest.add_hook :run_command do |at|
22
+ # system "rake build"
23
+ # end
File without changes
@@ -0,0 +1,6 @@
1
+ === 1.0.0 / 2012-01-28
2
+
3
+ * 1 major enhancement
4
+
5
+ * Birthday!
6
+
@@ -0,0 +1,8 @@
1
+ .autotest
2
+ History.txt
3
+ Manifest.txt
4
+ README.txt
5
+ Rakefile
6
+ bin/ruby_captivate
7
+ lib/ruby_captivate.rb
8
+ test/test_ruby_captivate.rb
@@ -0,0 +1,59 @@
1
+ = ruby_captivate
2
+
3
+ https://github.com/Leveton/ruby_captivate
4
+
5
+ == DESCRIPTION:
6
+
7
+ Process Adobe Captivate SWF files with Ruby.
8
+
9
+ == FEATURES/PROBLEMS:
10
+
11
+ In your Captivate instance, you must specify a target URL of http://www.<yourdomain.com>/ruby_captivate
12
+
13
+ More detailed instructions on how to set up the reporting of results at the Captivate end can be found here: https://tv.adobe.com/watch/publish-and-track-results/reporting-using-lms-or-internal-server/
14
+
15
+ == SYNOPSIS:
16
+ Creates a "captivate_results" directory in the "doc" directory of your project. In "captivate_results", XML files containing the Captivate quiz results will be appear after a quiz completed. Creates the necessary route and controller upon calling "rails generate ruby_captivate:install"
17
+ After installation, take a Captivate quiz and check for a generated XML file in 'doc/captivate_results/'. You can then use the Nokogiri gem to parse the results. http://rubygems.org/gems/nokogiri
18
+
19
+ == REQUIREMENTS:
20
+
21
+ Tested on rails >= 3.0
22
+
23
+ == INSTALL:
24
+
25
+ rails generate ruby_captivate:install
26
+
27
+ == DEVELOPERS:
28
+
29
+ After checking out the source, run:
30
+
31
+ $ rake newb
32
+
33
+ This task will install any missing dependencies, run the tests/specs,
34
+ and generate the RDoc.
35
+
36
+ == LICENSE:
37
+
38
+ (The MIT License)
39
+
40
+ Copyright (c) 2012 Michael Leveton
41
+
42
+ Permission is hereby granted, free of charge, to any person obtaining
43
+ a copy of this software and associated documentation files (the
44
+ 'Software'), to deal in the Software without restriction, including
45
+ without limitation the rights to use, copy, modify, merge, publish,
46
+ distribute, sublicense, and/or sell copies of the Software, and to
47
+ permit persons to whom the Software is furnished to do so, subject to
48
+ the following conditions:
49
+
50
+ The above copyright notice and this permission notice shall be
51
+ included in all copies or substantial portions of the Software.
52
+
53
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
54
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
55
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
56
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
57
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
58
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
59
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,22 @@
1
+ # -*- ruby -*-
2
+
3
+ require 'rubygems'
4
+ require 'hoe'
5
+
6
+ # Hoe.plugin :compiler
7
+ # Hoe.plugin :gem_prelude_sucks
8
+ # Hoe.plugin :inline
9
+ # Hoe.plugin :racc
10
+ # Hoe.plugin :rubyforge
11
+
12
+ Hoe.spec 'ruby_captivate' do
13
+ # HEY! If you fill these out in ~/.hoe_template/Rakefile.erb then
14
+ # you'll never have to touch them again!
15
+ # (delete this comment too, of course)
16
+
17
+ developer('Michael Leveton', 'mleveton@prepcloud.com')
18
+
19
+ # self.rubyforge_name = 'ruby_captivatex' # if different than 'ruby_captivate'
20
+ end
21
+
22
+ # vim: syntax=ruby
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env ruby
2
+ require 'ruby_captivate'
3
+ #puts RubyCaptivate.hola(ARGV[0])
4
+
5
+ class InitializerGenerator < Rails::Generators::Base
6
+ def create_initializer_file
7
+ create_file "config/initializers/initializer.rb", "# Add initialization content here"
8
+ end
9
+ end
10
+
11
+ abort "you need to write me"
@@ -0,0 +1,20 @@
1
+ class RubyCaptivate
2
+ VERSION = '1.0.7'
3
+
4
+ def process_captivate_results
5
+ company_name = params[:CompanyName]
6
+ department_name = params[:DepartmentName]
7
+ course_name = params[:CourseName]
8
+ file_name = params[:Filename]
9
+ file_data = params[:Filedata]
10
+ file_path = File.join("#{Rails.root}/doc", "CaptivateResults", company_name, department_name, course_name)
11
+ FileUtils.mkdir_p(file_path)
12
+ file_path = File.join(file_path, file_name)
13
+ handle = File.open(file_path, 'w' )
14
+ handle << file_data
15
+ handle.close
16
+ #file_save = File.open(handle)
17
+ end
18
+
19
+
20
+ end
@@ -0,0 +1,8 @@
1
+ require "test/unit"
2
+ require "ruby_captivate"
3
+
4
+ class TestRubyCaptivate < Test::Unit::TestCase
5
+ def test_sanity
6
+ flunk "write tests or I will kneecap you"
7
+ end
8
+ end
Binary file
@@ -0,0 +1,23 @@
1
+ # -*- ruby -*-
2
+
3
+ require 'autotest/restart'
4
+
5
+ # Autotest.add_hook :initialize do |at|
6
+ # at.extra_files << "../some/external/dependency.rb"
7
+ #
8
+ # at.libs << ":../some/external"
9
+ #
10
+ # at.add_exception 'vendor'
11
+ #
12
+ # at.add_mapping(/dependency.rb/) do |f, _|
13
+ # at.files_matching(/test_.*rb$/)
14
+ # end
15
+ #
16
+ # %w(TestA TestB).each do |klass|
17
+ # at.extra_class_map[klass] = "test/test_misc.rb"
18
+ # end
19
+ # end
20
+
21
+ # Autotest.add_hook :run_command do |at|
22
+ # system "rake build"
23
+ # end
File without changes
@@ -0,0 +1,6 @@
1
+ === 1.0.0 / 2012-01-28
2
+
3
+ * 1 major enhancement
4
+
5
+ * Birthday!
6
+