mdb 0.4.1 → 0.5.0

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
- SHA1:
3
- metadata.gz: 429fc8228ec1c7f6312f861a89ed373f6a4943c3
4
- data.tar.gz: 2466d91e0b35d520c221960ffe2c1de3167cbcdc
2
+ SHA256:
3
+ metadata.gz: fdd6834b543dd5e1397818e9c532ab083034a1d15e0d8b1203359efbd615ca16
4
+ data.tar.gz: a7adfc129d17d6350e920a9e253ce3374c3806d943a0da3253cc76ad32432618
5
5
  SHA512:
6
- metadata.gz: 5409924c5e720f29d9eacc7e5fab31cf91b4d0b728ed01a022267217bdaa19f562decdf7b04ec41703049cfa15ca2daeb641736656a34dc1afe76b6ac1d8ef57
7
- data.tar.gz: 949c088fef84c50dd2c6c51e5aca38c3b715baedb1d4a4a78626b55d259c0b51991b4e899a0ecb87f0911a7f080ed301fc52717c798eb1589572372924609d31
6
+ metadata.gz: c467566e7ecff206ae4c1d26b894c5661355f6f47926bab1c7463d49430f786b0db80fd2fa86c23f0dde81ccf35af66f5fe7ba73c822cc30be71c7a2893c3783
7
+ data.tar.gz: e0d160c33ed133e5a086a022c57a14a128b0ea82c3c4fbc790a23960c7488abfbf319beb2b42f24ec0e8eed9dfe6b9edc40aadc84af0733b9626d6a000ddb077
@@ -0,0 +1,18 @@
1
+ name: Tests
2
+ on: [push]
3
+
4
+ jobs:
5
+ ruby:
6
+ name: Ruby Tests
7
+ runs-on: ubuntu-latest
8
+ steps:
9
+ - name: Checkout
10
+ uses: actions/checkout@v2
11
+ - name: Setup Ruby
12
+ uses: ruby/setup-ruby@v1
13
+ with:
14
+ bundler-cache: true
15
+ - name: Install mdbtools
16
+ run: sudo apt-get -yqq install mdbtools
17
+ - name: Run tests
18
+ run: bundle exec rake test
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.3.1
1
+ 2.6.6
data/CHANGELOG.md ADDED
@@ -0,0 +1,46 @@
1
+ # Change Log
2
+
3
+ ## Unreleased
4
+
5
+ - None
6
+
7
+ ## 0.5.0 (2021-10-19)
8
+
9
+ - Fixed compatibility with newer versions of mdbtools which require specifying date and time formats separately
10
+
11
+ ## 0.4.1 (2017-03-23)
12
+
13
+ - Filled in homepage in mdb.gemspec
14
+
15
+ ## 0.4.0 (2017-03-21)
16
+
17
+ - Raised `Mdb::MdbToolsNotInstalledError` when shelling out to `mdb-export` or `mdb-tables` exits with 127 rather than shelling out to check `which mdb-export`
18
+ - Raised `Mdb::Error` when shelling out to `mdb-export` or `mdb-tables` exits nonzero
19
+
20
+ ## 0.3.2 (2016-04-05)
21
+
22
+ No docs yet. Contributions welcome!
23
+
24
+ ## 0.3.1 (2014-02-06)
25
+
26
+ No docs yet. Contributions welcome!
27
+
28
+ ## 0.3.0 (2013-11-20)
29
+
30
+ No docs yet. Contributions welcome!
31
+
32
+ ## 0.0.3.rc2 (2013-10-30)
33
+
34
+ No docs yet. Contributions welcome!
35
+
36
+ ## 0.0.3.rc1 (2013-10-25)
37
+
38
+ No docs yet. Contributions welcome!
39
+
40
+ ## 0.0.2 (2013-05-08)
41
+
42
+ No docs yet. Contributions welcome!
43
+
44
+ ## 0.0.1 (2013-05-07)
45
+
46
+ No docs yet. Contributions welcome!
data/lib/mdb/database.rb CHANGED
@@ -39,7 +39,9 @@ module Mdb
39
39
  def read_csv(table, &block)
40
40
  table = table.to_s
41
41
  raise TableDoesNotExistError, "#{table.inspect} does not exist in #{file_name.inspect}" unless tables.member?(table)
42
- execute "mdb-export -D '%F %T' -d #{Shellwords.escape(delimiter)} #{file_name} #{Shellwords.escape(table)}", &block
42
+ date_flags = "-D '%F %T'"
43
+ date_flags << " -T '%F %T'" if supports_datetime?
44
+ execute "mdb-export #{date_flags} -d #{Shellwords.escape(delimiter)} #{file_name} #{Shellwords.escape(table)}", &block
43
45
  end
44
46
 
45
47
 
@@ -118,5 +120,14 @@ module Mdb
118
120
 
