iron_core 0.5.2 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: b1b2f1ef22c86e785f1ec2d70755035804e64b43
4
+ data.tar.gz: 52feeb2d5388c08f8a0381274e4d9153e8879401
5
+ SHA512:
6
+ metadata.gz: 13dbce9075229d0d28e6fa56613326babd7f452389550d5f0e1474e1c474bb7e26aa5e2a84e5fe29d9c46c65d9861ac6f0a8662b3c7714ac11116d3ba782c944
7
+ data.tar.gz: 54d70264692962a99856c35da3a4010aa08af819dbc705980b7b4ffd0a6be5c602679bf584cbe508275e92569cd97567abc6b5313d0479d17fce39810d807b14
@@ -1,22 +1,20 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- iron_core (0.5.0)
4
+ iron_core (0.6.0)
5
5
  rest (>= 2.2.0)
6
6
 
7
7
  GEM
8
8
  remote: http://rubygems.org/
9
9
  specs:
10
- mime-types (1.19)
11
- minitest (4.4.0)
12
- net-http-persistent (2.8)
13
- rake (10.0.3)
14
- rest (2.2.0)
15
- net-http-persistent
10
+ mime-types (1.22)
11
+ minitest (4.7.1)
12
+ rake (10.0.4)
13
+ rest (2.6.0)
16
14
  rest-client (>= 0.3.0)
17
15
  rest-client (1.6.7)
18
16
  mime-types (>= 1.16)
19
- test-unit (2.5.3)
17
+ test-unit (2.5.4)
20
18
 
21
19
  PLATFORMS
22
20
  ruby
@@ -1,5 +1,6 @@
1
1
  require 'rest'
2
2
  require 'json'
3
+ require 'yaml'
3
4
 
4
5
  require 'iron_core/response_error'
5
6
 
@@ -50,7 +51,7 @@ module IronCore
50
51
  suffixes << ''
51
52
 
52
53
  suffixes.each do |suffix|
53
- ['.json'].each do |ext|
54
+ ['.json', '.yml'].each do |ext|
54
55
  ["#{company}-#{product}", "#{company}_#{product}", company].each do |config_base|
55
56
  load_from_config(company, product, "#{Dir.pwd}/#{config_base}#{suffix}#{ext}")
56
57
  load_from_config(company, product, "#{Dir.pwd}/.#{config_base}#{suffix}#{ext}")
@@ -119,7 +120,13 @@ module IronCore
119
120
  return
120
121
  end
121
122
 
122
- config = JSON.parse(config_data)
123
+ config = nil
124
+
125
+ if config_file.end_with?('.yml')
126
+ config = YAML.load(config_data)
127
+ else
128
+ config = JSON.parse(config_data)
129
+ end
123
130
 
124
131
  unless @env.nil?
125
132
  load_from_hash(config_file, get_sub_hash(config, [@env, "#{company}_#{product}"]))
@@ -1,5 +1,5 @@
1
1
  module IronCore
2
- VERSION = "0.5.2"
2
+ VERSION = "0.6.0"
3
3
 
4
4
  def self.version
5
5
  VERSION
metadata CHANGED
@@ -1,91 +1,79 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: iron_core
3
- version: !ruby/object:Gem::Version
4
- hash: 15
5
- prerelease:
6
- segments:
7
- - 0
8
- - 5
9
- - 2
10
- version: 0.5.2
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.6.0
11
5
  platform: ruby
12
- authors:
6
+ authors:
13
7
  - Andrew Kirilenko
14
8
  - Iron.io, Inc
15
9
  autorequire:
16
10
  bindir: bin
17
11
  cert_chain: []
18
-
19
- date: 2013-03-07 00:00:00 Z
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
12
+ date: 2013-04-12 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
22
15
  name: rest
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- hash: 7
30
- segments:
31
- - 2
32
- - 2
33
- - 0
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - '>='
19
+ - !ruby/object:Gem::Version
34
20
  version: 2.2.0
