ruby_powerpoint 1.4 → 1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ruby_powerpoint/presentation.rb +3 -3
- data/lib/ruby_powerpoint/slide.rb +6 -2
- data/lib/ruby_powerpoint/version.rb +1 -1
- data/spec/fixtures/rime.pptx +0 -0
- data/spec/test_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4bb0879b08bc9ac1d453aa25716073422c8041ae
|
4
|
+
data.tar.gz: c55ea18c26c084b72dd097daeff55c19c6265da5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1736e30801cd22f75186d16894f14cfd2dc53fc71662a002f05941993879e27128b8bd95814b14bfe9bfd21bc8a336e35acef841670bb33220005f00fef16eeb
|
7
|
+
data.tar.gz: d66ff7c40fcb633486a1c02e55b6d54cdd8ad5f10a3d2e8887edc88eca6afb19bf81e80e012fe6575dcb692538cbdffeb0a5a040386102e47caab27779925ea9
|
@@ -14,16 +14,16 @@ module RubyPowerpoint
|
|
14
14
|
|
15
15
|
def slides
|
16
16
|
slides = Array.new
|
17
|
-
@files.
|
17
|
+
@files.each do |f|
|
18
18
|
if f.name.include? 'ppt/slides/slide'
|
19
19
|
slides.push RubyPowerpoint::Slide.new(self, f.name)
|
20
20
|
end
|
21
21
|
end
|
22
|
-
slides
|
22
|
+
slides.sort{|a,b| a.slide_num <=> b.slide_num}
|
23
23
|
end
|
24
24
|
|
25
25
|
def close
|
26
26
|
@files.close
|
27
27
|
end
|
28
28
|
end
|
29
|
-
end
|
29
|
+
end
|
@@ -47,7 +47,11 @@ module RubyPowerpoint
|
|
47
47
|
node['Target'].gsub('..', 'ppt'))
|
48
48
|
end
|
49
49
|
end
|
50
|
-
|
50
|
+
|
51
|
+
def slide_num
|
52
|
+
@slide_xml_path.match(/slide([0-9]*)\.xml$/)[1].to_i
|
53
|
+
end
|
54
|
+
|
51
55
|
private
|
52
56
|
|
53
57
|
def extract_slide_number_from_path path
|
@@ -82,4 +86,4 @@ module RubyPowerpoint
|
|
82
86
|
node['Type'].include? 'image'
|
83
87
|
end
|
84
88
|
end
|
85
|
-
end
|
89
|
+
end
|
data/spec/fixtures/rime.pptx
CHANGED
Binary file
|
data/spec/test_spec.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby_powerpoint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- pythonicrubyist
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-03-
|
11
|
+
date: 2014-03-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|