mls 1.8.0 → 1.9.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
  SHA256:
3
- metadata.gz: ac6d0d6ddd4d6b888fc8b8340eae0ab697a99a6aa4368ac8d7596974fb169c6b
4
- data.tar.gz: dbcc04dd676749244ff3bb20f30a2b1874dd66106d89f01a815feabbcd602fc1
3
+ metadata.gz: 3a228308dffc4aa43757ff45cb6d67c42dca2f7eab445e34a6b834e5f1685502
4
+ data.tar.gz: 1636b07084fe34b7f997c8febf0287e0c7e0945bd8282e1d42b3b068e0eeaff8
5
5
  SHA512:
6
- metadata.gz: 92927db2d0dd6856cc80a9fbd3ef4930aa359252597bf197890614e659dc6090cab727baf8384f1fd875b1cf4a3f31fb211f6d8838a21ca15d52287fcef42f4a
7
- data.tar.gz: ba932bc2c69e00d6d998c0bbd78a058f96a9351934d943b88ebedeb94c0d138bfda5f8c2e9a39cbec01056e8ee9b477fe0522ab3059cb3b400accaf2ea04c21d
6
+ metadata.gz: 456dc2dba25d57763420327a523e890d4e069538cbb068929c9af55e65e7950e65c5cd6a018834ac3b2577f585cdd66064b3922c39753416f824b2a251128c65
7
+ data.tar.gz: eb59fe17b51a767fbd1ca72070b29128ac4d64e075640fda52dac4f1663271254c13c6a14f2949f79e5fb9261b8e71e1dae8aef4132d7a429562da3773cc7d64
@@ -30,6 +30,9 @@ module MLS::CLI::Documents
30
30
 
31
31
  def self.backup(dir)
32
32
  last_sync_file = File.join(dir, '.last_sync')
33
+ storage_engines = {}
34
+ storage_engines[:s3] = StandardStorage::S3.new(MLS::CLI.options[:s3]) if MLS::CLI.options[:s3]
35
+ storage_engines[:b2] = StandardStorage::B2.new(MLS::CLI.options[:b2]) if MLS::CLI.options[:b2]
33
36
 
34
37
  query = if File.exist?(last_sync_file)
35
38
  from_timestamp = Time.iso8601(File.read(last_sync_file))
@@ -43,9 +46,15 @@ module MLS::CLI::Documents
43
46
  puts "Downloaded #{document.id}"
44
47
  next
45
48
  end
46
-
47
- if document.provider.nil? || document.provider.include?('s3/hash_key')
48
- storage_engine = StandardStorage::S3.new(MLS::CLI.options[:s3])
49
+
50
+ if document.provider.nil?
51
+ storage_engine = storage_engines[:s3]
52
+ key = 'hash_key'
53
+ elsif document.provider.include?('b2/sha256')
54
+ storage_engine = storage_engines[:b2]
55
+ key = 'sha256'
56
+ elsif document.provider.include?('s3/hash_key')
57
+ storage_engine = storage_engines[:s3]
49
58
  key = 'hash_key'
50
59
  else
51
60
  raise 'unkown storage engine'
@@ -19,7 +19,10 @@ class Document < MLS::Model
19
19
  end
20
20
 
21
21
  def url(style=:original)
22
- File.join(MLS.config['document_host'].gsub(/\/$/, ''), path(style))
22
+ URI::HTTPS.build(
23
+ host: MLS.config['document_host'].gsub(/\/$/, ''),
24
+ path: path(style)
25
+ )
23
26
  end
24
27
 
25
28
  def path(style=:original)
@@ -0,0 +1,7 @@
1
+ module Integrations
2
+ def self.table_name_prefix
3
+ 'integrations/'
4
+ end
5
+ end
6
+
7
+ require 'mls/models/integrations/buildout'
@@ -0,0 +1,9 @@
1
+ class Integrations::Buildout < MLS::Model
2
+ def self.table_name_prefix
3
+ 'integrations/buildout/'
4
+ end
5
+
6
+ has_many :syndications
7
+ end
8
+
9
+ require 'mls/models/integrations/buildout/syndication'
@@ -0,0 +1,7 @@
1
+ class Integrations::Buildout::Syndication < MLS::Model
2
+ self.table_name = "integrations/buildout/syndications"
3
+
4
+ belongs_to :buildout
5
+ has_many :tasks, as: :subject, inverse_of: :subject
6
+
7
+ end
@@ -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 = '1.8.0'
6
+ s.version = '1.9.0'
7
7
  s.authors = ["Jon Bracy", "James R. Bracy"]
8
8
  s.email = ["jon@42floors.com", "james@42floors.com"]
9
9
  s.homepage = "http://mls.42floors.com"
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: 1.8.0
4
+ version: 1.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Bracy
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-01-06 00:00:00.000000000 Z
12
+ date: 2019-01-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -286,6 +286,9 @@ files:
286
286
  - lib/mls/models/image_ordering.rb
287
287
  - lib/mls/models/impression_count.rb
288
288
  - lib/mls/models/inquiry.rb
289
+ - lib/mls/models/integrations.rb
290
+ - lib/mls/models/integrations/buildout.rb
291
+ - lib/mls/models/integrations/buildout/syndication.rb
289
292
  - lib/mls/models/invoice.rb
290
293
  - lib/mls/models/lead.rb
291
294
  - lib/mls/models/listing.rb
@@ -344,8 +347,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
344
347
  - !ruby/object:Gem::Version
345
348
  version: '0'
346
349
  requirements: []
347
- rubyforge_project: mls
348
- rubygems_version: 2.7.4
350
+ rubygems_version: 3.0.2
349
351
  signing_key:
350
352
  specification_version: 4
351
353
  summary: 42Floors MLS Client