fixy 0.0.8 → 0.0.9

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
- SHA1:
3
- metadata.gz: 6e07746c49b92817445207fc85916f5e647852b6
4
- data.tar.gz: 60dfdc9542fa68975f597e1cc583cb66b55acecc
2
+ SHA256:
3
+ metadata.gz: f33b913ca5e515fc32e84463bbb0bca7b04d4fb0349ae673f3906fe8530355c5
4
+ data.tar.gz: 693fbf4d139be73d471c6665fbeed04e26ea5b3f55007672fa6ddeb38d17fec9
5
5
  SHA512:
6
- metadata.gz: 29d42d758cc2bfba96cf64fbf6a1fe2190d5c40348863b0d887dc1ec1521abc1080c116b5202d9b4361108d0050366e88013b4e71870f0fcf131278a46776a06
7
- data.tar.gz: c6b902cc25409fbf0a340464d36e30207fe3f8de30d6c366cfcee3111bc1efeb1adc4abbde84acc769dd2e39a4e4fc2f3fa24be524679a2f66ef716af18ad4ae
6
+ metadata.gz: e8cd433833fa4598b166f4ba4bdfab5879579288b4f977810f50e97ad2391dae9318cf036593d44af8cf871f3a5228ad4c45e75abb6437559cc3a429731045bb
7
+ data.tar.gz: 4b4802efeeb1b0aee6c988428fd15f17e7d9692733199fb6c67fe9053c9a4da488ec6fa3a58f88b5927c7abc8b25ce3853ff19df4cdac8f1c9df2022d43a7342
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## v0.0.9
2
+
3
+ * Fix Proc.new deprecation for block capture.
4
+
1
5
  ## v0.0.8
2
6
 
3
7
  * Strip line endings from fields in record.
data/README.md CHANGED
@@ -153,10 +153,10 @@ Occasionally, it is useful to generate a document using existing records. This i
153
153
  ```ruby
154
154
  class ParsedPeopleDocument < Fixy::Document
155
155
  def build
156
- parse_record IdentityRecord, 'Arcturus Mengsk '
157
- parse_record IdentityRecord, 'Sarah Kerrigan '
158
- parse_record IdentityRecord, 'Jim Raynor '
159
- end
156
+ parse_record IdentityRecord, 'Arcturus Mengsk '
157
+ parse_record IdentityRecord, 'Sarah Kerrigan '
158
+ parse_record IdentityRecord, 'Jim Raynor '
159
+ end
160
160
  end
161
161
  ```
162
162
 
data/lib/fixy/record.rb CHANGED
@@ -14,7 +14,7 @@ module Fixy
14
14
  @line_ending = character
15
15
  end
16
16
 
17
- def field(name, size, range, type)
17
+ def field(name, size, range, type, &block)
18
18
  @record_fields ||= default_record_fields
19
19
  range_matches = range.match /^(\d+)(?:-(\d+))?$/
20
20
 
@@ -42,7 +42,7 @@ module Fixy
42
42
  # We're good to go :)
43
43
  @record_fields[range_from] = { name: name, from: range_from, to: range_to, size: size, type: type}
44
44
 
45
- field_value(name, Proc.new) if block_given?
45
+ field_value(name, block) if block_given?
46
46
  end
47
47
 
48
48
  # Convenience method for creating field methods
data/lib/fixy/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Fixy
2
- VERSION = '0.0.8'
2
+ VERSION = '0.0.9'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fixy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Omar Skalli
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-20 00:00:00.000000000 Z
11
+ date: 2022-05-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -84,7 +84,7 @@ homepage: https://github.com/chetane/fixy
84
84
  licenses:
85
85
  - MIT
86
86
  metadata: {}
87
- post_install_message:
87
+ post_install_message:
88
88
  rdoc_options: []
89
89
  require_paths:
90
90
  - lib
@@ -99,9 +99,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
99
99
  - !ruby/object:Gem::Version
100
100
  version: '0'
101
101
  requirements: []
102
- rubyforge_project:
103
- rubygems_version: 2.4.2
104
- signing_key:
102
+ rubygems_version: 3.0.6
103
+ signing_key:
105
104
  specification_version: 4
106
105
  summary: Provides a DSL for defining, generating, and debugging fixed width documents.
107
106
  test_files: