bloc-atlas 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ee16d277714420f0968d177feb233ffd9585db21
4
- data.tar.gz: 63ecd5615fe24f9b56811921c2fa1a93ff212345
3
+ metadata.gz: 619cbc34d873d222d21ee9effe016c0f086ab373
4
+ data.tar.gz: a4f58755598e2d5e53f489a3098acd23bba08931
5
5
  SHA512:
6
- metadata.gz: 9e29942babaa6bdf64729846ffd9dd599b94088ae968835773513b5f1edff59c40ecf70289df42368a3398def00ee944ab9bc0a74f79da6d631ada5c4d0a62aa
7
- data.tar.gz: 4b7d30c94a49d217d5ad39c44d770ac44f87795d28a86feb9200095fab4307c0982f8f12a547dcaddb0bf114bceb0f854d2c61383c8fc51d8aa79b1e5d3017db
6
+ metadata.gz: b7f6c41cdf06ece55b0442f3e0b2c1fefea269a353d329beb0d6c9568f8410dc4775557210b8dbcc23c55296650cac3843cb636cf020684081a18de8a08b1d73
7
+ data.tar.gz: 6e123eecb6340e6223eb43c78cde7fa489edbb1bc31be0db65dca9d36861dd11af11ca982a7a62f8413bbbd88635a29b1a7e5de39154dba70b45201129332883
data/atlas.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 = "bloc-atlas"
7
- spec.version = '0.1.3'
7
+ spec.version = '0.1.4'
8
8
  spec.authors = ["Rob Madden"]
9
9
  spec.email = ["rob.madden@bloc.io"]
10
10
 
@@ -1,12 +1,12 @@
1
1
  require 'json'
2
2
  require 'active_support/inflector'
3
3
 
4
- module ClassFactory
5
- def ClassFactory.build_response_object(response_hash, name)
4
+ module AtlasClassFactory
5
+ def AtlasClassFactory.build_response_object(response_hash, name)
6
6
  if Object.const_defined?(name.camelize)
7
7
  name.camelize.constantize.new(response_hash)
8
8
  else
9
- generic_class = ClassFactory::GenericClass.new
9
+ generic_class = AtlasClassFactory::GenericClass.new
10
10
  generic_class.create_class name
11
11
  name.camelize.constantize.new(response_hash)
12
12
  end
@@ -1,4 +1,4 @@
1
- require_relative 'class_factory'
1
+ require_relative 'atlas_class_factory'
2
2
 
3
3
  module BaseAtlasClient
4
4
  # Handle API timeouts
@@ -16,9 +16,9 @@ module BaseAtlasClient
16
16
  body = response.body.is_a?(String) ? JSON.parse(response.body) : response.body
17
17
 
18
18
  if body.is_a?(Array)
19
- body.map {|hash| ClassFactory.build_response_object(hash, name)}
19
+ body.map {|hash| AtlasClassFactory.build_response_object(hash, name)}
20
20
  else
21
- ClassFactory.build_response_object(body, name)
21
+ AtlasClassFactory.build_response_object(body, name)
22
22
  end
23
23
  else
24
24
  return response
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bloc-atlas
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rob Madden
@@ -137,8 +137,8 @@ files:
137
137
  - Rakefile
138
138
  - atlas.gemspec
139
139
  - lib/atlas.rb
140
+ - lib/client/atlas_class_factory.rb
140
141
  - lib/client/base_atlas_client.rb
141
- - lib/client/class_factory.rb
142
142
  - lib/client/exercises.rb
143
143
  homepage: http://rubygems.org/gems/bloc-atlas
144
144
  licenses: