sibu 0.2.9 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2d4de3f8c930710c6b999e42d26de51430104679
4
- data.tar.gz: 9e185ac0d6619ebfee78ce1865bd289d3f743835
3
+ metadata.gz: 8ca17c63c7050a5f62b9b47d6acd36fa183666d3
4
+ data.tar.gz: bddddcfbb9425a65f97af2638acaa93e7cde5bd9
5
5
  SHA512:
6
- metadata.gz: 61fb2779438814e31070d05365dcae11b054cdfd57dd78287ad239dd2a5e6e2404dada3a22bcbd496dcbf009020f22bdbe6a7c705991c65103836efded0c9d1d
7
- data.tar.gz: 7ff856bee09b60257f62151032efd7c2bce2e1eacd9e893d5070dfcb745239c93dc33642aae5db64537900d554ca6320ee1935d1b85a7f2009cac1e481218e9f
6
+ metadata.gz: 1c403b8767fea270505ee91eed2a5209495684b6108796919b348e7f8ab0f16eddeb5bc10a43b90da6c8cd694854288bd8f44fe2a7510e0603593a0d2cb75881
7
+ data.tar.gz: 38e28f483040de3abc41d9181d67eead045ec5134f6f08342d5d81c9baf88207528961021f7e66d30432cdfd5e85125e44ae0fd9b0dce2bf5318c6aee19d6a9c
@@ -36,5 +36,19 @@ module Sibu
36
36
  new_page.name = name + ' - copie'
37
37
  new_page
38
38
  end
39
+
40
+ def update_templates(sections_templates)
41
+ sections.each do |s|
42
+ s["template"] = sections_templates[s["id"]]
43
+ end
44
+ save
45
+ end
46
+
47
+ def reorder_sections(*ordered_ids)
48
+ if ordered_ids.length == sections.length
49
+ self.sections = ordered_ids.map {|section_id| sections.find {|sec| sec["id"] == section_id}}
50
+ save
51
+ end
52
+ end
39
53
  end
40
54
  end
@@ -1,3 +1,3 @@
1
1
  module Sibu
2
- VERSION = '0.2.9'
2
+ VERSION = '0.3.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sibu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.9
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jean-Baptiste Vilain
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-05 00:00:00.000000000 Z
11
+ date: 2018-04-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails