blobject 0.2.3 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -1
- data/.pryrc +1 -1
- data/Gemfile.lock +42 -0
- data/README.markdown +157 -0
- data/{README.md → README.md_} +0 -0
- data/Rakefile +1 -1
- data/benchmarks/benchmark.rb +100 -0
- data/benchmarks/results +12 -0
- data/blob_defn.png +0 -0
- data/blobject.gemspec +4 -3
- data/console +7 -0
- data/lib/blobject.rb +218 -168
- data/lib/blobject/version.rb +1 -1
- data/makefile +4 -0
- data/spec/blobject_spec.rb +241 -119
- data/spec/env.rb +12 -0
- data/spec/exec +7 -0
- data/spec/sample_data/sample.json +1 -0
- data/spec/sample_data/sample.yaml +6 -0
- data/spec/sample_data/sample2.json +1 -0
- data/spec/sample_data/sample2.yaml +8 -0
- metadata +51 -15
- data/.rspec +0 -2
- data/benchmark.rb +0 -71
- data/benchmark0 +0 -20
- data/spec/spec_helper.rb +0 -12
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blobject
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2
|
4
|
+
version: 0.3.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2012-06-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
|
-
name:
|
16
|
-
requirement: &
|
15
|
+
name: minitest
|
16
|
+
requirement: &70364931995180 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70364931995180
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
|
-
name:
|
27
|
-
requirement: &
|
26
|
+
name: minitest-reporters
|
27
|
+
requirement: &70364931994120 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,7 +32,29 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70364931994120
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: pry
|
38
|
+
requirement: &70364931993020 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ! '>='
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0'
|
44
|
+
type: :development
|
45
|
+
prerelease: false
|
46
|
+
version_requirements: *70364931993020
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: debugger
|
49
|
+
requirement: &70364931981480 !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
type: :development
|
56
|
+
prerelease: false
|
57
|
+
version_requirements: *70364931981480
|
36
58
|
description: Blobject provides a free flowing syntax for creating blobs of data.
|
37
59
|
email:
|
38
60
|
- sjltaylor@gmail.com
|
@@ -42,19 +64,28 @@ extra_rdoc_files: []
|
|
42
64
|
files:
|
43
65
|
- .gitignore
|
44
66
|
- .pryrc
|
45
|
-
- .rspec
|
46
67
|
- Gemfile
|
47
|
-
-
|
68
|
+
- Gemfile.lock
|
69
|
+
- README.markdown
|
70
|
+
- README.md_
|
48
71
|
- Rakefile
|
49
|
-
- benchmark.rb
|
50
|
-
-
|
72
|
+
- benchmarks/benchmark.rb
|
73
|
+
- benchmarks/results
|
74
|
+
- blob_defn.png
|
51
75
|
- blobject.gemspec
|
52
76
|
- blobject.png
|
53
77
|
- blobject.psd
|
78
|
+
- console
|
54
79
|
- lib/blobject.rb
|
55
80
|
- lib/blobject/version.rb
|
81
|
+
- makefile
|
56
82
|
- spec/blobject_spec.rb
|
57
|
-
- spec/
|
83
|
+
- spec/env.rb
|
84
|
+
- spec/exec
|
85
|
+
- spec/sample_data/sample.json
|
86
|
+
- spec/sample_data/sample.yaml
|
87
|
+
- spec/sample_data/sample2.json
|
88
|
+
- spec/sample_data/sample2.yaml
|
58
89
|
homepage: https://github.com/sjltaylor/blobject
|
59
90
|
licenses: []
|
60
91
|
post_install_message:
|
@@ -75,10 +106,15 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
75
106
|
version: '0'
|
76
107
|
requirements: []
|
77
108
|
rubyforge_project: blobject
|
78
|
-
rubygems_version: 1.8.
|
109
|
+
rubygems_version: 1.8.15
|
79
110
|
signing_key:
|
80
111
|
specification_version: 3
|
81
112
|
summary: serializable object builder
|
82
113
|
test_files:
|
83
114
|
- spec/blobject_spec.rb
|
84
|
-
- spec/
|
115
|
+
- spec/env.rb
|
116
|
+
- spec/exec
|
117
|
+
- spec/sample_data/sample.json
|
118
|
+
- spec/sample_data/sample.yaml
|
119
|
+
- spec/sample_data/sample2.json
|
120
|
+
- spec/sample_data/sample2.yaml
|
data/.rspec
DELETED
data/benchmark.rb
DELETED
@@ -1,71 +0,0 @@
|
|
1
|
-
require 'benchmark'
|
2
|
-
require_relative 'lib/blobject'
|
3
|
-
|
4
|
-
class A
|
5
|
-
attr_accessor :member1
|
6
|
-
|
7
|
-
def member1=v
|
8
|
-
$m1 ||=0
|
9
|
-
$m1 += 1
|
10
|
-
@member1 = v
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
iterations = 100000
|
15
|
-
|
16
|
-
a = A.new
|
17
|
-
b = blobject
|
18
|
-
h = {}
|
19
|
-
|
20
|
-
value = "VALUE"
|
21
|
-
|
22
|
-
a.member1 = value
|
23
|
-
b.modify { member1 value }
|
24
|
-
h[:member1] = value
|
25
|
-
|
26
|
-
puts "\n\nITERATIONS: #{iterations}\n\n"
|
27
|
-
puts "\nBENCHMARK: attr_write\n=====================\n\n"
|
28
|
-
|
29
|
-
Benchmark.bm do |benchmark|
|
30
|
-
|
31
|
-
benchmark.report("Object: ") do
|
32
|
-
iterations.times do
|
33
|
-
a.member1 = value
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
benchmark.report("Hash: ") do
|
38
|
-
iterations.times do
|
39
|
-
h[:member1] = value
|
40
|
-
end
|
41
|
-
end
|
42
|
-
|
43
|
-
benchmark.report("Blobject: ") do
|
44
|
-
iterations.times do
|
45
|
-
b.modify { member1 value }
|
46
|
-
end
|
47
|
-
end
|
48
|
-
end
|
49
|
-
|
50
|
-
puts "\n\nBENCHMARK: attr_read\n=====================\n\n"
|
51
|
-
|
52
|
-
Benchmark.bm do |benchmark|
|
53
|
-
|
54
|
-
benchmark.report("Object: ") do
|
55
|
-
iterations.times do
|
56
|
-
v = a.member1
|
57
|
-
end
|
58
|
-
end
|
59
|
-
|
60
|
-
benchmark.report("Hash: ") do
|
61
|
-
iterations.times do
|
62
|
-
v = h[:member1]
|
63
|
-
end
|
64
|
-
end
|
65
|
-
|
66
|
-
benchmark.report("Blobject: ") do
|
67
|
-
iterations.times do
|
68
|
-
v = b.member1
|
69
|
-
end
|
70
|
-
end
|
71
|
-
end
|
data/benchmark0
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
ITERATIONS: 100000
|
2
|
-
|
3
|
-
BENCHMARK: attr_write
|
4
|
-
=====================
|
5
|
-
|
6
|
-
user system total real
|
7
|
-
Object: 0.030000 0.000000 0.030000 ( 0.029947)
|
8
|
-
Hash: 0.020000 0.000000 0.020000 ( 0.023872)
|
9
|
-
Blobject: 0.690000 0.000000 0.690000 ( 0.690897) ... oof!
|
10
|
-
|
11
|
-
|
12
|
-
BENCHMARK: attr_read
|
13
|
-
=====================
|
14
|
-
|
15
|
-
user system total real
|
16
|
-
Object: 0.020000 0.000000 0.020000 ( 0.017419)
|
17
|
-
Hash: 0.010000 0.000000 0.010000 ( 0.017054)
|
18
|
-
Blobject: 0.180000 0.000000 0.180000 ( 0.182304) ... oof!
|
19
|
-
|
20
|
-
|