dbmigrator 0.7.1 → 0.7.4

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -12,7 +12,7 @@ else
12
12
  gem.name = 'dbmigrator'
13
13
  gem.summary = "Standalone migrator for non Rails projects"
14
14
  gem.email = "vasenin@aboutecho.com"
15
- gem.homepage = "http://github.com/avasenin/dbmigrator"
15
+ gem.homepage = "http://github.com/EchoTeam/dbmigrator"
16
16
  gem.authors = ["Andrey Vasenin"]
17
17
  end
18
18
  Jeweler::GemcutterTasks.new
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.1
1
+ 0.7.4
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "dbmigrator"
8
- s.version = "0.7.1"
8
+ s.version = "0.7.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Andrey Vasenin"]
12
- s.date = "2013-03-21"
12
+ s.date = "2013-04-26"
13
13
  s.email = "vasenin@aboutecho.com"
14
14
  s.extra_rdoc_files = [
15
15
  "README.markdown"
@@ -24,7 +24,7 @@ Gem::Specification.new do |s|
24
24
  "example/.gitignore",
25
25
  "example/Rakefile",
26
26
  "lib/dbmigrator.rb",
27
- "lib/dbmigrator/migration.rb",
27
+ "lib/dbmigrator/environment.rb",
28
28
  "lib/dbmigrator/migration_generator.rb",
29
29
  "lib/dbmigrator/minimal_rails_application.rb",
30
30
  "lib/dbmigrator/postgres.rb",
@@ -32,7 +32,7 @@ Gem::Specification.new do |s|
32
32
  "lib/dbmigrator/tasks/databases.rake",
33
33
  "lib/dbmigrator/templates/migration.rb"
34
34
  ]
35
- s.homepage = "http://github.com/avasenin/dbmigrator"
35
+ s.homepage = "http://github.com/EchoTeam/dbmigrator"
36
36
  s.require_paths = ["lib"]
37
37
  s.rubygems_version = "1.8.24"
38
38
  s.summary = "Standalone migrator for non Rails projects"
@@ -0,0 +1,19 @@
1
+ require 'active_record/migration'
2
+
3
+ module DbMigrator
4
+ module Environment
5
+ def production?
6
+ "production" == ENV["DBM_ENV"]
7
+ end
8
+
9
+ def local?
10
+ !production?
11
+ end
12
+
13
+ module_function :production?, :local?
14
+ end
15
+ end
16
+
17
+ ActiveRecord::Migration.class_eval do
18
+ include DbMigrator::Environment
19
+ end
@@ -3,7 +3,7 @@ $:.unshift File.join(File.dirname(__FILE__), "..")
3
3
  require "task_manager"
4
4
  require "migration_generator"
5
5
  require "postgres"
6
- require "migration"
6
+ require "environment"
7
7
  require "tempfile"
8
8
 
9
9
  load "active_record/railties/databases.rake"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dbmigrator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.7.4
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: 2013-03-21 00:00:00.000000000 Z
12
+ date: 2013-04-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -75,14 +75,14 @@ files:
75
75
  - example/.gitignore
76
76
  - example/Rakefile
77
77
  - lib/dbmigrator.rb
78
- - lib/dbmigrator/migration.rb
78
+ - lib/dbmigrator/environment.rb
79
79
  - lib/dbmigrator/migration_generator.rb
80
80
  - lib/dbmigrator/minimal_rails_application.rb
81
81
  - lib/dbmigrator/postgres.rb
82
82
  - lib/dbmigrator/task_manager.rb
83
83
  - lib/dbmigrator/tasks/databases.rake
84
84
  - lib/dbmigrator/templates/migration.rb
85
- homepage: http://github.com/avasenin/dbmigrator
85
+ homepage: http://github.com/EchoTeam/dbmigrator
86
86
  licenses: []
87
87
  post_install_message:
88
88
  rdoc_options: []
@@ -96,7 +96,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
96
96
  version: '0'
97
97
  segments:
98
98
  - 0
99
- hash: -2354698246710805387
99
+ hash: -2486371934468851461
100
100
  required_rubygems_version: !ruby/object:Gem::Requirement
101
101
  none: false
102
102
  requirements:
@@ -1,11 +0,0 @@
1
- require 'active_record/migration'
2
-
3
- ActiveRecord::Migration.class_eval do
4
- def local?
5
- "local" == ENV["DBM_ENV"]
6
- end
7
-
8
- def production?
9
- "production" == ENV["DMB_ENV"]
10
- end
11
- end