kori 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (6) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +5 -1
  3. data/Gemfile +0 -3
  4. data/kori.gemspec +1 -2
  5. data/lib/kori.rb +3 -8
  6. metadata +2 -16
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7a174295f0da0dd1d18d2d923e39bcc9acc1f55a
4
- data.tar.gz: 7d906c048cc5f37f16a3475b5b68526bb11a670e
3
+ metadata.gz: 39d37086d8f33966883e54c70bf0e43f645f8e27
4
+ data.tar.gz: a03634cf6acf6ca980c600b2c02ab6bb735af658
5
5
  SHA512:
6
- metadata.gz: 5492aacdd29e4b870406ad6ea932a027324ee7d2999d0c6326f8a6e49ba4881c9ce32641c6c619b814fc898ba3a6c3860e0c8a76e735ff384613ccdcfa9fddf3
7
- data.tar.gz: 440b0476586446c93acd5c4653954e3a8c6a645e4ee239290feb7c054f4d63c52867f9f91b81ff077438dc794edd9e5af065fc157036e1ede7b9abfbac413d57
6
+ metadata.gz: 92bfc88d73951b703d040862a0059d8c1dc6da5e6eda1bf6303ea50484be81a31704c9aaeb6e4b071a5227304916fd948c76f8d2757578ae8e7a933f4d1b37e7
7
+ data.tar.gz: 3aa38633a2de72d4c1a787bcd386ad04a08a7c3e57186f0a846c6ddc593ea72cef4a2829d325a1d26c3271ccebfbdea1e9a034f506e168cc560b3ba3119cdb0f
data/.travis.yml CHANGED
@@ -1,7 +1,11 @@
1
1
  language: ruby
2
2
  rvm:
3
+ - 2.1.6
4
+ - 2.2.0
5
+ - 2.2.1
3
6
  - 2.2.2
4
- before_install: gem install bundler -v 1.10.5
7
+ - 2.2.3
8
+ before_install: gem install bundler -v 1.10.6
5
9
  addons:
6
10
  code_climate:
7
11
  repo_token: c05778589e31826bd230d58f92c598299c96c83805126865525a976c0d4807ce
data/Gemfile CHANGED
@@ -9,9 +9,6 @@ end
9
9
 
10
10
  group :test do
11
11
  gem 'minitest'
12
- gem 'minitest-around'
13
- gem 'minitest-power_assert'
14
- gem 'minitest-stub_any_instance'
15
12
  gem 'minitest-reporters'
16
13
  gem "codeclimate-test-reporter", require: false
17
14
  end
data/kori.gemspec CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = 'kori'
7
- spec.version = '0.3.0'
7
+ spec.version = '0.3.1'
8
8
  spec.authors = ['nalabjp']
9
9
  spec.email = ['nalabjp@gmail.com']
10
10
 
@@ -22,5 +22,4 @@ Gem::Specification.new do |spec|
22
22
 
23
23
  spec.add_development_dependency 'bundler', '~> 1.10'
24
24
  spec.add_development_dependency 'rake', '~> 10.0'
25
- spec.add_development_dependency 'minitest'
26
25
  end
data/lib/kori.rb CHANGED
@@ -50,7 +50,7 @@ class Kori < Hash
50
50
  when String, Symbol
51
51
  replace(load_yaml(file_or_hash))
52
52
  else
53
- raise "Could not load configuration. No such file - #{file_or_hash}"
53
+ raise ArgumentError, "Could not load configuration. Invalid type of argument (#{file_or_hash.class.name})."
54
54
  end
55
55
 
56
56
  create_accessors!
@@ -59,13 +59,8 @@ class Kori < Hash
59
59
  def load_yaml(file)
60
60
  on_rails = !!defined?(Rails)
61
61
 
62
- file = if on_rails
63
- "#{rails_config_path}/#{file}.yml"
64
- elsif file.is_a?(Symbol)
65
- file.to_s.concat('.yml')
66
- else
67
- file
68
- end
62
+ file = "#{rails_config_path}/#{file}.yml" if on_rails
63
+ file = file.to_s.concat('.yml') if file.is_a?(Symbol)
69
64
 
70
65
  config = YAML.load(ERB.new(File.read(file)).result)
71
66
  config = config[Rails.env] if on_rails
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kori
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - nalabjp
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-11-21 00:00:00.000000000 Z
11
+ date: 2015-11-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ice_nine
@@ -52,20 +52,6 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '10.0'
55
- - !ruby/object:Gem::Dependency
56
- name: minitest
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
55
  description: Deep frozen objects from yaml or hash.
70
56
  email:
71
57
  - nalabjp@gmail.com