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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ea43453048982cc8991397d085d37a423eb0b0f6
4
- data.tar.gz: abc99da56dbb0a1494f3ea44e1eec35ac8ef50e2
3
+ metadata.gz: 7ccd54aece78155f0dc1d720a791abd2024391e5
4
+ data.tar.gz: 839055c3f8929cd73179b38d3357a25c3ab8a16d
5
5
  SHA512:
6
- metadata.gz: 1e49d30efa85c2e81af67186c355855b4b002763081e947514868cdd3eaa54f6fe38bf46e6212dc738b2a2a2e09e969f76a27c0b4d3895e8a1fe4b8f3f57e2ce
7
- data.tar.gz: b5ee34a4b105456784514f29e77da19656541e896a3b618cb5dbf7afe83ef5a9e25e5e34e60c7c9b34b57609a4c053dbc3bf1eb2f97b2c19f05c89c96919d36e
6
+ metadata.gz: 6a5ed3415b414134ea2f36ea6f5c237b1baf4973596499cc1c21a467505aacc39ee72aef9f33fc509b577178a677aa6e10ee3bf3e9208750acbe11396bfb2325
7
+ data.tar.gz: 61ff9b31dc665f7236330814598446f6bccb8e8e90e6c86220ed19964a5db8927de29c8c837f48666d28fd2b7d41ce450309140cbed7f47dd4662ec09de2a0bd
@@ -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
- Before do
11
- DatabaseCleaner.start
10
+ if ::ActiveRecord::VERSION::MAJOR < 4
11
+ fixture_class = ActiveRecord::Fixtures
12
+ else
13
+ fixture_class = ActiveRecord::FixtureSet
14
+ end
12
15
 
13
- if ::ActiveRecord::VERSION::MAJOR < 4
14
- fixture_class = ActiveRecord::Fixtures
15
- else
16
- fixture_class = ActiveRecord::FixtureSet
17
- end
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
- fixture_class.reset_cache
20
- fixtures_folder = File.join(Rails.root, 'test', 'fixtures')
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
@@ -1,4 +1,5 @@
1
1
  require 'erb'
2
+ require 'daddy'
2
3
 
3
4
  module Daddy
4
5
  module Formatter
@@ -1,3 +1,3 @@
1
1
  module Daddy
2
- VERSION = '0.3.32'.freeze
2
+ VERSION = '0.3.33'
3
3
  end
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.32
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-15 00:00:00.000000000 Z
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.5
397
+ rubygems_version: 2.4.7
398
398
  signing_key:
399
399
  specification_version: 4
400
400
  summary: My rails dad