fastsheet 0.1.0 → 0.1.1

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: e6eb7e299b220f69ff05cb1dd1bb015409e4cc31
4
- data.tar.gz: 972681080beecd7165e47d0e0ddda8305004e7a9
3
+ metadata.gz: 45ad5e93adb4b6b458e8a655cf1d47dc4e4d1215
4
+ data.tar.gz: 5284228654e6d17ac9d0530e3a8420a9a9cc6563
5
5
  SHA512:
6
- metadata.gz: 9155761df20a035bfa2e550600db4f5daa50813dac66b6558604649a1cb22b2d07db828c96ad300c5b7213eb5213a9d7ad0e1946dbc9b709b7a51c10b373beb3
7
- data.tar.gz: 730e69d383da0b13e1dafc49ea2a9e0c287ad7ea56583e08fe01ebae58f89814cd20c24e32e908ba9638a1021017af02cdaa7c8e4e666f2e0a7b0cb172774380
6
+ metadata.gz: 38bd555168444f2374cfa051971a00e31da6b5aef5fdf92d0fd32d786242dca1a68b5f55da7302f585c546ca54b9bedce4b260dc111bc764e75cd6041e9474ad
7
+ data.tar.gz: 916d394fed1846c62edbc459c90bec3e9eae5fd05a4d79a96a2fb55305b8f48d132733bf09e7c9dbcc9b5c6257af390e2b160e0fc3250716d2d2b0c07d0c9b4d
data/.gitignore CHANGED
@@ -11,4 +11,3 @@ tmp/
11
11
  **/*.so
12
12
  **/*.gem
13
13
  **/*.log
14
- **/*.lock
@@ -0,0 +1,27 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ fastsheet (0.1.0)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ coderay (1.1.2)
10
+ method_source (0.8.2)
11
+ pry (0.10.4)
12
+ coderay (~> 1.1.0)
13
+ method_source (~> 0.8.1)
14
+ slop (~> 3.4)
15
+ rake (12.0.0)
16
+ slop (3.6.0)
17
+
18
+ PLATFORMS
19
+ ruby
20
+
21
+ DEPENDENCIES
22
+ fastsheet!
23
+ pry (~> 0.10.4)
24
+ rake (~> 12.0.0)
25
+
26
+ BUNDLED WITH
27
+ 1.15.4
data/Rakefile CHANGED
@@ -1,14 +1,28 @@
1
1
  require 'bundler/setup'
2
+ require 'logger'
3
+
4
+ @logger = Logger.new(STDOUT)
2
5
 
3
6
  desc 'Build native extension'
4
7
  task :build do
5
8
  ruby 'extconf.rb'
6
9
  end
7
10
 
11
+ desc 'Remove files listed in `.gitignore`'
12
+ task :clean do
13
+ # `split` here removes leading `/` from file name if any
14
+ File.read('.gitignore').each_line do |entry|
15
+ Dir.glob(entry.gsub(/(^\/|\n$)/, '')).each do |file_name|
16
+ @logger.info("Removing `#{file_name}`")
17
+ remove_entry(file_name)
18
+ end
19
+ end
20
+ end
21
+
8
22
  # TODO
9
23
  desc 'Run tests'
10
24
  task :test do
11
- puts "no tests"
25
+ @logger.info('No tests yet')
12
26
  end
13
27
 
14
28
  task default: [:build, :test]
