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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 646308c3740c8716d9fb91b9c0288edc6e915c060bdd713401980608d412119a
4
- data.tar.gz: 379a3bd099724e9cd6adc2542d804d4f4737eafc47742892dbc1ba4914f7b7c2
3
+ metadata.gz: f2639b34c270ac16732d4de9ff06be54e2ba33cf5c1cf9d7842ed7a639044b4c
4
+ data.tar.gz: 3533deb112141e2221b00479d6f4207891b7977c0ac1cf6ff37b40ade580fea1
5
5
  SHA512:
6
- metadata.gz: '02308d88008a6e7d5362b0c793f1ab4e55025b7df0d19741dbe66775450f672b654c9766ac3e49d6ec840d497b9fa39befd1f66e6d20e5a5539d6cf3eefbc276'
7
- data.tar.gz: 874eaf4089951eb94ac101699198e35981b72084036eb171ec70eb69dc2c135951138f773844b945ff7f4ebbd8d3a4020f3bdaf3f4286f165334e270ada23118
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
@@ -1,3 +1,3 @@
1
1
  module RobustExcelOle
2
- VERSION = "1.37"
2
+ VERSION = "1.38"
3
3
  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 '-u option" do
22
- it { RobustExcelOle::Cygwin.cygpath('-u', 'C:\\Users').should eq '/cygdrive/c/Users'}
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 '-u' options" do
28
- it { RobustExcelOle::Cygwin.cygpath('-u', './').should eq './' }
33
+ context "with '-p' options" do
34
+ it { RobustExcelOle::Cygwin.cygpath('-p', './').should eq './' }
29
35
  end
30
36
 
31
- context "with '-ua' options" do
32
- it { RobustExcelOle::Cygwin.cygpath('-ua', './').should eq File.expand_path('./') + '/' }
33
- end
37
+ # context "with '-pa' options" do
38
+ # it { RobustExcelOle::Cygwin.cygpath('-pa', './').should eq File.expand_path('./') + '/' }
39
+ # end
34
40
 
35
- context "with '-us' options" do
36
- it { RobustExcelOle::Cygwin.cygpath('-us', './').should eq './' }
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
+
Binary file
Binary file
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.37'
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: 2021-11-30 00:00:00.000000000 Z
11
+ date: 2022-03-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry