Permalink
Browse files

fixed schema stamp problem

  • Loading branch information...
1 parent 23c31ba commit 7f227b378abf5a7d341818c8e2c68b303d18d564 @ethn ethn committed Jul 26, 2014
Showing with 11 additions and 5 deletions.
  1. +7 −2 .simplecov
  2. +1 −1 lib/wagn/tasks/wagn.rake
  3. +3 −2 lib/wagn/version.rb
View
@@ -2,6 +2,11 @@
unless ENV['COVERAGE'] == 'false'
SimpleCov.start do
+ filters.clear # This will remove the :root_filter that comes via simplecov's defaults
+ add_filter do |src|
+ !(src.filename =~ /^#{SimpleCov.root}/) unless src.filename =~ /wagn/
+ end
+
add_filter '/spec/'
add_filter '/features/'
add_filter '/config/'
@@ -10,8 +15,8 @@ unless ENV['COVERAGE'] == 'false'
add_filter 'lib/wagn'
add_group 'Card', 'lib/card'
- add_group 'Set Patterns', 'tmp/set_patterns'
- add_group 'Sets', 'tmp/sets'
+ add_group 'Set Patterns', 'tmp/set_pattern'
+ add_group 'Sets', 'tmp/set'
add_group 'Formats' do |src_file|
src_file.filename =~ /mods\/[^\/]+\/formats/
end
@@ -111,7 +111,7 @@ namespace :wagn do
ENV['SCHEMA'] = "#{Wagn.gem_root}/db/schema.rb"
Wagn.config.action_mailer.perform_deliveries = false
- stamp_file = ENV['SCHEMA_STAMP_PATH'] || Wagn::Version.schema_stamp_path( args[:suffix] )
+ stamp_file = Wagn::Version.schema_stamp_path( args[:suffix] )
Wagn::MigrationHelper.schema_mode args[:suffix ] do
version = ActiveRecord::Migrator.current_version
puts ">> writing version: #{version} to #{stamp_file}"
View
@@ -14,9 +14,10 @@ def schema type=nil
end
def schema_stamp_path type
- File.join Wagn.gem_root, 'config', "version#{ '_cards' if type.to_s =~ /card/ }.txt"
+ stamp_dir = ENV['SCHEMA_STAMP_PATH'] || File.join( Wagn.gem_root, 'config' )
+ File.join stamp_dir, "version#{ '_cards' if type.to_s =~ /card/ }.txt"
end
-
+
end
end
end

0 comments on commit 7f227b3

Please sign in to comment.