119
121
 
120
122
 
123
+ def supports_datetime?
124
+ return @supports_datetime if instance_variable_defined?(:@supports_datetime)
125
+
126
+ version = Gem::Version.new(`mdb-ver -M`.gsub(/mdbtools v/, ""))
127
+ @supports_datetime = version >= Gem::Version.new("0.9.0")
128
+ end
129
+
130
+
131
+
121
132
  end
122
133
  end
data/lib/mdb/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Mdb
2
- VERSION = "0.4.1"
2
+ VERSION = "0.5.0"
3
3
  end
data/mdb.gemspec CHANGED
@@ -19,10 +19,11 @@ Gem::Specification.new do |spec|
19
19
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
20
20
  spec.require_paths = ["lib"]
21
21
 
22
- spec.add_development_dependency "bundler", "~> 1.3"
22
+ spec.add_development_dependency "bundler"
23
23
  spec.add_development_dependency "rake"
24
- spec.add_development_dependency "rails", ">= 3.2.0", "< 4.1.0"
24
+ spec.add_development_dependency "rails", "< 7.0"
25
25
  spec.add_development_dependency "shoulda-context"
26
- spec.add_development_dependency "turn"
27
26
  spec.add_development_dependency "pry"
27
+ spec.add_development_dependency "minitest-reporters"
28
+ spec.add_development_dependency "minitest-reporters-turn_reporter"
28
29
  end
data/test/test_helper.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  require "rails"
2
2
  require "rails/test_help"
3
+ require "minitest/reporters/turn_reporter"
3
4
  require "shoulda/context"
4
- require "turn"
5
5
  require "pry"
6
6
  require "mdb"
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mdb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Lail
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-23 00:00:00.000000000 Z
11
+ date: 2021-10-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '1.3'
19
+ version: '0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '1.3'
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -42,22 +42,16 @@ dependencies:
42
42
  name: rails
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: 3.2.0
48
45
  - - "<"
49
46
  - !ruby/object:Gem::Version
50
- version: 4.1.0
47
+ version: '7.0'
51
48
  type: :development
52
49
  prerelease: false
53
50
  version_requirements: !ruby/object:Gem::Requirement
54
51
  requirements:
55
- - - ">="
56
- - !ruby/object:Gem::Version
57
- version: 3.2.0
58
52
  - - "<"
59
53
  - !ruby/object:Gem::Version
60
- version: 4.1.0
54
+ version: '7.0'
61
55
  - !ruby/object:Gem::Dependency
62
56
  name: shoulda-context
63
57
  requirement: !ruby/object:Gem::Requirement
@@ -73,7 +67,7 @@ dependencies:
73
67
  - !ruby/object:Gem::Version
74
68
  version: '0'
75
69
  - !ruby/object:Gem::Dependency
76
- name: turn
70
+ name: pry
77
71
  requirement: !ruby/object:Gem::Requirement
78
72
  requirements:
79
73
  - - ">="
@@ -87,7 +81,21 @@ dependencies:
87
81
  - !ruby/object:Gem::Version
88
82
  version: '0'
89
83
  - !ruby/object:Gem::Dependency
90
- name: pry
84
+ name: minitest-reporters
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: minitest-reporters-turn_reporter
91
99
  requirement: !ruby/object:Gem::Requirement
92
100
  requirements:
93
101
  - - ">="
@@ -107,9 +115,10 @@ executables: []
107
115
  extensions: []
108
116
  extra_rdoc_files: []
109
117
  files:
118
+ - ".github/workflows/ci.yml"
110
119
  - ".gitignore"
111
120
  - ".ruby-version"
112
- - ".travis.yml"
121
+ - CHANGELOG.md
113
122
  - Gemfile
114
123
  - LICENSE.txt
115
124
  - README.md
@@ -127,7 +136,7 @@ homepage: https://github.com/cph/mdb
127
136
  licenses:
128
137
  - MIT
129
138
  metadata: {}
130
- post_install_message:
139
+ post_install_message:
131
140
  rdoc_options: []
132
141
  require_paths:
133
142
  - lib
@@ -142,9 +151,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
142
151
  - !ruby/object:Gem::Version
143
152
  version: '0'
144
153
  requirements: []
145
- rubyforge_project:
146
- rubygems_version: 2.5.1
147
- signing_key:
154
+ rubygems_version: 3.0.3
155
+ signing_key:
148
156
  specification_version: 4
149
157
  summary: Wraps mdb-tools for reading and Microsoft Access databases (MDB)
150
158
  test_files:
data/.travis.yml DELETED
@@ -1,8 +0,0 @@
1
- # .travis.yml
2
- language: ruby
3
- rvm:
4
- - 2.0.0
5
- script:
6
- - bundle exec rake test
7
- before_install:
8
- - sudo apt-get install mdbtools