monetra 0.1.12 → 0.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Rakefile +1 -1
- data/lib/monetra/configuration.rb +10 -3
- data/monetra.gemspec +1 -1
- metadata +1 -1
data/Rakefile
CHANGED
|
@@ -3,7 +3,7 @@ require 'psych'
|
|
|
3
3
|
require 'rake'
|
|
4
4
|
require 'echoe'
|
|
5
5
|
YAML::ENGINE.yamler = 'syck'
|
|
6
|
-
Echoe.new('monetra', '0.1.
|
|
6
|
+
Echoe.new('monetra', '0.1.13') do |p|
|
|
7
7
|
p.description = "A gem that uses the Monetra API to perform actions"
|
|
8
8
|
p.url = "http://github.com/winelibrary/monetra"
|
|
9
9
|
p.author = ["Dan Ahern", "John Kassimatis", "Brian Woolley"]
|
|
@@ -4,11 +4,18 @@ module Monetra
|
|
|
4
4
|
def options(options_or_path_to=nil)
|
|
5
5
|
@options ||= case options_or_path_to.class.to_s
|
|
6
6
|
when "String"
|
|
7
|
-
YAML::load_file(options_or_path_to)
|
|
7
|
+
YAML::load_file(options_or_path_to).stringify_keys!
|
|
8
8
|
when "Hash"
|
|
9
|
-
options_or_path_to
|
|
9
|
+
options_or_path_to.stringify_keys!
|
|
10
10
|
when "NilClass"
|
|
11
|
-
|
|
11
|
+
case
|
|
12
|
+
when defined?(Rails)
|
|
13
|
+
YAML::load_file(File.join(Rails.root, 'config', 'monetra.yml'))[Rails.env].stringify_keys!
|
|
14
|
+
when ENV['RACK_ENV']
|
|
15
|
+
YAML::load_file(File.join('.', 'config', 'monetra.yml'))[ENV['RACK_ENV']].stringify_keys!
|
|
16
|
+
when ENV['RAILS_ENV']
|
|
17
|
+
YAML::load_file(File.join('.', 'config', 'monetra.yml'))[ENV['RAILS_ENV']].stringify_keys!
|
|
18
|
+
end
|
|
12
19
|
end
|
|
13
20
|
end
|
|
14
21
|
|
data/monetra.gemspec
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Gem::Specification.new do |s|
|
|
4
4
|
s.name = "monetra"
|
|
5
|
-
s.version = "0.1.
|
|
5
|
+
s.version = "0.1.13"
|
|
6
6
|
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
|
8
8
|
s.authors = ["Dan Ahern, John Kassimatis, Brian Woolley"]
|