reviewed 1.0.4 → 1.1.0

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: cfffffb064d98e7510c88d71b48c355c324b5a46
4
- data.tar.gz: b5f611e25c3345c0d5133de3bf4888319a26f099
3
+ metadata.gz: 3afa1af40768b88591f005452625b6294a73656e
4
+ data.tar.gz: 03cadb04fa3e8e9dd1da037587d1eeb0cff90716
5
5
  SHA512:
6
- metadata.gz: e7695fdfd9a3de0ccdda000e73a65160872120582236fb5569db43c19c12d4f0b49514537b50302f680423b7e7b03508654f37d19e303ef9d27b868f6d2e1c40
7
- data.tar.gz: 5823e0d3a89ab6ee80fe5d7fbc5a026c5407426a3a43ec91674744ae5362e56a34959e8c0b01c0ed6e2cbd55ef5cbc0145f4ba525385d6097cc51e71d44541a1
6
+ metadata.gz: 3d1cd4cb774f3dcb5bbff359dc6dc9fdeb1c0aa5de22c987ede6e0879b9eae69ca4efd9d54f4259a5a65d59ac06df08112759fe2b1bd1c2aa65508783c9cafd8
7
+ data.tar.gz: eea5b89695e96b2e720a55e193469f2209d0310a72bdca094798fe7ad5289ebb5f38c07550b2bbf047e16f80917b27cc4863be38bc0b67e9adad666a1ac416e1
data/lib/reviewed/base.rb CHANGED
@@ -47,7 +47,7 @@ module Reviewed
47
47
 
48
48
  def association_name klass=nil
49
49
  klass ||= self
50
- klass.name.demodulize.downcase.pluralize
50
+ klass.name.demodulize.underscore.pluralize
51
51
  end
52
52
 
53
53
  end
@@ -1,4 +1,4 @@
1
1
  module Reviewed
2
- VERSION = "1.0.4"
2
+ VERSION = "1.1.0"
3
3
  API_VERSION = 'v1'
4
4
  end
data/spec/article_spec.rb CHANGED
@@ -7,7 +7,6 @@ describe Reviewed::Article, vcr: true do
7
7
  end
8
8
 
9
9
  before(:each) do
10
- Reviewed::Cache.store.clear
11
10
  @article = client.articles.find('big-green-egg-medium-charcoal-grill-review', { with_attachments: true })
12
11
  end
13
12
 
data/spec/base_spec.rb CHANGED
@@ -61,6 +61,14 @@ describe Reviewed::Base do
61
61
  it 'returns the demodulized & pluralized version of itself' do
62
62
  Reviewed::Article.association_name.should eql("articles")
63
63
  end
64
+
65
+ it 'works for multi word module names' do
66
+ module Reviewed
67
+ class FooBar < Base
68
+ end
69
+ end
70
+ Reviewed::FooBar.association_name.should eql("foo_bars")
71
+ end
64
72
  end
65
73
 
66
74
  describe 'attributes' do
data/spec/client_spec.rb CHANGED
@@ -2,10 +2,6 @@ require 'spec_helper.rb'
2
2
 
3
3
  describe Reviewed::Client do
4
4
 
5
- before do
6
- Reviewed::Cache.store.clear
7
- end
8
-
9
5
  let(:client) { Reviewed::Client.new }
10
6
 
11
7
  describe 'config' do
@@ -12,7 +12,6 @@ describe Reviewed::Collection, vcr: true do
12
12
  end
13
13
 
14
14
  before(:each) do
15
- Reviewed::Cache.store.clear
16
15
  @collection = client.products.with_no_cache.all # creates a collection
17
16
  end
18
17
 
data/spec/product_spec.rb CHANGED
@@ -11,7 +11,6 @@ describe Reviewed::Product do
11
11
  describe 'attachments', vcr: true do
12
12
 
13
13
  before(:each) do
14
- Reviewed::Cache.store.clear
15
14
  @product = client.products.with_no_cache.find('minden-master-ii')
16
15
  end
17
16
 
data/spec/request_spec.rb CHANGED
@@ -1,10 +1,6 @@
1
1
  require 'spec_helper.rb'
2
2
 
3
3
  describe Reviewed::Request do
4
- before do
5
- Reviewed::Cache.store.clear
6
- end
7
-
8
4
  let(:request) do
9
5
  Reviewed::Request.new(
10
6
  resource: Reviewed::Article,
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reviewed
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Plante
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-11-18 00:00:00.000000000 Z
12
+ date: 2013-12-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport