canvas_cc 0.0.4 → 0.0.5
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: fc50be4e2acf75a525a68008378e88c37a9d00ee
|
|
4
|
+
data.tar.gz: e2e5c8e089bdcd17942d43e14ccdf1ea00c08fa7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2bd4bc90a7c96675548bf3fad16913c3e56be5fe11550cca20d4ca1892d0d2c0bd0462fca949ff68cfffee44815f9e28814bf97d47aaefbf916c2e5d74ced60d
|
|
7
|
+
data.tar.gz: 22ba9d035d3675e98f9a9bf1442cfbbf4b87afe583aa3bddb113e1a2fa0393d543c948ff2953ead17241892846d3cea3e2083a371d4062ef29a504be8be43a82
|
data/canvas_cc.gemspec
CHANGED
|
@@ -32,6 +32,6 @@ Gem::Specification.new do |spec|
|
|
|
32
32
|
spec.add_development_dependency "guard-bundler"
|
|
33
33
|
spec.add_development_dependency "guard-minitest"
|
|
34
34
|
spec.add_development_dependency "guard-rspec"
|
|
35
|
-
spec.add_development_dependency "
|
|
35
|
+
spec.add_development_dependency "byebug"
|
|
36
36
|
spec.add_development_dependency "bundler", "~> 1.5"
|
|
37
37
|
end
|
|
@@ -40,7 +40,7 @@ module CanvasCc::CanvasCC
|
|
|
40
40
|
) { |xml|
|
|
41
41
|
xml.topic_id discussion_resource.identifier
|
|
42
42
|
xml.title discussion.title
|
|
43
|
-
xml.position
|
|
43
|
+
xml.position discussion.position
|
|
44
44
|
xml.type 'topic'
|
|
45
45
|
xml.discussion_type discussion.discussion_type
|
|
46
46
|
xml.require_initial_post discussion.require_initial_post
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
module CanvasCc::CanvasCC::Models
|
|
2
2
|
class Discussion
|
|
3
|
-
attr_accessor :identifier, :title, :text, :discussion_type, :workflow_state, :require_initial_post,
|
|
3
|
+
attr_accessor :identifier, :title, :text, :discussion_type, :workflow_state, :require_initial_post,
|
|
4
|
+
:assignment, :position
|
|
4
5
|
DISCUSSION_ID_POSTFIX = '_DISCUSSION'
|
|
5
6
|
DISCUSSION_META_POSTFIX = '_meta'
|
|
6
7
|
IMSDT_TYPE = 'imsdt_xmlv1p1'
|
data/lib/canvas_cc/version.rb
CHANGED
|
@@ -26,13 +26,14 @@ describe CanvasCc::CanvasCC::DiscussionWriter do
|
|
|
26
26
|
discussion.title = 'Discussion Title'
|
|
27
27
|
discussion.text = '<p>discussion_text</p>'
|
|
28
28
|
discussion.discussion_type = 'threaded'
|
|
29
|
+
discussion.position = '1'
|
|
29
30
|
writer.write
|
|
30
31
|
xml = Nokogiri::XML(File.read(File.join(work_dir, discussion.meta_resource.href)))
|
|
31
32
|
expect(xml.at_xpath('xmlns:topicMeta/@identifier').value).to eq('discussion_id_meta')
|
|
32
33
|
expect(xml.%('topicMeta/topic_id').text).to eq 'discussion_id'
|
|
33
34
|
expect(xml.%('topicMeta/title').text).to eq 'Discussion Title'
|
|
34
35
|
expect(xml.%('topicMeta/type').text).to eq 'topic'
|
|
35
|
-
expect(xml.%('topicMeta/position').text).to eq ''
|
|
36
|
+
expect(xml.%('topicMeta/position').text).to eq '1'
|
|
36
37
|
expect(xml.%('topicMeta/discussion_type').text).to eq 'threaded'
|
|
37
38
|
end
|
|
38
39
|
|
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.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Instructure
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-10-
|
|
11
|
+
date: 2014-10-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rubyzip
|
|
@@ -193,7 +193,7 @@ dependencies:
|
|
|
193
193
|
- !ruby/object:Gem::Version
|
|
194
194
|
version: '0'
|
|
195
195
|
- !ruby/object:Gem::Dependency
|
|
196
|
-
name:
|
|
196
|
+
name: byebug
|
|
197
197
|
requirement: !ruby/object:Gem::Requirement
|
|
198
198
|
requirements:
|
|
199
199
|
- - ">="
|