office_elin 0.0.2 → 0.0.3

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
  SHA256:
3
- metadata.gz: 563cce89aadb0c3eddd46ec5bead7396ee025f312cc9d67182d055dc01545f73
4
- data.tar.gz: '06658306192827652b5f858467ea13328a4e8a03a874b7dfd891d5cf2ffb8f9d'
3
+ metadata.gz: 46ef39dc9d8971c4d3f8262161f6289ca7406af424932176851be7a0434a9266
4
+ data.tar.gz: ca9e218ddfc1c40dda4031c4c455c961e952d6df9fb720a194f3725b7b28b7a6
5
5
  SHA512:
6
- metadata.gz: b6c5cb819f3125fc8685efa695ff6f2e20ad447c7e6a277ede4c2072a559b50aec22f79f9e6295751f4f6faf76152cc0f1cbafed43d49bacd6a091f472322ee5
7
- data.tar.gz: 506e560f546e9e01e1f09c4d15660f4e7668c60fb460daa1d6554bf0f8f105def29be63a919ce11401f59c720323bc357934b243967589d1b553f527a9fa1ef3
6
+ metadata.gz: de5c8921d1804760a8a2283e1e4ca0c9f7b88da5fdc0baa456b4c6c1d7e778045c148c05b1b33fd3d2e7d00e3e34a14fe785d967c1604a9252d5cbb8f66d9667
7
+ data.tar.gz: 6f7c773b37d9387211074374519d4174736668487ce96a3421e6fc4875314dac6718149f964e27c853cbac09d18c6b7a3a70deb7efb3ad7a1b4e9bcdce363363
@@ -77,6 +77,7 @@ module ExcelOffice
77
77
  end
78
78
 
79
79
  def save(path)
80
+ path = Toolkit::String.safe_path(path)
80
81
  @workbook.saveas(path)
81
82
  end
82
83
 
@@ -83,6 +83,7 @@ module ExcelWps
83
83
  end
84
84
 
85
85
  def save(path)
86
+ path = Toolkit::String.safe_path(path)
86
87
  @workbook.saveas(path)
87
88
  end
88
89
 
@@ -20,10 +20,9 @@ module Toolkit::String
20
20
 
21
21
  # 改写成安全的Windows书写方式
22
22
  def safe_path(path)
23
- #if OS.windows?
24
- # path.gsub!("/", "\\")
25
- #end
26
- Pathname.new(path).to_s
23
+ if OS.windows?
24
+ path.gsub!("/", "\\")
25
+ end
27
26
  end
28
27
  end
29
28
  end
@@ -32,6 +32,7 @@ module WordWps
32
32
  end
33
33
 
34
34
  def save(path)
35
+ path = Toolkit::String.safe_path(path)
35
36
  @document.saveas(path)
36
37
  end
37
38
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: office_elin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elin