mymedia-pages 0.1.6 → 0.1.7

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: b3b8b0a619d72a9126e778962d3220bb69318745
4
- data.tar.gz: 2e62fcb66bd390c4fd7acf10a7a2f27a0a8071db
3
+ metadata.gz: bd50fb53aa3bec5bb8317c7f85d1e30f1aa9063f
4
+ data.tar.gz: c191cdd51acfb0553b0278ed8deb4b80ac15d4e8
5
5
  SHA512:
6
- metadata.gz: c2dfe295bb20ff4d267311fd6b85cfd1f6f48a11cf7a02582e043b2be900fd17002929acae5521826a086b421825eac8b0740c3995ad65b3ee78cc9b4d548fa4
7
- data.tar.gz: 1f8f978b8f28b8b2e854fb2083ea7e4be5f26cce6ac93d85b1c5bd55f92b3900684348c854761f1762a7dbeb81435ccf5261fc2423a1213f7a42202d67beda39
6
+ metadata.gz: b4f31a2b4ee1cb76dbe5f46d16b21de1f73c7e903ab96aeca4552618becce19dba142fc0acafc697faf1b701a1a7772238feeac273fa2441581570fa1fdd9843
7
+ data.tar.gz: 3059c74c10c8879ffa68a5b9eb139ab972c171e98257a34e187eb6df41bec9200aab935d00236f3fbdb76e5e95c24390a0c618597940b8f1e5253437faf189f7
checksums.yaml.gz.sig CHANGED
@@ -1 +1 @@
1
- 3mcEy�\�>��=��8Em�D*B���j+� q�� �\�`=�@ ����7����ё�遲�� c�yh��#k ����eu�d�$�0�=���ο?ܘ)���~b��$�!��NM�Z �<��}�Jʾcx��'���N~@a9�����?5�!�!��(�:<��@��(-��L}f *'q}�QwQ�"�97Ez��~�ѓK��75�
1
+ ��� I��6i�+ ��%��҃�"}ׂ\�硛�Ve��و��#4��@4g�S?���(�K{>��CW�_����s����~B}�F�;|Yl)��󺕯n�ԊEI���a픖�cg���I�/r<rͰ���=�܍=CS��K��w���B��g���e��ϵ�G���w#����`G�[�U߃:��'������8��ޜ� �d�3Z�����i"�uO?np涬�mb�G�#��Ee��YκR
data.tar.gz.sig CHANGED
Binary file
data/lib/mymedia-pages.rb CHANGED
@@ -4,6 +4,7 @@
4
4
 
5
5
 
6
6
  require 'mymedia'
7
+ require 'martile'
7
8
 
8
9
 
9
10
  class MyMediaPages < MyMedia::Base
@@ -73,6 +74,8 @@ class MyMediaPages < MyMedia::Base
73
74
  #target_url = [@website, @public_type, html_filename].join('/')
74
75
 
75
76
  else
77
+
78
+ html_filename = File.basename(src_path)
76
79
  FileUtils.cp src_path, destination
77
80
  FileUtils.cp src_path, raw_destination
78
81
  end
@@ -82,7 +85,10 @@ class MyMediaPages < MyMedia::Base
82
85
 
83
86
 
84
87
  FileUtils.cp destination, @home + "/#{@public_type}/" + html_filename
85
- FileUtils.cp dest_xml, @home + "/#{@public_type}/" + xml_filename
88
+
89
+ if xml_filename then
90
+ FileUtils.cp dest_xml, @home + "/#{@public_type}/" + xml_filename
91
+ end
86
92
 
87
93
  static_filepath = @home + "/#{@public_type}/static.xml"
88
94
 
@@ -92,14 +98,19 @@ class MyMediaPages < MyMedia::Base
92
98
  target_url = [@website, @public_type, x_filename].join('/')
93
99
 
94
100
  publish_dynarex(static_filepath, {title: x_filename, url: target_url })
101
+
95
102
 
96
103
 
97
104
  end
98
-
99
- tags = doc.root.xpath('summary/tags/tag/text()')
100
105
 
101
- raw_msg = "%s %s" % [doc.root.text('summary/title'),
102
- tags.map {|x| "#%s" % x }.join]
106
+ if doc then
107
+
108
+ tags = doc.root.xpath('summary/tags/tag/text()')
109
+ raw_msg = "%s %s" % [doc.root.text('summary/title'),
110
+ tags.map {|x| "#%s" % x }.join]
111
+ else
112
+ raw_msg = File.read(destination)[/<title>([^<]+)<\/title>/,1]
113
+ end
103
114
 
104
115
  [raw_msg, target_url]
105
116
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mymedia-pages
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -31,7 +31,7 @@ cert_chain:
31
31
  R8qQYTqUH5uyN1gXTamDXNnXrSWNIRgATqBFU0Rk4ia1O2X6/oMnJctbKR+A3n78
32
32
  zZLvJwXE0u524g==
33
33
  -----END CERTIFICATE-----
34
- date: 2014-12-14 00:00:00.000000000 Z
34
+ date: 2015-01-26 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: mymedia
@@ -53,6 +53,26 @@ dependencies:
53
53
  - - ">="
54
54
  - !ruby/object:Gem::Version
55
55
  version: 0.1.1
56
+ - !ruby/object:Gem::Dependency
57
+ name: martile
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - "~>"
61
+ - !ruby/object:Gem::Version
62
+ version: '0.4'
63
+ - - ">="
64
+ - !ruby/object:Gem::Version
65
+ version: 0.4.1
66
+ type: :runtime
67
+ prerelease: false
68
+ version_requirements: !ruby/object:Gem::Requirement
69
+ requirements:
70
+ - - "~>"
71
+ - !ruby/object:Gem::Version
72
+ version: '0.4'
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: 0.4.1
56
76
  description:
57
77
  email: james@r0bertson.co.uk
58
78
  executables: []
metadata.gz.sig CHANGED
Binary file