pg_gnostic 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/lib/pg_gnostic.rb CHANGED
@@ -3,7 +3,7 @@ $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname
3
3
  require 'kung_figure'
4
4
  # PgGnostic
5
5
  module PgGnostic
6
- VERSION = "0.1.0"
6
+ VERSION = "0.1.1"
7
7
  include KungFigure
8
8
 
9
9
  autoload :ViewDefinition, 'pg_gnostic/view_definition'
@@ -21,8 +21,8 @@ class PgViewGenerator < Rails::Generators::Base
21
21
 
22
22
  def generate
23
23
  model_path = PgGnostic.config.view_model.model_path
24
- empty_directory 'db/views'
25
- empty_directory model_path
24
+ FileUtils.mkdir_p 'db/views'
25
+ FileUtils.mkdir_p model_path
26
26
  case options[:format]
27
27
  when 'sql'
28
28
  template "templates/view.sql", File.join('db/views', "#{@view_name}.sql")
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 0
9
- version: 0.1.0
8
+ - 1
9
+ version: 0.1.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - niquola
@@ -67,32 +67,32 @@ extensions: []
67
67
  extra_rdoc_files:
68
68
  - README.rdoc
69
69
  files:
70
- - README.rdoc
71
70
  - Rakefile
72
71
  - MIT-LICENSE
72
+ - README.rdoc
73
+ - rails/generators/pg_view/templates/view.rb
74
+ - rails/generators/pg_view/templates/view.sql
75
+ - rails/generators/pg_view/templates/model.rb
73
76
  - rails/generators/pg_view/USAGE
74
77
  - rails/generators/pg_view/pg_view_generator.rb
75
- - rails/generators/pg_view/templates/model.rb
76
- - rails/generators/pg_view/templates/view.sql
77
- - rails/generators/pg_view/templates/view.rb
78
- - lib/pg_gnostic/railtie.rb
79
- - lib/pg_gnostic/config.rb
80
78
  - lib/pg_gnostic/view_definition.rb
79
+ - lib/pg_gnostic/config.rb
80
+ - lib/pg_gnostic/railtie.rb
81
81
  - lib/pg_gnostic.rb
82
82
  - tasks/pg_gnostic_tasks.rake
83
- - test/config_test.rb
84
- - test/test_helper.rb
85
- - test/database.yml
86
- - test/pg_gnostic_test.rb
87
83
  - test/db/views/users.rb
88
84
  - test/db/views/other_users.sql
89
85
  - test/db/schema.rb
90
- - test/view_generator_test.rb
86
+ - test/database.yml
87
+ - test/config_test.rb
91
88
  - test/view_definition_test.rb
89
+ - test/pg_gnostic_test.rb
90
+ - test/test_helper.rb
91
+ - test/view_generator_test.rb
92
92
  - test/rails_root/db/views/users.rb
93
93
  - test/rails_root/db/views/roles.sql
94
- - test/rails_root/app/model/views/role.rb
95
94
  - test/rails_root/app/model/views/user.rb
95
+ - test/rails_root/app/model/views/role.rb
96
96
  has_rdoc: true
97
97
  homepage: http://github.com/niquola/pg_gnostic
98
98
  licenses: []