openbanana 1.0.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +0 -2
- data/lib/openbanana.rb +1 -1
- data/lib/openbanana/version.rb +1 -1
- data/openbanana.gemspec +2 -2
- data/spec/tasks_spec.rb +6 -2
- metadata +10 -10
data/README.md
CHANGED
data/lib/openbanana.rb
CHANGED
@@ -11,7 +11,7 @@ module Openbanana
|
|
11
11
|
|
12
12
|
# load config YML file
|
13
13
|
def self.load_yml(filename = 'database.yml')
|
14
|
-
YAML.
|
14
|
+
YAML.load(ERB.new(File.read(File.join(Rails.root, 'config', filename))).result)
|
15
15
|
end
|
16
16
|
|
17
17
|
# read config YML for environment
|
data/lib/openbanana/version.rb
CHANGED
data/openbanana.gemspec
CHANGED
@@ -4,8 +4,8 @@ require File.expand_path('../lib/openbanana/version', __FILE__)
|
|
4
4
|
Gem::Specification.new do |gem|
|
5
5
|
gem.authors = ["R. Tyler Croy"]
|
6
6
|
gem.email = ["tyler@monkeypox.org"]
|
7
|
-
gem.description = %q{Simple gem to handle creating DB
|
8
|
-
gem.summary = %q{Simple gem to handle creating DB
|
7
|
+
gem.description = %q{Simple gem to handle creating DB grants}
|
8
|
+
gem.summary = %q{Simple gem to handle creating DB grants}
|
9
9
|
gem.homepage = "https://github.com/lookout/openbanana"
|
10
10
|
|
11
11
|
gem.files = `git ls-files`.split($\)
|
data/spec/tasks_spec.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
|
2
2
|
require 'spec_helper'
|
3
|
+
require 'erb'
|
4
|
+
require 'yaml'
|
3
5
|
|
4
6
|
describe 'db:grant' do
|
5
7
|
end
|
@@ -12,12 +14,14 @@ describe Openbanana do
|
|
12
14
|
|
13
15
|
describe '#load_yml' do
|
14
16
|
it 'should load the database.yml file on Rails.root/config' do
|
15
|
-
|
17
|
+
File.should_receive(:read).with(Rails.root + '/config/database.yml').and_return("")
|
18
|
+
YAML.should_receive(:load).and_return({})
|
16
19
|
Openbanana.load_yml
|
17
20
|
end
|
18
21
|
|
19
22
|
it 'should load the shards.yml file on Rails.root/config' do
|
20
|
-
|
23
|
+
File.should_receive(:read).with(Rails.root + '/config/shards.yml').and_return("")
|
24
|
+
YAML.should_receive(:load).and_return({})
|
21
25
|
Openbanana.load_yml('shards.yml')
|
22
26
|
end
|
23
27
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openbanana
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-10-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
16
|
-
requirement: &
|
16
|
+
requirement: &31384680 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *31384680
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rspec
|
27
|
-
requirement: &
|
27
|
+
requirement: &31384260 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,8 +32,8 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
36
|
-
description: Simple gem to handle creating DB
|
35
|
+
version_requirements: *31384260
|
36
|
+
description: Simple gem to handle creating DB grants
|
37
37
|
email:
|
38
38
|
- tyler@monkeypox.org
|
39
39
|
executables: []
|
@@ -65,7 +65,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
65
65
|
version: '0'
|
66
66
|
segments:
|
67
67
|
- 0
|
68
|
-
hash:
|
68
|
+
hash: 625874684965012738
|
69
69
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
70
70
|
none: false
|
71
71
|
requirements:
|
@@ -74,13 +74,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
74
74
|
version: '0'
|
75
75
|
segments:
|
76
76
|
- 0
|
77
|
-
hash:
|
77
|
+
hash: 625874684965012738
|
78
78
|
requirements: []
|
79
79
|
rubyforge_project:
|
80
80
|
rubygems_version: 1.8.10
|
81
81
|
signing_key:
|
82
82
|
specification_version: 3
|
83
|
-
summary: Simple gem to handle creating DB
|
83
|
+
summary: Simple gem to handle creating DB grants
|
84
84
|
test_files:
|
85
85
|
- spec/spec_helper.rb
|
86
86
|
- spec/tasks_spec.rb
|