burgundy 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +3 -2
- data/README.md +3 -0
- data/lib/burgundy/collection.rb +2 -1
- data/lib/burgundy/version.rb +1 -1
- data/spec/burgundy_spec.rb +13 -8
- data/spec/dummy/config/environments/test.rb +1 -1
- data/spec/spec_helper.rb +0 -3
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f7c3874c398cc2ab2ef4400629e242daead00ec7
|
4
|
+
data.tar.gz: 64871202971ab0a7570437edb627692d23a0743d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c9c17ab637cb9ebf6702778821f7498f313beffedfb92231d80c29af8df4e8338dcf75f7772f8880ba077adcadf5d79c2f4733673bf78534c833c30eb3eae21
|
7
|
+
data.tar.gz: c4da20444705bc989ce27efb8cfa2f692963460a8470968ad16932b0b709a9f3c0a39cbd5b5ec54710e7205cec02b11edda29fbbdc8bf05393ccdf58606c0817
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# Burgundy
|
2
2
|
|
3
|
+
[](https://travis-ci.org/fnando/burgundy)
|
4
|
+
[](https://codeclimate.com/github/fnando/burgundy)
|
5
|
+
|
3
6
|
A simple wrapper for objects (think of Burgundy as a decorator/presenter) in less than 100 lines.
|
4
7
|
|
5
8
|
## Installation
|
data/lib/burgundy/collection.rb
CHANGED
data/lib/burgundy/version.rb
CHANGED
data/spec/burgundy_spec.rb
CHANGED
@@ -27,6 +27,11 @@ describe Burgundy do
|
|
27
27
|
expect(collection.first).to eql(1)
|
28
28
|
end
|
29
29
|
|
30
|
+
it 'delegates collection calls' do
|
31
|
+
collection = Burgundy::Collection.new([1,2,3], wrapper)
|
32
|
+
expect(collection.size).to eql(3)
|
33
|
+
end
|
34
|
+
|
30
35
|
it 'includes Enumerable' do
|
31
36
|
expect(Burgundy::Collection).to include(Enumerable)
|
32
37
|
end
|
@@ -42,24 +47,24 @@ describe Burgundy do
|
|
42
47
|
it 'responds to the routes method' do
|
43
48
|
item = wrapper.new('hello')
|
44
49
|
|
45
|
-
expect(item.respond_to
|
46
|
-
expect(item.respond_to
|
50
|
+
expect(item).to respond_to(:routes)
|
51
|
+
expect(item).to respond_to(:r)
|
47
52
|
end
|
48
53
|
|
49
54
|
it 'responds to the helpers method' do
|
50
55
|
item = wrapper.new('hello')
|
51
56
|
|
52
|
-
expect(item.respond_to
|
53
|
-
expect(item.respond_to
|
57
|
+
expect(item).to respond_to(:helpers)
|
58
|
+
expect(item).to respond_to(:h)
|
54
59
|
end
|
55
60
|
|
56
61
|
it 'responds to the I18n methods' do
|
57
62
|
item = wrapper.new('hello')
|
58
63
|
|
59
|
-
expect(item.respond_to
|
60
|
-
expect(item.respond_to
|
61
|
-
expect(item.respond_to
|
62
|
-
expect(item.respond_to
|
64
|
+
expect(item).to respond_to(:translate)
|
65
|
+
expect(item).to respond_to(:t)
|
66
|
+
expect(item).to respond_to(:localize)
|
67
|
+
expect(item).to respond_to(:l)
|
63
68
|
end
|
64
69
|
|
65
70
|
it 'returns route using action mailer options' do
|
@@ -13,7 +13,7 @@ Dummy::Application.configure do
|
|
13
13
|
config.eager_load = false
|
14
14
|
|
15
15
|
# Configure static asset server for tests with Cache-Control for performance.
|
16
|
-
config.
|
16
|
+
config.serve_static_files = true
|
17
17
|
config.static_cache_control = "public, max-age=3600"
|
18
18
|
|
19
19
|
# Show full error reports and disable caching.
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: burgundy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nando Vieira
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -177,7 +177,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
177
177
|
version: '0'
|
178
178
|
requirements: []
|
179
179
|
rubyforge_project:
|
180
|
-
rubygems_version: 2.
|
180
|
+
rubygems_version: 2.4.5
|
181
181
|
signing_key:
|
182
182
|
specification_version: 4
|
183
183
|
summary: A simple wrapper for objects (think of Burgundy as a decorator/presenter)
|
@@ -225,4 +225,3 @@ test_files:
|
|
225
225
|
- spec/dummy/public/500.html
|
226
226
|
- spec/dummy/public/favicon.ico
|
227
227
|
- spec/spec_helper.rb
|
228
|
-
has_rdoc:
|