whitelabel 0.1.1 → 0.2.0
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.
- data/.rspec +1 -1
- data/.travis.yml +1 -1
- data/Gemfile.lock +1 -1
- data/lib/whitelabel.rb +5 -0
- data/lib/whitelabel/version.rb +1 -1
- data/spec/lib/whitelabel_spec.rb +19 -3
- metadata +17 -7
data/.rspec
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
--color
|
2
|
-
--format
|
2
|
+
--format documentation
|
data/.travis.yml
CHANGED
data/Gemfile.lock
CHANGED
data/lib/whitelabel.rb
CHANGED
data/lib/whitelabel/version.rb
CHANGED
data/spec/lib/whitelabel_spec.rb
CHANGED
@@ -3,9 +3,11 @@ require 'spec_helper'
|
|
3
3
|
|
4
4
|
describe Whitelabel do
|
5
5
|
let(:path) { fixture_path("whitelabel.yml") }
|
6
|
+
let(:dummy) { Dummy.new('some_id', 'some_name') }
|
6
7
|
|
7
8
|
before(:each) do
|
8
9
|
Whitelabel.labels = []
|
10
|
+
Whitelabel.reset!
|
9
11
|
end
|
10
12
|
|
11
13
|
context "initialization" do
|
@@ -50,13 +52,27 @@ describe Whitelabel do
|
|
50
52
|
Whitelabel.label.should eql(label)
|
51
53
|
end
|
52
54
|
|
55
|
+
it "should throw a meaningfull error when no label is set" do
|
56
|
+
expect { Whitelabel[:blame] }.to raise_error("set a label before calling 'blame'")
|
57
|
+
end
|
58
|
+
|
53
59
|
context "with current label" do
|
54
60
|
before(:each) do
|
55
|
-
Whitelabel.label =
|
61
|
+
Whitelabel.label = dummy
|
62
|
+
end
|
63
|
+
|
64
|
+
context "resetting" do
|
65
|
+
it "should reset the current label" do
|
66
|
+
Whitelabel.label.should be(dummy)
|
67
|
+
Whitelabel.reset!
|
68
|
+
Whitelabel.label.should be_nil
|
69
|
+
end
|
56
70
|
end
|
57
71
|
|
58
|
-
|
59
|
-
|
72
|
+
context "accessing values" do
|
73
|
+
it "should access a label property via []" do
|
74
|
+
Whitelabel[:name].should eql('some_name')
|
75
|
+
end
|
60
76
|
end
|
61
77
|
end
|
62
78
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: whitelabel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
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: 2012-
|
12
|
+
date: 2012-09-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
requirement:
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,15 @@ dependencies:
|
|
21
21
|
version: '2.9'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '2.9'
|
25
30
|
- !ruby/object:Gem::Dependency
|
26
31
|
name: pry
|
27
|
-
requirement:
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
28
33
|
none: false
|
29
34
|
requirements:
|
30
35
|
- - ~>
|
@@ -32,7 +37,12 @@ dependencies:
|
|
32
37
|
version: '0.9'
|
33
38
|
type: :development
|
34
39
|
prerelease: false
|
35
|
-
version_requirements:
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0.9'
|
36
46
|
description: This gem helps you providing whitelabel functionality in your application
|
37
47
|
email:
|
38
48
|
- phoetmail@googlemail.com
|
@@ -75,7 +85,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
75
85
|
version: '0'
|
76
86
|
requirements: []
|
77
87
|
rubyforge_project:
|
78
|
-
rubygems_version: 1.8.
|
88
|
+
rubygems_version: 1.8.24
|
79
89
|
signing_key:
|
80
90
|
specification_version: 3
|
81
91
|
summary: This gem helps you providing whitelabel functionality in your application
|