@@ -0,0 +1,230 @@
1
+ [root]
2
+ name = "fastsheet"
3
+ version = "0.1.0"
4
+ dependencies = [
5
+ "calamine 0.11.8 (registry+https://github.com/rust-lang/crates.io-index)",
6
+ "libc 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
7
+ ]
8
+
9
+ [[package]]
10
+ name = "backtrace"
11
+ version = "0.3.3"
12
+ source = "registry+https://github.com/rust-lang/crates.io-index"
13
+ dependencies = [
14
+ "backtrace-sys 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)",
15
+ "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
16
+ "dbghelp-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
17
+ "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
18
+ "libc 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
19
+ "rustc-demangle 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
20
+ "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
21
+ ]
22
+
23
+ [[package]]
24
+ name = "backtrace-sys"
25
+ version = "0.1.14"
26
+ source = "registry+https://github.com/rust-lang/crates.io-index"
27
+ dependencies = [
28
+ "cc 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
29
+ "libc 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
30
+ ]
31
+
32
+ [[package]]
33
+ name = "byteorder"
34
+ version = "1.1.0"
35
+ source = "registry+https://github.com/rust-lang/crates.io-index"
36
+
37
+ [[package]]
38
+ name = "calamine"
39
+ version = "0.11.8"
40
+ source = "registry+https://github.com/rust-lang/crates.io-index"
41
+ dependencies = [
42
+ "byteorder 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
43
+ "encoding_rs 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
44
+ "error-chain 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
45
+ "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
46
+ "quick-xml 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)",
47
+ "zip 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
48
+ ]
49
+
50
+ [[package]]
51
+ name = "cc"
52
+ version = "1.0.0"
53
+ source = "registry+https://github.com/rust-lang/crates.io-index"
54
+
55
+ [[package]]
56
+ name = "cfg-if"
57
+ version = "0.1.2"
58
+ source = "registry+https://github.com/rust-lang/crates.io-index"
59
+
60
+ [[package]]
61
+ name = "dbghelp-sys"
62
+ version = "0.2.0"
63
+ source = "registry+https://github.com/rust-lang/crates.io-index"
64
+ dependencies = [
65
+ "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
66
+ "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
67
+ ]
68
+
69
+ [[package]]
70
+ name = "encoding_rs"
71
+ version = "0.6.11"
72
+ source = "registry+https://github.com/rust-lang/crates.io-index"
73
+ dependencies = [
74
+ "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
75
+ ]
76
+
77
+ [[package]]
78
+ name = "encoding_rs"
79
+ version = "0.7.1"
80
+ source = "registry+https://github.com/rust-lang/crates.io-index"
81
+ dependencies = [
82
+ "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
83
+ ]
84
+
85
+ [[package]]
86
+ name = "error-chain"
87
+ version = "0.10.0"
88
+ source = "registry+https://github.com/rust-lang/crates.io-index"
89
+ dependencies = [
90
+ "backtrace 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
91
+ ]
92
+
93
+ [[package]]
94
+ name = "flate2"
95
+ version = "0.2.20"
96
+ source = "registry+https://github.com/rust-lang/crates.io-index"
97
+ dependencies = [
98
+ "libc 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
99
+ "miniz-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
100
+ ]
101
+
102
+ [[package]]
103
+ name = "kernel32-sys"
104
+ version = "0.2.2"
105
+ source = "registry+https://github.com/rust-lang/crates.io-index"
106
+ dependencies = [
107
+ "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
108
+ "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
109
+ ]
110
+
111
+ [[package]]
112
+ name = "libc"
113
+ version = "0.2.32"
114
+ source = "registry+https://github.com/rust-lang/crates.io-index"
115
+
116
+ [[package]]
117
+ name = "log"
118
+ version = "0.3.8"
119
+ source = "registry+https://github.com/rust-lang/crates.io-index"
120
+
121
+ [[package]]
122
+ name = "memchr"
123
+ version = "1.0.1"
124
+ source = "registry+https://github.com/rust-lang/crates.io-index"
125
+ dependencies = [
126
+ "libc 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
127
+ ]
128
+
129
+ [[package]]
130
+ name = "miniz-sys"
131
+ version = "0.1.10"
132
+ source = "registry+https://github.com/rust-lang/crates.io-index"
133
+ dependencies = [
134
+ "cc 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
135
+ "libc 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
136
+ ]
137
+
138
+ [[package]]
139
+ name = "msdos_time"
140
+ version = "0.1.5"
141
+ source = "registry+https://github.com/rust-lang/crates.io-index"
142
+ dependencies = [
143
+ "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
144
+ "time 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)",
145
+ "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
146
+ ]
147
+
148
+ [[package]]
149
+ name = "podio"
150
+ version = "0.1.5"
151
+ source = "registry+https://github.com/rust-lang/crates.io-index"
152
+
153
+ [[package]]
154
+ name = "quick-xml"
155
+ version = "0.9.4"
156
+ source = "registry+https://github.com/rust-lang/crates.io-index"
157
+ dependencies = [
158
+ "encoding_rs 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
159
+ "error-chain 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
160
+ "memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
161
+ ]
162
+
163
+ [[package]]
164
+ name = "redox_syscall"
165
+ version = "0.1.31"
166
+ source = "registry+https://github.com/rust-lang/crates.io-index"
167
+
168
+ [[package]]
169
+ name = "rustc-demangle"
170
+ version = "0.1.5"
171
+ source = "registry+https://github.com/rust-lang/crates.io-index"
172
+
173
+ [[package]]
174
+ name = "time"
175
+ version = "0.1.38"
176
+ source = "registry+https://github.com/rust-lang/crates.io-index"
177
+ dependencies = [
178
+ "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
179
+ "libc 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
180
+ "redox_syscall 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)",
181
+ "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
182
+ ]
183
+
184
+ [[package]]
185
+ name = "winapi"
186
+ version = "0.2.8"
187
+ source = "registry+https://github.com/rust-lang/crates.io-index"
188
+
189
+ [[package]]
190
+ name = "winapi-build"
191
+ version = "0.1.1"
192
+ source = "registry+https://github.com/rust-lang/crates.io-index"
193
+
194
+ [[package]]
195
+ name = "zip"
196
+ version = "0.2.6"
197
+ source = "registry+https://github.com/rust-lang/crates.io-index"
198
+ dependencies = [
199
+ "flate2 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
200
+ "msdos_time 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
201
+ "podio 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
202
+ "time 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)",
203
+ ]
204
+
205
+ [metadata]
206
+ "checksum backtrace 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "99f2ce94e22b8e664d95c57fff45b98a966c2252b60691d0b7aeeccd88d70983"
207
+ "checksum backtrace-sys 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "c63ea141ef8fdb10409d0f5daf30ac51f84ef43bff66f16627773d2a292cd189"
208
+ "checksum byteorder 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff81738b726f5d099632ceaffe7fb65b90212e8dce59d518729e7e8634032d3d"
209
+ "checksum calamine 0.11.8 (registry+https://github.com/rust-lang/crates.io-index)" = "73461e3e2d9ad1ed03e2f8163beade40ae1ac1e9be7fe14c437c57db45d7df2f"
210
+ "checksum cc 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7db2f146208d7e0fbee761b09cd65a7f51ccc38705d4e7262dad4d73b12a76b1"
211
+ "checksum cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de"
212
+ "checksum dbghelp-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "97590ba53bcb8ac28279161ca943a924d1fd4a8fb3fa63302591647c4fc5b850"
213
+ "checksum encoding_rs 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)" = "e00a1b1e95eb46988805ceee6f34cd95c46a6753e290cb3ff0486931989d4a4c"
214
+ "checksum encoding_rs 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f5215aabf22b83153be3ee44dfe3f940214541b2ce13d419c55e7a115c8c51a9"
215
+ "checksum error-chain 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d9435d864e017c3c6afeac1654189b06cdb491cf2ff73dbf0d73b0f292f42ff8"
216
+ "checksum flate2 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)" = "e6234dd4468ae5d1e2dbb06fe2b058696fdc50a339c68a393aefbf00bc81e423"
217
+ "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d"
218
+ "checksum libc 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)" = "56cce3130fd040c28df6f495c8492e5ec5808fb4c9093c310df02b0c8f030148"
219
+ "checksum log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "880f77541efa6e5cc74e76910c9884d9859683118839d6a1dc3b11e63512565b"
220
+ "checksum memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1dbccc0e46f1ea47b9f17e6d67c5a96bd27030519c519c9c91327e31275a47b4"
221
+ "checksum miniz-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "609ce024854aeb19a0ef7567d348aaa5a746b32fb72e336df7fcc16869d7e2b4"
222
+ "checksum msdos_time 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "65ba9d75bcea84e07812618fedf284a64776c2f2ea0cad6bca7f69739695a958"
223
+ "checksum podio 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e5422a1ee1bc57cc47ae717b0137314258138f38fd5f3cea083f43a9725383a0"
224
+ "checksum quick-xml 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)" = "19a3a610544419c527d5f51ae1a6ae3db533e25c117d3eed8fce6434f70c5e95"
225
+ "checksum redox_syscall 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)" = "8dde11f18c108289bef24469638a04dce49da56084f2d50618b226e47eb04509"
226
+ "checksum rustc-demangle 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "aee45432acc62f7b9a108cc054142dac51f979e69e71ddce7d6fc7adf29e817e"
227
+ "checksum time 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)" = "d5d788d3aa77bc0ef3e9621256885555368b47bd495c13dd2e7413c89f845520"
228
+ "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"
229
+ "checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc"
230
+ "checksum zip 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "21c4067ff2f91926cb9aef8a8a55f8568b0f2631bb6b827d0fb9770ff5894e43"
data/extconf.rb CHANGED
@@ -7,11 +7,6 @@ abort unless have_header 'ruby.h'
7
7
  abort unless find_executable 'rustc'
