scorm_cloud 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +8 -0
- data/Gemfile +7 -0
- data/Rakefile +25 -0
- data/bin/scorm_cloud +6 -0
- data/features/api_bugs.feature +12 -0
- data/features/course_service.feature +19 -0
- data/features/debug_service.feature +12 -0
- data/features/registration_service.feature +21 -0
- data/features/step_definitions/scorm_cloud_steps.rb +184 -0
- data/features/support/env.rb +71 -0
- data/features/upload_service.feature +9 -0
- data/lib/scorm_cloud.rb +36 -0
- data/lib/scorm_cloud/base.rb +110 -0
- data/lib/scorm_cloud/base_object.rb +23 -0
- data/lib/scorm_cloud/base_service.rb +27 -0
- data/lib/scorm_cloud/connection.rb +67 -0
- data/lib/scorm_cloud/course.rb +13 -0
- data/lib/scorm_cloud/course_service.rb +53 -0
- data/lib/scorm_cloud/debug_service.rb +25 -0
- data/lib/scorm_cloud/dispatch_service.rb +9 -0
- data/lib/scorm_cloud/export_service.rb +7 -0
- data/lib/scorm_cloud/railtie.rb +13 -0
- data/lib/scorm_cloud/registration.rb +19 -0
- data/lib/scorm_cloud/registration_service.rb +50 -0
- data/lib/scorm_cloud/reporting_service.rb +7 -0
- data/lib/scorm_cloud/scorm_rails_helpers.rb +15 -0
- data/lib/scorm_cloud/tagging_service.rb +9 -0
- data/lib/scorm_cloud/upload_service.rb +37 -0
- data/lib/scorm_cloud/version.rb +3 -0
- data/readme.textile +53 -0
- data/scorm_cloud.gemspec +24 -0
- data/spec/apikey_template.rb +3 -0
- data/spec/course_service_spec.rb +31 -0
- data/spec/debug_service_spec.rb +26 -0
- data/spec/dispatch_service_spec.rb +21 -0
- data/spec/export_service_spec.rb +13 -0
- data/spec/registration_service_spec.rb +28 -0
- data/spec/reporting_service_spec.rb +11 -0
- data/spec/small_scorm_package.zip +0 -0
- data/spec/spec_helper.rb +4 -0
- data/spec/tagging_service_spec.rb +20 -0
- data/spec/upload_service_spec.rb +18 -0
- metadata +139 -0
data/scorm_cloud.gemspec
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "scorm_cloud/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "scorm_cloud"
|
7
|
+
s.version = ScormCloud::VERSION
|
8
|
+
s.platform = Gem::Platform::RUBY
|
9
|
+
s.authors = ["Ken Richard"]
|
10
|
+
s.email = ["kenrichar@gmail.com"]
|
11
|
+
s.homepage = ""
|
12
|
+
s.summary = %q{Rustici Scorm Cloud Web Service API Wrapper}
|
13
|
+
s.description = %q{Rustici Scorm Cloud Web Service API Wrapper}
|
14
|
+
|
15
|
+
s.rubyforge_project = "scorm_cloud"
|
16
|
+
|
17
|
+
s.files = `git ls-files`.split("\n")
|
18
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
19
|
+
s.executables = ["scorm_cloud"]
|
20
|
+
s.default_executable = "bin/scorm_cloud"
|
21
|
+
s.require_paths = ["lib"]
|
22
|
+
|
23
|
+
s.add_dependency('multipart-post')
|
24
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe "Rustici Web Service API" do
|
4
|
+
|
5
|
+
describe ScormCloud::ScormCloud.new($scorm_cloud_appid,$scorm_cloud_secret).course do
|
6
|
+
|
7
|
+
it { should respond_to(:import_course).with(2).arguments }
|
8
|
+
it { should respond_to(:preview).with(2).argument }
|
9
|
+
it { should respond_to(:delete_course).with(1).arguments }
|
10
|
+
it { should respond_to(:exists).with(1).argument }
|
11
|
+
it { should respond_to(:get_attributes).with(1).argument }
|
12
|
+
it { should respond_to(:update_attributes).with(2).arguments }
|
13
|
+
it { should respond_to(:get_manifest).with(1).argument }
|
14
|
+
it { should respond_to(:get_course_list).with(0).argument }
|
15
|
+
it { should respond_to(:get_course_list).with(1).argument }
|
16
|
+
|
17
|
+
# Not Implemented
|
18
|
+
it { should respond_to(:get_assets).with(0).arguments }
|
19
|
+
it { should respond_to(:update_assets).with(0).arguments }
|
20
|
+
it { should respond_to(:import_cours_async).with(0).arguments }
|
21
|
+
it { should respond_to(:get_async_import_result).with(0).arguments }
|
22
|
+
it { should respond_to(:properties).with(0).arguments }
|
23
|
+
it { should respond_to(:get_file_structure).with(0).arguments }
|
24
|
+
it { should respond_to(:delete_files).with(0).arguments }
|
25
|
+
it { should respond_to(:get_metadata).with(0).arguments }
|
26
|
+
|
27
|
+
|
28
|
+
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe "Rustici Web Service API" do
|
4
|
+
|
5
|
+
describe ScormCloud::ScormCloud.new($scorm_cloud_appid,$scorm_cloud_secret).debug do
|
6
|
+
|
7
|
+
# interface
|
8
|
+
it { should respond_to(:ping).with(0).arguments }
|
9
|
+
it { should respond_to(:auth_ping).with(0).arguments }
|
10
|
+
it { should respond_to(:get_time).with(0).arguments }
|
11
|
+
|
12
|
+
it "should ping the server" do
|
13
|
+
subject.ping.should include("pong")
|
14
|
+
end
|
15
|
+
|
16
|
+
it "should auth_ping the server" do
|
17
|
+
subject.auth_ping.should include("pong")
|
18
|
+
end
|
19
|
+
|
20
|
+
it "should get the time" do
|
21
|
+
subject.get_time.should match(/\d+/)
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe "Rustici Web Service API" do
|
4
|
+
|
5
|
+
describe ScormCloud::ScormCloud.new($scorm_cloud_appid,$scorm_cloud_secret).dispatch do
|
6
|
+
|
7
|
+
it { should respond_to(:get_destination_list) }
|
8
|
+
it { should respond_to(:get_destination_info) }
|
9
|
+
it { should respond_to(:create_destination) }
|
10
|
+
it { should respond_to(:update_destination) }
|
11
|
+
it { should respond_to(:delete_destination) }
|
12
|
+
it { should respond_to(:get_dispatch_list) }
|
13
|
+
it { should respond_to(:get_dispatch_info) }
|
14
|
+
it { should respond_to(:create_dispatch) }
|
15
|
+
it { should respond_to(:update_dispatches) }
|
16
|
+
it { should respond_to(:download_dispatches) }
|
17
|
+
it { should respond_to(:delete_dispatches) }
|
18
|
+
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe "Rustici Web Service API" do
|
4
|
+
|
5
|
+
describe ScormCloud::ScormCloud.new($scorm_cloud_appid,$scorm_cloud_secret).export do
|
6
|
+
it { should respond_to(:start) }
|
7
|
+
it { should respond_to(:cancel) }
|
8
|
+
it { should respond_to(:status) }
|
9
|
+
it { should respond_to(:download) }
|
10
|
+
it { should respond_to(:list) }
|
11
|
+
end
|
12
|
+
|
13
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe "Rustici Web Service API" do
|
4
|
+
|
5
|
+
describe ScormCloud::ScormCloud.new($scorm_cloud_appid,$scorm_cloud_secret).registration do
|
6
|
+
|
7
|
+
# interface
|
8
|
+
it { should respond_to(:create_registration).with(5).arguments }
|
9
|
+
it { should respond_to(:create_registration).with(6).arguments }
|
10
|
+
it { should respond_to(:get_registration_list).with(0).arguments }
|
11
|
+
it { should respond_to(:get_registration_list).with(1).arguments }
|
12
|
+
it { should respond_to(:delete_registration).with(1).arguments }
|
13
|
+
it { should respond_to(:reset_registration).with(1).arguments }
|
14
|
+
it { should respond_to(:get_registration_result).with(1).arguments }
|
15
|
+
it { should respond_to(:get_registration_result).with(2).arguments }
|
16
|
+
it { should respond_to(:launch).with(2).arguments }
|
17
|
+
it { should respond_to(:launch).with(3).arguments }
|
18
|
+
|
19
|
+
# not implemented
|
20
|
+
it { should respond_to(:get_registration_list_results)}
|
21
|
+
it { should respond_to(:get_launch_history) }
|
22
|
+
it { should respond_to(:get_launch_info) }
|
23
|
+
it { should respond_to(:reset_global_objectives) }
|
24
|
+
it { should respond_to(:update_learner_info) }
|
25
|
+
it { should respond_to(:test_registration_post_url) }
|
26
|
+
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe "Rustici Web Service API" do
|
4
|
+
|
5
|
+
describe ScormCloud::ScormCloud.new($scorm_cloud_appid,$scorm_cloud_secret).reporting do
|
6
|
+
it { should respond_to(:get_account_info) }
|
7
|
+
it { should respond_to(:get_reportage_auth) }
|
8
|
+
it { should respond_to(:launch_report) }
|
9
|
+
end
|
10
|
+
|
11
|
+
end
|
Binary file
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe "Rustici Web Service API" do
|
4
|
+
|
5
|
+
describe ScormCloud::ScormCloud.new($scorm_cloud_appid,$scorm_cloud_secret).tagging do
|
6
|
+
it { should respond_to(:get_course_tags) }
|
7
|
+
it { should respond_to(:set_course_tags) }
|
8
|
+
it { should respond_to(:add_course_tag) }
|
9
|
+
it { should respond_to(:remove_course_tag) }
|
10
|
+
it { should respond_to(:get_learner_tags) }
|
11
|
+
it { should respond_to(:set_learner_tags) }
|
12
|
+
it { should respond_to(:add_learner_tag) }
|
13
|
+
it { should respond_to(:remove_learner_tag) }
|
14
|
+
it { should respond_to(:get_registration_tags) }
|
15
|
+
it { should respond_to(:set_registration_tags) }
|
16
|
+
it { should respond_to(:add_registration_tag) }
|
17
|
+
it { should respond_to(:remove_registration_tag) }
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe "Rustici Web Service API" do
|
4
|
+
|
5
|
+
describe ScormCloud::ScormCloud.new($scorm_cloud_appid,$scorm_cloud_secret).upload do
|
6
|
+
|
7
|
+
# interface
|
8
|
+
it { should respond_to(:get_upload_token).with(0).arguments }
|
9
|
+
it { should respond_to(:upload_file).with(2).arguments }
|
10
|
+
it { should respond_to(:list_files).with(0).arguments }
|
11
|
+
it { should respond_to(:delete_files).with(1).arguments }
|
12
|
+
|
13
|
+
# not implemented
|
14
|
+
it { should respond_to(:get_upload_progress).with(0).arguments }
|
15
|
+
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
metadata
ADDED
@@ -0,0 +1,139 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: scorm_cloud
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 25
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 3
|
10
|
+
version: 0.0.3
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Ken Richard
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2011-07-14 00:00:00 -04:00
|
19
|
+
default_executable: bin/scorm_cloud
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
name: multipart-post
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 3
|
30
|
+
segments:
|
31
|
+
- 0
|
32
|
+
version: "0"
|
33
|
+
type: :runtime
|
34
|
+
version_requirements: *id001
|
35
|
+
description: Rustici Scorm Cloud Web Service API Wrapper
|
36
|
+
email:
|
37
|
+
- kenrichar@gmail.com
|
38
|
+
executables:
|
39
|
+
- scorm_cloud
|
40
|
+
extensions: []
|
41
|
+
|
42
|
+
extra_rdoc_files: []
|
43
|
+
|
44
|
+
files:
|
45
|
+
- .gitignore
|
46
|
+
- Gemfile
|
47
|
+
- Rakefile
|
48
|
+
- features/api_bugs.feature
|
49
|
+
- features/course_service.feature
|
50
|
+
- features/debug_service.feature
|
51
|
+
- features/registration_service.feature
|
52
|
+
- features/step_definitions/scorm_cloud_steps.rb
|
53
|
+
- features/support/env.rb
|
54
|
+
- features/upload_service.feature
|
55
|
+
- lib/scorm_cloud.rb
|
56
|
+
- lib/scorm_cloud/base.rb
|
57
|
+
- lib/scorm_cloud/base_object.rb
|
58
|
+
- lib/scorm_cloud/base_service.rb
|
59
|
+
- lib/scorm_cloud/connection.rb
|
60
|
+
- lib/scorm_cloud/course.rb
|
61
|
+
- lib/scorm_cloud/course_service.rb
|
62
|
+
- lib/scorm_cloud/debug_service.rb
|
63
|
+
- lib/scorm_cloud/dispatch_service.rb
|
64
|
+
- lib/scorm_cloud/export_service.rb
|
65
|
+
- lib/scorm_cloud/railtie.rb
|
66
|
+
- lib/scorm_cloud/registration.rb
|
67
|
+
- lib/scorm_cloud/registration_service.rb
|
68
|
+
- lib/scorm_cloud/reporting_service.rb
|
69
|
+
- lib/scorm_cloud/scorm_rails_helpers.rb
|
70
|
+
- lib/scorm_cloud/tagging_service.rb
|
71
|
+
- lib/scorm_cloud/upload_service.rb
|
72
|
+
- lib/scorm_cloud/version.rb
|
73
|
+
- readme.textile
|
74
|
+
- scorm_cloud.gemspec
|
75
|
+
- spec/apikey_template.rb
|
76
|
+
- spec/course_service_spec.rb
|
77
|
+
- spec/debug_service_spec.rb
|
78
|
+
- spec/dispatch_service_spec.rb
|
79
|
+
- spec/export_service_spec.rb
|
80
|
+
- spec/registration_service_spec.rb
|
81
|
+
- spec/reporting_service_spec.rb
|
82
|
+
- spec/small_scorm_package.zip
|
83
|
+
- spec/spec_helper.rb
|
84
|
+
- spec/tagging_service_spec.rb
|
85
|
+
- spec/upload_service_spec.rb
|
86
|
+
- bin/scorm_cloud
|
87
|
+
has_rdoc: true
|
88
|
+
homepage: ""
|
89
|
+
licenses: []
|
90
|
+
|
91
|
+
post_install_message:
|
92
|
+
rdoc_options: []
|
93
|
+
|
94
|
+
require_paths:
|
95
|
+
- lib
|
96
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
98
|
+
requirements:
|
99
|
+
- - ">="
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
hash: 3
|
102
|
+
segments:
|
103
|
+
- 0
|
104
|
+
version: "0"
|
105
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
106
|
+
none: false
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
hash: 3
|
111
|
+
segments:
|
112
|
+
- 0
|
113
|
+
version: "0"
|
114
|
+
requirements: []
|
115
|
+
|
116
|
+
rubyforge_project: scorm_cloud
|
117
|
+
rubygems_version: 1.6.2
|
118
|
+
signing_key:
|
119
|
+
specification_version: 3
|
120
|
+
summary: Rustici Scorm Cloud Web Service API Wrapper
|
121
|
+
test_files:
|
122
|
+
- features/api_bugs.feature
|
123
|
+
- features/course_service.feature
|
124
|
+
- features/debug_service.feature
|
125
|
+
- features/registration_service.feature
|
126
|
+
- features/step_definitions/scorm_cloud_steps.rb
|
127
|
+
- features/support/env.rb
|
128
|
+
- features/upload_service.feature
|
129
|
+
- spec/apikey_template.rb
|
130
|
+
- spec/course_service_spec.rb
|
131
|
+
- spec/debug_service_spec.rb
|
132
|
+
- spec/dispatch_service_spec.rb
|
133
|
+
- spec/export_service_spec.rb
|
134
|
+
- spec/registration_service_spec.rb
|
135
|
+
- spec/reporting_service_spec.rb
|
136
|
+
- spec/small_scorm_package.zip
|
137
|
+
- spec/spec_helper.rb
|
138
|
+
- spec/tagging_service_spec.rb
|
139
|
+
- spec/upload_service_spec.rb
|