slickplan 0.1.0 → 0.1.1

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: 73275f1dfc58b306445a6d110ae71d99af4f7023
4
- data.tar.gz: fb88becc4c384a8642cbbe58a27dcec30a14313e
3
+ metadata.gz: 387473611cf2ad24dd7f074ee5762367fc8490cf
4
+ data.tar.gz: 339c373cf1a2178c95dc198e3d855027e7eb9878
5
5
  SHA512:
6
- metadata.gz: 87290a6cbf2deea5c8ab4e3577a3021048e05e25607421cf639590288b10c08168f3c589183342c6e746249b5c282c4c7ffbb12c8170b90347b3d4d295440e9e
7
- data.tar.gz: 7adae97f5524a3459759ca1641bf2eec7105432a7bcd03fd2bae54d93fb5eb62a7e9d01095e99baaee9ca502ce9cec8597e8e6f4538c6b9bbd91a6087b27efb0
6
+ metadata.gz: 707998beae11f1153d4e6b06b8a89702054fba3a1e332f048ae2589464224ef75e79b3051201e6744ea0341feddac7e91c361becaacb969cec5868a8330e68d1
7
+ data.tar.gz: 150f708b9cf45e85e4e37a68070700ab04c1c35f1bceb5140baddc7ffec426890dcea5cd444c32bb92aeb888ce11553b8c4866472554bbc2f259b15d07c07880
@@ -1,4 +1,4 @@
1
- module SlickPlan
1
+ module Slickplan
2
2
  class Page < OpenStruct
3
3
 
4
4
  end
@@ -1,17 +1,17 @@
1
- module SlickPlan
1
+ module Slickplan
2
2
  module Parser
3
3
  class XML
4
4
  def self.parse(xml)
5
5
  doc = Nokogiri::XML(xml)
6
- sitemap = SlickPlan::Sitemap.new(title: doc.css('sitemap>title').text)
6
+ sitemap = Slickplan::Sitemap.new(title: doc.css('sitemap>title').text)
7
7
  sitemap.templates = doc.css('content_templates>template').collect do |t|
8
- SlickPlan::Template.new(name: t.attr(:name), id: t.attr(:id))
8
+ Slickplan::Template.new(name: t.attr(:name), id: t.attr(:id))
9
9
  end
10
10
  sitemap.pages = doc.css('section#svgmainsection>cells>cell').collect do |p|
11
11
  template_id = p.css('contents>template').text
12
12
  parent_id = p.css('parent').text
13
13
 
14
- SlickPlan::Page.new(id: p.attr(:id), title: p.css('text').text, content: p.css('contents>body>wysiwyg>content').text, template_id: template_id, template: sitemap.templates.find {|t| t.id == template_id}, parent_id: parent_id)
14
+ Slickplan::Page.new(id: p.attr(:id), title: p.css('text').text, content: p.css('contents>body>wysiwyg>content').text, template_id: template_id, template: sitemap.templates.find {|t| t.id == template_id}, parent_id: parent_id)
15
15
  end
16
16
  sitemap.pages.each do |page|
17
17
  page.parent = sitemap.pages.find {|p| p.id == page.parent_id}
@@ -1,4 +1,4 @@
1
- module SlickPlan
1
+ module Slickplan
2
2
  class Sitemap < OpenStruct
3
3
  end
4
4
  end
@@ -1,4 +1,4 @@
1
- module SlickPlan
1
+ module Slickplan
2
2
  class Template < OpenStruct
3
3
 
4
4
  end
@@ -1,3 +1,3 @@
1
1
  module Slickplan
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slickplan
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ed Jones
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-06-28 00:00:00.000000000 Z
11
+ date: 2017-06-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler