refinerycms-testing 2.0.8 → 2.0.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,13 @@
1
1
  namespace :refinery do
2
2
  namespace :testing do
3
3
  desc "Generates a dummy app for testing"
4
- task :dummy_app => [:setup_dummy_app, :setup_extension, "extension:setup"]
4
+ task :dummy_app do
5
+ unless dummy_app_path.exist?
6
+ Rake::Task["refinery:testing:setup_dummy_app"].invoke
7
+ Rake::Task["refinery:testing:setup_extension"].invoke
8
+ Rake::Task["refinery:testing:init_test_database"].invoke
9
+ end
10
+ end
5
11
 
6
12
  task :setup_dummy_app do
7
13
  require 'refinerycms'
@@ -11,7 +17,12 @@ namespace :refinery do
11
17
 
12
18
  Refinery::DummyGenerator.start params
13
19
 
20
+ # Ensure the database is not there from a previous run.
21
+ Rake::Task['refinery:testing:drop_dummy_app_database'].invoke
22
+
14
23
  Refinery::CmsGenerator.start %w[--quiet --fresh-installation]
24
+
25
+ Dir.chdir dummy_app_path
15
26
  end
16
27
 
17
28
  # This task is a hook to allow extensions to pass configuration
@@ -31,21 +42,22 @@ namespace :refinery do
31
42
 
32
43
  desc "Remove the dummy app used for testing"
33
44
  task :clean_dummy_app do
34
- path = Refinery::Testing::Railtie.target_extension_path.join('spec', 'dummy')
35
-
36
- path.rmtree if path.exist?
45
+ Rake::Task['refinery:testing:drop_dummy_app_database'].invoke
46
+ dummy_app_path.rmtree if dummy_app_path.exist?
37
47
  end
38
48
 
39
- namespace :extension do
40
- desc "Initialize the testing environment"
41
- task :setup => [:init_test_database]
49
+ desc "Remove the dummy app's database."
50
+ task :drop_dummy_app_database do
51
+ load 'rails/tasks/engine.rake'
52
+ Rake::Task['app:db:drop'].invoke
53
+ end
42
54
 
43
- task :init_test_database do
44
- task_params = [%Q{ bundle exec rake -f #{Refinery::Testing::Railtie.target_extension_path.join('Rakefile')} }]
45
- task_params << %Q{ app:db:test:prepare }
55
+ task :init_test_database do
56
+ system "bundle exec rake -f #{dummy_app_path.join('Rakefile')} db:test:prepare"
57
+ end
46
58
 
47
- system task_params.join(' ')
48
- end
59
+ def dummy_app_path
60
+ Refinery::Testing::Railtie.target_extension_path.join('spec', 'dummy')
49
61
  end
50
62
  end
51
63
  end
@@ -9,11 +9,11 @@ Gem::Specification.new do |s|
9
9
  s.name = %q{refinerycms-testing}
10
10
  s.version = version
11
11
  s.summary = %q{Testing plugin for Refinery CMS}
12
- s.description = %q{This plugin adds the ability to run cucumber and rspec against the Refinery CMS gem while inside a Refinery CMS project}
12
+ s.description = %q{This plugin adds the ability to run rspec against the Refinery CMS gem while inside a Refinery CMS project}
13
13
  s.email = %q{info@refinerycms.com}
14
14
  s.homepage = %q{http://refinerycms.com}
15
15
  s.rubyforge_project = %q{refinerycms}
16
- s.authors = ['Philip Arndt']
16
+ s.authors = ['Philip Arndt', 'Uģis Ozols', 'Rob Yurkowski']
17
17
  s.license = %q{MIT}
18
18
  s.require_paths = %w(lib)
19
19
 
metadata CHANGED
@@ -1,15 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: refinerycms-testing
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.8
4
+ version: 2.0.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Philip Arndt
9
+ - Uģis Ozols
10
+ - Rob Yurkowski
9
11
  autorequire:
10
12
  bindir: bin
11
13
  cert_chain: []
12
- date: 2012-08-18 00:00:00.000000000 Z
14
+ date: 2012-11-21 00:00:00.000000000 Z
13
15
  dependencies:
14
16
  - !ruby/object:Gem::Dependency
15
17
  name: refinerycms-core
@@ -18,7 +20,7 @@ dependencies:
18
20
  requirements:
19
21
  - - '='
20
22
  - !ruby/object:Gem::Version
21
- version: 2.0.8
23
+ version: 2.0.9
22
24
  type: :runtime
23
25
  prerelease: false
24
26
  version_requirements: !ruby/object:Gem::Requirement
@@ -26,7 +28,7 @@ dependencies:
26
28
  requirements:
27
29
  - - '='
28
30
  - !ruby/object:Gem::Version
29
- version: 2.0.8
31
+ version: 2.0.9
30
32
  - !ruby/object:Gem::Dependency
31
33
  name: database_cleaner
32
34
  requirement: !ruby/object:Gem::Requirement
@@ -91,8 +93,8 @@ dependencies:
91
93
  - - ~>
92
94
  - !ruby/object:Gem::Version
93
95
  version: 1.1.2
94
- description: This plugin adds the ability to run cucumber and rspec against the Refinery
95
- CMS gem while inside a Refinery CMS project
96
+ description: This plugin adds the ability to run rspec against the Refinery CMS gem
97
+ while inside a Refinery CMS project
96
98
  email: info@refinerycms.com
97
99
  executables: []
98
100
  extensions: []
@@ -127,7 +129,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
127
129
  version: '0'
128
130
  segments:
129
131
  - 0
130
- hash: -4211370660276341353
132
+ hash: -2130918620000130095
131
133
  required_rubygems_version: !ruby/object:Gem::Requirement
132
134
  none: false
133
135
  requirements:
@@ -136,10 +138,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
136
138
  version: '0'
137
139
  segments:
138
140
  - 0
139
- hash: -4211370660276341353
141
+ hash: -2130918620000130095
140
142
  requirements: []
141
143
  rubyforge_project: refinerycms
142
- rubygems_version: 1.8.22
144
+ rubygems_version: 1.8.24
143
145
  signing_key:
144
146
  specification_version: 3
145
147
  summary: Testing plugin for Refinery CMS