mls 0.5.0 → 0.5.1

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: e070d9a4cae4be4554e66251a009b02df572f7a6
4
- data.tar.gz: 13f784337f9dc51435121f0e94044a05489fbea5
3
+ metadata.gz: e0259bdcabcd9435ebe44c1003bfc636500429d9
4
+ data.tar.gz: 7b100fc2e8b099f2dc104435874d7c223a152050
5
5
  SHA512:
6
- metadata.gz: 54bfaa9d98bbbd187e5504d33f6e9ed0089942d6da60f74c23f202a596f0a0ef3da9673cbca6ac7e8c9ca98c5bc9aa88102185b8363b6dbf98a5cadea541c324
7
- data.tar.gz: a2f7a3c6a4531501760e86a58e0006ca4e471920315b76e6cbb78142624542433e670052339cb2b3fa37e0379ee156ef98f44acf34fc651530d88a0667b6ceb1
6
+ metadata.gz: 012dbb4b8421a324a42452356dd1f16017235f0b2aeb2e81f1856a2b95e8b96c2e46b8b5be7792ce8b83acf7f363ca01d3d03c93f0012764833ac80d85bf3aad
7
+ data.tar.gz: 485cc3ccc57724a2000c041dd4b026bc6ef6d5b8f567e80340b02189e53d9670b87d58b045b71f4a13d614c0f0b13c16e6f780af483c42b80884e928faaf0880
@@ -147,11 +147,11 @@ class MLS::Listing < MLS::Resource
147
147
  # #!ruby
148
148
  # listing = MLS::Listing.find(@id)
149
149
  # info => {:company => 'name', :population => 10, :funding => 'string', :move_id => '2012-09-12'}
150
- # listing.request_tour('name', 'email@address.com', info) # => #<MLS::TourRequest>
150
+ # listing.request_tour('name', 'email@address.com', info) # => #<MLS::Tour>
151
151
  #
152
- # listing.request_tour('', 'emai', info) # => #<MLS::TourRequest> will have errors on account
152
+ # listing.request_tour('', 'emai', info) # => #<MLS::Tour> will have errors on account
153
153
  def request_tour(account, tour={})
154
- MLS::TourRequest.create(id, account, tour)
154
+ MLS::Tour.create(id, account, tour)
155
155
  end
156
156
 
157
157
 
@@ -1,4 +1,4 @@
1
- class MLS::TourRequest < MLS::Resource
1
+ class MLS::Tour < MLS::Resource
2
2
  property :id, Fixnum
3
3
  property :status, String
4
4
  property :client_id, Fixnum
@@ -39,24 +39,24 @@ class MLS::TourRequest < MLS::Resource
39
39
  class << self
40
40
  def get_all_for_account
41
41
  response = MLS.get('/account/tours')
42
- MLS::TourRequest::Parser.parse_collection(response.body)
42
+ MLS::Tour::Parser.parse_collection(response.body)
43
43
  end
44
44
 
45
45
  def find_by_token(token)
46
46
  response = MLS.get("/tours/#{token}")
47
- MLS::TourRequest::Parser.parse(response.body)
47
+ MLS::Tour::Parser.parse(response.body)
48
48
  end
49
49
 
50
50
  def create(listing_id, account, tour={})
51
51
  params = {:account => account, :tour => tour}
52
52
  response = MLS.post("/listings/#{listing_id}/tours", params)
53
- return MLS::TourRequest::Parser.parse(response.body)
53
+ return MLS::Tour::Parser.parse(response.body)
54
54
  end
55
55
  end
56
56
 
57
57
  end
58
58
 
59
- class MLS::TourRequest::Parser < MLS::Parser
59
+ class MLS::Tour::Parser < MLS::Parser
60
60
 
61
61
  def listing=(listing)
62
62
  @object.listing = MLS::Listing::Parser.build(listing)
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "mls"
6
- s.version = '0.5.0'
6
+ s.version = '0.5.1'
7
7
  s.authors = ["James R. Bracy", "Jon Bracy"]
8
8
  s.email = ["james@42floors.com"]
9
9
  s.homepage = "http://mls.42floors.com"
@@ -1,5 +1,5 @@
1
1
  FactoryGirl.define do
2
- factory :tour, :class => MLS::TourRequest do
2
+ factory :tour, :class => MLS::Tour do
3
3
  message { Faker::Lorem.paragraph }
4
4
  company { Faker::Company.email }
5
5
  population { Kernel.rand(2..200) }
@@ -1,26 +1,26 @@
1
1
  require 'test_helper'
2
2
 
3
- class TestTourRequest < ::Test::Unit::TestCase
3
+ class TestTour < ::Test::Unit::TestCase
4
4
 
5
5
  # def test_properties
6
- # tr = MLS::TourRequest.new
6
+ # tr = MLS::Tour.new
7
7
  #
8
8
  # assert tr.respond_to?(:message)
9
9
  # end
10
10
  #
11
11
  # def test_attr_accessors
12
- # tr = MLS::TourRequest.new
12
+ # tr = MLS::Tour.new
13
13
  #
14
14
  # assert tr.respond_to?(:listing)
15
15
  # end
16
16
  #
17
17
  # def test_class_methods
18
- # assert MLS::TourRequest.respond_to?(:get_all_for_account)
19
- # assert MLS::TourRequest.respond_to?(:create)
18
+ # assert MLS::Tour.respond_to?(:get_all_for_account)
19
+ # assert MLS::Tour.respond_to?(:create)
20
20
  # end
21
21
  #
22
22
  # def test_parser
23
- # assert defined?(MLS::TourRequest::Parser)
23
+ # assert defined?(MLS::Tour::Parser)
24
24
  # end
25
25
 
26
26
  test 'it' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mls
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James R. Bracy
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-06-13 00:00:00.000000000 Z
12
+ date: 2013-06-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake