pio 0.18.1 → 0.18.2

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: b1aaeba878ba42a95f7512584b62bcdc4664e023
4
- data.tar.gz: 76acc8af59e5950e6512e810cba7d8b63e90a9f3
3
+ metadata.gz: 8f3d25e89b140718eea14e7bf453d0da621b3b5b
4
+ data.tar.gz: 085b56cba5a30481ad2ff833b67600b480f58299
5
5
  SHA512:
6
- metadata.gz: 288b7d5cdfdeae54f6cbcb48ce5890ffec014aa7b1099442ea0abb659950f62dd6ed9b279e999ba4040fdaef34cf3f9d4655a7505e55525f841f24a7f8a1b87c
7
- data.tar.gz: daf919d605c6b42d1dd41b79a169ee147249a38773de9cb44af1e6c1c18a6705ba7c47e9ad591e36470fc2388489faab9843ba69960b82b7454ec77d1dc2af5d
6
+ metadata.gz: 0f5344001a2d27f5757f9dfa971d2fa64a65e1aaabe2f8c74b94620c96ae9e19dd77200fad1e41ad70378ff2aa276792a5b50b57a3cf2f6348730f1865689e2b
7
+ data.tar.gz: 47f511b27dce773a818e49883b9fe07f93411dd5bcff8d1e1a3f942fcf16c56a74775aabdc316ba94d425c0fbea98f0180e91db4454a04f43824624c16dfd8d1
data/CHANGELOG.md CHANGED
@@ -3,6 +3,11 @@
3
3
  ## develop (unreleased)
4
4
 
5
5
 
6
+ ## 0.18.2 (3/12/2015)
7
+ ### New features
8
+ * Add attr writers to `Pio::Match` and `Pio::ExactMatch`.
9
+
10
+
6
11
  ## 0.18.1 (3/11/2015)
7
12
  ### Changes
8
13
  * `Lldp#port_number` returns primitive Ruby objects.
@@ -44,22 +44,8 @@ module Pio
44
44
  # rubocop:enable MethodLength
45
45
  # rubocop:enable AbcSize
46
46
 
47
- extend Forwardable
48
-
49
- def_delegator :@match, :wildcards
50
- def_delegator :@match, :in_port
51
- def_delegator :@match, :dl_src
52
- def_delegator :@match, :dl_dst
53
- def_delegator :@match, :dl_vlan
54
- def_delegator :@match, :dl_vlan_pcp
55
- def_delegator :@match, :dl_type
56
- def_delegator :@match, :nw_tos
57
- def_delegator :@match, :nw_proto
58
- def_delegator :@match, :nw_src
59
- def_delegator :@match, :nw_dst
60
- def_delegator :@match, :tp_src
61
- def_delegator :@match, :tp_dst
62
- def_delegator :@match, :to_binary_s
63
- def_delegator :@match, :to_binary_s, :to_binary
47
+ def method_missing(method, *args, &block)
48
+ @match.__send__ method, *args, &block
49
+ end
64
50
  end
65
51
  end
data/lib/pio/match.rb CHANGED
@@ -3,7 +3,6 @@ require 'bindata'
3
3
  require 'pio/open_flow'
4
4
  require 'pio/type/ip_address'
5
5
  require 'pio/type/mac_address'
6
- require 'forwardable'
7
6
 
8
7
  module Pio
9
8
  # Fields to match against flows
@@ -127,26 +126,6 @@ module Pio
127
126
  MatchFormat.read binary
128
127
  end
129
128
 
130
- extend Forwardable
131
-
132
- def_delegators :@format, :wildcards
133
- def_delegators :@format, :in_port
134
- def_delegators :@format, :dl_vlan
135
- def_delegators :@format, :dl_src
136
- def_delegators :@format, :dl_dst
137
- def_delegators :@format, :dl_type
138
- def_delegators :@format, :nw_proto
139
- def_delegators :@format, :tp_src
140
- def_delegators :@format, :tp_dst
141
- def_delegators :@format, :nw_src
142
- def_delegators :@format, :nw_src_all
143
- def_delegators :@format, :nw_dst
144
- def_delegators :@format, :nw_dst_all
145
- def_delegators :@format, :dl_vlan_pcp
146
- def_delegators :@format, :nw_tos
147
- def_delegators :@format, :to_binary_s
148
- def_delegator :@format, :to_binary_s, :to_binary
149
-
150
129
  # rubocop:disable MethodLength
151
130
  # This method smells of :reek:FeatureEnvy
152
131
  # This method smells of :reek:DuplicateMethodCall
@@ -165,9 +144,17 @@ module Pio
165
144
  end
166
145
  # rubocop:enable MethodLength
167
146
 
147
+ def to_binary
148
+ @format.to_binary_s
149
+ end
150
+
168
151
  def ==(other)
169
152
  return false unless other
170
153
  to_binary == other.to_binary
171
154
  end
155
+
156
+ def method_missing(method, *args, &block)
157
+ @format.__send__ method, *args, &block
158
+ end
172
159
  end
173
160
  end
data/lib/pio/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # Base module.
2
2
  module Pio
3
3
  # gem version.
4
- VERSION = '0.18.1'.freeze
4
+ VERSION = '0.18.2'.freeze
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pio
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.1
4
+ version: 0.18.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yasuhito Takamiya
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-11 00:00:00.000000000 Z
11
+ date: 2015-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bindata