davidtrogers-steamer 0.1.2

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/.document ADDED
@@ -0,0 +1,5 @@
1
+ README.rdoc
2
+ lib/**/*.rb
3
+ bin/*
4
+ features/**/*.feature
5
+ LICENSE
data/.gitignore ADDED
@@ -0,0 +1,5 @@
1
+ *.sw?
2
+ .DS_Store
3
+ coverage
4
+ rdoc
5
+ pkg
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2009 Your Name
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/README ADDED
@@ -0,0 +1,9 @@
1
+ ToDo:
2
+ - get it working with sqlite3
3
+ - read from database
4
+ - write it to factory directory in rb files
5
+ - instantiate it correctly in env.rb or wherever the factories are normally created (cucumber, rspec, etc.)
6
+ - get associations made correctly using model associations
7
+ - test out the factories
8
+ - write some specs
9
+ -
data/README.rdoc ADDED
@@ -0,0 +1,7 @@
1
+ = steamer
2
+
3
+ Description goes here.
4
+
5
+ == Copyright
6
+
7
+ Copyright (c) 2009 Your Name. See LICENSE for details.
data/Rakefile ADDED
@@ -0,0 +1,131 @@
1
+ require 'rubygems'
2
+ require 'rake'
3
+
4
+ begin
5
+ require 'jeweler'
6
+ Jeweler::Tasks.new do |gem|
7
+ gem.name = "steamer"
8
+ #gem.executables = "steamer"
9
+ gem.summary = %Q{when you want to dup a db for use in factories without the hassle of creating factories by hand}
10
+ gem.email = "david.t.rogers@gmail.com"
11
+ gem.homepage = "http://github.com/davidtrogers/steamer"
12
+ gem.authors = ["Dave Rogers"]
13
+
14
+ gem.rdoc_options = ["--inline-source", "--charset=UTF-8"]
15
+ gem.require_paths = ["lib"]
16
+ gem.rubygems_version = %q{1.3.3}
17
+ gem.add_dependency "activerecord"
18
+ # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
19
+ # if s.respond_to? :specification_version then
20
+ # current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
21
+ # s.specification_version = 2
22
+ # if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
23
+ # else
24
+ # end
25
+ # else
26
+ # end
27
+ end
28
+
29
+ rescue LoadError
30
+ puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
31
+ end
32
+
33
+ #
34
+ # # -*- encoding: utf-8 -*-
35
+ #
36
+ # Gem::Specification.new do |s|
37
+ # s.name = %q{davidtrogers-grit}
38
+ # s.version = "0.4.4"
39
+ #
40
+ # s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
41
+ # s.authors = ["brynary"]
42
+ # s.date = %q{2009-03-31}
43
+ # s.description = %q{"webrat is awesome"}
44
+ # s.email = %q{david.t.rogers@gmail.com}
45
+ # s.homepage = %q{http://github.com/davidtrogers/webrat}
46
+ # s.rdoc_options = ["--inline-source", "--charset=UTF-8"]
47
+ # s.require_paths = ["lib"]
48
+ # s.rubyforge_project = %q{webrat}
49
+ # s.rubygems_version = %q{1.3.3}
50
+ # s.summary = %q{Webrat is awesome}
51
+ #
52
+ # if s.respond_to? :specification_version then
53
+ # current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
54
+ # s.specification_version = 2
55
+ #
56
+ # if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
57
+ # else
58
+ # end
59
+ # else
60
+ # end
61
+ # end
62
+
63
+
64
+ # begin
65
+ # require 'jeweler'
66
+ # Jeweler::Tasks.new do |s|
67
+ # s.name = "jeweler"
68
+ # s.executables = "jeweler"
69
+ # s.summary = "Simple and opinionated helper for creating Rubygem projects on GitHub"
70
+ # s.email = "josh@technicalpickles.com"
71
+ # s.homepage = "http://github.com/technicalpickles/jeweler"
72
+ # s.description = "Simple and opinionated helper for creating Rubygem projects on GitHub"
73
+ # s.authors = ["Josh Nichols"]
74
+ # s.files = FileList["[A-Z]*", "{bin,generators,lib,test}/**/*", 'lib/jeweler/templates/.gitignore']
75
+ # s.add_dependency 'schacon-git'
76
+ # end
77
+ # rescue LoadError
78
+ # puts "Jeweler, or one of its dependencies, is not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
79
+ # end
80
+ #
81
+
82
+
83
+ # Gem::Specification.new do |s|
84
+ # s.name = "amee"
85
+ # s.version = "2.0.16"
86
+ # s.date = "2009-05-12"
87
+ # s.summary = "Ruby interface to the AMEE carbon calculator"
88
+ # s.email = "james@floppy.org.uk"
89
+ # s.homepage = "http://github.com/Floppy/amee-ruby"
90
+ # s.has_rdoc = true
91
+ # s.authors = ["James Smith"]
92
+ # s.files = ["README", "COPYING"]
93
+ # s.files += ['lib/amee.rb', 'lib/amee/connection.rb', 'lib/amee/data_item.rb', 'lib/amee/exceptions.rb', 'lib/amee/profile.rb', 'lib/amee/profile_object.rb', 'lib/amee/profile_category.rb', 'lib/amee/profile_item.rb', 'lib/amee/profile_item_value.rb', 'lib/amee/version.rb', 'lib/amee/data_category.rb', 'lib/amee/data_item_value.rb', 'lib/amee/data_object.rb', 'lib/amee/object.rb', 'lib/amee/shell.rb', 'lib/amee/drill_down.rb', 'lib/amee/rails.rb', 'lib/amee/pager.rb', 'lib/amee/item_definition.rb']
94
+ # s.files += ['bin/ameesh']
95
+ # s.files += ['examples/list_profiles.rb', 'examples/create_profile.rb', 'examples/create_profile_item.rb', 'examples/view_data_category.rb', 'examples/view_data_item.rb']
96
+ # s.files += ['init.rb', 'rails/init.rb']
97
+ # s.executables = ['ameesh']
98
+ # s.add_dependency("activesupport")
99
+ # s.add_dependency("json")
100
+ # end
101
+
102
+ require 'spec/rake/spectask'
103
+ Spec::Rake::SpecTask.new(:spec) do |spec|
104
+ spec.libs << 'lib' << 'spec'
105
+ spec.spec_files = FileList['spec/**/*_spec.rb']
106
+ end
107
+
108
+ Spec::Rake::SpecTask.new(:rcov) do |spec|
109
+ spec.libs << 'lib' << 'spec'
110
+ spec.pattern = 'spec/**/*_spec.rb'
111
+ spec.rcov = true
112
+ end
113
+
114
+
115
+ task :default => :spec
116
+
117
+ require 'rake/rdoctask'
118
+ Rake::RDocTask.new do |rdoc|
119
+ if File.exist?('VERSION.yml')
120
+ config = YAML.load(File.read('VERSION.yml'))
121
+ version = "#{config[:major]}.#{config[:minor]}.#{config[:patch]}"
122
+ else
123
+ version = ""
124
+ end
125
+
126
+ rdoc.rdoc_dir = 'rdoc'
127
+ rdoc.title = "steamer #{version}"
128
+ rdoc.rdoc_files.include('README*')
129
+ rdoc.rdoc_files.include('lib/**/*.rb')
130
+ end
131
+
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.1.2
data/lib/steamer.rb ADDED
@@ -0,0 +1,17 @@
1
+ require 'activerecord'
2
+ class Steamer < ActiveRecord::Base
3
+ def initialize(options = { :default_db => :sqlite3,
4
+ :source_db_name => "development.sqlite3",
5
+ :destination_db_name => "test.sqlite3"})
6
+ @source_db = options[:source_db_name]
7
+ @destination_db = options[:destination_db_name]
8
+ # read from sqlite3 db
9
+ if options[:source_db_name].include?("sqlite3")
10
+ self.establish_connection({:adapter => "sqlite3",
11
+ :database => "db/#{@source_db_name}"})
12
+ end
13
+ end
14
+
15
+ def copy_table(table_name = nil)
16
+ end
17
+ end
@@ -0,0 +1,9 @@
1
+ require 'spec'
2
+
3
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
4
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
5
+ require 'steamer'
6
+
7
+ Spec::Runner.configure do |config|
8
+
9
+ end
@@ -0,0 +1,7 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
+
3
+ describe "Steamer" do
4
+ it "fails" do
5
+ fail "hey buddy, you should probably rename this file and start specing for real"
6
+ end
7
+ end
data/steamer.gemspec ADDED
@@ -0,0 +1,51 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = %q{steamer}
5
+ s.version = "0.1.2"
6
+
7
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
+ s.authors = ["Dave Rogers"]
9
+ s.date = %q{2009-06-02}
10
+ s.email = %q{david.t.rogers@gmail.com}
11
+ s.extra_rdoc_files = [
12
+ "LICENSE",
13
+ "README",
14
+ "README.rdoc"
15
+ ]
16
+ s.files = [
17
+ ".document",
18
+ ".gitignore",
19
+ "LICENSE",
20
+ "README",
21
+ "README.rdoc",
22
+ "Rakefile",
23
+ "VERSION",
24
+ "lib/steamer.rb",
25
+ "spec/spec_helper.rb",
26
+ "spec/steamer_spec.rb",
27
+ "steamer.gemspec"
28
+ ]
29
+ s.homepage = %q{http://github.com/davidtrogers/steamer}
30
+ s.rdoc_options = ["--inline-source", "--charset=UTF-8"]
31
+ s.require_paths = ["lib"]
32
+ s.rubygems_version = %q{1.3.3}
33
+ s.summary = %q{when you want to dup a db for use in factories without the hassle of creating factories by hand}
34
+ s.test_files = [
35
+ "spec/spec_helper.rb",
36
+ "spec/steamer_spec.rb"
37
+ ]
38
+
39
+ if s.respond_to? :specification_version then
40
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
41
+ s.specification_version = 3
42
+
43
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
44
+ s.add_runtime_dependency(%q<activerecord>, [">= 0"])
45
+ else
46
+ s.add_dependency(%q<activerecord>, [">= 0"])
47
+ end
48
+ else
49
+ s.add_dependency(%q<activerecord>, [">= 0"])
50
+ end
51
+ end
metadata ADDED
@@ -0,0 +1,76 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: davidtrogers-steamer
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.2
5
+ platform: ruby
6
+ authors:
7
+ - Dave Rogers
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-06-02 00:00:00 -07:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: activerecord
17
+ type: :runtime
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: "0"
24
+ version:
25
+ description:
26
+ email: david.t.rogers@gmail.com
27
+ executables: []
28
+
29
+ extensions: []
30
+
31
+ extra_rdoc_files:
32
+ - LICENSE
33
+ - README
34
+ - README.rdoc
35
+ files:
36
+ - .document
37
+ - .gitignore
38
+ - LICENSE
39
+ - README
40
+ - README.rdoc
41
+ - Rakefile
42
+ - VERSION
43
+ - lib/steamer.rb
44
+ - spec/spec_helper.rb
45
+ - spec/steamer_spec.rb
46
+ - steamer.gemspec
47
+ has_rdoc: false
48
+ homepage: http://github.com/davidtrogers/steamer
49
+ post_install_message:
50
+ rdoc_options:
51
+ - --inline-source
52
+ - --charset=UTF-8
53
+ require_paths:
54
+ - lib
55
+ required_ruby_version: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ version: "0"
60
+ version:
61
+ required_rubygems_version: !ruby/object:Gem::Requirement
62
+ requirements:
63
+ - - ">="
64
+ - !ruby/object:Gem::Version
65
+ version: "0"
66
+ version:
67
+ requirements: []
68
+
69
+ rubyforge_project:
70
+ rubygems_version: 1.2.0
71
+ signing_key:
72
+ specification_version: 3
73
+ summary: when you want to dup a db for use in factories without the hassle of creating factories by hand
74
+ test_files:
75
+ - spec/spec_helper.rb
76
+ - spec/steamer_spec.rb