daddy 0.3.32 → 0.3.33
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/daddy.rb +9 -9
- data/lib/daddy/cucumber/hooks/database.rb +13 -14
- data/lib/daddy/formatter/daddy_html.rb +1 -0
- data/lib/daddy/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ccd54aece78155f0dc1d720a791abd2024391e5
|
4
|
+
data.tar.gz: 839055c3f8929cd73179b38d3357a25c3ab8a16d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a5ed3415b414134ea2f36ea6f5c237b1baf4973596499cc1c21a467505aacc39ee72aef9f33fc509b577178a677aa6e10ee3bf3e9208750acbe11396bfb2325
|
7
|
+
data.tar.gz: 61ff9b31dc665f7236330814598446f6bccb8e8e90e6c86220ed19964a5db8927de29c8c837f48666d28fd2b7d41ce450309140cbed7f47dd4662ec09de2a0bd
|
data/lib/daddy.rb
CHANGED
@@ -1,12 +1,3 @@
|
|
1
|
-
if defined?(Rails)
|
2
|
-
require 'daddy/rails/engine'
|
3
|
-
require 'daddy/rails/railtie'
|
4
|
-
else
|
5
|
-
Dir[File.join(File.dirname(__FILE__), 'tasks', '*.rake')].each do |f|
|
6
|
-
load f
|
7
|
-
end
|
8
|
-
end
|
9
|
-
|
10
1
|
require 'daddy/utils/config'
|
11
2
|
require 'daddy/utils/string_utils'
|
12
3
|
require 'sql_builder'
|
@@ -18,3 +9,12 @@ module Daddy
|
|
18
9
|
end
|
19
10
|
|
20
11
|
end
|
12
|
+
|
13
|
+
if defined?(Rails)
|
14
|
+
require 'daddy/rails/engine'
|
15
|
+
require 'daddy/rails/railtie'
|
16
|
+
else
|
17
|
+
Dir[File.join(File.dirname(__FILE__), 'tasks', '*.rake')].each do |f|
|
18
|
+
load f
|
19
|
+
end
|
20
|
+
end
|
@@ -7,25 +7,24 @@ rescue NameError
|
|
7
7
|
raise "You need to add database_cleaner to your Gemfile (in the :test group) if you wish to use it."
|
8
8
|
end
|
9
9
|
|
10
|
-
|
11
|
-
|
10
|
+
if ::ActiveRecord::VERSION::MAJOR < 4
|
11
|
+
fixture_class = ActiveRecord::Fixtures
|
12
|
+
else
|
13
|
+
fixture_class = ActiveRecord::FixtureSet
|
14
|
+
end
|
12
15
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
16
|
+
fixtures_folder = File.join(Rails.root, 'test', 'fixtures')
|
17
|
+
fixtures = Dir[File.join(fixtures_folder, '*.yml')].map {|f| File.basename(f, '.yml') }
|
18
|
+
if defined? RailsCsvFixtures
|
19
|
+
fixtures += Dir[File.join(fixtures_folder, '*.csv')].map {|f| File.basename(f, '.csv') }
|
20
|
+
end
|
18
21
|
|
19
|
-
|
20
|
-
|
21
|
-
fixtures = Dir[File.join(fixtures_folder, '*.yml')].map {|f| File.basename(f, '.yml') }
|
22
|
+
Before do
|
23
|
+
DatabaseCleaner.start
|
22
24
|
fixture_class.create_fixtures(fixtures_folder, fixtures)
|
23
|
-
if defined? RailsCsvFixtures
|
24
|
-
fixtures = Dir[File.join(fixtures_folder, '*.csv')].map {|f| File.basename(f, '.csv') }
|
25
|
-
fixture_class.create_fixtures(fixtures_folder, fixtures)
|
26
|
-
end
|
27
25
|
end
|
28
26
|
|
29
27
|
After do |scenario|
|
28
|
+
fixture_class.reset_cache
|
30
29
|
DatabaseCleaner.clean
|
31
30
|
end
|
data/lib/daddy/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: daddy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.33
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ichy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-05-
|
11
|
+
date: 2015-05-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capybara
|
@@ -394,7 +394,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
394
394
|
version: '0'
|
395
395
|
requirements: []
|
396
396
|
rubyforge_project:
|
397
|
-
rubygems_version: 2.4.
|
397
|
+
rubygems_version: 2.4.7
|
398
398
|
signing_key:
|
399
399
|
specification_version: 4
|
400
400
|
summary: My rails dad
|