freeswitcher 0.5.11 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
1
- require 'ostruct'
1
+ require_relative '../ostruct'
2
2
  module FSR
3
3
  module Model
4
4
  class Agent < OpenStruct
@@ -1,5 +1,4 @@
1
- require 'ostruct'
2
-
1
+ require_relative '../ostruct'
3
2
  module FSR
4
3
  module Model
5
4
  class Call < OpenStruct
@@ -1,5 +1,4 @@
1
- require 'ostruct'
2
-
1
+ require_relative '../ostruct'
3
2
  module FSR
4
3
  module Model
5
4
  class Channel < OpenStruct
@@ -1,5 +1,4 @@
1
- require 'ostruct'
2
-
1
+ require_relative '../ostruct'
3
2
  module FSR
4
3
  module Model
5
4
  class Queue < OpenStruct
@@ -1,5 +1,4 @@
1
- require 'ostruct'
2
-
1
+ require_relative '../ostruct'
3
2
  module FSR
4
3
  module Model
5
4
  class Tier < OpenStruct
@@ -0,0 +1,13 @@
1
+ require "ostruct"
2
+ require "json"
3
+ module FSR
4
+ class OpenStruct < ::OpenStruct
5
+ def to_json(*args)
6
+ @table.to_json *args
7
+ end
8
+
9
+ def to_hash
10
+ @table.dup
11
+ end
12
+ end
13
+ end
data/lib/fsr/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module FSR
2
- VERSION = "0.5.11"
2
+ VERSION = "0.6.0"
3
3
  end
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 5
8
- - 11
9
- version: 0.5.11
7
+ - 6
8
+ - 0
9
+ version: 0.6.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Jayson Vaughn
@@ -110,13 +110,13 @@ files:
110
110
  - lib/fsr/listener/inbound/event.rb
111
111
  - lib/fsr/listener/mock.rb
112
112
  - lib/fsr/listener/outbound.rb
113
- - lib/fsr/model.rb
114
113
  - lib/fsr/model/agent.rb
115
114
  - lib/fsr/model/call.rb
116
115
  - lib/fsr/model/channel.rb
117
116
  - lib/fsr/model/enum.rb
118
117
  - lib/fsr/model/queue.rb
119
118
  - lib/fsr/model/tier.rb
119
+ - lib/fsr/ostruct.rb
120
120
  - lib/fsr/version.rb
121
121
  - lib/rack/middleware.rb
122
122
  - tasks/authors.rake
data/lib/fsr/model.rb DELETED
@@ -1,11 +0,0 @@
1
- module FSR
2
- module Model
3
- def to_hash
4
- Hash[fields.map { |f| [f,self.send(f.to_sym)] }]
5
- end
6
-
7
- def inspect
8
- "<##{self.object_id} #{self.class} - #{self.to_hash}>"
9
- end
10
- end
11
- end