packed-model 0.1.8 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ Y2M3MDMxYmI2NGNhZWUzODEyNDE3MDNmOTNhMDgwOWY0ZTQwZGQwNw==
5
+ data.tar.gz: !binary |-
6
+ MjE3OTEzMzM5MDE3MmYzOTVhOGYzNWI5MGFlNDBjMjZlMjk5N2E2MA==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ MDI5Mjk1MjA2ZjQ2MjQ5Y2YyYTE0NmNkNWZhZDAwNTg4MDgxODg2MDI5N2Y5
10
+ OTYwZGI3NGMyNTQwZWZiZmM4NWQ2MWNmZWRiYzgzOTc4N2RkYWM4ZGQ2MTUz
11
+ Njg3YmQ3ZjdiNjQxNWI4NTRiOTQzOTIwNzlkM2RjYTkzYzNjMDE=
12
+ data.tar.gz: !binary |-
13
+ MDA2MjlmYTE2YzE1NDcyYmJmNWQxNzg0NGIwOTI4ZWVjNDYzOTAwNzU1NzY1
14
+ YzBmNmI4YThiZDMzY2FlMjlhMTRhM2U1NDk5NzMwODkxYjk5NjNhYTYxOTYx
15
+ NGY5MWM0N2UzZWUxNmUzMGZmZmJiMzc0ZDg0MjMzZTBkZWJiMzU=
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.8
1
+ 0.2.0
@@ -5,6 +5,7 @@ module PackedModel
5
5
  def initialize(row_class, values=nil)
6
6
  raise InvalidPackedModelException.new("row_class must be fixed width") unless row_class.fixed_width?
7
7
  @row_class = row_class
8
+ values.force_encoding(Encoding::BINARY) if values.respond_to?(:force_encoding)
8
9
  @buffer = values
9
10
  end
10
11
 
@@ -34,7 +35,7 @@ module PackedModel
34
35
  def pack
35
36
  return repack if @must_repack
36
37
  return @buffer unless @rows
37
- @buffer ||= ''
38
+ @buffer ||= ''.force_encoding(Encoding::BINARY)
38
39
  start = 0
39
40
  @rows.each_with_index do |row, idx|
40
41
  # only updated dirty rows
@@ -49,7 +50,7 @@ module PackedModel
49
50
 
50
51
  # repacks the buffer
51
52
  def repack
52
- @buffer = ''
53
+ @buffer = ''.force_encoding(Encoding::BINARY)
53
54
  self.each do |row|
54
55
  next unless row
55
56
  @buffer << row.pack
@@ -2,14 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
+ # stub: packed-model 0.2.0 ruby lib
5
6
 
6
7
  Gem::Specification.new do |s|
7
8
  s.name = "packed-model"
8
- s.version = "0.1.8"
9
+ s.version = "0.2.0"
9
10
 
10
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
+ s.require_paths = ["lib"]
11
13
  s.authors = ["Doug Youch"]
12
- s.date = "2014-01-21"
14
+ s.date = "2015-06-08"
13
15
  s.description = "Used to minimize storage space required to store list of data"
14
16
  s.email = "doug@sessionm.com"
15
17
  s.extra_rdoc_files = [
@@ -37,12 +39,11 @@ Gem::Specification.new do |s|
37
39
  ]
38
40
  s.homepage = "http://github.com/dyouch5@yahoo.com/packed-model"
39
41
  s.licenses = ["MIT"]
40
- s.require_paths = ["lib"]
41
- s.rubygems_version = "1.8.23"
42
+ s.rubygems_version = "2.4.6"
42
43
  s.summary = "PackedModel stores model data in a binary string"
43
44
 
44
45
  if s.respond_to? :specification_version then
45
- s.specification_version = 3
46
+ s.specification_version = 4
46
47
 
47
48
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
48
49
  s.add_development_dependency(%q<jeweler>, [">= 0"])
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: packed-model
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
5
- prerelease:
4
+ version: 0.2.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Doug Youch
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2014-01-21 00:00:00.000000000 Z
11
+ date: 2015-06-08 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: jeweler
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ! '>='
20
18
  - !ruby/object:Gem::Version
@@ -22,7 +20,6 @@ dependencies:
22
20
  type: :development
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - ! '>='
28
25
  - !ruby/object:Gem::Version
@@ -30,7 +27,6 @@ dependencies:
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: rspec
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - ! '>='
36
32
  - !ruby/object:Gem::Version
@@ -38,7 +34,6 @@ dependencies:
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - ! '>='
44
39
  - !ruby/object:Gem::Version
@@ -71,29 +66,25 @@ files:
71
66
  homepage: http://github.com/dyouch5@yahoo.com/packed-model
72
67
  licenses:
73
68
  - MIT
69
+ metadata: {}
74
70
  post_install_message:
75
71
  rdoc_options: []
76
72
  require_paths:
77
73
  - lib
78
74
  required_ruby_version: !ruby/object:Gem::Requirement
79
- none: false
80
75
  requirements:
81
76
  - - ! '>='
82
77
  - !ruby/object:Gem::Version
83
78
  version: '0'
84
- segments:
85
- - 0
86
- hash: 2279594938976666295
87
79
  required_rubygems_version: !ruby/object:Gem::Requirement
88
- none: false
89
80
  requirements:
90
81
  - - ! '>='
91
82
  - !ruby/object:Gem::Version
92
83
  version: '0'
93
84
  requirements: []
94
85
  rubyforge_project:
95
- rubygems_version: 1.8.23
86
+ rubygems_version: 2.4.6
96
87
  signing_key:
97
- specification_version: 3
88
+ specification_version: 4
98
89
  summary: PackedModel stores model data in a binary string
99
90
  test_files: []