active_record_tasks 1.0.4 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -1
- data/lib/active_record_tasks/tasks.rb +5 -2
- data/lib/active_record_tasks/version.rb +1 -1
- metadata +27 -16
- checksums.yaml +0 -7
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
config = ActiveRecordTasks.config
|
3
3
|
config.db_dir ||= 'db'
|
4
4
|
config.db_config_path ||= File.join(config.db_dir, 'config.yml')
|
5
|
-
config.env ||= '
|
5
|
+
config.env ||= 'development'
|
6
6
|
|
7
7
|
# This is needed to overwrite the already-existing Rake task "load_config"
|
8
8
|
class Rake::Task
|
@@ -18,7 +18,10 @@ load File.join(spec.gem_dir, "lib/active_record/railties/databases.rake")
|
|
18
18
|
|
19
19
|
# Overwrite the load config to your needs
|
20
20
|
Rake::Task["db:load_config"].overwrite do
|
21
|
-
|
21
|
+
require 'erb'
|
22
|
+
# yaml = YAML.load(ERB.new(IO.read(@config[:db_yml])))
|
23
|
+
db_config = YAML.load ERB.new(File.read config.db_config_path).result
|
24
|
+
ActiveRecord::Base.configurations = ActiveRecord::Tasks::DatabaseTasks.database_configuration = db_config
|
22
25
|
ActiveRecord::Tasks::DatabaseTasks.db_dir = config.db_dir
|
23
26
|
ActiveRecord::Tasks::DatabaseTasks.env = config.env
|
24
27
|
ActiveRecord::Tasks::DatabaseTasks.root = config.root || File.join(config.db_dir, '..')
|
metadata
CHANGED
@@ -1,69 +1,78 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_record_tasks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Gilbert
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date: 2014-
|
12
|
+
date: 2014-05-27 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: activerecord
|
15
16
|
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
16
18
|
requirements:
|
17
|
-
- -
|
19
|
+
- - ! '>='
|
18
20
|
- !ruby/object:Gem::Version
|
19
21
|
version: '4.0'
|
20
22
|
type: :runtime
|
21
23
|
prerelease: false
|
22
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
23
26
|
requirements:
|
24
|
-
- -
|
27
|
+
- - ! '>='
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: '4.0'
|
27
30
|
- !ruby/object:Gem::Dependency
|
28
31
|
name: rake
|
29
32
|
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
30
34
|
requirements:
|
31
|
-
- -
|
35
|
+
- - ! '>='
|
32
36
|
- !ruby/object:Gem::Version
|
33
37
|
version: '0'
|
34
38
|
type: :runtime
|
35
39
|
prerelease: false
|
36
40
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
37
42
|
requirements:
|
38
|
-
- -
|
43
|
+
- - ! '>='
|
39
44
|
- !ruby/object:Gem::Version
|
40
45
|
version: '0'
|
41
46
|
- !ruby/object:Gem::Dependency
|
42
47
|
name: rainbow
|
43
48
|
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
44
50
|
requirements:
|
45
|
-
- -
|
51
|
+
- - ! '>='
|
46
52
|
- !ruby/object:Gem::Version
|
47
53
|
version: '0'
|
48
54
|
type: :runtime
|
49
55
|
prerelease: false
|
50
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
51
58
|
requirements:
|
52
|
-
- -
|
59
|
+
- - ! '>='
|
53
60
|
- !ruby/object:Gem::Version
|
54
61
|
version: '0'
|
55
62
|
- !ruby/object:Gem::Dependency
|
56
63
|
name: bundler
|
57
64
|
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
58
66
|
requirements:
|
59
|
-
- -
|
67
|
+
- - ~>
|
60
68
|
- !ruby/object:Gem::Version
|
61
69
|
version: '1.3'
|
62
70
|
type: :development
|
63
71
|
prerelease: false
|
64
72
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
65
74
|
requirements:
|
66
|
-
- -
|
75
|
+
- - ~>
|
67
76
|
- !ruby/object:Gem::Version
|
68
77
|
version: '1.3'
|
69
78
|
description: Use ActiveRecord 4 in non-rails projects.
|
@@ -73,7 +82,7 @@ executables: []
|
|
73
82
|
extensions: []
|
74
83
|
extra_rdoc_files: []
|
75
84
|
files:
|
76
|
-
-
|
85
|
+
- .gitignore
|
77
86
|
- Gemfile
|
78
87
|
- LICENSE.txt
|
79
88
|
- README.md
|
@@ -90,25 +99,27 @@ files:
|
|
90
99
|
homepage: https://github.com/makersquare/active_record_tasks
|
91
100
|
licenses:
|
92
101
|
- MIT
|
93
|
-
metadata: {}
|
94
102
|
post_install_message:
|
95
103
|
rdoc_options: []
|
96
104
|
require_paths:
|
97
105
|
- lib
|
98
106
|
required_ruby_version: !ruby/object:Gem::Requirement
|
107
|
+
none: false
|
99
108
|
requirements:
|
100
|
-
- -
|
109
|
+
- - ! '>='
|
101
110
|
- !ruby/object:Gem::Version
|
102
111
|
version: '0'
|
103
112
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
104
114
|
requirements:
|
105
|
-
- -
|
115
|
+
- - ! '>='
|
106
116
|
- !ruby/object:Gem::Version
|
107
117
|
version: '0'
|
108
118
|
requirements: []
|
109
119
|
rubyforge_project:
|
110
|
-
rubygems_version:
|
120
|
+
rubygems_version: 1.8.25
|
111
121
|
signing_key:
|
112
|
-
specification_version:
|
122
|
+
specification_version: 3
|
113
123
|
summary: The easiest way to get started with ActiveRecord 4 in a non-rails project.
|
114
124
|
test_files: []
|
125
|
+
has_rdoc:
|
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: f28dbbf1b5b1b47fa988aeb1f9ecbfff3074f111
|
4
|
-
data.tar.gz: 09c3a22b8c348ddc5e67e14a55d9d59cd89014f1
|
5
|
-
SHA512:
|
6
|
-
metadata.gz: 8040b2d4aca4f92ceb7bf5ec3dbc004b4ee9ec4e0e5ff0a2b472f0036685b8c8af87d6fcf059f0661b57d9ff58ed5bb86ffcefb133f95eb86391543a10d68a6b
|
7
|
-
data.tar.gz: 83bdaaf6880379d542f02157c99d56cf1cbad82522b19374147d9a188dcac86de459b4ad53c0e816a36bf145fb6b1e78245ca8156227b8ee7ca6d650ae2abe6f
|