8
8
  abort unless cargo = find_executable(ENV.fetch('CARGO', 'cargo'))
9
9
 
10
- target_file = 'libfastsheet.so'
11
-
12
- target = File.join(__dir__, 'ext/fastsheet/target/release', target_file)
13
- lib_dest = File.join(__dir__, 'lib/fastsheet', target_file)
14
-
15
10
  # HACK: rubygems requires Makefile with tasks above
16
11
  File.write 'Makefile', <<EOF
17
12
  all:
@@ -23,6 +18,5 @@ $makefile_created = true
23
18
  Dir.chdir 'ext/fastsheet' do
24
19
  when_writing 'Building fastsheet...' do
25
20
  sh cargo, 'build', '--release'
26
- cp target, lib_dest
27
21
  end
28
22
  end
@@ -1,2 +1,21 @@
1
- require 'fastsheet/libfastsheet'
1
+ require 'fiddle'
2
+
3
+ case RUBY_PLATFORM
4
+
5
+ # Windows
6
+ when /win32/ then 'dll'
7
+
8
+ # OS X
9
+ when /darwin/ then 'dylib'
10
+
11
+ # Linux, BSD
12
+ else 'so'
13
+ end.tap do |lib_ext|
14
+ # Load library.
15
+ lib = Fiddle.dlopen(File.expand_path("../../ext/fastsheet/target/release/libfastsheet.#{lib_ext}", __FILE__))
16
+
17
+ # Invoke library entry point.
18
+ Fiddle::Function.new(lib['Init_libfastsheet'], [], Fiddle::TYPE_VOIDP).call
19
+ end
20
+
2
21
  require 'fastsheet/sheet'
@@ -1,3 +1,3 @@
1
1
  module Fastsheet
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastsheet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitry Koval
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-22 00:00:00.000000000 Z
11
+ date: 2017-10-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -48,10 +48,12 @@ extra_rdoc_files: []
48
48
  files:
49
49
  - ".gitignore"
50
50
  - Gemfile
51
+ - Gemfile.lock
51
52
  - LICENSE.txt
52
53
  - README.md
53
54
  - Rakefile
54
55
  - bin/.keep
56
+ - ext/fastsheet/Cargo.lock
55
57
  - ext/fastsheet/Cargo.toml
56
58
  - ext/fastsheet/build.rs
57
59
  - ext/fastsheet/src/lib.rs
@@ -80,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
80
82
  version: '0'
81
83
  requirements: []
82
84
  rubyforge_project:
83
- rubygems_version: 2.6.11
85
+ rubygems_version: 2.6.13
84
86
  signing_key:
85
87
  specification_version: 4
86
88
  summary: Fast XLSX reader