canvas_cc 0.0.14 → 0.0.15
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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6b4afe3c5ee9a6786154ee3c7df78e05050584f6
|
4
|
+
data.tar.gz: 8c5fd7da7c293d92b4e0d485ffe527a54095f386
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d741d173e813de59b9f64112f4dc6a3dc9025ce7eb75e9dcf178ccdb495d3bd9525b89d1145bcebc2921b2d4994bd71527bcfbcc90f2adf53213229fd3dd664
|
7
|
+
data.tar.gz: 9cc727623b59503c4c28d02957ddbf99586b3e8d8490c8d76f32cdaea33705e29819f759f0c6d14b8f0c13e0ff7846c494e41b026fd748a49028c724cbd7d8f3
|
data/Gemfile.lock
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
module CanvasCc::CanvasCC::Models
|
2
2
|
class CanvasModule
|
3
3
|
|
4
|
-
attr_accessor :identifier, :title, :workflow_state, :module_items
|
4
|
+
attr_accessor :identifier, :title, :workflow_state, :module_items,
|
5
|
+
:unlock_at, :start_at, :end_at, :require_sequential_progress
|
5
6
|
|
6
7
|
def initialize
|
7
8
|
@module_items = []
|
8
9
|
end
|
9
10
|
end
|
10
|
-
end
|
11
|
+
end
|
@@ -26,6 +26,10 @@ module CanvasCc::CanvasCC
|
|
26
26
|
xml.module('identifier' => mod.identifier) {
|
27
27
|
xml.title mod.title
|
28
28
|
xml.workflow_state mod.workflow_state
|
29
|
+
xml.require_sequential_progress mod.require_sequential_progress unless mod.require_sequential_progress.nil?
|
30
|
+
xml.start_at CanvasCc::CC::CCHelper.ims_datetime(mod.start_at) if mod.start_at
|
31
|
+
xml.end_at CanvasCc::CC::CCHelper.ims_datetime(mod.end_at) if mod.end_at
|
32
|
+
xml.unlock_at CanvasCc::CC::CCHelper.ims_datetime(mod.unlock_at) if mod.unlock_at
|
29
33
|
xml.position(position)
|
30
34
|
xml.items { |xml|
|
31
35
|
add_module_items_to_xml(mod.module_items, xml)
|
@@ -49,4 +53,4 @@ module CanvasCc::CanvasCC
|
|
49
53
|
end
|
50
54
|
|
51
55
|
end
|
52
|
-
end
|
56
|
+
end
|
data/lib/canvas_cc/version.rb
CHANGED
@@ -19,6 +19,10 @@ module CanvasCc::CanvasCC
|
|
19
19
|
canvas_module.identifier = 'module_identifier'
|
20
20
|
canvas_module.title = 'test_title'
|
21
21
|
canvas_module.workflow_state = 'active'
|
22
|
+
canvas_module.start_at = Time.parse('Sat, 08 Feb 2014 16:00:00 GMT')
|
23
|
+
canvas_module.end_at = Time.parse('Sat, 08 Feb 2014 16:00:00 GMT')
|
24
|
+
canvas_module.unlock_at = Time.parse('Sat, 08 Feb 2014 16:00:00 GMT')
|
25
|
+
canvas_module.require_sequential_progress = false
|
22
26
|
xml = write_xml(canvas_module)
|
23
27
|
|
24
28
|
assert_xml_schema(xml)
|
@@ -28,12 +32,20 @@ module CanvasCc::CanvasCC
|
|
28
32
|
canvas_module.identifier = 'ident'
|
29
33
|
canvas_module.title = 'module title'
|
30
34
|
canvas_module.workflow_state = 'active'
|
35
|
+
canvas_module.start_at = Time.parse('Sat, 08 Feb 2014 16:00:00 GMT')
|
36
|
+
canvas_module.end_at = Time.parse('Sat, 08 Feb 2014 16:00:00 GMT')
|
37
|
+
canvas_module.unlock_at = Time.parse('Sat, 08 Feb 2014 16:00:00 GMT')
|
38
|
+
canvas_module.require_sequential_progress = false
|
31
39
|
xml = write_xml(canvas_module)
|
32
40
|
|
33
41
|
expect(xml.at_xpath('xmlns:modules/xmlns:module/@identifier').text).to eq('ident')
|
34
42
|
expect(xml.%('modules/module/title').text).to eq('module title')
|
35
43
|
expect(xml.%('modules/module/workflow_state').text).to eq('active')
|
36
44
|
expect(xml.%('modules/module/position').text).to eq('0')
|
45
|
+
expect(xml.%('modules/module/start_at').text).to eq('2014-02-08T16:00:00')
|
46
|
+
expect(xml.%('modules/module/end_at').text).to eq('2014-02-08T16:00:00')
|
47
|
+
expect(xml.%('modules/module/unlock_at').text).to eq('2014-02-08T16:00:00')
|
48
|
+
expect(xml.%('modules/module/require_sequential_progress').text).to eq('false')
|
37
49
|
end
|
38
50
|
|
39
51
|
it 'increments the position for each module that is written' do
|
@@ -115,4 +127,4 @@ module CanvasCc::CanvasCC
|
|
115
127
|
end
|
116
128
|
|
117
129
|
end
|
118
|
-
end
|
130
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: canvas_cc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Instructure
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubyzip
|