data_miner 2.4.0 → 2.4.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,10 @@
1
+ 2.4.1 / 2012-07-26
2
+
3
+ * Enhancements
4
+
5
+ * Support sqlite in sql steps
6
+ * More accurately detect if a table has been created during a run
7
+
1
8
  2.4.0 / 2012-07-26
2
9
 
3
10
  * Breaking changes
data/README.markdown CHANGED
@@ -119,6 +119,8 @@ And many more - look for the `data_miner.rb` file that corresponds to each model
119
119
  ## Wishlist
120
120
 
121
121
  * Make the tests real unit tests
122
+ * sql steps shouldn't shell out if binaries are missing
123
+ * csv import step that uses pg_restore, mysqlimport, etc.
122
124
 
123
125
  ## Copyright
124
126
 
@@ -100,6 +100,10 @@ class DataMiner
100
100
  fail!
101
101
  raise $!
102
102
  ensure
103
+ if model.connection.respond_to?(:schema_cache)
104
+ model.connection.schema_cache.clear!
105
+ end
106
+ model.reset_column_information
103
107
  if model.table_exists?
104
108
  self.row_count_after = model.count
105
109
  if DataMiner.per_column_statistics?
@@ -112,6 +112,21 @@ class DataMiner
112
112
  end
113
113
  nil
114
114
  end
115
+
116
+ def sqlite3(path)
117
+ argv = [
118
+ 'sqlite3',
119
+ config[:database]
120
+ ]
121
+ File.open(path) do |f|
122
+ pid = POSIX::Spawn.spawn(*(argv+[{:in => f}]))
123
+ ::Process.waitpid pid
124
+ end
125
+ unless $?.success?
126
+ raise RuntimeError, %{[data_miner] Failed: "cat #{path} | #{argv.join(' ')}"}
127
+ end
128
+ nil
129
+ end
115
130
  end
116
131
  end
117
132
  end
@@ -1,3 +1,3 @@
1
1
  class DataMiner
2
- VERSION = '2.4.0'
2
+ VERSION = '2.4.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: data_miner
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.0
4
+ version: 2.4.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2012-07-26 00:00:00.000000000 Z
14
+ date: 2012-07-27 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: aasm