meowth 0.0.1 → 0.0.2.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d4bac154e511d7fd7194bb930df12b6cf56468b5
4
- data.tar.gz: f50adfebd880b45bd652a6426b69881ea5e495a8
3
+ metadata.gz: 45f481e5db1226716df53655c4140f3d72fd59f3
4
+ data.tar.gz: fd5e37a958f99126eb80641cecdb502b7c0f12f7
5
5
  SHA512:
6
- metadata.gz: 4bcc0ae5172fd7798f07d6a3fddb0880ef2fa8505be03ee5e7f4232b3c088345e98475859f3b1a467c414524aa376e3761db30b39142849955fc9f0fea205c70
7
- data.tar.gz: 610a8a8fbad2a329f9638279c35787d8d9be930acacfae635e0fd3cfe7f09ff3ac9f387a69fc9f127304b6a9e45a1f786441c5a2106dba39f9ae2922883ebfd6
6
+ metadata.gz: 0b242fe93880d7b831764ecc10b3c6e3afb9829a7d4e742eaf59fe95c85f90ab847167272b615c8ca8106b61835c11e0a2844150f4ab12b50e1c4f01d3d57295
7
+ data.tar.gz: b8a04b0e60a1d28f419e08515fb1ff1854a3c34111ecbdde8844839d5755c83ac2e6ac43e97c2ff7d1868f4d4ae597f90d60a0d5f4926a6cda4275e7f86fdc10
data/lib/meowth/config.rb CHANGED
@@ -60,16 +60,13 @@ module Meowth
60
60
  def self.init_constant
61
61
  if defined?(::Rails) and Rails.root
62
62
  config_file = Rails.root.join('config/meowth.yml')
63
- return YAML.load(ERB.new(File.read(config_file)).result)[Rails.env] if File.exist?(config_file)
63
+ @config = YAML.load(ERB.new(File.read(config_file)).result)[Rails.env] if File.exist?(config_file)
64
64
  else
65
65
  require "yaml"
66
66
  rails_config_file = File.join(Dir.getwd, 'config/meowth.yml')
67
67
  if File.exist?(rails_config_file)
68
68
  rails_env = ENV['RAILS_ENV'] || 'default'
69
- config = YAML.load(ERB.new(File.read(rails_config_file)).result)[rails_env]
70
- if config
71
- @config = config
72
- end
69
+ @config = YAML.load(ERB.new(File.read(rails_config_file)).result)[rails_env] if File.exist?(rails_config_file)
73
70
  end
74
71
  end
75
72
  end
@@ -1,3 +1,3 @@
1
1
  module Meowth
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: meowth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jack Pan
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-03-14 00:00:00.000000000 Z
11
+ date: 2017-03-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler