Commit graph

194 commits

Author SHA1 Message Date
Chaïb Martinez
0fe473b84e Add 2 new categories in admin contact form 2018-12-20 15:29:49 +01:00
gregoirenovel
616e9305e9 Enable the Style/ClassCheck cop 2018-12-19 13:56:10 +01:00
gregoirenovel
026fd1aaa2 Use parentheses 2018-12-18 22:18:38 +01:00
Pierre de La Morinerie
d614ea6bd5 stats: display contact rate 2018-12-18 10:38:59 +01:00
Pierre de La Morinerie
30774aa189 api_geo: cache requests for one day
This should make the 500 errors that we get in production less frequent.

NB: Unfortunately we can't write a spec for the caching behavior, as the
VCR mocks are never cached.
2018-12-10 11:41:07 +01:00
Pierre de La Morinerie
a0ae1afb45 typhoeus: add a cache store for successful requests 2018-12-10 11:41:07 +01:00
gregoirenovel
3b0562949c Ask API Entreprise for insee v3 2018-12-10 10:49:56 +01:00
gregoirenovel
31250b4642 Make more ApiEntreprise::API methods private 2018-12-10 10:48:57 +01:00
Paul Chavard
b9af07b845 Add admin support contact form 2018-11-28 16:50:37 +01:00
Paul Chavard
fcdc0114fd Add id to geo areas 2018-10-30 12:16:09 +01:00
simon lehericey
ee0a6b1913 Time.at => Time.zone.at 2018-10-26 10:10:20 +00:00
Paul Chavard
7ffbe417f9 Add ApiGeo RPG adapter 2018-10-23 18:13:44 +02:00
Paul Chavard
ed46e2c3be Use Typhoeus in ApiGeo adapter 2018-10-23 18:13:44 +02:00
gregoirenovel
a8af27105d Remove ssl_verifypeer option in ApiEntreprise::API.call
SSL seems OK for https://entreprise.api.gouv.fr/
2018-10-16 10:23:30 +02:00
gregoirenovel
5a326db650 Simplify ApiCarto::API.call
SSL seems OK for https://apicarto.sgmap.fr
2018-10-16 10:16:44 +02:00
gregoirenovel
f66f0f9668 Remove two useless initialize methods 2018-10-16 09:33:16 +02:00
gregoirenovel
22088b167d Remove ApiAdresse::Geocodeur 2018-10-16 09:33:16 +02:00
gregoirenovel
d68aca545a Refactor ApiAddresse::PointAdapter 2018-10-16 09:33:16 +02:00
gregoirenovel
145880555e ApiAdresse::PointAdapter#point → #geocode 2018-10-16 09:33:16 +02:00
gregoirenovel
af716fa3c6 ApiAdresse::PointRetriever → ApiAdresse::PointAdapter 2018-10-16 09:33:16 +02:00
gregoirenovel
81d2b27160 Refactor ApiAdresse::AddressAdapter 2018-10-16 09:33:16 +02:00
gregoirenovel
7af41b35a2 ApiAdresse::AddressAdapter#list → #get_suggestions 2018-10-16 09:33:16 +02:00
gregoirenovel
517c0ad3fc ApiAdresse::AddressRetriever → ApiAdresse::AddressAdapter 2018-10-16 09:33:16 +02:00
gregoirenovel
32b27ba111 Add some spacing 2018-10-15 23:31:23 +02:00
gregoirenovel
76cf9ab746 ApiGeo::Driver → ApiGeo::API 2018-10-15 23:31:23 +02:00
gregoirenovel
c654122e90 Unify scoping in app/lib 2018-10-15 23:31:23 +02:00
gregoirenovel
831cd56b95 Remove comments in ApiAdresse 2018-10-15 23:31:23 +02:00
gregoirenovel
8b4ba42f15 Simplify ApiAdresse 2018-10-15 23:31:23 +02:00
gregoirenovel
a841a517df ApiAdresse::Driver → ApiAdresse::API 2018-10-15 23:31:23 +02:00
gregoirenovel
5db4de6c53 QuartiersPrioritaires::Adapter → QuartiersPrioritairesAdapter 2018-10-15 23:31:23 +02:00
gregoirenovel
918a91a985 ApiCarto::Cadastre::Adapter → ApiCarto::CadastreAdapter 2018-10-15 23:31:23 +02:00
gregoirenovel
6be26af7db Use parentheses 2018-10-15 20:55:46 +02:00
gregoirenovel
5e9e913dce Carto::Geocodeur → ApiAdresse::Geocodeur 2018-10-15 20:55:46 +02:00
gregoirenovel
d726fbf698 CARTO::SGMAP → ApiCarto 2018-10-15 20:55:46 +02:00
gregoirenovel
442b4a241b Make API_ADRRESSE_URL canonical 2018-10-15 20:55:46 +02:00
gregoirenovel
a7a6898ce3 Constantize the API Adresse URL 2018-10-15 20:55:46 +02:00
gregoirenovel
ca8af0e904 Use parentheses 2018-10-15 20:55:46 +02:00
gregoirenovel
dac2019675 Carto::Bano → ApiAdresse 2018-10-15 20:55:46 +02:00
gregoirenovel
d749d20bb3 api_url → url 2018-10-15 20:55:46 +02:00
gregoirenovel
a7019719c2 Use parentheses 2018-10-15 20:55:46 +02:00
gregoirenovel
4903a6b189 Carto::GeoAPI → ApiGeo 2018-10-15 20:55:46 +02:00
gregoirenovel
34ac68b27f 2018-10-15 17:12:34 +02:00
gregoirenovel
b162c68844 Use Hash#slice 2018-10-15 17:12:34 +02:00
gregoirenovel
889b9b9342 Make Cadastre::Adapter#to_params more like QuartiersPrioritaires::Adapter 2018-10-15 16:45:30 +02:00
gregoirenovel
22beb41240 Unify #generate_qp with #generate_cadastre 2018-10-15 16:45:30 +02:00
gregoirenovel
a18af4e616 Simplify CARTO::SGMAP::API.call 2018-10-15 16:45:30 +02:00
gregoirenovel
5df4e3305e Simplify CARTO::SGMAP::API 2018-10-15 16:45:30 +02:00
gregoirenovel
2ed4c1da1c Use round brackets 2018-10-15 16:45:30 +02:00
gregoirenovel
0196309822 Remove a useless default in CARTO::SGMAP::API.call 2018-10-15 16:16:16 +02:00
gregoirenovel
7fe3b43eab Improve a comment in RNAAdapter 2018-10-04 21:03:49 +02:00
gregoirenovel
1ffd4a230b Simplify RNAAdapter#process_params
Avoid catching an attribute only to remove it
a few lines later
2018-10-04 21:03:49 +02:00
gregoirenovel
b28607a3a6 Simplify an instruction in ExercicesAdapter#process_params 2018-10-04 21:03:49 +02:00
Paul Chavard
1302b68d91 Only reject api entreprise data if required fields are missing 2018-10-04 17:55:09 +02:00
gregoirenovel
7e4268db67 Enable Style/TrailingCommaInArguments 2018-10-03 12:03:21 +02:00
gregoirenovel
a171186dd8 Enable Style/TrailingCommaInHashLiteral 2018-10-03 12:03:21 +02:00
gregoirenovel
1f4ef0074f Enable Style/ZeroLengthPredicate 2018-10-03 12:00:17 +02:00
gregoirenovel
b994fa4206 Do one thing per line 2018-10-01 16:15:46 +02:00
gregoirenovel
0c9628c180 Fix some files according the the .editorconfig rules 2018-09-20 16:23:09 +02:00
Paul Chavard
6453b53a41 Add helpscout API adapter 2018-08-29 10:43:00 +01:00
gregoirenovel
9284afc649 Use a constant for the API Entreprise URL 2018-08-28 10:44:16 +02:00
Paul Chavard
9abb3c7a5a [ENV] Pipedrive key config 2018-08-23 15:55:32 +02:00
Mathieu Magnin
db8e750f1a [ENV] Configure Api Entreprise token 2018-08-23 15:55:32 +02:00
simon lehericey
d9a9677d1d [fix #2397] Manager: update crm conf 2018-08-23 12:12:39 +02:00
simon lehericey
ee43650c32 Demande: add nb_of_procedure, deadline and nb_of_dossier fields 2018-08-23 12:12:39 +02:00
Pierre de La Morinerie
d1301762d4 pipedrive: fix deals when no deals are returned 2018-07-02 17:07:24 +02:00
gregoirenovel
346b32fbd4 [Fix #1736] Assign the deal and person to the person who accepted them 2018-06-07 16:04:15 +02:00
Frederic Merizen
695f5b2705 Fix class methods on BizDev module
and add missing tests
2018-06-06 16:07:29 +02:00
gregoirenovel
6992bea141 Add the BizDev module 2018-06-01 20:48:50 +02:00
gregoirenovel
5d188c191d Move transform_keys calls directly to #process_params methods 2018-05-24 17:54:51 +02:00
simon lehericey
aaebcd3494 [fix #1701] Use DS form to enroll admin 2018-05-24 17:15:44 +02:00
gregoirenovel
44754418f8 Add parentheses 2018-05-22 19:01:46 +02:00
gregoirenovel
a246181afd Add API_GEO_URL 2018-05-22 19:01:46 +02:00
gregoirenovel
1839269dd9 Add API_CARTO_URL 2018-05-22 18:53:34 +02:00
Paul Chavard
d9dbf7b7f9 Remove legacy features support 2018-04-26 16:28:45 +02:00
Paul Chavard
e76e17895a Flipflop should check administrateur id not user id 2018-04-25 11:06:40 +02:00
Paul Chavard
3f3358db16 Add flipflop config 2018-04-18 16:51:21 +02:00
gregoirenovel
26b66aac96 Improve a method name 2018-04-09 09:54:11 +02:00
gregoirenovel
71e9a6056d Structure the helpers methods the same way 2018-04-09 09:54:10 +02:00
gregoirenovel
c5953f8aef Use .join to generate urls (unification) 2018-04-09 09:54:10 +02:00
gregoirenovel
298d7d050c Mutualize some code in Pipedrive::API#put 2018-04-09 09:54:10 +02:00
gregoirenovel
e688fc4212 Mutualize some code in Pipedrive::API#get 2018-04-09 09:54:10 +02:00
gregoirenovel
d202e0173e Mutualize some code in Pipedrive::API#get 2018-04-09 09:54:10 +02:00
gregoirenovel
d287eb0e5f Create Pipedrive::API get helpers 2018-04-09 09:54:10 +02:00
gregoirenovel
4ff07f2b93 Mutualize a call Pipedrive::API.put 2018-04-09 09:54:10 +02:00
gregoirenovel
e31b839e0c Create Pipedrive::API put helpers 2018-04-09 09:54:10 +02:00
gregoirenovel
e71d3a76fa Refactor Pipedrive: create adapters and an API files 2018-04-09 09:54:10 +02:00
gregoirenovel
094ccecc01 Rename Adapter’s siret_or_siren to siret 2018-03-29 16:06:14 +02:00
gregoirenovel
8938a5b40d Delete SiretService.siren, move its code to EntrepriseAdapter#get_resource 2018-03-29 16:06:14 +02:00
gregoirenovel
cc9e318210 Add a comment to explain why we reject 206 responses 2018-03-29 15:36:41 +02:00
gregoirenovel
67cf614879 Mutualize some code on ApiEntreprise::Adapter 2018-03-29 11:44:59 +02:00
gregoirenovel
5f1394cd7f ExercicesAdapter#to_array -> ExercicesAdapter#to_params 2018-03-29 11:44:59 +02:00
gregoirenovel
68c9849977 Mutualize the adapters’ #data_source methods 2018-03-29 11:44:59 +02:00
gregoirenovel
a9360a8be2 Mutualize Adapter initialization in a class and method 2018-03-29 11:44:59 +02:00
gregoirenovel
681e33b850 Simplify RNAAdapter#to_params and unify the type of objects it returns 2018-03-28 10:55:15 +02:00
gregoirenovel
caf2e50954 Make #to_params return blank hashes if we have no data 2018-03-28 10:55:15 +02:00
gregoirenovel
de483ac0f6 Format all attr_to_fetch methods the same way 2018-03-28 10:55:14 +02:00
gregoirenovel
3dd76c3d68 Remove useless success? methods 2018-03-28 10:55:14 +02:00
gregoirenovel
a9c1c9f551 Improve #success? methods 2018-03-28 10:55:14 +02:00
gregoirenovel
19add3f534 Use if-flows instead of rescue-flows 2018-03-28 10:55:14 +02:00
gregoirenovel
182afee970 to_params -> to_array 2018-03-28 10:52:54 +02:00