immoscout 1.1.0 → 1.2.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
- SHA1:
3
- metadata.gz: 1cf89223af1887705e7bd11ac75ace0fd75a85a2
4
- data.tar.gz: c98eb3a001575904e6c4dda7f1cd33976a3eaf56
2
+ SHA256:
3
+ metadata.gz: 82ad461373e66ad5c9e41e085be2f5f7bb4f9470a1603a1e78290c4323e57e24
4
+ data.tar.gz: aa6ae66f0e12411d5a2c8b9bb471c68ee274cb6036df214fa9c4ebefc444ba7d
5
5
  SHA512:
6
- metadata.gz: 70989b548a37cc8b8bb6c65e64b99963bb36cc928ed089a09521b76be907a314cd28a0bea1967e6b6860e2b63cd5e4575f7704630426d105732bf72e201a3217
7
- data.tar.gz: d25b442f51b4c70b14ca375161bbb511f245fbfae0918854d0e627c3109edb7f447be3a93d50d2553f23c4594cc20efc56fe933dbe4708af461cd8d6353d8f83
6
+ metadata.gz: cd1aced1165e0d0872e40729bb89e2dc70aaf7ff208ead3878c5b20517950935ba9bfc434db9c60e22af51100412c608c2cbabae64b56683b2298f6a6719c746
7
+ data.tar.gz: 73ff09a0d1b0cb31dd62d164956c71d16e3f0508e514ede0d024ff4b7b3d3cbf8ea41951bf829737add05b55a0cf3f2b023c5b7bf0cc0af8aca9e951dbcedea3
@@ -6,10 +6,10 @@ env:
6
6
 
7
7
  language: ruby
8
8
  rvm:
9
+ - 2.6
9
10
  - 2.5
10
11
  - 2.4
11
12
  - 2.3
12
- - 2.2
13
13
 
14
14
  before_install: gem install bundler -v 1.15.4
15
15
  before_script:
