scorm_cloud 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -0
- data/lib/scorm_cloud/CLI.rb +24 -0
- data/lib/scorm_cloud/version.rb +1 -1
- data/spec/apikey_template.rb +17 -0
- metadata +37 -52
data/Gemfile
CHANGED
@@ -0,0 +1,24 @@
|
|
1
|
+
module ScormCloud
|
2
|
+
class CLI
|
3
|
+
def self.start
|
4
|
+
command = ARGV.shift
|
5
|
+
secret = ENV['SCORM-CLOUD-APPID']
|
6
|
+
secret = ENV['SCORM-CLOUD-SECRET']
|
7
|
+
opts = {}
|
8
|
+
while ARGV.length > 0
|
9
|
+
case ARGV[0]
|
10
|
+
when '--appid'
|
11
|
+
ARGV.shift; appid = ARGV.shift
|
12
|
+
when '--secret'
|
13
|
+
ARGV.shift; secret = ARGV.shift
|
14
|
+
else
|
15
|
+
name = ARGV.shift[2..-1].to_sym
|
16
|
+
value = ARGV.shift
|
17
|
+
opts[name] = value
|
18
|
+
end
|
19
|
+
end
|
20
|
+
sc = ScormCloud.new(appid, secret)
|
21
|
+
puts sc.call(command, opts)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
data/lib/scorm_cloud/version.rb
CHANGED
data/spec/apikey_template.rb
CHANGED
@@ -1,3 +1,20 @@
|
|
1
|
+
##
|
2
|
+
## WARNING!
|
3
|
+
##
|
4
|
+
## DO NOT PUT YOUR LIVE ACCOUNT KEYS HERE
|
5
|
+
##
|
6
|
+
## ALL OF YOUR DATA COULD BE DESTROYED
|
7
|
+
##
|
8
|
+
## The tests work against the actual scorm cloud
|
9
|
+
## database and will destory data that you have
|
10
|
+
## on the system.
|
11
|
+
##
|
12
|
+
## Sign up for a second (free) scorm cloud account
|
13
|
+
## with a different email address and use the keys
|
14
|
+
## from that account.
|
15
|
+
##
|
16
|
+
## Copy this file to "apikey.rb" to enable tests.
|
17
|
+
##
|
1
18
|
$scorm_cloud_appid = "AAA"
|
2
19
|
$scorm_cloud_secret = "BBB"
|
3
20
|
|
metadata
CHANGED
@@ -1,50 +1,39 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: scorm_cloud
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.5
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 0
|
9
|
-
- 4
|
10
|
-
version: 0.0.4
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Ken Richard
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
dependencies:
|
21
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2012-11-15 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
22
15
|
name: multipart-post
|
23
|
-
|
24
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: &2156632360 !ruby/object:Gem::Requirement
|
25
17
|
none: false
|
26
|
-
requirements:
|
27
|
-
- -
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
|
30
|
-
segments:
|
31
|
-
- 0
|
32
|
-
version: "0"
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
33
22
|
type: :runtime
|
34
|
-
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *2156632360
|
35
25
|
description: Rustici Scorm Cloud Web Service API Wrapper
|
36
|
-
email:
|
26
|
+
email:
|
37
27
|
- kenrichar@gmail.com
|
38
|
-
executables:
|
28
|
+
executables:
|
39
29
|
- scorm_cloud
|
40
30
|
extensions: []
|
41
|
-
|
42
31
|
extra_rdoc_files: []
|
43
|
-
|
44
|
-
files:
|
32
|
+
files:
|
45
33
|
- .gitignore
|
46
34
|
- Gemfile
|
47
35
|
- Rakefile
|
36
|
+
- bin/scorm_cloud
|
48
37
|
- features/api_bugs.feature
|
49
38
|
- features/course_service.feature
|
50
39
|
- features/debug_service.feature
|
@@ -53,6 +42,7 @@ files:
|
|
53
42
|
- features/support/env.rb
|
54
43
|
- features/upload_service.feature
|
55
44
|
- lib/scorm_cloud.rb
|
45
|
+
- lib/scorm_cloud/CLI.rb
|
56
46
|
- lib/scorm_cloud/base.rb
|
57
47
|
- lib/scorm_cloud/base_object.rb
|
58
48
|
- lib/scorm_cloud/base_service.rb
|
@@ -83,42 +73,37 @@ files:
|
|
83
73
|
- spec/spec_helper.rb
|
84
74
|
- spec/tagging_service_spec.rb
|
85
75
|
- spec/upload_service_spec.rb
|
86
|
-
|
87
|
-
has_rdoc: true
|
88
|
-
homepage: ""
|
76
|
+
homepage: ''
|
89
77
|
licenses: []
|
90
|
-
|
91
78
|
post_install_message:
|
92
79
|
rdoc_options: []
|
93
|
-
|
94
|
-
require_paths:
|
80
|
+
require_paths:
|
95
81
|
- lib
|
96
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
82
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
97
83
|
none: false
|
98
|
-
requirements:
|
99
|
-
- -
|
100
|
-
- !ruby/object:Gem::Version
|
101
|
-
|
102
|
-
segments:
|
84
|
+
requirements:
|
85
|
+
- - ! '>='
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: '0'
|
88
|
+
segments:
|
103
89
|
- 0
|
104
|
-
|
105
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
90
|
+
hash: -4157192321636224720
|
91
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
106
92
|
none: false
|
107
|
-
requirements:
|
108
|
-
- -
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
|
111
|
-
segments:
|
93
|
+
requirements:
|
94
|
+
- - ! '>='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
segments:
|
112
98
|
- 0
|
113
|
-
|
99
|
+
hash: -4157192321636224720
|
114
100
|
requirements: []
|
115
|
-
|
116
101
|
rubyforge_project: scorm_cloud
|
117
|
-
rubygems_version: 1.
|
102
|
+
rubygems_version: 1.8.10
|
118
103
|
signing_key:
|
119
104
|
specification_version: 3
|
120
105
|
summary: Rustici Scorm Cloud Web Service API Wrapper
|
121
|
-
test_files:
|
106
|
+
test_files:
|
122
107
|
- features/api_bugs.feature
|
123
108
|
- features/course_service.feature
|
124
109
|
- features/debug_service.feature
|