frenchy 0.2.6 → 0.2.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4b87c18d424750ac80d153e0dfc11fae1a27d835
4
- data.tar.gz: dfef868e271f1346e30e1b38e9a3083f04aa1e67
3
+ metadata.gz: 14578cc89e3790bd2ec10cac3d8d106c92bb81d1
4
+ data.tar.gz: ca7b4859677d522ffd5f1b994039f9463bd3b824
5
5
  SHA512:
6
- metadata.gz: f32f3a1a9f63ffc28225bfe482992f061ed74a1707fd06b6ccd36fef052650907f406fa6d081e9ed0d7c257286295f23fd73e81f1ff403e83cf7b7a884c07111
7
- data.tar.gz: f6628b1bd1b7e1994fa1bbd012db4e2cb491b9b12a4a8bd97e3f23c8230af13dca3ddb310c7733d580b83fdf5744ee8181fb383780dce1bf1b81f6d40b54b696
6
+ metadata.gz: cfb4d3a4064c40cfaa12ff7511d6ae08045e0aa65f475bb90076aa3c22d132fc1b36281845ada1c52b0fc4c6c0c92fc54252c9671bd3c1e647063d7e7232bc7d
7
+ data.tar.gz: ac736a0ab6048fc99bbc5c80f4636c17ccff855cd628e96eeeed18df5aaaa9c65c901d0e74dbf51692d6bd5835f5328288179d01371135955fd174f81c991648
@@ -25,6 +25,10 @@ if defined?(ActiveModel)
25
25
  def self.model_name
26
26
  ActiveModel::Name.new(self, nil, @model.to_s.camelize)
27
27
  end
28
+
29
+ def self.table_name
30
+ @model.to_s.pluralize
31
+ end
28
32
  end
29
33
  end
30
34
  end
@@ -1,3 +1,3 @@
1
1
  module Frenchy
2
- VERSION = "0.2.6"
2
+ VERSION = "0.2.7"
3
3
  end
@@ -15,5 +15,9 @@ describe Frenchy::Veneer do
15
15
  it "provides the expected model name" do
16
16
  expect(FakeModel.model_name.to_s).to eql("RealModel")
17
17
  end
18
+
19
+ it "provides the expected table name" do
20
+ expect(FakeModel.table_name).to eql("real_models")
21
+ end
18
22
  end
19
23
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: frenchy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Coene
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-20 00:00:00.000000000 Z
11
+ date: 2014-12-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json