ruby_captivate 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.autotest +23 -0
- data/.gemtest +0 -0
- data/History.txt +6 -0
- data/Manifest.txt +8 -0
- data/README.txt +57 -0
- data/Rakefile +22 -0
- data/bin/ruby_captivate +3 -0
- data/lib/ruby_captivate.rb +23 -0
- data/test/test_ruby_captivate.rb +8 -0
- metadata +86 -0
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/.gemtest
ADDED
File without changes
|
data/History.txt
ADDED
data/Manifest.txt
ADDED
data/README.txt
ADDED
@@ -0,0 +1,57 @@
|
|
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
|
+
== SYNOPSIS:
|
14
|
+
|
15
|
+
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
|
16
|
+
|
17
|
+
== REQUIREMENTS:
|
18
|
+
|
19
|
+
Tested on rails >= 3.0
|
20
|
+
|
21
|
+
== INSTALL:
|
22
|
+
|
23
|
+
rails generate ruby_captivate:install
|
24
|
+
|
25
|
+
== DEVELOPERS:
|
26
|
+
|
27
|
+
After checking out the source, run:
|
28
|
+
|
29
|
+
$ rake newb
|
30
|
+
|
31
|
+
This task will install any missing dependencies, run the tests/specs,
|
32
|
+
and generate the RDoc.
|
33
|
+
|
34
|
+
== LICENSE:
|
35
|
+
|
36
|
+
(The MIT License)
|
37
|
+
|
38
|
+
Copyright (c) 2012 Michael Leveton
|
39
|
+
|
40
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
41
|
+
a copy of this software and associated documentation files (the
|
42
|
+
'Software'), to deal in the Software without restriction, including
|
43
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
44
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
45
|
+
permit persons to whom the Software is furnished to do so, subject to
|
46
|
+
the following conditions:
|
47
|
+
|
48
|
+
The above copyright notice and this permission notice shall be
|
49
|
+
included in all copies or substantial portions of the Software.
|
50
|
+
|
51
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
52
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
53
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
54
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
55
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
56
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
57
|
+
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/bin/ruby_captivate
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
class RubyCaptivate
|
2
|
+
VERSION = '1.0.0'
|
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
|
+
def self.hi
|
20
|
+
puts "Hello world!"
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
metadata
ADDED
@@ -0,0 +1,86 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ruby_captivate
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Michael Leveton
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-01-28 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: rdoc
|
16
|
+
requirement: &9315920 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '3.10'
|
22
|
+
type: :development
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *9315920
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: hoe
|
27
|
+
requirement: &9315460 !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
29
|
+
requirements:
|
30
|
+
- - ~>
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '2.13'
|
33
|
+
type: :development
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *9315460
|
36
|
+
description: Process Adobe Captivate SWF files with Ruby. Creates a "captivate_results"
|
37
|
+
directory in the "doc" directory of your project. In "captivate_results", XML files
|
38
|
+
containing the Captivate quiz results will be appear after a quiz completed. Creates
|
39
|
+
the necessary route and controller upon calling "rails generate ruby_captivate:install"
|
40
|
+
email:
|
41
|
+
- mleveton@prepcloud.com
|
42
|
+
executables:
|
43
|
+
- ruby_captivate
|
44
|
+
extensions: []
|
45
|
+
extra_rdoc_files:
|
46
|
+
- History.txt
|
47
|
+
- Manifest.txt
|
48
|
+
- README.txt
|
49
|
+
files:
|
50
|
+
- .autotest
|
51
|
+
- History.txt
|
52
|
+
- Manifest.txt
|
53
|
+
- README.txt
|
54
|
+
- Rakefile
|
55
|
+
- bin/ruby_captivate
|
56
|
+
- lib/ruby_captivate.rb
|
57
|
+
- test/test_ruby_captivate.rb
|
58
|
+
- .gemtest
|
59
|
+
homepage: https://github.com/Leveton/ruby_captivate
|
60
|
+
licenses: []
|
61
|
+
post_install_message:
|
62
|
+
rdoc_options:
|
63
|
+
- --main
|
64
|
+
- README.txt
|
65
|
+
require_paths:
|
66
|
+
- lib
|
67
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
68
|
+
none: false
|
69
|
+
requirements:
|
70
|
+
- - ! '>='
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: '0'
|
73
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
74
|
+
none: false
|
75
|
+
requirements:
|
76
|
+
- - ! '>='
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: '0'
|
79
|
+
requirements: []
|
80
|
+
rubyforge_project: ruby_captivate
|
81
|
+
rubygems_version: 1.8.10
|
82
|
+
signing_key:
|
83
|
+
specification_version: 3
|
84
|
+
summary: Process Adobe Captivate SWF files with Ruby
|
85
|
+
test_files:
|
86
|
+
- test/test_ruby_captivate.rb
|