spnet 0.1.7 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -36,4 +36,8 @@ Every block is given just one parameter: a Hash containing the :sample_rate key.
36
36
 
37
37
  Change port_params to params.
38
38
  Only export params that have changed from initialization.
39
- Remove @name from Network class.
39
+ Remove @name from Network class.
40
+
41
+ === 0.1.8 / 2013-07-03
42
+
43
+ Update for compatibility with hashmake-0.2.0.
@@ -21,7 +21,7 @@ class Block
21
21
  # @param [Hash] args Hashed arguments for initialization. See Block::ARG_SPECS
22
22
  # for details of which keys are required.
23
23
  def initialize args = {}
24
- hash_make Block::ARG_SPECS, args
24
+ hash_make args, Block::ARG_SPECS
25
25
  @initial_params = collect_params
26
26
  end
27
27
 
@@ -17,7 +17,7 @@ class InPort
17
17
  # @param [Hash] args Hashed arguments for initialization. See InPort::ARG_SPECS
18
18
  # for details.
19
19
  def initialize args
20
- hash_make InPort::ARG_SPECS, args
20
+ hash_make args, InPort::ARG_SPECS
21
21
  @link = nil
22
22
  end
23
23
 
@@ -19,7 +19,7 @@ class Link
19
19
  # @param [Hash] args Hashed arguments for initialization. See Link::ARG_SPECS
20
20
  # for details of which keys are required.
21
21
  def initialize args = {}
22
- hash_make Link::ARG_SPECS, args
22
+ hash_make args, Link::ARG_SPECS
23
23
 
24
24
  raise ArgumentError, "from port class #{@from.class} is not a #{@to.matching_class}" unless @from.is_a?(@to.matching_class)
25
25
  raise ArgumentError, "to port class #{@to.class} is not a #{@from.matching_class}" unless @to.is_a?(@from.matching_class)
@@ -20,7 +20,7 @@ class Network
20
20
  # @param [Hash] args Hashed arguments for initialization. See Network::ARG_SPECS
21
21
  # for details of which keys are required.
22
22
  def initialize args = {}
23
- hash_make Network::ARG_SPECS, args
23
+ hash_make args, Network::ARG_SPECS
24
24
 
25
25
  # ensure that all sample rates match given rate
26
26
  @blocks.each do |block_name, block|
@@ -17,7 +17,7 @@ class OutPort
17
17
  # @param [Hash] args Hashed arguments for initialization. See OutPort::ARG_SPECS
18
18
  # for details.
19
19
  def initialize args
20
- hash_make OutPort::ARG_SPECS, args
20
+ hash_make args, OutPort::ARG_SPECS
21
21
  @link = nil
22
22
  end
23
23
 
@@ -16,7 +16,7 @@ class CommandInPort < InPort
16
16
  # @param [Hash] hashed_args Hashed arguments for initialization. See Network::ARG_SPECS
17
17
  # for details.
18
18
  def initialize hashed_args
19
- hash_make CommandInPort::ARG_SPECS, hashed_args
19
+ hash_make hashed_args, CommandInPort::ARG_SPECS
20
20
  super(:matching_class => CommandOutPort)
21
21
  end
22
22
 
@@ -20,7 +20,7 @@ class ParamInPort < InPort
20
20
  # @param [Hash] hashed_args Hashed arguments for initialization. See Network::ARG_SPECS
21
21
  # for details.
22
22
  def initialize hashed_args = {}
23
- hash_make ParamInPort::ARG_SPECS, hashed_args
23
+ hash_make hashed_args, ParamInPort::ARG_SPECS
24
24
  @skip_limiting = @limiter.is_a?(NoLimiter)
25
25
 
26
26
  super(:matching_class => ParamOutPort)
@@ -18,7 +18,7 @@ class SignalInPort < InPort
18
18
  # @param [Hash] hashed_args Hashed arguments for initialization. See Network::ARG_SPECS
19
19
  # for details.
20
20
  def initialize hashed_args = {}
21
- hash_make SignalInPort::ARG_SPECS, hashed_args
21
+ hash_make hashed_args, SignalInPort::ARG_SPECS
22
22
 
23
23
  @queue = []
24
24
  @skip_limiting = @limiter.is_a?(NoLimiter)
@@ -18,7 +18,7 @@ class BlockState
18
18
  # @param [Hash] args Hashed arguments for initialization. See Network::ARG_SPECS
19
19
  # for details of which keys are required.
20
20
  def initialize args
21
- hash_make BlockState::ARG_SPECS, args
21
+ hash_make args, BlockState::ARG_SPECS
22
22
  end
23
23
 
24
24
  # Produce a Block object from the current BlockState object.
@@ -15,7 +15,7 @@ class LinkState
15
15
  attr_reader :from, :to
16
16
 
17
17
  def initialize args
18
- hash_make ARG_SPECS, args
18
+ hash_make args, ARG_SPECS
19
19
  end
20
20
 
21
21
  # Make a Link objet from the current LinkState object.
@@ -18,7 +18,7 @@ class NetworkState
18
18
  # @param [Hash] args Hashed arguments for initialization. See Network::ARG_SPECS
19
19
  # for details of which keys are required.
20
20
  def initialize args = {}
21
- hash_make NetworkState::ARG_SPECS, args
21
+ hash_make args, NetworkState::ARG_SPECS
22
22
  end
23
23
 
24
24
  # Produce a Network object from the current NetworkState object.
@@ -15,7 +15,7 @@ class PortLocater
15
15
  attr_reader :block_name, :port_name
16
16
 
17
17
  def initialize args
18
- hash_make ARG_SPECS, args
18
+ hash_make args, ARG_SPECS
19
19
  end
20
20
  end
21
21
  end
@@ -1,5 +1,5 @@
1
1
  # Provide infrastructure for forming processing networks.
2
2
  module SPNet
3
3
  # spnet version
4
- VERSION = "0.1.7"
4
+ VERSION = "0.1.8"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spnet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-03 00:00:00.000000000 Z
12
+ date: 2013-07-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: hashmake
@@ -186,7 +186,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
186
186
  version: '0'
187
187
  segments:
188
188
  - 0
189
- hash: -2015029166841238127
189
+ hash: -292303110774403795
190
190
  required_rubygems_version: !ruby/object:Gem::Requirement
191
191
  none: false
192
192
  requirements:
@@ -195,7 +195,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
195
195
  version: '0'
196
196
  segments:
197
197
  - 0
198
- hash: -2015029166841238127
198
+ hash: -292303110774403795
199
199
  requirements: []
200
200
  rubyforge_project:
201
201
  rubygems_version: 1.8.23