app_reset 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
data/app_reset.gemspec CHANGED
@@ -15,5 +15,4 @@ Gem::Specification.new do |s|
15
15
  s.test_files = Dir['spec/**/*']
16
16
 
17
17
  s.add_dependency "rails"
18
- s.add_dependency "awesome_print"
19
18
  end
@@ -1,3 +1,3 @@
1
1
  module AppReset
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
@@ -1,16 +1,16 @@
1
- require 'awesome_print'
2
-
3
1
  unless Rails.env.production?
4
2
  host_is_engine = ! Rake::Task.tasks.map { |t| t.name =~ /app:/ }.uniq.compact.empty?
5
3
  task_name = host_is_engine ? 'reset' : 'app:reset'
6
- rails_envs = ENV['RAILS_ENV'].nil? ? ['development', 'test'] : [ENV['RAILS_ENV']]
4
+
5
+ rails_env = ENV['RAILS_ENV']
6
+ rails_envs = rails_env.nil? ? ['development', 'test'] : [rails_env]
7
7
 
8
8
  desc 'Resets (and if available, seeds) your development and test databases'
9
9
  task task_name => 'db:create' do
10
10
  rails_envs.each do |env|
11
- ap '=' * 35
12
- ap "Resetting #{env} database ..."
13
- ap '=' * 35
11
+ puts '=' * 35
12
+ puts "Resetting #{env} database ..."
13
+ puts '=' * 35
14
14
 
15
15
  # this workaround is faster than spawning subprocesses,
16
16
  # but due to the nature of it (it re-enables pretty much all tasks),
@@ -28,6 +28,6 @@ unless Rails.env.production?
28
28
  end
29
29
 
30
30
  # ensure we reset the Rails.env in case other tasks depend on this
31
- Rails.env = ENV['RAILS_ENV']
31
+ ENV['RAILS_ENV'] = rails_env
32
32
  end
33
33
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: app_reset
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-02 00:00:00.000000000 Z
12
+ date: 2012-09-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -27,22 +27,6 @@ dependencies:
27
27
  - - ! '>='
28
28
  - !ruby/object:Gem::Version
29
29
  version: '0'
30
- - !ruby/object:Gem::Dependency
31
- name: awesome_print
32
- requirement: !ruby/object:Gem::Requirement
33
- none: false
34
- requirements:
35
- - - ! '>='
36
- - !ruby/object:Gem::Version
37
- version: '0'
38
- type: :runtime
39
- prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ! '>='
44
- - !ruby/object:Gem::Version
45
- version: '0'
46
30
  description: Resets (and if available, seeds) your development and test databases.
47
31
  email:
48
32
  - ifredwu@gmail.com
@@ -73,7 +57,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
73
57
  version: '0'
74
58
  segments:
75
59
  - 0
76
- hash: -3153442923856711302
60
+ hash: 3902845237607112477
77
61
  required_rubygems_version: !ruby/object:Gem::Requirement
78
62
  none: false
79
63
  requirements:
@@ -82,7 +66,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
82
66
  version: '0'
83
67
  segments:
84
68
  - 0
85
- hash: -3153442923856711302
69
+ hash: 3902845237607112477
86
70
  requirements: []
87
71
  rubyforge_project:
88
72
  rubygems_version: 1.8.24