imposter 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/.document CHANGED
File without changes
data/.gitignore CHANGED
File without changes
data/LICENSE CHANGED
File without changes
data/README.rdoc CHANGED
File without changes
data/Rakefile CHANGED
@@ -14,7 +14,7 @@ begin
14
14
  gem.add_dependency "sqlite3-ruby", ">= 1.2.5"
15
15
  gem.add_dependency "faker", ">= 0"
16
16
  gem.add_dependency "fastercsv", ">= 0"
17
- gem.files.include %w(lib/imposter/*.rb lib/imposter/*.db generators/**/*.rb)
17
+ gem.files.include %w(lib/imposter/*.rb lib/imposter/*.db generators/**/*.rb lib/tasks/**/*.rake)
18
18
  gem.summary = %Q{Real fake data}
19
19
  gem.description = %Q{Add generator and rake tasks via YAML based imposters for schema level data faking}
20
20
  gem.email = "robert.hall@itatc.com"
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.2
1
+ 0.1.3
@@ -1,8 +1,8 @@
1
1
  require 'rubygems'
2
2
  require 'activerecord'
3
3
  require 'pathname'
4
- require 'activesupport'
5
-
4
+ require 'activesupport'
5
+ require 'ftools'
6
6
 
7
7
  class ImposterGenerator < Rails::Generator::Base
8
8
  dbc = YAML.load(File.read('config/database.yml'))
@@ -24,7 +24,7 @@ class ImposterGenerator < Rails::Generator::Base
24
24
  end
25
25
 
26
26
 
27
- def genmodel(model_name)
27
+ def genmodel(model_name)
28
28
  mn = Pathname.new(model_name).basename.to_s.chomp(File.extname(model_name))
29
29
  require model_name
30
30
  puts " " + mn
@@ -75,12 +75,16 @@ class ImposterGenerator < Rails::Generator::Base
75
75
  end
76
76
 
77
77
  def genmodels
78
-
78
+ create_rake_file
79
79
  models_dir = Dir.glob("app/models/*.rb")
80
80
  models_dir.each do |model_dir|
81
81
  genmodel(model_dir)
82
82
  end
83
83
  end
84
-
84
+
85
+ def create_rake_file
86
+ puts "Creating lib/tasks/databases.rake"
87
+ File.copy( Pathname.new(__FILE__).dirname + "../lib/tasks/databases.rake", "lib/tasks/")
88
+ end
85
89
 
86
90
  end
data/id_rsa.pub CHANGED
File without changes
data/imposter.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{imposter}
8
- s.version = "0.1.2"
8
+ s.version = "0.1.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Robert Hall"]
File without changes
data/lib/imposter/csz.db CHANGED
File without changes
File without changes
File without changes
data/lib/imposter/noun.rb CHANGED
File without changes
File without changes
data/lib/imposter/verb.rb CHANGED
File without changes
data/lib/imposter.rb CHANGED
File without changes
@@ -1,8 +1,11 @@
1
- namespace :db do
2
- namespace :imposter do
3
- desc "Build imposters into Fixtures. Load specific Imposters using Imposters=x,y."
4
- task :load do
5
- Imposter::genimposters
6
- end
7
- end
8
- end
1
+ require 'rubygems'
2
+ require 'imposter'
3
+
4
+
5
+ namespace :imposter do
6
+ desc "Build imposters into Fixtures. Load specific Imposters using Imposters=x,y."
7
+ task :load do
8
+ Imposter::genimposters
9
+ end
10
+ end
11
+
data/test/helper.rb CHANGED
File without changes
File without changes
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: imposter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Hall