taps 0.3.14 → 0.3.15
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION.yml +3 -3
- data/lib/taps/cli.rb +1 -1
- data/lib/taps/config.rb +1 -15
- data/lib/taps/data_stream.rb +1 -1
- data/lib/taps/multipart.rb +1 -1
- data/lib/taps/schema.rb +1 -2
- data/lib/taps/version.rb +18 -0
- data/spec/server_spec.rb +1 -1
- metadata +120 -48
- data/LICENSE +0 -20
- data/Rakefile +0 -72
- data/TODO +0 -1
data/VERSION.yml
CHANGED
data/lib/taps/cli.rb
CHANGED
data/lib/taps/config.rb
CHANGED
@@ -1,24 +1,10 @@
|
|
1
1
|
require 'sequel'
|
2
2
|
require 'sqlite3'
|
3
|
-
require '
|
3
|
+
require 'taps/version'
|
4
4
|
|
5
5
|
Sequel.datetime_class = DateTime
|
6
6
|
|
7
7
|
module Taps
|
8
|
-
def self.version_yml
|
9
|
-
@@version_yml ||= YAML.load(File.read(File.dirname(__FILE__) + '/../../VERSION.yml'))
|
10
|
-
end
|
11
|
-
|
12
|
-
def self.version
|
13
|
-
version = "#{version_yml[:major]}.#{version_yml[:minor]}.#{version_yml[:patch]}"
|
14
|
-
version += ".#{version_yml[:build]}" if version_yml[:build]
|
15
|
-
version
|
16
|
-
end
|
17
|
-
|
18
|
-
def self.compatible_version
|
19
|
-
"#{version_yml[:major]}.#{version_yml[:minor]}"
|
20
|
-
end
|
21
|
-
|
22
8
|
def self.exiting=(val)
|
23
9
|
@@exiting = val
|
24
10
|
end
|
data/lib/taps/data_stream.rb
CHANGED
data/lib/taps/multipart.rb
CHANGED
data/lib/taps/schema.rb
CHANGED
data/lib/taps/version.rb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
require "yaml"
|
2
|
+
|
3
|
+
module Taps
|
4
|
+
def self.version_yml
|
5
|
+
@@version_yml ||= YAML.load(File.read(File.dirname(__FILE__) + '/../../VERSION.yml'))
|
6
|
+
end
|
7
|
+
|
8
|
+
def self.version
|
9
|
+
version = "#{version_yml[:major]}.#{version_yml[:minor]}.#{version_yml[:patch]}"
|
10
|
+
version += ".#{version_yml[:build]}" if version_yml[:build]
|
11
|
+
version
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.compatible_version
|
15
|
+
"#{version_yml[:major]}.#{version_yml[:minor]}"
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
data/spec/server_spec.rb
CHANGED
@@ -23,7 +23,7 @@ describe Taps::Server do
|
|
23
23
|
end
|
24
24
|
|
25
25
|
it "verifies the client taps version" do
|
26
|
-
get('/', { }, { 'HTTP_AUTHORIZATION' => @auth_header, 'HTTP_TAPS_VERSION' => Taps.compatible_version })
|
26
|
+
get('/', { }, { 'HTTP_AUTHORIZATION' => @auth_header, 'HTTP_TAPS_VERSION' => Taps.compatible_version + ".14" })
|
27
27
|
last_response.status.should == 200
|
28
28
|
end
|
29
29
|
|
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: taps
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 13
|
5
|
+
prerelease:
|
5
6
|
segments:
|
6
7
|
- 0
|
7
8
|
- 3
|
8
|
-
-
|
9
|
-
version: 0.3.
|
9
|
+
- 15
|
10
|
+
version: 0.3.15
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Ricardo Chimal, Jr.
|
@@ -14,51 +15,50 @@ autorequire:
|
|
14
15
|
bindir: bin
|
15
16
|
cert_chain: []
|
16
17
|
|
17
|
-
date:
|
18
|
+
date: 2011-01-11 00:00:00 -05:00
|
18
19
|
default_executable:
|
19
20
|
dependencies:
|
20
21
|
- !ruby/object:Gem::Dependency
|
21
|
-
name:
|
22
|
+
name: json
|
22
23
|
prerelease: false
|
23
24
|
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
24
26
|
requirements:
|
25
|
-
- -
|
26
|
-
- !ruby/object:Gem::Version
|
27
|
-
segments:
|
28
|
-
- 1
|
29
|
-
- 2
|
30
|
-
- 0
|
31
|
-
version: 1.2.0
|
32
|
-
- - <
|
27
|
+
- - ~>
|
33
28
|
- !ruby/object:Gem::Version
|
29
|
+
hash: 11
|
34
30
|
segments:
|
35
31
|
- 1
|
36
|
-
-
|
37
|
-
-
|
38
|
-
version: 1.
|
32
|
+
- 4
|
33
|
+
- 6
|
34
|
+
version: 1.4.6
|
39
35
|
type: :runtime
|
40
36
|
version_requirements: *id001
|
41
37
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
38
|
+
name: rack
|
43
39
|
prerelease: false
|
44
40
|
requirement: &id002 !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
45
42
|
requirements:
|
46
|
-
- -
|
43
|
+
- - ">="
|
47
44
|
- !ruby/object:Gem::Version
|
45
|
+
hash: 21
|
48
46
|
segments:
|
49
47
|
- 1
|
50
48
|
- 0
|
51
|
-
-
|
52
|
-
version: 1.0.
|
49
|
+
- 1
|
50
|
+
version: 1.0.1
|
53
51
|
type: :runtime
|
54
52
|
version_requirements: *id002
|
55
53
|
- !ruby/object:Gem::Dependency
|
56
54
|
name: rest-client
|
57
55
|
prerelease: false
|
58
56
|
requirement: &id003 !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
59
58
|
requirements:
|
60
59
|
- - ">="
|
61
60
|
- !ruby/object:Gem::Version
|
61
|
+
hash: 7
|
62
62
|
segments:
|
63
63
|
- 1
|
64
64
|
- 4
|
@@ -66,6 +66,7 @@ dependencies:
|
|
66
66
|
version: 1.4.0
|
67
67
|
- - <
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
+
hash: 11
|
69
70
|
segments:
|
70
71
|
- 1
|
71
72
|
- 7
|
@@ -77,9 +78,11 @@ dependencies:
|
|
77
78
|
name: sequel
|
78
79
|
prerelease: false
|
79
80
|
requirement: &id004 !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
80
82
|
requirements:
|
81
83
|
- - ~>
|
82
84
|
- !ruby/object:Gem::Version
|
85
|
+
hash: 67
|
83
86
|
segments:
|
84
87
|
- 3
|
85
88
|
- 17
|
@@ -88,32 +91,106 @@ dependencies:
|
|
88
91
|
type: :runtime
|
89
92
|
version_requirements: *id004
|
90
93
|
- !ruby/object:Gem::Dependency
|
91
|
-
name:
|
94
|
+
name: sinatra
|
92
95
|
prerelease: false
|
93
96
|
requirement: &id005 !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
94
98
|
requirements:
|
95
99
|
- - ~>
|
96
100
|
- !ruby/object:Gem::Version
|
101
|
+
hash: 23
|
97
102
|
segments:
|
98
103
|
- 1
|
99
|
-
-
|
100
|
-
|
104
|
+
- 0
|
105
|
+
- 0
|
106
|
+
version: 1.0.0
|
101
107
|
type: :runtime
|
102
108
|
version_requirements: *id005
|
103
109
|
- !ruby/object:Gem::Dependency
|
104
|
-
name:
|
110
|
+
name: sqlite3-ruby
|
105
111
|
prerelease: false
|
106
112
|
requirement: &id006 !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
107
114
|
requirements:
|
108
|
-
- -
|
115
|
+
- - ~>
|
109
116
|
- !ruby/object:Gem::Version
|
117
|
+
hash: 11
|
110
118
|
segments:
|
111
119
|
- 1
|
112
|
-
-
|
113
|
-
|
114
|
-
version: 1.0.1
|
120
|
+
- 2
|
121
|
+
version: "1.2"
|
115
122
|
type: :runtime
|
116
123
|
version_requirements: *id006
|
124
|
+
- !ruby/object:Gem::Dependency
|
125
|
+
name: bacon
|
126
|
+
prerelease: false
|
127
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
128
|
+
none: false
|
129
|
+
requirements:
|
130
|
+
- - ">="
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
hash: 3
|
133
|
+
segments:
|
134
|
+
- 0
|
135
|
+
version: "0"
|
136
|
+
type: :development
|
137
|
+
version_requirements: *id007
|
138
|
+
- !ruby/object:Gem::Dependency
|
139
|
+
name: mocha
|
140
|
+
prerelease: false
|
141
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
142
|
+
none: false
|
143
|
+
requirements:
|
144
|
+
- - ">="
|
145
|
+
- !ruby/object:Gem::Version
|
146
|
+
hash: 3
|
147
|
+
segments:
|
148
|
+
- 0
|
149
|
+
version: "0"
|
150
|
+
type: :development
|
151
|
+
version_requirements: *id008
|
152
|
+
- !ruby/object:Gem::Dependency
|
153
|
+
name: rack-test
|
154
|
+
prerelease: false
|
155
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
156
|
+
none: false
|
157
|
+
requirements:
|
158
|
+
- - ">="
|
159
|
+
- !ruby/object:Gem::Version
|
160
|
+
hash: 3
|
161
|
+
segments:
|
162
|
+
- 0
|
163
|
+
version: "0"
|
164
|
+
type: :development
|
165
|
+
version_requirements: *id009
|
166
|
+
- !ruby/object:Gem::Dependency
|
167
|
+
name: rake
|
168
|
+
prerelease: false
|
169
|
+
requirement: &id010 !ruby/object:Gem::Requirement
|
170
|
+
none: false
|
171
|
+
requirements:
|
172
|
+
- - ">="
|
173
|
+
- !ruby/object:Gem::Version
|
174
|
+
hash: 3
|
175
|
+
segments:
|
176
|
+
- 0
|
177
|
+
version: "0"
|
178
|
+
type: :development
|
179
|
+
version_requirements: *id010
|
180
|
+
- !ruby/object:Gem::Dependency
|
181
|
+
name: rcov
|
182
|
+
prerelease: false
|
183
|
+
requirement: &id011 !ruby/object:Gem::Requirement
|
184
|
+
none: false
|
185
|
+
requirements:
|
186
|
+
- - ">="
|
187
|
+
- !ruby/object:Gem::Version
|
188
|
+
hash: 3
|
189
|
+
segments:
|
190
|
+
- 0
|
191
|
+
version: "0"
|
192
|
+
type: :development
|
193
|
+
version_requirements: *id011
|
117
194
|
description: A simple database agnostic import/export app to transfer data to/from a remote database.
|
118
195
|
email: ricardo@heroku.com
|
119
196
|
executables:
|
@@ -121,15 +198,9 @@ executables:
|
|
121
198
|
- schema
|
122
199
|
extensions: []
|
123
200
|
|
124
|
-
extra_rdoc_files:
|
125
|
-
|
126
|
-
- README.rdoc
|
127
|
-
- TODO
|
201
|
+
extra_rdoc_files: []
|
202
|
+
|
128
203
|
files:
|
129
|
-
- LICENSE
|
130
|
-
- README.rdoc
|
131
|
-
- Rakefile
|
132
|
-
- VERSION.yml
|
133
204
|
- bin/schema
|
134
205
|
- bin/schema.cmd
|
135
206
|
- bin/taps
|
@@ -146,47 +217,48 @@ files:
|
|
146
217
|
- lib/taps/schema.rb
|
147
218
|
- lib/taps/server.rb
|
148
219
|
- lib/taps/utils.rb
|
220
|
+
- lib/taps/version.rb
|
221
|
+
- README.rdoc
|
149
222
|
- spec/base.rb
|
150
223
|
- spec/cli_spec.rb
|
151
224
|
- spec/data_stream_spec.rb
|
152
225
|
- spec/operation_spec.rb
|
153
226
|
- spec/server_spec.rb
|
154
227
|
- spec/utils_spec.rb
|
155
|
-
-
|
228
|
+
- VERSION.yml
|
156
229
|
has_rdoc: true
|
157
230
|
homepage: http://github.com/ricardochimal/taps
|
158
231
|
licenses: []
|
159
232
|
|
160
233
|
post_install_message:
|
161
|
-
rdoc_options:
|
162
|
-
|
234
|
+
rdoc_options: []
|
235
|
+
|
163
236
|
require_paths:
|
164
237
|
- lib
|
165
238
|
required_ruby_version: !ruby/object:Gem::Requirement
|
239
|
+
none: false
|
166
240
|
requirements:
|
167
241
|
- - ">="
|
168
242
|
- !ruby/object:Gem::Version
|
243
|
+
hash: 3
|
169
244
|
segments:
|
170
245
|
- 0
|
171
246
|
version: "0"
|
172
247
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
248
|
+
none: false
|
173
249
|
requirements:
|
174
250
|
- - ">="
|
175
251
|
- !ruby/object:Gem::Version
|
252
|
+
hash: 3
|
176
253
|
segments:
|
177
254
|
- 0
|
178
255
|
version: "0"
|
179
256
|
requirements: []
|
180
257
|
|
181
|
-
rubyforge_project:
|
182
|
-
rubygems_version: 1.
|
258
|
+
rubyforge_project:
|
259
|
+
rubygems_version: 1.4.2
|
183
260
|
signing_key:
|
184
261
|
specification_version: 3
|
185
262
|
summary: simple database import/export app
|
186
|
-
test_files:
|
187
|
-
|
188
|
-
- spec/cli_spec.rb
|
189
|
-
- spec/data_stream_spec.rb
|
190
|
-
- spec/operation_spec.rb
|
191
|
-
- spec/server_spec.rb
|
192
|
-
- spec/utils_spec.rb
|
263
|
+
test_files: []
|
264
|
+
|
data/LICENSE
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
Copyright (c) 2008 Ricardo Chimal, Jr
|
2
|
-
|
3
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
-
a copy of this software and associated documentation files (the
|
5
|
-
"Software"), to deal in the Software without restriction, including
|
6
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
-
permit persons to whom the Software is furnished to do so, subject to
|
9
|
-
the following conditions:
|
10
|
-
|
11
|
-
The above copyright notice and this permission notice shall be
|
12
|
-
included in all copies or substantial portions of the Software.
|
13
|
-
|
14
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
DELETED
@@ -1,72 +0,0 @@
|
|
1
|
-
begin
|
2
|
-
require 'jeweler'
|
3
|
-
Jeweler::Tasks.new do |s|
|
4
|
-
s.name = "taps"
|
5
|
-
s.summary = %Q{simple database import/export app}
|
6
|
-
s.email = "ricardo@heroku.com"
|
7
|
-
s.homepage = "http://github.com/ricardochimal/taps"
|
8
|
-
s.description = "A simple database agnostic import/export app to transfer data to/from a remote database."
|
9
|
-
s.authors = ["Ricardo Chimal, Jr."]
|
10
|
-
|
11
|
-
s.rubygems_version = %q{1.3.5}
|
12
|
-
|
13
|
-
s.add_dependency 'json_pure', '>= 1.2.0', '< 1.5.0'
|
14
|
-
s.add_dependency 'sinatra', '~> 1.0.0'
|
15
|
-
s.add_dependency 'rest-client', '>= 1.4.0', '< 1.7.0'
|
16
|
-
s.add_dependency 'sequel', '~> 3.17.0'
|
17
|
-
s.add_dependency 'sqlite3-ruby', '~> 1.2'
|
18
|
-
s.add_dependency 'rack', '>= 1.0.1'
|
19
|
-
|
20
|
-
s.rubyforge_project = "taps"
|
21
|
-
|
22
|
-
s.files = FileList['spec/*.rb'] + FileList['lib/**/*.rb'] + ['README.rdoc', 'LICENSE', 'VERSION.yml', 'Rakefile'] + FileList['bin/*']
|
23
|
-
s.executables = ['taps', 'schema']
|
24
|
-
end
|
25
|
-
rescue LoadError => e
|
26
|
-
if e.message =~ /jeweler/
|
27
|
-
puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
|
28
|
-
else
|
29
|
-
puts e.message + ' -- while loading jeweler.'
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
begin
|
34
|
-
require 'rake/rdoctask'
|
35
|
-
Rake::RDocTask.new do |rdoc|
|
36
|
-
rdoc.rdoc_dir = 'rdoc'
|
37
|
-
rdoc.title = 'taps'
|
38
|
-
rdoc.options << '--line-numbers' << '--inline-source'
|
39
|
-
rdoc.rdoc_files.include('README*')
|
40
|
-
rdoc.rdoc_files.include('lib/**/*.rb')
|
41
|
-
end
|
42
|
-
rescue LoadError
|
43
|
-
puts "Rdoc is not available"
|
44
|
-
end
|
45
|
-
|
46
|
-
begin
|
47
|
-
require 'rcov/rcovtask'
|
48
|
-
Rcov::RcovTask.new do |t|
|
49
|
-
t.libs << 'spec'
|
50
|
-
t.test_files = FileList['spec/*_spec.rb']
|
51
|
-
t.verbose = true
|
52
|
-
end
|
53
|
-
rescue LoadError
|
54
|
-
puts "RCov is not available. In order to run rcov, you must: sudo gem install rcov"
|
55
|
-
end
|
56
|
-
|
57
|
-
desc "Run all specs; requires the bacon gem"
|
58
|
-
task :spec do
|
59
|
-
if `which bacon`.empty?
|
60
|
-
puts "bacon is not available. In order to run the specs, you must: sudo gem install bacon."
|
61
|
-
else
|
62
|
-
system "bacon #{File.dirname(__FILE__)}/spec/*_spec.rb"
|
63
|
-
end
|
64
|
-
end
|
65
|
-
|
66
|
-
desc "copy/paste env vars for dev testing"
|
67
|
-
task :env do
|
68
|
-
puts "export RUBYLIB='#{File.dirname(__FILE__) + '/lib'}'"
|
69
|
-
puts "export RUBYOPT='-rrubygems'"
|
70
|
-
end
|
71
|
-
|
72
|
-
task :default => :spec
|