distant 0.1.8 → 0.1.9

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: 5047b3a44d35e47ccd5aa8430acda91ae52c9c3d
4
- data.tar.gz: 7d812f37ef7b05c12cda42cd2653c957de16c207
3
+ metadata.gz: de2b76237765999f08fcca78971200e9eae09e8d
4
+ data.tar.gz: 6b272cc360c3c90a61f197c97b96d3604caa8919
5
5
  SHA512:
6
- metadata.gz: c6598e3a3df31e46d98767f8e0ba51852d3871bb600c5dad0f778c02cc076dc4652ffcb899e1c0378270ba90049ca6606d259cb8407adeb50eb5fa4f40ad8964
7
- data.tar.gz: 739cdb1ddb0ffe034466ac0ed2c1cbdb1e02a741a02c1ebf5a5324f7221d13668eb76844defe1834402133f52fabb9fddf3c52eca16b489aa81df20e0137f84d
6
+ metadata.gz: 36b8393002e34e03e5cfc5f7cacde1c98bbae7f223f1df2fc14d81435edd255fc36858c3f37f60fafd3b1b4c5a97128e7942f26932fe626851039b09d5e4ae0e
7
+ data.tar.gz: ae02ec9edff96c8a506d27ba33193fd293fb090cab3274e75205f64c6b007a1cf39f2768d8d48de988e35ceae323fa6628848150fc5e25417e98ae00245743d7
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- distant (0.1.8)
4
+ distant (0.1.9)
5
5
  activesupport
6
6
  httparty
7
7
 
@@ -1,9 +1,9 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'distant'
3
- spec.version = '0.1.8'
3
+ spec.version = '0.1.9'
4
4
  spec.authors = ['John Drago']
5
5
  spec.email = 'jdrago.999@gmail.com'
6
- spec.homepage = 'https://github.com/distant/distant'
6
+ spec.homepage = 'https://github.com/distant-labs/distant'
7
7
  spec.summary = 'Distant API Client'
8
8
  spec.description = 'Distant API Client'
9
9
  spec.required_rubygems_version = '>= 1.3.6'
@@ -0,0 +1,7 @@
1
+
2
+ require 'rspec/expectations'
3
+ RSpec::Matchers.define :belong_to do |expected|
4
+ match do |actual|
5
+ actual.class.belongs_to_rels.include? expected.to_sym
6
+ end
7
+ end
@@ -25,7 +25,6 @@ describe Distant::Base do
25
25
 
26
26
  class Distant::SubTest < Distant::Base
27
27
  attr_accessor :id, :base_test_id
28
- belongs_to :base_test, '/base/tests/:base_test_id'
29
28
  end
30
29
  end
31
30
  describe '.path_closure_generator(route)' do
@@ -165,6 +164,10 @@ describe Distant::Base do
165
164
  @route = '/base/:base_test_id'
166
165
  Distant::SubTest.belongs_to :base_test, @route
167
166
  end
167
+ context 'rspec matcher' do
168
+ let(:subject){ Distant::SubTest.new }
169
+ it { should belong_to :base_test }
170
+ end
168
171
  it 'creates an instance method named after the plural collection' do
169
172
  expect(Distant::SubTest.new).to respond_to :base_test
170
173
  end
@@ -13,3 +13,4 @@ lib = File.expand_path('../../lib', __FILE__)
13
13
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
14
14
 
15
15
  require 'distant'
16
+ require 'distant/rspec'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: distant
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Drago
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-21 00:00:00.000000000 Z
11
+ date: 2016-04-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -154,6 +154,7 @@ files:
154
154
  - lib/distant/base.rb
155
155
  - lib/distant/config.rb
156
156
  - lib/distant/connection.rb
157
+ - lib/distant/rspec.rb
157
158
  - lib/distant/translator.rb
158
159
  - spec/client/base_spec.rb
159
160
  - spec/client/config_spec.rb
@@ -161,7 +162,7 @@ files:
161
162
  - spec/client/module_spec.rb
162
163
  - spec/client/translator_spec.rb
163
164
  - spec/spec_helper.rb
164
- homepage: https://github.com/distant/distant
165
+ homepage: https://github.com/distant-labs/distant
165
166
  licenses: []
166
167
  metadata: {}
167
168
  post_install_message: