responsible 0.0.1 → 0.0.2
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 +8 -8
- data/lib/responsible.rb +5 -0
- data/responsible.gemspec +1 -1
- data/spec/base_spec.rb +20 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YjU5Y2IzNzQ3YjY1MzAxMzQ3MzY4OWQyYjgzYTQyZjA0YzdlNGYwMQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NDNkMGQ5NjRlMjhlYTM4ODEwNWY4NGRhNzMyM2YzMGQ3OTE4YTFiOQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZWIxMmE3MTRjZmFiNGU5NTdlYzZhZTUwY2VhZWY3NGZhMTQyM2UwYWRlOWQz
|
10
|
+
NzAzMTYzODVhY2M5YmI0MTY0ZmM4OTA2NjE1ZGEwMjc1Mzc0YjY5OTEwNGVj
|
11
|
+
NjYyOGE4OWI0MDEzYzQ4NTc0YTg0NWZjOWY2Y2FlNGU2ZGRhNjc=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OTM3MTljZDdkOWMyMTM0NjU1NmI2Mzg1N2JjOGUyOTY3MjM3Y2YzMjYzMDUw
|
14
|
+
YmRlZjBjMDY3OTViNjMxYzdmODFhYzU0OTQzNzYzMTVjN2I0MTQzNmI2YmM4
|
15
|
+
OTUyMGVhMjc2NDhlY2IwOGFmOTlmNzgwOGM0NjczODFhNzdiNjE=
|
data/lib/responsible.rb
CHANGED
data/responsible.gemspec
CHANGED
@@ -3,7 +3,7 @@ $:.unshift 'lib'
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.platform = Gem::Platform::RUBY
|
5
5
|
s.name = "responsible"
|
6
|
-
s.version = "0.0.
|
6
|
+
s.version = "0.0.2"
|
7
7
|
s.date = Time.now.strftime('%Y-%m-%d')
|
8
8
|
s.homepage = "https://github.com/reevoo/responsible"
|
9
9
|
s.authors = ["dw_henry", "lamp"]
|
data/spec/base_spec.rb
CHANGED
@@ -125,4 +125,24 @@ describe Responsible::Base do
|
|
125
125
|
expect(klass.new(consumer, data).as_json).to eq( { with_external_role: 'external', with_analytics_role: 'analytics' } )
|
126
126
|
end
|
127
127
|
end
|
128
|
+
|
129
|
+
describe "#data_object_name" do
|
130
|
+
|
131
|
+
let(:consumer) { double(:consumer, can_see?: true) }
|
132
|
+
|
133
|
+
it "allows aliasing of the data method to a more sensible name" do
|
134
|
+
klass = Class.new(described_class) do
|
135
|
+
|
136
|
+
data_object_name :my_custom_name
|
137
|
+
property :prop
|
138
|
+
|
139
|
+
def prop
|
140
|
+
my_custom_name
|
141
|
+
end
|
142
|
+
end
|
143
|
+
|
144
|
+
expect(klass.new(consumer, 'foo').as_json).to eq({ prop: 'foo' })
|
145
|
+
end
|
146
|
+
|
147
|
+
end
|
128
148
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: responsible
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- dw_henry
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-02-
|
12
|
+
date: 2014-02-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|