monetra 0.1.12 → 0.1.13

Sign up to get free protection for your applications and to get access to all the features.
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.12') do |p|
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
- YAML::load_file(File.join(Rails.root, 'config', 'monetra.yml'))[Rails.env]
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.12"
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"]
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: monetra
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.12
5
+ version: 0.1.13
6
6
  platform: ruby
7
7
  authors:
8
8
  - Dan Ahern, John Kassimatis, Brian Woolley