iibee 0.1.0 → 0.1.4

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: 5dcd8bd75488fdd3dbc6435ff05151c1008b2bbe
4
- data.tar.gz: f55e84b30ed82a782317951cc7a5fb2401805b41
3
+ metadata.gz: 2cf4b444de3cbc46579f3cf3479a015802dee1cb
4
+ data.tar.gz: 8ef0a03832c927ef04a30ebd99bc2ad1fe59a9b9
5
5
  SHA512:
6
- metadata.gz: 2a29161eddda61f861d95b410fc6fa7e91c4b6911bdb22cf2b64c9b4038de26393040e683a73005eee4293c89e45b8b4bbdde54fc74c9a9c61edc39557d19d1c
7
- data.tar.gz: 7565c70e25c6fdf87fd4dc6d317224517f4c3000d5f7e07627f7bb9b02a7c1d1943eb140697971956979247cecbed63c4e02e6f352321ac0461aa9a04437ecbb
6
+ metadata.gz: f338e8fe565bcebe6b60bfa1d29b8bffa51abd8800f79c128cf71a3de944d802724c12072973dcc30f9e05bc49cdf88203c8e48d52c30fe81db3bfd422ed98e9
7
+ data.tar.gz: 751341cd8310c974318e4a439aa76a6e37121006be2a04ce5354b54c7e1b3c0b5370a4231e18ba7b6c3031805a3dd1394e168840f4e494e3551181c128105ef5
data/.gitignore CHANGED
@@ -8,3 +8,4 @@
8
8
  /spec/reports/
9
9
  /tmp/
10
10
  /vendor/
11
+ iib*.gem
data/README.md CHANGED
@@ -1,8 +1,10 @@
1
- # Iibee
1
+ [![Codeship Status for quantiguous/iibee](https://codeship.com/projects/8b85c0f0-36f8-0133-93cb-2615b91c1f97/status?branch=master)](https://codeship.com/projects/100974)
2
+ [![Code Climate](https://codeclimate.com/github/quantiguous/iibee/badges/gpa.svg)](https://codeclimate.com/github/quantiguous/iibee)
3
+ [![Test Coverage](https://codeclimate.com/github/quantiguous/iibee/badges/coverage.svg)](https://codeclimate.com/github/quantiguous/iibee/coverage)
2
4
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/iibee`. To experiment with that code, run `bin/console` for an interactive prompt.
5
+ # Iibee
4
6
 
5
- TODO: Delete this and the text above, and describe your gem
7
+ A ruby sdk for the IIB REST API
6
8
 
7
9
  ## Installation
8
10
 
data/iibee.gemspec CHANGED
@@ -18,6 +18,8 @@ Gem::Specification.new do |spec|
18
18
  spec.bindir = "exe"
19
19
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
20
  spec.require_paths = ["lib"]
21
+
22
+ spec.required_ruby_version = '>= 1.9.3'
21
23
 
22
24
  spec.add_development_dependency "bundler", "~> 1.9"
23
25
  spec.add_development_dependency "rake", "~> 10.0"
data/lib/iibee/broker.rb CHANGED
@@ -1,10 +1,9 @@
1
1
  require 'faraday'
2
2
  require 'oga'
3
3
 
4
- API_URL = "http://10.211.55.7:4424/apiv1/properties"
5
-
6
4
  module Iibee
7
5
  class Broker
6
+ CONTEXT_PATH = "/properties/"
8
7
  attr_reader :AdminSecurity, :version, :name, :runMode, :shortDesc, :longDesc,
9
8
  :platformName, :FixpackCapability, :platformArchitecture, :platformVersion, :operationMode, :buildLevel, :AdminAgentPID, :queueManager
10
9
 
@@ -28,7 +27,7 @@ module Iibee
28
27
  end
29
28
 
30
29
  def self.find(id)
31
- response = Faraday.get("#{API_URL}/")
30
+ response = Faraday.get("#{Iibee.configuration.base_url}#{CONTEXT_PATH}")
32
31
  document = Oga.parse_xml(response.body)
33
32
  new(document)
34
33
  end
@@ -0,0 +1,9 @@
1
+ module Iibee
2
+ class Configuration
3
+ attr_reader :base_url
4
+
5
+ def base_url=(base_url)
6
+ @base_url = base_url.chomp("/")
7
+ end
8
+ end
9
+ end
data/lib/iibee/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Iibee
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.4"
3
3
  end
data/lib/iibee.rb CHANGED
@@ -1,6 +1,17 @@
1
1
  require "iibee/version"
2
2
  require "iibee/broker"
3
+ require "iibee/configuration"
3
4
 
4
5
  module Iibee
5
- # Your code goes here...
6
+ class << self
7
+ attr_writer :configuration
8
+ end
9
+
10
+ def self.configuration
11
+ @configuration ||= Configuration.new
12
+ end
13
+
14
+ def self.configure
15
+ yield(configuration)
16
+ end
6
17
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iibee
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - akil
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-09-06 00:00:00.000000000 Z
11
+ date: 2015-09-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -127,6 +127,7 @@ files:
127
127
  - iibee.gemspec
128
128
  - lib/iibee.rb
129
129
  - lib/iibee/broker.rb
130
+ - lib/iibee/configuration.rb
130
131
  - lib/iibee/version.rb
131
132
  homepage: http://quantiguous.com.
132
133
  licenses:
@@ -140,7 +141,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
140
141
  requirements:
141
142
  - - ">="
142
143
  - !ruby/object:Gem::Version
143
- version: '0'
144
+ version: 1.9.3
144
145
  required_rubygems_version: !ruby/object:Gem::Requirement
145
146
  requirements:
146
147
  - - ">="