portal_scraper 2.2.1 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0be4e772a2a12824b3b8758f9914f89fa1403100749ba81b4f6a73e036c21064
4
- data.tar.gz: b1cd8df8f5e4427b53c2e86a498f9bb141175d8cd844e3b9df64125ce4e8cdc2
3
+ metadata.gz: b5b77cb5759492b2d73d62b20dc152bd3b28647c7be2212538c0f647fd5db5f4
4
+ data.tar.gz: 1e2d37f32f66e12b9853636684e02fa6f1d611773c85de8a97ed74533ff6f41a
5
5
  SHA512:
6
- metadata.gz: 9c1f8dca1fb37272f1f67da43b050d594b4ebb79d2ad377ca18bbae72909dd78095a15e634006197bc150e4720c9b78e2ee4ebb00799145c2de706daf0be0775
7
- data.tar.gz: ddce7d5af7db47a15fdbc4b0abe118e3636f218497cb61ca7e3ba3197e3b539a2916661b4de84c5d6880b1a646e83b97d4635a43973f254df79bd194085a89d9
6
+ metadata.gz: a05dc807833a9668268335c68ee157c078b8ab52d316878b79b56c859fb14f6634f85332a24faabcc1895fb693643e2b1e1fc2819e4ad10048358f411d77fe72
7
+ data.tar.gz: e6657265707f3d4d3e8891332928ae5bb5b55fd7b60e43f6793ee3288470092663167a64398e263df7d3342f418394e443ce14be66ba84183cd3a0a13d59aaa8
@@ -11,6 +11,7 @@ module PortalScraper
11
11
  CODE_TO_COUNTRY_MAPPING = JSON.parse(File.read(File.join(File.dirname(__FILE__), 'code_to_country.json')))
12
12
  IS_POSTAL_CODE_DOM = JSON.parse(File.read(File.join(File.dirname(__FILE__), 'is_postal_code_dom.json')))
13
13
  MINIMUM_AMOUNT = 10
14
+ PROPOSITION_INDEX = 5
14
15
 
15
16
  def initialize(app_id = nil, secret = nil)
16
17
  @app_id = app_id || config.app_id
@@ -131,7 +132,7 @@ module PortalScraper
131
132
  end
132
133
 
133
134
  def proposition
134
- proposition_page = app.get(url_for('/propositionDetail.do'), { idx: 3 })
135
+ proposition_page = app.get(url_for('/propositionDetail.do'), { idx: PROPOSITION_INDEX })
135
136
  proposition_form = proposition_page.form_with(name: /proposition/i)
136
137
  try_form_fields(proposition_form, %w(montant amount), MINIMUM_AMOUNT)
137
138
  proposition_form['regimeFiscal'] = 'I'
@@ -1,8 +1,8 @@
1
1
  module PortalScraper
2
2
  class Version
3
3
  MAJOR = 2
4
- MINOR = 2
5
- PATCH = 1
4
+ MINOR = 3
5
+ PATCH = 0
6
6
 
7
7
  def self.to_s
8
8
  [MAJOR, MINOR, PATCH].compact.join('.')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: portal_scraper
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.1
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Armand Mégrot
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-05-27 00:00:00.000000000 Z
12
+ date: 2020-10-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mechanize