davidtrogers-steamer 0.1.2 → 0.1.2.1243972942
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.
- data/.gitignore +2 -0
- data/Rakefile +3 -1
- data/VERSION +1 -1
- data/lib/steamer.rb +22 -10
- data/steamer.gemspec +1 -3
- metadata +1 -1
data/.gitignore
CHANGED
data/Rakefile
CHANGED
|
@@ -10,11 +10,13 @@ begin
|
|
|
10
10
|
gem.email = "david.t.rogers@gmail.com"
|
|
11
11
|
gem.homepage = "http://github.com/davidtrogers/steamer"
|
|
12
12
|
gem.authors = ["Dave Rogers"]
|
|
13
|
-
|
|
13
|
+
# gem.version = "#{version}.#{Time.now.to_i}"
|
|
14
14
|
gem.rdoc_options = ["--inline-source", "--charset=UTF-8"]
|
|
15
15
|
gem.require_paths = ["lib"]
|
|
16
16
|
gem.rubygems_version = %q{1.3.3}
|
|
17
17
|
gem.add_dependency "activerecord"
|
|
18
|
+
gem.version = final_version
|
|
19
|
+
# puts "version: #{version}.#{Time.now.to_i}"
|
|
18
20
|
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
|
19
21
|
# if s.respond_to? :specification_version then
|
|
20
22
|
# current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.1.2
|
|
1
|
+
0.1.2.1243972524
|
data/lib/steamer.rb
CHANGED
|
@@ -1,17 +1,29 @@
|
|
|
1
1
|
require 'activerecord'
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
require 'sqlite3'
|
|
3
|
+
|
|
4
|
+
class Steamer
|
|
5
|
+
|
|
6
|
+
attr_accessor :source_db_connection
|
|
7
|
+
|
|
8
|
+
def initialize
|
|
9
|
+
connect
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def connect # assuming sqlite3 db at the moment
|
|
13
|
+
@source_db_name = Dir[File.join("./*/development.sqlite3")].first
|
|
14
|
+
@destination_db_name = Dir[File.join("./*/test.sqlite3")].first
|
|
8
15
|
# read from sqlite3 db
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
16
|
+
@source_db= ActiveRecord::Base.establish_connection({:adapter => "sqlite3",
|
|
17
|
+
:database => @source_db_name})
|
|
18
|
+
@source_db_connection = @source_db.connection
|
|
19
|
+
@source_db.connected?
|
|
13
20
|
end
|
|
14
21
|
|
|
15
22
|
def copy_table(table_name = nil)
|
|
16
23
|
end
|
|
24
|
+
|
|
25
|
+
def make_factory(table_name)
|
|
26
|
+
@source_db_connection.
|
|
27
|
+
end
|
|
17
28
|
end
|
|
29
|
+
|
data/steamer.gemspec
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
|
2
|
-
|
|
3
2
|
Gem::Specification.new do |s|
|
|
4
3
|
s.name = %q{steamer}
|
|
5
|
-
s.version = "0.1.2"
|
|
6
|
-
|
|
4
|
+
s.version = "0.1.2.#{Time.now.to_i}"
|
|
7
5
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
8
6
|
s.authors = ["Dave Rogers"]
|
|
9
7
|
s.date = %q{2009-06-02}
|