tms_bridge 0.2.0 → 0.3.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.
- checksums.yaml +4 -4
- data/lib/tms_bridge/model_support.rb +1 -0
- data/lib/tms_bridge/version.rb +1 -1
- data/spec/tms_bridge/mocks.rb +4 -0
- data/spec/tms_bridge/model_support_spec.rb +6 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea05d05001175345c0615014e03f858138f8da4c
|
4
|
+
data.tar.gz: 560385ad1f9b5010f19d5674c3704987b985c535
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 546f06c5a9d5678b963308382cb12ded74ec263b9995a6f861234f1d4621918a10cac5d87125c439668079e818268cebfd57687c8aa3e29e0498865b085de5e5
|
7
|
+
data.tar.gz: 3c756cf6fb40ab6f5b29dd340068b4af3a87099e2aa69c93e6e3d8d56d9d3df0721b7168b8a7413a6ee06fdcb93624cf867e1b239f3e51b9fcf19d6e0cb28756
|
@@ -3,6 +3,7 @@ module TmsBridge
|
|
3
3
|
def published_attribute_names
|
4
4
|
_attributes_names = self.column_names - %w{id created_at updated_at}
|
5
5
|
_attributes_names+=self.attribute_aliases.keys
|
6
|
+
_attributes_names+=self.monetized_attributes.keys
|
6
7
|
return _attributes_names.compact.map(&:to_s).uniq
|
7
8
|
end
|
8
9
|
end
|
data/lib/tms_bridge/version.rb
CHANGED
data/spec/tms_bridge/mocks.rb
CHANGED
@@ -19,10 +19,15 @@ describe TmsBridge::ModelSupport do
|
|
19
19
|
it "should include items declared in column_names" do
|
20
20
|
expect(MockModel.published_attribute_names).to include('some_key')
|
21
21
|
end
|
22
|
-
|
22
|
+
|
23
23
|
it "should include alias_attributes" do
|
24
24
|
expect(MockModel).to receive(:attribute_aliases){{"alias_key"=>"some_key"}}
|
25
25
|
expect(MockModel.published_attribute_names).to include('alias_key')
|
26
26
|
end
|
27
|
+
|
28
|
+
it "should include monetized_attributes" do
|
29
|
+
expect(MockModel).to receive(:monetized_attributes){{"monetized_attribute"=>"cents_attribute"}}
|
30
|
+
expect(MockModel.published_attribute_names).to include('monetized_attribute')
|
31
|
+
end
|
27
32
|
end
|
28
33
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tms_bridge
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Erich Timkar
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-10-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|