@@ -0,0 +1,17 @@
1
+ ### 1.2.0
2
+
3
+ * Added a changelog file to track changes for library users
4
+ * Allow newer version of faraday/faraday-middleware. (#7)
5
+ * Set `HausgoldImmoscout/#{gem_version}` as user agent
6
+ * Set correct content type and filename for mixed multipart (#5)
7
+ * Dropped support for EOL Ruby 2.2
8
+ * Added support for Ruby 2.6
9
+
10
+ ### 1.1.0
11
+
12
+ * Add support for property `international_country_region` in address
13
+
14
+ ### 1.0.0
15
+
16
+ * The first stable release
17
+ * All initial Immoscout models are mapped
@@ -0,0 +1,115 @@
1
+ MAKEFLAGS += --warn-undefined-variables -j1
2
+ SHELL := bash
3
+ .SHELLFLAGS := -eu -o pipefail -c
4
+ .DEFAULT_GOAL := all
5
+ .DELETE_ON_ERROR:
6
+ .SUFFIXES:
7
+ .PHONY:
8
+
9
+ # Environment switches
10
+ MAKE_ENV ?= docker
11
+ COMPOSE_RUN_SHELL_FLAGS ?= --rm
12
+
13
+ # Directories
14
+ VENDOR_DIR ?= vendor/bundle
15
+ GEMFILES_DIR ?= gemfiles
16
+
17
+ # Host binaries
18
+ BASH ?= bash
19
+ COMPOSE ?= docker-compose
20
+ ID ?= id
21
+ MKDIR ?= mkdir
22
+ RM ?= rm
23
+
24
+ # Container binaries
25
+ BUNDLE ?= bundle
26
+ APPRAISAL ?= appraisal
27
+ RAKE ?= rake
28
+ YARD ?= yard
29
+ RUBOCOP ?= rubocop
30
+
31
+ # Files
32
+ GEMFILES ?= $(subst _,-,$(patsubst $(GEMFILES_DIR)/%.gemfile,%,\
33
+ $(wildcard $(GEMFILES_DIR)/*.gemfile)))
34
+ TEST_GEMFILES := $(GEMFILES:%=test-%)
35
+
36
+ # Define a generic shell run wrapper
37
+ # $1 - The command to run
38
+ ifeq ($(MAKE_ENV),docker)
39
+ define run-shell
40
+ $(COMPOSE) run $(COMPOSE_RUN_SHELL_FLAGS) \
41
+ -e LANG=en_US.UTF-8 -e LANGUAGE=en_US.UTF-8 -e LC_ALL=en_US.UTF-8 \
42
+ -e HOME=/home/web -e BUNDLE_APP_CONFIG=/app/.bundle \
43
+ -u `$(ID) -u` test bash -c 'sleep 0.1; echo; $(1)'
44
+ endef
45
+ else ifeq ($(MAKE_ENV),baremetal)
46
+ define run-shell
47
+ $(1)
48
+ endef
49
+ endif
50
+
51
+ all:
52
+ # HAUSGOLD SDK
53
+ #
54
+ # install Install the dependencies
55
+ # test Run the whole test suite
56
+ # clean Clean the dependencies
57
+ #
58
+ # shell Run an interactive shell on the container
59
+ # shell-irb Run an interactive IRB shell on the container
60
+
61
+ install:
62
+ # Install the dependencies
63
+ @$(MKDIR) -p $(VENDOR_DIR)
64
+ @$(call run-shell,$(BUNDLE) check || $(BUNDLE) install --path $(VENDOR_DIR))
65
+ @$(call run-shell,$(BUNDLE) exec $(APPRAISAL) install)
66
+
67
+ update: install
68
+ # Install the dependencies
69
+ @$(MKDIR) -p $(VENDOR_DIR)
70
+ @$(call run-shell,$(BUNDLE) exec $(APPRAISAL) update)
71
+
72
+ test: #install
73
+ # Run the whole test suite
74
+ @$(call run-shell,$(BUNDLE) exec $(RAKE))
75
+
76
+ $(TEST_GEMFILES): GEMFILE=$(@:test-%=%)
77
+ $(TEST_GEMFILES):
78
+ # Run the whole test suite ($(GEMFILE))
79
+ @$(call run-shell,$(BUNDLE) exec $(APPRAISAL) $(GEMFILE) $(RAKE))
80
+
81
+ test-style: \
82
+ test-style-ruby
83
+
84
+ test-style-ruby:
85
+ # Run the static code analyzer (rubocop)
86
+ @$(call run-shell,$(BUNDLE) exec $(RUBOCOP) -a)
87
+
88
+ clean:
89
+ # Clean the dependencies
90
+ @$(RM) -rf $(VENDOR_DIR)
91
+
92
+ clean-containers:
93
+ # Clean running containers
94
+ ifeq ($(MAKE_ENV),docker)
95
+ @$(COMPOSE) down
96
+ endif
97
+
98
+ distclean: clean clean-containers
99
+
100
+ shell: install
101
+ # Run an interactive shell on the container
102
+ @$(call run-shell,$(BASH) -i)
103
+
104
+ shell-irb: install
105
+ # Run an interactive IRB shell on the container
106
+ @$(call run-shell,bin/console)
107
+
108
+ docs: install
109
+ # Build the API documentation
110
+ @$(call run-shell,$(BUNDLE) exec $(YARD) -q && \
111
+ $(BUNDLE) exec $(YARD) stats --list-undoc --compact)
112
+
113
+ release:
114
+ # Release a new gem version
115
+ @$(RAKE) release
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ![Immoscout](doc/assets/project.png)
1
+ ![Immoscout](doc/assets/project.svg)
2
2
 
3
3
  [![Build Status](https://travis-ci.org/hausgold/immoscout.svg?branch=master)](https://travis-ci.org/hausgold/immoscout)
4
4
  [![Gem Version](https://badge.fury.io/rb/immoscout.svg)](https://badge.fury.io/rb/immoscout)
@@ -0,0 +1,68 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <svg
3
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
4
+ xmlns:cc="http://creativecommons.org/ns#"
5
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
6
+ xmlns:svg="http://www.w3.org/2000/svg"
7
+ xmlns="http://www.w3.org/2000/svg"
8
+ version="1.1"
9
+ id="Ebene_1"
10
+ x="0px"
11
+ y="0px"
12
+ viewBox="0 0 800 200"
13
+ xml:space="preserve"
14
+ width="800"
15
+ height="200"><metadata
16
+ id="metadata33"><rdf:RDF><cc:Work
17
+ rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
18
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
19
+ id="defs31" />
20
+ <style
21
+ type="text/css"
22
+ id="style2">
23
+ .st0{fill-rule:evenodd;clip-rule:evenodd;fill:#E73E11;}
24
+ .st1{fill-rule:evenodd;clip-rule:evenodd;fill:#0371B9;}
25
+ .st2{fill:#132E48;}
26
+ .st3{font-family:'OpenSans-Bold';}
27
+ .st4{font-size:29.5168px;}
28
+ .st5{fill-rule:evenodd;clip-rule:evenodd;fill:none;}
29
+ .st6{opacity:0.5;fill:#132E48;}
30
+ .st7{font-family:'OpenSans';}
31
+ .st8{font-size:12px;}
32
+ </style>
33
+ <g
34
+ transform="translate(0,1.53584)"
35
+ id="g828"><g
36
+ transform="translate(35.93985,35.66416)"
37
+ id="g8">
38
+ <path
39
+ style="clip-rule:evenodd;fill:#e73e11;fill-rule:evenodd"
40
+ id="path4"
41
+ d="m -0.1,124.4 c 0,0 33.7,-123.2 66.7,-123.2 12.8,0 26.9,21.9 38.8,47.2 -23.6,27.9 -66.6,59.7 -94,76 -7.1,0 -11.5,0 -11.5,0 z"
42
+ class="st0" />
43
+ <path
44
+ style="clip-rule:evenodd;fill:#0371b9;fill-rule:evenodd"
45
+ id="path6"
46
+ d="m 88.1,101.8 c 13.5,-10.4 18.4,-16.2 27.1,-25.4 10,25.7 16.7,48 16.7,48 0,0 -41.4,0 -78,0 14.6,-7.9 18.7,-10.7 34.2,-22.6 z"
47
+ class="st1" />
48
+ </g><text
49
+ y="106.40316"
50
+ x="192.43155"
51
+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:29.51733398px;font-family:'Open Sans', sans-serif;-inkscape-font-specification:'OpenSans-Bold, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#132e48"
52
+ id="text10"
53
+ class="st2 st3 st4">Immoscout</text>
54
+ <rect
55
+ style="clip-rule:evenodd;fill:none;fill-rule:evenodd"
56
+ id="rect12"
57
+ height="24"
58
+ width="314.5"
59
+ class="st5"
60
+ y="118.06416"
61
+ x="194.23985" /><text
62
+ y="127.22146"
63
+ x="194.21715"
64
+ style="font-size:12px;font-family:'Open Sans', sans-serif;opacity:0.5;fill:#132e48;-inkscape-font-specification:'Open Sans, sans-serif, Normal';font-weight:normal;font-style:normal;font-stretch:normal;font-variant:normal;text-anchor:start;text-align:start;writing-mode:lr;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;"
65
+ id="text14"
66
+ class="st6 st7 st8">Ruby client for the Immobilienscout24 REST API</text>
67
+ </g>
68
+ </svg>
@@ -32,16 +32,16 @@ Gem::Specification.new do |spec|
32
32
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
33
33
  spec.require_paths = ["lib"]
34
34
  spec.add_dependency "activesupport", ">= 3.2.0"
35
- spec.add_dependency "faraday", "~> 0.13.0"
36
- spec.add_dependency "faraday_middleware", "~> 0.12.0"
35
+ spec.add_dependency "faraday", "~> 0.13"
36
+ spec.add_dependency "faraday_middleware", "~> 0.12"
37
37
  spec.add_dependency "simple_oauth", ">= 0.3"
38
38
 
39
- spec.add_development_dependency "bundler", "~> 1.15"
39
+ spec.add_development_dependency "bundler", ">= 1.16", "< 3"
40
40
  spec.add_development_dependency "pry"
41
41
  spec.add_development_dependency "rake", "~> 10.0"
42
42
  spec.add_development_dependency "rspec", "~> 3.0"
43
- spec.add_development_dependency "rspec-json_expectations", "~> 1.4.0"
44
- spec.add_development_dependency "vcr", "~> 3.0.0"
45
- spec.add_development_dependency "webmock", "~> 2.3.0"
43
+ spec.add_development_dependency "rspec-json_expectations", "~> 1.4"
44
+ spec.add_development_dependency "vcr", "~> 3.0"
45
+ spec.add_development_dependency "webmock", "~> 3.5"
46
46
  spec.add_development_dependency "simplecov"
47
47
  end
@@ -26,6 +26,8 @@ module Immoscout
26
26
  request.headers['Content-Type'] = "application/json;charset=UTF-8"
27
27
  end
28
28
  request.headers['Accept'] = "application/json"
29
+ request.headers['User-Agent'] = \
30
+ "HausgoldImmoscout/#{Immoscout::VERSION}"
29
31
  end
30
32
  end
31
33
  end
@@ -23,7 +23,11 @@ module Immoscout
23
23
  "user/#{api.user_name}/realestate/#{attachable_id}/attachment",
24
24
  nil,
25
25
  attachment: Faraday::UploadIO.new(file, content_type, file_name),
26
- metadata: as_json
26
+ metadata: Faraday::UploadIO.new(
27
+ StringIO.new(to_json),
28
+ 'application/json',
29
+ 'metadata.json'
30
+ )
27
31
  )
28
32
  handle_response(response)
29
33
  self.id = id_from_response(response)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Immoscout
4
- VERSION = "1.1.0".freeze
4
+ VERSION = "1.2.0".freeze
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: immoscout
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcus Geissler
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-09-06 00:00:00.000000000 Z
11
+ date: 2019-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -30,28 +30,28 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.13.0
33
+ version: '0.13'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 0.13.0
40
+ version: '0.13'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: faraday_middleware
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 0.12.0
47
+ version: '0.12'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 0.12.0
54
+ version: '0.12'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: simple_oauth
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -70,16 +70,22 @@ dependencies:
70
70
  name: bundler
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
- version: '1.15'
75
+ version: '1.16'
76
+ - - "<"
77
+ - !ruby/object:Gem::Version
78
+ version: '3'
76
79
  type: :development
77
80
  prerelease: false
78
81
  version_requirements: !ruby/object:Gem::Requirement
79
82
  requirements:
80
- - - "~>"
83
+ - - ">="
84
+ - !ruby/object:Gem::Version
85
+ version: '1.16'
86
+ - - "<"
81
87
  - !ruby/object:Gem::Version
82
- version: '1.15'
88
+ version: '3'
83
89
  - !ruby/object:Gem::Dependency
84
90
  name: pry
85
91
  requirement: !ruby/object:Gem::Requirement
@@ -128,42 +134,42 @@ dependencies:
128
134
  requirements:
129
135
  - - "~>"
130
136
  - !ruby/object:Gem::Version
131
- version: 1.4.0
137
+ version: '1.4'
132
138
  type: :development
133
139
  prerelease: false
134
140
  version_requirements: !ruby/object:Gem::Requirement
135
141
  requirements:
136
142
  - - "~>"
137
143
  - !ruby/object:Gem::Version
138
- version: 1.4.0
144
+ version: '1.4'
139
145
  - !ruby/object:Gem::Dependency
140
146
  name: vcr
141
147
  requirement: !ruby/object:Gem::Requirement
142
148
  requirements:
143
149
  - - "~>"
144
150
  - !ruby/object:Gem::Version
145
- version: 3.0.0
151
+ version: '3.0'
146
152
  type: :development
147
153
  prerelease: false
148
154
  version_requirements: !ruby/object:Gem::Requirement
149
155
  requirements:
150
156
  - - "~>"
151
157
  - !ruby/object:Gem::Version
152
- version: 3.0.0
158
+ version: '3.0'
153
159
  - !ruby/object:Gem::Dependency
154
160
  name: webmock
155
161
  requirement: !ruby/object:Gem::Requirement
156
162
  requirements:
157
163
  - - "~>"
158
164
  - !ruby/object:Gem::Version
159
- version: 2.3.0
165
+ version: '3.5'
160
166
  type: :development
161
167
  prerelease: false
162
168
  version_requirements: !ruby/object:Gem::Requirement
163
169
  requirements:
164
170
  - - "~>"
165
171
  - !ruby/object:Gem::Version
166
- version: 2.3.0
172
+ version: '3.5'
167
173
  - !ruby/object:Gem::Dependency
168
174
  name: simplecov
169
175
  requirement: !ruby/object:Gem::Requirement
@@ -192,16 +198,16 @@ files:
192
198
  - ".rubocop.yml"
193
199
  - ".simplecov"
194
200
  - ".travis.yml"
201
+ - CHANGELOG.md
195
202
  - CODE_OF_CONDUCT.md
196
203
  - Gemfile
197
204
  - LICENSE
205
+ - Makefile
198
206
  - README.md
199
207
  - Rakefile
200
208
  - bin/console
201
209
  - bin/setup
202
- - doc/assets/logo.png
203
- - doc/assets/project.png
204
- - doc/assets/project.xcf
210
+ - doc/assets/project.svg
205
211
  - immoscout.gemspec
206
212
  - lib/immoscout.rb
207
213
  - lib/immoscout/api/client.rb
@@ -261,8 +267,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
261
267
  - !ruby/object:Gem::Version
262
268
  version: '0'
263
269
  requirements: []
264
- rubyforge_project:
265
- rubygems_version: 2.6.8
270
+ rubygems_version: 3.0.2
266
271
  signing_key:
267
272
  specification_version: 4
268
273
  summary: Ruby client for the Immobilienscout24 REST API
Binary file
Binary file
Binary file