active_wrapper 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/gemspec.rb +3 -3
- data/lib/active_wrapper.rb +2 -2
- data/lib/active_wrapper/db.rb +6 -0
- metadata +4 -5
- data/active_wrapper.gemspec +0 -33
data/gemspec.rb
CHANGED
@@ -11,13 +11,13 @@ GEM_SPEC = Gem::Specification.new do |s|
|
|
11
11
|
s.homepage = "http://github.com/winton/#{GEM_NAME}"
|
12
12
|
s.summary = "Wraps ActiveRecord and Logger for use in non-Rails environments"
|
13
13
|
# == CONFIGURE ==
|
14
|
-
s.add_dependency('activerecord', '=2.3.
|
15
|
-
s.add_dependency('actionmailer', '=2.3.
|
14
|
+
s.add_dependency('activerecord', '=2.3.4')
|
15
|
+
s.add_dependency('actionmailer', '=2.3.4')
|
16
16
|
s.extra_rdoc_files = [ "README.markdown" ]
|
17
17
|
s.files = GEM_FILES.to_a
|
18
18
|
s.has_rdoc = false
|
19
19
|
s.name = GEM_NAME
|
20
20
|
s.platform = Gem::Platform::RUBY
|
21
21
|
s.require_path = "lib"
|
22
|
-
s.version = "0.2.
|
22
|
+
s.version = "0.2.1"
|
23
23
|
end
|
data/lib/active_wrapper.rb
CHANGED
@@ -3,8 +3,8 @@ Dir["#{File.dirname(__FILE__)}/../vendor/*/lib"].each do |path|
|
|
3
3
|
end
|
4
4
|
|
5
5
|
require 'rubygems'
|
6
|
-
gem 'activerecord', '=2.3.
|
7
|
-
gem 'actionmailer', '=2.3.
|
6
|
+
gem 'activerecord', '=2.3.4'
|
7
|
+
gem 'actionmailer', '=2.3.4'
|
8
8
|
require 'activerecord'
|
9
9
|
require 'actionmailer'
|
10
10
|
require 'logger'
|
data/lib/active_wrapper/db.rb
CHANGED
@@ -7,8 +7,13 @@ module ActiveWrapper
|
|
7
7
|
@base = options[:base]
|
8
8
|
if File.exists?(path = "#{base}/config/database.yml")
|
9
9
|
@config = YAML::load(File.open(path))
|
10
|
+
else
|
11
|
+
raise "Could not find #{path}"
|
10
12
|
end
|
11
13
|
@env = options[:env].to_s
|
14
|
+
unless config[env]
|
15
|
+
raise "Environment \"#{env}\" not found in #{path}"
|
16
|
+
end
|
12
17
|
end
|
13
18
|
|
14
19
|
def connected?
|
@@ -36,6 +41,7 @@ module ActiveWrapper
|
|
36
41
|
end
|
37
42
|
|
38
43
|
def migrate(version=nil)
|
44
|
+
establish_connection
|
39
45
|
redirect_stdout do
|
40
46
|
ActiveRecord::Migrator.migrate("#{base}/db/migrate", version)
|
41
47
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_wrapper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Winton Welsh
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-11-
|
12
|
+
date: 2009-11-10 00:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -20,7 +20,7 @@ dependencies:
|
|
20
20
|
requirements:
|
21
21
|
- - "="
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: 2.3.
|
23
|
+
version: 2.3.4
|
24
24
|
version:
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: actionmailer
|
@@ -30,7 +30,7 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 2.3.
|
33
|
+
version: 2.3.4
|
34
34
|
version:
|
35
35
|
description:
|
36
36
|
email: mail@wintoni.us
|
@@ -41,7 +41,6 @@ extensions: []
|
|
41
41
|
extra_rdoc_files:
|
42
42
|
- README.markdown
|
43
43
|
files:
|
44
|
-
- active_wrapper.gemspec
|
45
44
|
- gemspec.rb
|
46
45
|
- lib/active_wrapper/db.rb
|
47
46
|
- lib/active_wrapper/log.rb
|
data/active_wrapper.gemspec
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
|
3
|
-
Gem::Specification.new do |s|
|
4
|
-
s.name = %q{active_wrapper}
|
5
|
-
s.version = "0.2.0"
|
6
|
-
|
7
|
-
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
|
-
s.authors = ["Winton Welsh"]
|
9
|
-
s.date = %q{2009-08-13}
|
10
|
-
s.email = %q{mail@wintoni.us}
|
11
|
-
s.extra_rdoc_files = ["README.markdown"]
|
12
|
-
s.files = ["active_wrapper.gemspec", "gemspec.rb", "lib", "lib/active_wrapper", "lib/active_wrapper/db.rb", "lib/active_wrapper/log.rb", "lib/active_wrapper/mail.rb", "lib/active_wrapper/tasks.rb", "lib/active_wrapper.rb", "MIT-LICENSE", "Rakefile", "README.markdown", "resources", "resources/migration.template", "spec", "spec/active_wrapper", "spec/active_wrapper/db_spec.rb", "spec/active_wrapper/log_spec.rb", "spec/example_project", "spec/example_project/config", "spec/example_project/config/database.yml", "spec/example_project/db", "spec/example_project/db/migrate", "spec/example_project/db/migrate/001_test.rb", "spec/example_project/Rakefile", "spec/spec.opts", "spec/spec_helper.rb"]
|
13
|
-
s.homepage = %q{http://github.com/winton/active_wrapper}
|
14
|
-
s.require_paths = ["lib"]
|
15
|
-
s.rubygems_version = %q{1.3.1}
|
16
|
-
s.summary = %q{Wraps ActiveRecord and Logger for use in non-Rails environments}
|
17
|
-
|
18
|
-
if s.respond_to? :specification_version then
|
19
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
20
|
-
s.specification_version = 2
|
21
|
-
|
22
|
-
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
23
|
-
s.add_runtime_dependency(%q<activerecord>, ["= 2.3.2"])
|
24
|
-
s.add_runtime_dependency(%q<actionmailer>, ["= 2.3.2"])
|
25
|
-
else
|
26
|
-
s.add_dependency(%q<activerecord>, ["= 2.3.2"])
|
27
|
-
s.add_dependency(%q<actionmailer>, ["= 2.3.2"])
|
28
|
-
end
|
29
|
-
else
|
30
|
-
s.add_dependency(%q<activerecord>, ["= 2.3.2"])
|
31
|
-
s.add_dependency(%q<actionmailer>, ["= 2.3.2"])
|
32
|
-
end
|
33
|
-
end
|