heroics 0.0.20 → 0.0.21
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/heroics.gemspec +1 -0
- data/lib/heroics/client.rb +5 -3
- data/lib/heroics/version.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b42c680d9fc2051a178839597105346700c037f
|
4
|
+
data.tar.gz: 994a3d4567585660665351aecfe66709cc360f00
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 39f3ec1ec24f29d83d0d5c5a88fa9ae10a596fdd9e03cc127dc07260fb399333b436413b9f24cfb569ca1055d443cecc768e7d62713a0b79f4510abb612024aa
|
7
|
+
data.tar.gz: c34cbe354b65f8d428e00e26231b0f55b63034580ce8a9afd55357d4b1bb4f44abdba44f2b55af4e7f2d2d21e0cb96772c66fed215db61148f2a2064acc236f3
|
data/heroics.gemspec
CHANGED
@@ -27,6 +27,7 @@ Gem::Specification.new do |spec|
|
|
27
27
|
spec.add_development_dependency 'rake'
|
28
28
|
spec.add_development_dependency 'turn'
|
29
29
|
spec.add_development_dependency 'yard'
|
30
|
+
spec.add_development_dependency 'pry'
|
30
31
|
|
31
32
|
spec.add_dependency 'erubis', '~> 2.0'
|
32
33
|
spec.add_dependency 'excon'
|
data/lib/heroics/client.rb
CHANGED
@@ -8,7 +8,8 @@ module Heroics
|
|
8
8
|
# to resources.
|
9
9
|
# @param url [String] The URL used by this client.
|
10
10
|
def initialize(resources, url)
|
11
|
-
|
11
|
+
# Transform resource keys via the ruby_name replacement semantics
|
12
|
+
@resources = Hash[resources.map{ |k, v| [Heroics.ruby_name(k), v] }]
|
12
13
|
@url = url
|
13
14
|
end
|
14
15
|
|
@@ -21,8 +22,9 @@ module Heroics
|
|
21
22
|
name = name.to_s
|
22
23
|
resource = @resources[name]
|
23
24
|
if resource.nil?
|
24
|
-
#
|
25
|
-
|
25
|
+
# Find the name using the same ruby_name replacement semantics as when
|
26
|
+
# we set up the @resources hash
|
27
|
+
name = Heroics.ruby_name(name)
|
26
28
|
resource = @resources[name]
|
27
29
|
if resource.nil?
|
28
30
|
raise NoMethodError.new("undefined method `#{name}' for #{to_s}")
|
data/lib/heroics/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: heroics
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.21
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- geemus
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-02
|
12
|
+
date: 2017-03-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -109,6 +109,20 @@ dependencies:
|
|
109
109
|
- - ">="
|
110
110
|
- !ruby/object:Gem::Version
|
111
111
|
version: '0'
|
112
|
+
- !ruby/object:Gem::Dependency
|
113
|
+
name: pry
|
114
|
+
requirement: !ruby/object:Gem::Requirement
|
115
|
+
requirements:
|
116
|
+
- - ">="
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: '0'
|
119
|
+
type: :development
|
120
|
+
prerelease: false
|
121
|
+
version_requirements: !ruby/object:Gem::Requirement
|
122
|
+
requirements:
|
123
|
+
- - ">="
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
112
126
|
- !ruby/object:Gem::Dependency
|
113
127
|
name: erubis
|
114
128
|
requirement: !ruby/object:Gem::Requirement
|