ruby_captivate 1.0.10 → 1.0.13
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.
- data/.autotest +23 -0
- data/History.txt +6 -0
- data/Manifest.txt +8 -0
- data/README.txt~ +59 -0
- data/Rakefile +22 -0
- data/Rakefile~ +22 -0
- data/bin/initializer_generator.rb +1 -0
- data/bin/initializer_generator.rb~ +5 -0
- data/bin/install.rb +1 -0
- data/bin/install.rb~ +5 -0
- data/lib/generators/install_generator.rb +24 -0
- data/lib/generators/install_generator.rb~ +0 -0
- data/lib/generators/ruby_captivate/initializer_generator.rb +6 -0
- data/lib/generators/ruby_captivate/initializer_generator.rb~ +0 -0
- data/lib/generators/ruby_captivate/install/install_generator.rb +21 -0
- data/lib/generators/ruby_captivate/install/install_generator.rb~ +27 -0
- data/lib/ruby_captivate.rb~ +20 -0
- data/pkg/ruby_captivate-1.0.0/.autotest +23 -0
- data/pkg/ruby_captivate-1.0.0/.gemtest +0 -0
- data/pkg/ruby_captivate-1.0.0/History.txt +6 -0
- data/pkg/ruby_captivate-1.0.0/Manifest.txt +8 -0
- data/pkg/ruby_captivate-1.0.0/README.txt +59 -0
- data/pkg/ruby_captivate-1.0.0/Rakefile +22 -0
- data/pkg/ruby_captivate-1.0.0/bin/ruby_captivate +11 -0
- data/pkg/ruby_captivate-1.0.0/lib/ruby_captivate.rb +20 -0
- data/pkg/ruby_captivate-1.0.0/test/test_ruby_captivate.rb +8 -0
- data/pkg/ruby_captivate-1.0.0.gem +0 -0
- data/pkg/ruby_captivate-1.0.1/.autotest +23 -0
- data/pkg/ruby_captivate-1.0.1/.gemtest +0 -0
- data/pkg/ruby_captivate-1.0.1/History.txt +6 -0
- data/pkg/ruby_captivate-1.0.1/Manifest.txt +8 -0
- data/pkg/ruby_captivate-1.0.1/README.txt +59 -0
- data/pkg/ruby_captivate-1.0.1/Rakefile +22 -0
- data/pkg/ruby_captivate-1.0.1/bin/ruby_captivate +11 -0
- data/pkg/ruby_captivate-1.0.1/lib/ruby_captivate.rb +20 -0
- data/pkg/ruby_captivate-1.0.1/test/test_ruby_captivate.rb +8 -0
- data/pkg/ruby_captivate-1.0.1.gem +0 -0
- data/pkg/ruby_captivate-1.0.2/.autotest +23 -0
- data/pkg/ruby_captivate-1.0.2/.gemtest +0 -0
- data/pkg/ruby_captivate-1.0.2/History.txt +6 -0
- data/pkg/ruby_captivate-1.0.2/Manifest.txt +8 -0
- data/pkg/ruby_captivate-1.0.2/README.txt +59 -0
- data/pkg/ruby_captivate-1.0.2/Rakefile +22 -0
- data/pkg/ruby_captivate-1.0.2/bin/ruby_captivate +11 -0
- data/pkg/ruby_captivate-1.0.2/lib/ruby_captivate.rb +20 -0
- data/pkg/ruby_captivate-1.0.2/test/test_ruby_captivate.rb +8 -0
- data/pkg/ruby_captivate-1.0.2.gem +0 -0
- data/pkg/ruby_captivate-1.0.3/.autotest +23 -0
- data/pkg/ruby_captivate-1.0.3/.gemtest +0 -0
- data/pkg/ruby_captivate-1.0.3/History.txt +6 -0
- data/pkg/ruby_captivate-1.0.3/Manifest.txt +8 -0
- data/pkg/ruby_captivate-1.0.3/README.txt +59 -0
- data/pkg/ruby_captivate-1.0.3/Rakefile +22 -0
- data/pkg/ruby_captivate-1.0.3/bin/ruby_captivate +11 -0
- data/pkg/ruby_captivate-1.0.3/lib/ruby_captivate.rb +20 -0
- data/pkg/ruby_captivate-1.0.3/test/test_ruby_captivate.rb +8 -0
- data/pkg/ruby_captivate-1.0.3.gem +0 -0
- data/pkg/ruby_captivate-1.0.4/.autotest +23 -0
- data/pkg/ruby_captivate-1.0.4/.gemtest +0 -0
- data/pkg/ruby_captivate-1.0.4/History.txt +6 -0
- data/pkg/ruby_captivate-1.0.4/Manifest.txt +8 -0
- data/pkg/ruby_captivate-1.0.4/README.txt +59 -0
- data/pkg/ruby_captivate-1.0.4/Rakefile +22 -0
- data/pkg/ruby_captivate-1.0.4/bin/ruby_captivate +11 -0
- data/pkg/ruby_captivate-1.0.4/lib/ruby_captivate.rb +20 -0
- data/pkg/ruby_captivate-1.0.4/test/test_ruby_captivate.rb +8 -0
- data/pkg/ruby_captivate-1.0.4.gem +0 -0
- data/pkg/ruby_captivate-1.0.5/.autotest +23 -0
- data/pkg/ruby_captivate-1.0.5/.gemtest +0 -0
- data/pkg/ruby_captivate-1.0.5/History.txt +6 -0
- data/pkg/ruby_captivate-1.0.5/Manifest.txt +8 -0
- data/pkg/ruby_captivate-1.0.5/README.txt +59 -0
- data/pkg/ruby_captivate-1.0.5/Rakefile +22 -0
- data/pkg/ruby_captivate-1.0.5/bin/ruby_captivate +11 -0
- data/pkg/ruby_captivate-1.0.5/lib/ruby_captivate.rb +20 -0
- data/pkg/ruby_captivate-1.0.5/test/test_ruby_captivate.rb +8 -0
- data/pkg/ruby_captivate-1.0.5.gem +0 -0
- data/pkg/ruby_captivate-1.0.6/.autotest +23 -0
- data/pkg/ruby_captivate-1.0.6/.gemtest +0 -0
- data/pkg/ruby_captivate-1.0.6/History.txt +6 -0
- data/pkg/ruby_captivate-1.0.6/Manifest.txt +8 -0
- data/pkg/ruby_captivate-1.0.6/README.txt +59 -0
- data/pkg/ruby_captivate-1.0.6/Rakefile +22 -0
- data/pkg/ruby_captivate-1.0.6/bin/ruby_captivate +11 -0
- data/pkg/ruby_captivate-1.0.6/lib/ruby_captivate.rb +20 -0
- data/pkg/ruby_captivate-1.0.6/test/test_ruby_captivate.rb +8 -0
- data/pkg/ruby_captivate-1.0.6.gem +0 -0
- data/pkg/ruby_captivate-1.0.7/.autotest +23 -0
- data/pkg/ruby_captivate-1.0.7/.gemtest +0 -0
- data/pkg/ruby_captivate-1.0.7/History.txt +6 -0
- data/pkg/ruby_captivate-1.0.7/Manifest.txt +8 -0
- data/pkg/ruby_captivate-1.0.7/README.txt +59 -0
- data/pkg/ruby_captivate-1.0.7/Rakefile +22 -0
- data/pkg/ruby_captivate-1.0.7/bin/ruby_captivate +11 -0
- data/pkg/ruby_captivate-1.0.7/lib/ruby_captivate.rb +20 -0
- data/pkg/ruby_captivate-1.0.7/test/test_ruby_captivate.rb +8 -0
- data/pkg/ruby_captivate-1.0.7.gem +0 -0
- data/ruby_captivate-1.0.10.gem +0 -0
- data/ruby_captivate-1.0.11.gem +0 -0
- data/ruby_captivate-1.0.12.gem +0 -0
- data/ruby_captivate-1.0.8.gem +0 -0
- data/ruby_captivate-1.0.9.gem +0 -0
- data/ruby_captivate.gemspec +19 -0
- data/ruby_captivate.gemspec~ +19 -0
- 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
data/Manifest.txt
ADDED
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
|
data/bin/install.rb
CHANGED
data/bin/install.rb~
ADDED
@@ -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
|
File without changes
|
@@ -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,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
|
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,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
|
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
|