robust_excel_ole 1.37 → 1.38
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 +4 -4
- data/lib/robust_excel_ole/cygwin.rb +12 -0
- data/lib/robust_excel_ole/version.rb +1 -1
- data/spec/cygwin_spec.rb +17 -10
- data/spec/data/workbook.xls +0 -0
- data/spec/data/workbook.xlsm +0 -0
- data/spec/data/workbook.xlsx +0 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f2639b34c270ac16732d4de9ff06be54e2ba33cf5c1cf9d7842ed7a639044b4c
|
4
|
+
data.tar.gz: 3533deb112141e2221b00479d6f4207891b7977c0ac1cf6ff37b40ade580fea1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 19071fbe4d293f73f02081c9cb23f706d2102a97d3a038324551e912a6b17929282e0fff738b98f30a2377bf7f2f48b9fb5eaa699a4439b989f2e174a1ff9a63
|
7
|
+
data.tar.gz: 8da4acac7393db1c62b352842aa6b8944b0ecb1fc410077b62d9b0f618a82e07df69612afb0077c0fedfedb824d1962e97c90041a762e4cbadd6691534f1d3f7
|
@@ -1,7 +1,10 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
2
|
|
3
3
|
module RobustExcelOle
|
4
|
+
|
4
5
|
module Cygwin
|
6
|
+
|
7
|
+
=begin
|
5
8
|
require 'Win32API'
|
6
9
|
|
7
10
|
@conv_to_full_posix_path =
|
@@ -38,6 +41,15 @@ module RobustExcelOle
|
|
38
41
|
buf.delete!("\0")
|
39
42
|
buf
|
40
43
|
end
|
44
|
+
=end
|
45
|
+
|
46
|
+
require "open3"
|
47
|
+
|
48
|
+
# @private
|
49
|
+
def cygpath(options, path)
|
50
|
+
Open3.popen3("cygpath #{options} #{path}") { |stdin, stdout, stderr| stdout.read }[0..-2]
|
51
|
+
end
|
52
|
+
|
41
53
|
module_function :cygpath
|
42
54
|
end
|
43
55
|
end
|
data/spec/cygwin_spec.rb
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
|
+
|
2
3
|
require_relative 'spec_helper'
|
3
4
|
|
5
|
+
$VERBOSE = nil
|
6
|
+
|
7
|
+
include RobustExcelOle
|
8
|
+
include General
|
9
|
+
|
4
10
|
describe "on cygwin", :if => RUBY_PLATFORM =~ /cygwin/ do
|
5
11
|
describe ".cygpath" do
|
6
12
|
context "cygwin path is '/cygdrive/c/Users'" do
|
@@ -18,25 +24,26 @@ describe "on cygwin", :if => RUBY_PLATFORM =~ /cygwin/ do
|
|
18
24
|
end
|
19
25
|
|
20
26
|
context "windows path is 'C:\\Users'" do
|
21
|
-
context "with '-
|
22
|
-
it { RobustExcelOle::Cygwin.cygpath('-
|
27
|
+
context "with '-p option" do
|
28
|
+
it { RobustExcelOle::Cygwin.cygpath('-p', 'C:\\Users').should eq '/cygdrive/c/Users'}
|
23
29
|
end
|
24
30
|
end
|
25
31
|
|
26
32
|
context "cygwin path is './'" do
|
27
|
-
context "with '-
|
28
|
-
it { RobustExcelOle::Cygwin.cygpath('-
|
33
|
+
context "with '-p' options" do
|
34
|
+
it { RobustExcelOle::Cygwin.cygpath('-p', './').should eq './' }
|
29
35
|
end
|
30
36
|
|
31
|
-
|
32
|
-
|
33
|
-
|
37
|
+
# context "with '-pa' options" do
|
38
|
+
# it { RobustExcelOle::Cygwin.cygpath('-pa', './').should eq File.expand_path('./') + '/' }
|
39
|
+
# end
|
34
40
|
|
35
|
-
context "with '-
|
36
|
-
|
37
|
-
end
|
41
|
+
#context "with '-ps' options" do
|
42
|
+
# it { RobustExcelOle::Cygwin.cygpath('-ps', './').should eq './' }
|
43
|
+
#end
|
38
44
|
end
|
39
45
|
|
40
46
|
end
|
41
47
|
|
42
48
|
end
|
49
|
+
|
data/spec/data/workbook.xls
CHANGED
Binary file
|
data/spec/data/workbook.xlsm
CHANGED
Binary file
|
data/spec/data/workbook.xlsx
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: robust_excel_ole
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '1.
|
4
|
+
version: '1.38'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- traths
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-03-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|