35
21
  type: :runtime
36
- version_requirements: *id001
37
- - !ruby/object:Gem::Dependency
38
- name: test-unit
39
22
  prerelease: false
40
- requirement: &id002 !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ">="
44
- - !ruby/object:Gem::Version
45
- hash: 3
46
- segments:
47
- - 0
48
- version: "0"
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - '>='
26
+ - !ruby/object:Gem::Version
27
+ version: 2.2.0
28
+ - !ruby/object:Gem::Dependency
29
+ name: test-unit
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - '>='
33
+ - !ruby/object:Gem::Version
34
+ version: '0'
49
35
  type: :development
50
- version_requirements: *id002
51
- - !ruby/object:Gem::Dependency
52
- name: minitest
53
36
  prerelease: false
54
- requirement: &id003 !ruby/object:Gem::Requirement
55
- none: false
56
- requirements:
57
- - - ">="
58
- - !ruby/object:Gem::Version
59
- hash: 3
60
- segments:
61
- - 0
62
- version: "0"
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - '>='
40
+ - !ruby/object:Gem::Version
41
+ version: '0'
42
+ - !ruby/object:Gem::Dependency
43
+ name: minitest
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - '>='
47
+ - !ruby/object:Gem::Version
48
+ version: '0'
63
49
  type: :development
64
- version_requirements: *id003
65
- - !ruby/object:Gem::Dependency
66
- name: rake
67
50
  prerelease: false
68
- requirement: &id004 !ruby/object:Gem::Requirement
69
- none: false
70
- requirements:
71
- - - ">="
72
- - !ruby/object:Gem::Version
73
- hash: 3
74
- segments:
75
- - 0
76
- version: "0"
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - '>='
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
56
+ - !ruby/object:Gem::Dependency
57
+ name: rake
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - '>='
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
77
63
  type: :development
78
- version_requirements: *id004
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
79
70
  description: Core library for Iron products
80
- email:
71
+ email:
81
72
  - info@iron.io
82
73
  executables: []
83
-
84
74
  extensions: []
85
-
86
75
  extra_rdoc_files: []
87
-
88
- files:
76
+ files:
89
77
  - .gitignore
90
78
  - Gemfile
91
79
  - Gemfile.lock
@@ -102,40 +90,26 @@ files:
102
90
  - lib/iron_core/version.rb
103
91
  homepage: https://github.com/iron-io/iron_core_ruby
104
92
  licenses: []
105
-
93
+ metadata: {}
106
94
  post_install_message:
107
95
  rdoc_options: []
108
-
109
- require_paths:
96
+ require_paths:
110
97
  - lib
111
- required_ruby_version: !ruby/object:Gem::Requirement
112
- none: false
113
- requirements:
114
- - - ">="
115
- - !ruby/object:Gem::Version
116
- hash: 31
117
- segments:
118
- - 1
119
- - 8
120
- version: "1.8"
121
- required_rubygems_version: !ruby/object:Gem::Requirement
122
- none: false
123
- requirements:
124
- - - ">="
125
- - !ruby/object:Gem::Version
126
- hash: 23
127
- segments:
128
- - 1
129
- - 3
130
- - 6
98
+ required_ruby_version: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - '>='
101
+ - !ruby/object:Gem::Version
102
+ version: '1.8'
103
+ required_rubygems_version: !ruby/object:Gem::Requirement
104
+ requirements:
105
+ - - '>='
106
+ - !ruby/object:Gem::Version
131
107
  version: 1.3.6
132
108
  requirements: []
133
-
134
109
  rubyforge_project:
135
- rubygems_version: 1.8.24
110
+ rubygems_version: 2.0.2
136
111
  signing_key:
137
- specification_version: 3
112
+ specification_version: 4
138
113
  summary: Core library for Iron products
139
114
  test_files: []
140
-
141
115
  has_rdoc: