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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cd09e8601f91427278f8d3bfdfaa9523637e8647
4
- data.tar.gz: 5e01784d862d2dd3ef97acd2b7989f8306f24008
3
+ metadata.gz: ea05d05001175345c0615014e03f858138f8da4c
4
+ data.tar.gz: 560385ad1f9b5010f19d5674c3704987b985c535
5
5
  SHA512:
6
- metadata.gz: d3b697f342d736f9f2abc266226746d705130dc122546eb116e97d7c64ebffc55e5a1b3a554fd54dd4ef9a3505d4ef90cddab0c94ca84fd4956202ee576ba589
7
- data.tar.gz: 91eeefd9cce793a2d031ebb31eb5263cca1e9a11176c373f6fddaa13d0e948e2cfb52b96bf489df13cd93c47bf82527bce6fb318bfa44b61e180de82a5b68975
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
@@ -1,3 +1,3 @@
1
1
  module Bridge
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
@@ -13,6 +13,10 @@ class MockModel
13
13
  return {}
14
14
  end
15
15
 
16
+ def self.monetized_attributes
17
+ return {}
18
+ end
19
+
16
20
  def save(*args)
17
21
  self.called_save = true
18
22
  end
@@ -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.2.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-04-22 00:00:00.000000000 Z
11
+ date: 2016-10-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler