canvas_cc 0.0.24 → 0.0.25

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: 6a398ab85593904d7e8d1c688eadf4fd8c5e1707
4
- data.tar.gz: 6f363dd3ab8dd2d45d90c334a45392ea565190b2
3
+ metadata.gz: 335a9d5e80554dd49b1f2a808572f76dcb9a893b
4
+ data.tar.gz: 53d0b452e3d8c12e80c429d0b3a04305089ae674
5
5
  SHA512:
6
- metadata.gz: fa69dc36833c599c21b06861e97791ab9717f80c8910e221ec287fcfd76c3db847d0f3f299fac3fada205f4d0f76d5b8d6eeee13f52d16f33085c54dcd6a43ad
7
- data.tar.gz: e2790def901a40bf8d99f235497e7de8d16c192565f2797703a6dfb4a0be33413c648e242fafef1998860e954061d949538242efd31c90a9bcdebbaa9bd19f15
6
+ metadata.gz: 68777d5e4bfd36a453e9fa28c0d9b059d2e1875b80aa3901a66e2cfa16ebc60a65b69b7b55f36b69e269a1005b0017ecc75efb1288164ab9abd03188d72eca7b
7
+ data.tar.gz: 7a839022ffee44b07107454e08a1be76bfda54dca1e8115eb06659d9dccfa2c815229b2a1bdb8c4b3b91a24a36d2b67517eb9f28a753ea6b4ad705b128fd1b2b
@@ -52,6 +52,10 @@ module CanvasCc::Canvas
52
52
  topic_meta.posted_at @posted_at
53
53
  topic_meta.position @position
54
54
  topic_meta.type @type
55
+ topic_meta.pinned @pinned
56
+ topic_meta.delayed_post_at @delayed_post_at
57
+ topic_meta.lock_at @lock_at
58
+
55
59
  end
56
60
  end
57
61
  end
@@ -44,6 +44,9 @@ module CanvasCc::CanvasCC
44
44
  xml.type 'topic'
45
45
  xml.discussion_type discussion.discussion_type
46
46
  xml.require_initial_post discussion.require_initial_post
47
+ xml.pinned discussion.pinned
48
+ xml.delayed_post_at discussion.delayed_post_at
49
+ xml.lock_at discussion.lock_at
47
50
  unless discussion.assignment.nil?
48
51
  xml.assignment('identifier' => discussion.assignment.assignment_resource.identifier) { |xml|
49
52
  assignment_xml(discussion.assignment, xml)
@@ -1,7 +1,7 @@
1
1
  module CanvasCc::CanvasCC::Models
2
2
  class Discussion
3
3
  attr_accessor :identifier, :title, :text, :discussion_type, :workflow_state, :require_initial_post,
4
- :assignment, :position
4
+ :assignment, :position, :pinned, :lock_at, :delayed_post_at
5
5
  DISCUSSION_ID_POSTFIX = '_DISCUSSION'
6
6
  DISCUSSION_META_POSTFIX = '_meta'
7
7
  IMSDT_TYPE = 'imsdt_xmlv1p1'
@@ -1,3 +1,3 @@
1
1
  module CanvasCc
2
- VERSION = "0.0.24"
2
+ VERSION = "0.0.25"
3
3
  end
@@ -22,11 +22,15 @@ describe CanvasCc::CanvasCC::DiscussionWriter do
22
22
  end
23
23
 
24
24
  it 'creates the meta xml' do
25
+ time = Time.now
25
26
  discussion.identifier = 'discussion_id'
26
27
  discussion.title = 'Discussion Title'
27
28
  discussion.text = '<p>discussion_text</p>'
28
29
  discussion.discussion_type = 'threaded'
29
30
  discussion.position = '1'
31
+ discussion.pinned = true
32
+ discussion.delayed_post_at = time
33
+ discussion.lock_at = time
30
34
  writer.write
31
35
  xml = Nokogiri::XML(File.read(File.join(work_dir, discussion.meta_resource.href)))
32
36
  expect(xml.at_xpath('xmlns:topicMeta/@identifier').value).to eq('discussion_id_meta')
@@ -35,6 +39,10 @@ describe CanvasCc::CanvasCC::DiscussionWriter do
35
39
  expect(xml.%('topicMeta/type').text).to eq 'topic'
36
40
  expect(xml.%('topicMeta/position').text).to eq '1'
37
41
  expect(xml.%('topicMeta/discussion_type').text).to eq 'threaded'
42
+ expect(xml.%('topicMeta/pinned').text).to eq 'true'
43
+ expect(xml.%('topicMeta/delayed_post_at').text).to eq time.to_s
44
+ expect(xml.%('topicMeta/lock_at').text).to eq time.to_s
45
+
38
46
  end
39
47
 
40
48
  it 'creates assignment meta' do
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.24
4
+ version: 0.0.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - Instructure
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-13 00:00:00.000000000 Z
11
+ date: 2015-10-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubyzip