decorum 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +17 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +356 -0
- data/Rakefile +1 -0
- data/decorum.gemspec +24 -0
- data/examples/coffee.rb +7 -0
- data/examples/fibonacci_decorator.rb +24 -0
- data/examples/milk_decorator.rb +29 -0
- data/examples/sugar_decorator.rb +12 -0
- data/lib/decorum.rb +14 -0
- data/lib/decorum/bare_particular.rb +5 -0
- data/lib/decorum/chain_stop.rb +7 -0
- data/lib/decorum/decorated_state.rb +29 -0
- data/lib/decorum/decorations.rb +101 -0
- data/lib/decorum/decorator.rb +85 -0
- data/lib/decorum/version.rb +3 -0
- data/spec/integration/coffee_spec.rb +41 -0
- data/spec/integration/fibonacci_spec.rb +20 -0
- data/spec/spec_helper.rb +4 -0
- data/spec/support/decorated_state/shared_state_stub.rb +15 -0
- data/spec/support/decorations/decorated_object_stub.rb +17 -0
- data/spec/support/decorations/first_decorator.rb +20 -0
- data/spec/support/decorations/second_decorator.rb +20 -0
- data/spec/support/decorations/third_decorator.rb +20 -0
- data/spec/support/decorator/basic_decorator.rb +20 -0
- data/spec/support/decorator/decorated_object_stub.rb +17 -0
- data/spec/support/decorator/decorated_state_stub.rb +11 -0
- data/spec/support/decorator/decorator_stub.rb +11 -0
- data/spec/unit/bare_particular_spec.rb +13 -0
- data/spec/unit/chain_stop_spec.rb +12 -0
- data/spec/unit/decorated_state_spec.rb +31 -0
- data/spec/unit/decorations_spec.rb +233 -0
- data/spec/unit/decorator_spec.rb +166 -0
- metadata +146 -0
metadata
ADDED
@@ -0,0 +1,146 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: decorum
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Erik Cameron
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2014-01-04 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: bundler
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '1.3'
|
22
|
+
type: :development
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '1.3'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: rspec
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ~>
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '2.14'
|
38
|
+
type: :development
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '2.14'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: rake
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
description: Tasteful decorators for Ruby. Use it wherever.
|
63
|
+
email:
|
64
|
+
- erik.cameron@gmail.com
|
65
|
+
executables: []
|
66
|
+
extensions: []
|
67
|
+
extra_rdoc_files: []
|
68
|
+
files:
|
69
|
+
- .gitignore
|
70
|
+
- Gemfile
|
71
|
+
- LICENSE.txt
|
72
|
+
- README.md
|
73
|
+
- Rakefile
|
74
|
+
- decorum.gemspec
|
75
|
+
- examples/coffee.rb
|
76
|
+
- examples/fibonacci_decorator.rb
|
77
|
+
- examples/milk_decorator.rb
|
78
|
+
- examples/sugar_decorator.rb
|
79
|
+
- lib/decorum.rb
|
80
|
+
- lib/decorum/bare_particular.rb
|
81
|
+
- lib/decorum/chain_stop.rb
|
82
|
+
- lib/decorum/decorated_state.rb
|
83
|
+
- lib/decorum/decorations.rb
|
84
|
+
- lib/decorum/decorator.rb
|
85
|
+
- lib/decorum/version.rb
|
86
|
+
- spec/integration/coffee_spec.rb
|
87
|
+
- spec/integration/fibonacci_spec.rb
|
88
|
+
- spec/spec_helper.rb
|
89
|
+
- spec/support/decorated_state/shared_state_stub.rb
|
90
|
+
- spec/support/decorations/decorated_object_stub.rb
|
91
|
+
- spec/support/decorations/first_decorator.rb
|
92
|
+
- spec/support/decorations/second_decorator.rb
|
93
|
+
- spec/support/decorations/third_decorator.rb
|
94
|
+
- spec/support/decorator/basic_decorator.rb
|
95
|
+
- spec/support/decorator/decorated_object_stub.rb
|
96
|
+
- spec/support/decorator/decorated_state_stub.rb
|
97
|
+
- spec/support/decorator/decorator_stub.rb
|
98
|
+
- spec/unit/bare_particular_spec.rb
|
99
|
+
- spec/unit/chain_stop_spec.rb
|
100
|
+
- spec/unit/decorated_state_spec.rb
|
101
|
+
- spec/unit/decorations_spec.rb
|
102
|
+
- spec/unit/decorator_spec.rb
|
103
|
+
homepage: ''
|
104
|
+
licenses:
|
105
|
+
- MIT
|
106
|
+
post_install_message:
|
107
|
+
rdoc_options: []
|
108
|
+
require_paths:
|
109
|
+
- lib
|
110
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
111
|
+
none: false
|
112
|
+
requirements:
|
113
|
+
- - ! '>='
|
114
|
+
- !ruby/object:Gem::Version
|
115
|
+
version: '0'
|
116
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
117
|
+
none: false
|
118
|
+
requirements:
|
119
|
+
- - ! '>='
|
120
|
+
- !ruby/object:Gem::Version
|
121
|
+
version: '0'
|
122
|
+
requirements: []
|
123
|
+
rubyforge_project:
|
124
|
+
rubygems_version: 1.8.23
|
125
|
+
signing_key:
|
126
|
+
specification_version: 3
|
127
|
+
summary: Decorum implements the Decorator pattern (more or less) in a fairly unobtrusive
|
128
|
+
way.
|
129
|
+
test_files:
|
130
|
+
- spec/integration/coffee_spec.rb
|
131
|
+
- spec/integration/fibonacci_spec.rb
|
132
|
+
- spec/spec_helper.rb
|
133
|
+
- spec/support/decorated_state/shared_state_stub.rb
|
134
|
+
- spec/support/decorations/decorated_object_stub.rb
|
135
|
+
- spec/support/decorations/first_decorator.rb
|
136
|
+
- spec/support/decorations/second_decorator.rb
|
137
|
+
- spec/support/decorations/third_decorator.rb
|
138
|
+
- spec/support/decorator/basic_decorator.rb
|
139
|
+
- spec/support/decorator/decorated_object_stub.rb
|
140
|
+
- spec/support/decorator/decorated_state_stub.rb
|
141
|
+
- spec/support/decorator/decorator_stub.rb
|
142
|
+
- spec/unit/bare_particular_spec.rb
|
143
|
+
- spec/unit/chain_stop_spec.rb
|
144
|
+
- spec/unit/decorated_state_spec.rb
|
145
|
+
- spec/unit/decorations_spec.rb
|
146
|
+
- spec/unit/decorator_spec.rb
|