Merge branch 'develop' into cerfa_flag
108
Gemfile
|
@ -5,20 +5,20 @@ source 'https://rubygems.org'
|
|||
gem 'rails', '4.2.0'
|
||||
|
||||
# Use SCSS for stylesheets
|
||||
gem 'sass-rails', '~> 5.0'
|
||||
gem 'sass-rails', '~> 5.0.3'
|
||||
# Use Uglifier as compressor for JavaScript assets
|
||||
gem 'uglifier', '>= 1.3.0'
|
||||
# Use CoffeeScript for .coffee assets and views
|
||||
gem 'coffee-rails', '~> 4.1.0'
|
||||
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
|
||||
gem 'therubyracer', platforms: :ruby
|
||||
gem 'therubyracer', '~> 0.12.2', platforms: :ruby
|
||||
|
||||
# Use jquery as the JavaScript library
|
||||
gem 'jquery-rails'
|
||||
gem 'jquery-rails', '~> 4.1.0'
|
||||
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
|
||||
gem 'turbolinks'
|
||||
gem 'turbolinks', '~> 2.5.3'
|
||||
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
|
||||
gem 'jbuilder', '~> 2.0'
|
||||
gem 'jbuilder', '~> 2.3.1'
|
||||
# bundle exec rake doc:rails generates the API under doc/api.
|
||||
gem 'sdoc', '~> 0.4.0', group: :doc
|
||||
|
||||
|
@ -26,100 +26,102 @@ gem 'sdoc', '~> 0.4.0', group: :doc
|
|||
# gem 'bcrypt', '~> 3.1.7'
|
||||
|
||||
# Use Unicorn as the app server
|
||||
gem 'unicorn'
|
||||
gem 'unicorn', '~> 4.9.0'
|
||||
|
||||
# Use Capistrano for deployment
|
||||
# gem 'capistrano-rails', group: :development
|
||||
|
||||
# serializer
|
||||
gem 'active_model_serializers'
|
||||
gem 'active_model_serializers', '~> 0.8.3'
|
||||
|
||||
#haml
|
||||
gem 'haml-rails'
|
||||
gem 'haml-rails', '~> 0.9.0'
|
||||
|
||||
#bootstrap saas
|
||||
gem 'bootstrap-sass', '~> 3.3.5'
|
||||
|
||||
# Pagination
|
||||
gem 'will_paginate-bootstrap'
|
||||
gem 'will_paginate-bootstrap', '~> 1.0.1'
|
||||
|
||||
# Decorators
|
||||
gem 'draper'
|
||||
gem 'draper', '~> 2.1.0'
|
||||
|
||||
#Gestion des comptes utilisateurs
|
||||
gem 'devise'
|
||||
gem 'openid_connect'
|
||||
gem 'rest-client'
|
||||
gem 'devise', '~> 3.4.1'
|
||||
gem 'openid_connect', '~> 0.9.2'
|
||||
gem 'rest-client', '~> 1.8.0'
|
||||
|
||||
gem 'carrierwave'
|
||||
gem 'carrierwave', '~> 0.10.0'
|
||||
|
||||
gem 'pg'
|
||||
gem 'pg', '~> 0.18.2'
|
||||
|
||||
gem 'rgeo-geojson'
|
||||
gem 'leaflet-rails'
|
||||
gem 'rgeo-geojson', '~> 0.3.1'
|
||||
gem 'leaflet-rails', '~> 0.7.4'
|
||||
gem 'leaflet-markercluster-rails', '~> 0.7.0'
|
||||
gem 'leaflet-draw-rails'
|
||||
gem 'leaflet-draw-rails', '~> 0.1.0'
|
||||
|
||||
gem 'bootstrap-datepicker-rails'
|
||||
gem 'bootstrap-datepicker-rails', '~> 1.4.0'
|
||||
|
||||
gem 'chartkick'
|
||||
gem 'chartkick', '~> 1.3.2'
|
||||
|
||||
gem 'logstasher'
|
||||
gem 'logstasher', '~> 0.6.5'
|
||||
|
||||
gem "font-awesome-rails"
|
||||
gem "font-awesome-rails", '~> 4.4.0'
|
||||
|
||||
gem 'hashie'
|
||||
gem 'hashie', '~> 3.4.1'
|
||||
|
||||
gem 'mailjet'
|
||||
gem 'mailjet', '~> 1.1.0'
|
||||
|
||||
gem "smart_listing"
|
||||
gem "smart_listing", '~> 1.1.2'
|
||||
|
||||
gem 'swagger-docs'
|
||||
|
||||
group :test do
|
||||
gem 'capybara'
|
||||
gem 'factory_girl'
|
||||
gem 'database_cleaner'
|
||||
gem 'selenium-webdriver'
|
||||
gem 'webmock'
|
||||
gem 'shoulda-matchers', require: false
|
||||
gem 'simplecov', require: false
|
||||
gem 'poltergeist'
|
||||
gem 'timecop'
|
||||
gem 'guard'
|
||||
gem 'guard-rspec', require: false
|
||||
gem 'guard-livereload', '~> 2.4', require: false
|
||||
gem 'capybara', '~> 2.1'
|
||||
gem 'factory_girl', '~> 4.5.0'
|
||||
gem 'database_cleaner', '~> 1.4.1'
|
||||
gem 'selenium-webdriver', '~> 2.44.0'
|
||||
gem 'webmock', '~> 1.21.0'
|
||||
gem 'shoulda-matchers', '~> 2.8.0', require: false
|
||||
gem 'simplecov', '~> 0.9.1', require: false
|
||||
gem 'poltergeist', '~> 1.6.0'
|
||||
gem 'timecop', '~> 0.7.3'
|
||||
gem 'guard', '~> 2.13.0'
|
||||
gem 'guard-rspec', '~> 4.3.1', require: false
|
||||
gem 'guard-livereload', '~> 2.5.1', require: false
|
||||
end
|
||||
|
||||
group :development, :test do
|
||||
gem 'terminal-notifier'
|
||||
gem 'terminal-notifier-guard'
|
||||
gem 'terminal-notifier', '~> 1.6.3'
|
||||
gem 'terminal-notifier-guard', '~> 1.6.4'
|
||||
|
||||
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
|
||||
gem 'byebug'
|
||||
gem 'pry-byebug'
|
||||
gem 'byebug', '~> 5.0.0'
|
||||
gem 'pry-byebug', '~> 3.2.0'
|
||||
|
||||
# Access an IRB console on exception pages or by using <%= console %> in views
|
||||
gem 'web-console', '~> 2.0'
|
||||
gem 'web-console', '~> 2.2.1'
|
||||
|
||||
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
|
||||
gem 'spring'
|
||||
gem 'spring-commands-rspec'
|
||||
gem 'rspec-rails', '~> 3.0'
|
||||
gem 'spring', '~> 1.3.6'
|
||||
gem 'spring-commands-rspec', '~> 1.0.4'
|
||||
gem 'rspec-rails', '~> 3.2.0'
|
||||
|
||||
gem 'railroady'
|
||||
gem 'railroady', '~> 1.3.0'
|
||||
|
||||
gem 'rubocop', require: false
|
||||
gem 'rubocop-checkstyle_formatter', require: false
|
||||
gem 'rubocop-rspec', require: false
|
||||
gem 'rubocop', '~> 0.30.1', require: false
|
||||
gem 'rubocop-checkstyle_formatter', '~> 0.2.0', require: false
|
||||
gem 'rubocop-rspec', '~> 1.3.0', require: false
|
||||
|
||||
gem "nyan-cat-formatter"
|
||||
gem "nyan-cat-formatter", '0.11'
|
||||
|
||||
gem 'parallel_tests'
|
||||
gem 'parallel_tests', '~> 1.9'
|
||||
|
||||
# Deploy
|
||||
gem 'mina', git: 'https://github.com/mina-deploy/mina.git'
|
||||
gem 'mina', git: 'https://github.com/mina-deploy/mina.git', :tag => 'v0.3.8'
|
||||
end
|
||||
|
||||
group :production, :staging do
|
||||
gem 'sentry-raven'
|
||||
gem 'sentry-raven', '~> 0.13.1'
|
||||
end
|
||||
|
||||
|
|
292
Gemfile.lock
|
@ -1,8 +1,9 @@
|
|||
GIT
|
||||
remote: https://github.com/mina-deploy/mina.git
|
||||
revision: a66b55a72833b19ac0ffb240afb37c86c0227582
|
||||
revision: cf890b9556d718caf51ec335649f33630428afb3
|
||||
tag: v0.3.8
|
||||
specs:
|
||||
mina (0.3.7)
|
||||
mina (0.3.8)
|
||||
open4 (~> 1.3.4)
|
||||
rake
|
||||
|
||||
|
@ -46,28 +47,29 @@ GEM
|
|||
minitest (~> 5.1)
|
||||
thread_safe (~> 0.3, >= 0.3.4)
|
||||
tzinfo (~> 1.1)
|
||||
addressable (2.3.8)
|
||||
arel (6.0.2)
|
||||
ast (2.0.0)
|
||||
astrolabe (1.3.0)
|
||||
parser (>= 2.2.0.pre.3, < 3.0)
|
||||
attr_required (1.0.0)
|
||||
autoprefixer-rails (5.2.1)
|
||||
addressable (2.4.0)
|
||||
arel (6.0.3)
|
||||
ast (2.2.0)
|
||||
astrolabe (1.3.1)
|
||||
parser (~> 2.2)
|
||||
attr_required (1.0.1)
|
||||
autoprefixer-rails (6.3.1)
|
||||
execjs
|
||||
json
|
||||
bcrypt (3.1.10)
|
||||
bindata (2.1.0)
|
||||
bindata (2.2.0)
|
||||
binding_of_caller (0.7.2)
|
||||
debug_inspector (>= 0.0.1)
|
||||
bootstrap-datepicker-rails (1.4.0)
|
||||
railties (>= 3.0)
|
||||
bootstrap-sass (3.3.5)
|
||||
autoprefixer-rails (>= 5.0.0.1)
|
||||
sass (>= 3.2.19)
|
||||
bootstrap-sass (3.3.6)
|
||||
autoprefixer-rails (>= 5.2.1)
|
||||
sass (>= 3.3.4)
|
||||
builder (3.2.2)
|
||||
byebug (5.0.0)
|
||||
columnize (= 0.9.0)
|
||||
capybara (2.4.4)
|
||||
capybara (2.6.2)
|
||||
addressable
|
||||
mime-types (>= 1.16)
|
||||
nokogiri (>= 1.3.3)
|
||||
rack (>= 1.0.0)
|
||||
|
@ -79,19 +81,20 @@ GEM
|
|||
json (>= 1.7)
|
||||
mime-types (>= 1.16)
|
||||
chartkick (1.3.2)
|
||||
childprocess (0.5.5)
|
||||
childprocess (0.5.9)
|
||||
ffi (~> 1.0, >= 1.0.11)
|
||||
cliver (0.3.2)
|
||||
coderay (1.1.0)
|
||||
coffee-rails (4.1.0)
|
||||
coffee-rails (4.1.1)
|
||||
coffee-script (>= 2.2.0)
|
||||
railties (>= 4.0.0, < 5.0)
|
||||
railties (>= 4.0.0, < 5.1.x)
|
||||
coffee-script (2.4.1)
|
||||
coffee-script-source
|
||||
execjs
|
||||
coffee-script-source (1.9.1.1)
|
||||
coffee-script-source (1.10.0)
|
||||
columnize (0.9.0)
|
||||
crack (0.4.2)
|
||||
concurrent-ruby (1.0.0)
|
||||
crack (0.4.3)
|
||||
safe_yaml (~> 1.0.0)
|
||||
database_cleaner (1.4.1)
|
||||
debug_inspector (0.0.2)
|
||||
|
@ -104,7 +107,7 @@ GEM
|
|||
warden (~> 1.2.3)
|
||||
diff-lcs (1.2.5)
|
||||
docile (1.1.5)
|
||||
domain_name (0.5.24)
|
||||
domain_name (0.5.20160128)
|
||||
unf (>= 0.0.5, < 1.0.0)
|
||||
draper (2.1.0)
|
||||
actionpack (>= 3.0)
|
||||
|
@ -115,17 +118,17 @@ GEM
|
|||
eventmachine (>= 0.12.9)
|
||||
http_parser.rb (~> 0.6.0)
|
||||
erubis (2.7.0)
|
||||
eventmachine (1.0.8)
|
||||
execjs (2.5.2)
|
||||
eventmachine (1.0.9.1)
|
||||
execjs (2.6.0)
|
||||
factory_girl (4.5.0)
|
||||
activesupport (>= 3.0.0)
|
||||
faraday (0.9.1)
|
||||
faraday (0.9.2)
|
||||
multipart-post (>= 1.2, < 3)
|
||||
ffi (1.9.6)
|
||||
ffi (1.9.10)
|
||||
font-awesome-rails (4.4.0.0)
|
||||
railties (>= 3.2, < 5.0)
|
||||
formatador (0.2.5)
|
||||
globalid (0.3.5)
|
||||
globalid (0.3.6)
|
||||
activesupport (>= 4.1.0)
|
||||
guard (2.13.0)
|
||||
formatador (>= 0.2.4)
|
||||
|
@ -145,7 +148,7 @@ GEM
|
|||
guard-rspec (4.3.1)
|
||||
guard (~> 2.1)
|
||||
rspec (>= 2.14, < 4.0)
|
||||
haml (4.0.6)
|
||||
haml (4.0.7)
|
||||
tilt
|
||||
haml-rails (0.9.0)
|
||||
actionpack (>= 4.0.1)
|
||||
|
@ -153,7 +156,7 @@ GEM
|
|||
haml (>= 4.0.6, < 5.0)
|
||||
html2haml (>= 1.0.1)
|
||||
railties (>= 4.0.1)
|
||||
hashie (3.4.1)
|
||||
hashie (3.4.3)
|
||||
html2haml (2.0.0)
|
||||
erubis (~> 2.7.0)
|
||||
haml (~> 4.0.0)
|
||||
|
@ -162,17 +165,17 @@ GEM
|
|||
http-cookie (1.0.2)
|
||||
domain_name (~> 0.5)
|
||||
http_parser.rb (0.6.0)
|
||||
httpclient (2.6.0.1)
|
||||
httpclient (2.7.1)
|
||||
i18n (0.7.0)
|
||||
jbuilder (2.3.1)
|
||||
jbuilder (2.3.2)
|
||||
activesupport (>= 3.0.0, < 5)
|
||||
multi_json (~> 1.2)
|
||||
jquery-rails (4.0.4)
|
||||
jquery-rails (4.1.0)
|
||||
rails-dom-testing (~> 1.0)
|
||||
railties (>= 4.2.0)
|
||||
thor (>= 0.14, < 2.0)
|
||||
json (1.8.3)
|
||||
json-jwt (1.5.1)
|
||||
json-jwt (1.5.2)
|
||||
activesupport
|
||||
bindata
|
||||
multi_json (>= 1.3)
|
||||
|
@ -181,38 +184,38 @@ GEM
|
|||
kaminari (0.16.3)
|
||||
actionpack (>= 3.0.0)
|
||||
activesupport (>= 3.0.0)
|
||||
kgio (2.9.3)
|
||||
kgio (2.10.0)
|
||||
leaflet-draw-rails (0.1.0)
|
||||
leaflet-markercluster-rails (0.7.0)
|
||||
railties (>= 3.1)
|
||||
leaflet-rails (0.7.4)
|
||||
libv8 (3.16.14.7)
|
||||
listen (3.0.4)
|
||||
libv8 (3.16.14.13)
|
||||
listen (3.0.5)
|
||||
rb-fsevent (>= 0.9.3)
|
||||
rb-inotify (>= 0.9)
|
||||
logstash-event (1.2.02)
|
||||
logstasher (0.6.5)
|
||||
logstash-event (~> 1.2.0)
|
||||
request_store
|
||||
loofah (2.0.2)
|
||||
loofah (2.0.3)
|
||||
nokogiri (>= 1.5.9)
|
||||
lumberjack (1.0.9)
|
||||
lumberjack (1.0.10)
|
||||
mail (2.6.3)
|
||||
mime-types (>= 1.16, < 3)
|
||||
mailjet (1.1.0)
|
||||
mailjet (1.1.1)
|
||||
activesupport (>= 3.1.0)
|
||||
rack (>= 1.4.0)
|
||||
rest-client
|
||||
method_source (0.8.2)
|
||||
mime-types (2.6.1)
|
||||
mini_portile (0.6.2)
|
||||
minitest (5.7.0)
|
||||
mime-types (2.99)
|
||||
mini_portile2 (2.0.0)
|
||||
minitest (5.8.4)
|
||||
multi_json (1.11.2)
|
||||
multipart-post (2.0.0)
|
||||
nenv (0.2.0)
|
||||
netrc (0.10.3)
|
||||
nokogiri (1.6.6.2)
|
||||
mini_portile (~> 0.6.0)
|
||||
netrc (0.11.0)
|
||||
nokogiri (1.6.7.2)
|
||||
mini_portile2 (~> 2.0.0.rc2)
|
||||
notiffany (0.0.8)
|
||||
nenv (~> 0.1)
|
||||
shellany (~> 0.0)
|
||||
|
@ -234,16 +237,16 @@ GEM
|
|||
parallel (1.6.1)
|
||||
parallel_tests (1.9.0)
|
||||
parallel
|
||||
parser (2.2.2.2)
|
||||
ast (>= 1.1, < 3.0)
|
||||
pg (0.18.2)
|
||||
parser (2.3.0.2)
|
||||
ast (~> 2.2)
|
||||
pg (0.18.4)
|
||||
poltergeist (1.6.0)
|
||||
capybara (~> 2.1)
|
||||
cliver (~> 0.3.1)
|
||||
multi_json (~> 1.0)
|
||||
websocket-driver (>= 0.2.0)
|
||||
powerpack (0.1.0)
|
||||
pry (0.10.1)
|
||||
powerpack (0.1.1)
|
||||
pry (0.10.3)
|
||||
coderay (~> 1.1.0)
|
||||
method_source (~> 0.8.1)
|
||||
slop (~> 3.4)
|
||||
|
@ -251,7 +254,7 @@ GEM
|
|||
byebug (~> 5.0)
|
||||
pry (~> 0.10)
|
||||
rack (1.6.4)
|
||||
rack-oauth2 (1.2.1)
|
||||
rack-oauth2 (1.2.2)
|
||||
activesupport (>= 2.3)
|
||||
attr_required (>= 0.0.5)
|
||||
httpclient (>= 2.4)
|
||||
|
@ -259,7 +262,7 @@ GEM
|
|||
rack (>= 1.1)
|
||||
rack-test (0.6.3)
|
||||
rack (>= 1.0)
|
||||
railroady (1.3.0)
|
||||
railroady (1.3.1)
|
||||
rails (4.2.0)
|
||||
actionmailer (= 4.2.0)
|
||||
actionpack (= 4.2.0)
|
||||
|
@ -273,36 +276,36 @@ GEM
|
|||
sprockets-rails
|
||||
rails-deprecated_sanitizer (1.0.3)
|
||||
activesupport (>= 4.2.0.alpha)
|
||||
rails-dom-testing (1.0.6)
|
||||
rails-dom-testing (1.0.7)
|
||||
activesupport (>= 4.2.0.beta, < 5.0)
|
||||
nokogiri (~> 1.6.0)
|
||||
rails-deprecated_sanitizer (>= 1.0.1)
|
||||
rails-html-sanitizer (1.0.2)
|
||||
rails-html-sanitizer (1.0.3)
|
||||
loofah (~> 2.0)
|
||||
railties (4.2.0)
|
||||
actionpack (= 4.2.0)
|
||||
activesupport (= 4.2.0)
|
||||
rake (>= 0.8.7)
|
||||
thor (>= 0.18.1, < 2.0)
|
||||
rainbow (2.0.0)
|
||||
raindrops (0.13.0)
|
||||
rake (10.4.2)
|
||||
rb-fsevent (0.9.6)
|
||||
rainbow (2.1.0)
|
||||
raindrops (0.15.0)
|
||||
rake (10.5.0)
|
||||
rb-fsevent (0.9.7)
|
||||
rb-inotify (0.9.5)
|
||||
ffi (>= 0.5.0)
|
||||
rdoc (4.2.0)
|
||||
rdoc (4.2.1)
|
||||
json (~> 1.4)
|
||||
ref (2.0.0)
|
||||
request_store (1.1.0)
|
||||
responders (2.1.0)
|
||||
railties (>= 4.2.0, < 5)
|
||||
request_store (1.3.0)
|
||||
responders (2.1.1)
|
||||
railties (>= 4.2.0, < 5.1)
|
||||
rest-client (1.8.0)
|
||||
http-cookie (>= 1.0.2, < 2.0)
|
||||
mime-types (>= 1.16, < 3.0)
|
||||
netrc (~> 0.7)
|
||||
rgeo (0.3.20)
|
||||
rgeo-geojson (0.3.1)
|
||||
rgeo (~> 0.3)
|
||||
rgeo (0.5.2)
|
||||
rgeo-geojson (0.3.3)
|
||||
rgeo (~> 0.5)
|
||||
rspec (3.2.0)
|
||||
rspec-core (~> 3.2.0)
|
||||
rspec-expectations (~> 3.2.0)
|
||||
|
@ -315,7 +318,7 @@ GEM
|
|||
rspec-mocks (3.2.1)
|
||||
diff-lcs (>= 1.2.0, < 2.0)
|
||||
rspec-support (~> 3.2.0)
|
||||
rspec-rails (3.2.1)
|
||||
rspec-rails (3.2.3)
|
||||
actionpack (>= 3.0, < 4.3)
|
||||
activesupport (>= 3.0, < 4.3)
|
||||
railties (>= 3.0, < 4.3)
|
||||
|
@ -332,19 +335,19 @@ GEM
|
|||
ruby-progressbar (~> 1.4)
|
||||
rubocop-checkstyle_formatter (0.2.0)
|
||||
rubocop (>= 0.20.1)
|
||||
rubocop-rspec (1.3.0)
|
||||
rubocop-rspec (1.3.1)
|
||||
ruby-progressbar (1.7.5)
|
||||
ruby_parser (3.7.0)
|
||||
ruby_parser (3.7.3)
|
||||
sexp_processor (~> 4.1)
|
||||
rubyzip (1.1.7)
|
||||
safe_yaml (1.0.4)
|
||||
sass (3.4.16)
|
||||
sass-rails (5.0.3)
|
||||
sass (3.4.21)
|
||||
sass-rails (5.0.4)
|
||||
railties (>= 4.0.0, < 5.0)
|
||||
sass (~> 3.1)
|
||||
sprockets (>= 2.8, < 4.0)
|
||||
sprockets-rails (>= 2.0, < 4.0)
|
||||
tilt (~> 1.1)
|
||||
tilt (>= 1.1, < 3)
|
||||
sdoc (0.4.1)
|
||||
json (~> 1.7, >= 1.7.7)
|
||||
rdoc (~> 4.0)
|
||||
|
@ -354,17 +357,17 @@ GEM
|
|||
multi_json (~> 1.0)
|
||||
rubyzip (~> 1.0)
|
||||
websocket (~> 1.0)
|
||||
sentry-raven (0.13.1)
|
||||
sentry-raven (0.13.3)
|
||||
faraday (>= 0.7.6)
|
||||
sexp_processor (4.6.0)
|
||||
sexp_processor (4.6.1)
|
||||
shellany (0.0.1)
|
||||
shoulda-matchers (2.8.0)
|
||||
activesupport (>= 3.0.0)
|
||||
simplecov (0.9.1)
|
||||
simplecov (0.9.2)
|
||||
docile (~> 1.1.0)
|
||||
multi_json (~> 1.0)
|
||||
simplecov-html (~> 0.8.0)
|
||||
simplecov-html (0.8.0)
|
||||
simplecov-html (~> 0.9.0)
|
||||
simplecov-html (0.9.0)
|
||||
slop (3.6.0)
|
||||
smart_listing (1.1.2)
|
||||
coffee-rails
|
||||
|
@ -374,13 +377,17 @@ GEM
|
|||
spring (1.3.6)
|
||||
spring-commands-rspec (1.0.4)
|
||||
spring (>= 0.9.1)
|
||||
sprockets (3.2.0)
|
||||
rack (~> 1.0)
|
||||
sprockets-rails (2.3.2)
|
||||
actionpack (>= 3.0)
|
||||
activesupport (>= 3.0)
|
||||
sprockets (>= 2.8, < 4.0)
|
||||
swd (1.0.0)
|
||||
sprockets (3.5.2)
|
||||
concurrent-ruby (~> 1.0)
|
||||
rack (> 1, < 3)
|
||||
sprockets-rails (3.0.1)
|
||||
actionpack (>= 4.0)
|
||||
activesupport (>= 4.0)
|
||||
sprockets (>= 3.0.0)
|
||||
swagger-docs (0.2.8)
|
||||
activesupport (>= 3, < 5)
|
||||
rails (>= 3, < 5)
|
||||
swd (1.0.1)
|
||||
activesupport (>= 3)
|
||||
attr_required (>= 0.0.5)
|
||||
httpclient (>= 2.4)
|
||||
|
@ -393,13 +400,13 @@ GEM
|
|||
ref
|
||||
thor (0.19.1)
|
||||
thread_safe (0.3.5)
|
||||
tilt (1.4.1)
|
||||
timecop (0.7.3)
|
||||
tilt (2.0.2)
|
||||
timecop (0.7.4)
|
||||
turbolinks (2.5.3)
|
||||
coffee-rails
|
||||
tzinfo (1.2.2)
|
||||
thread_safe (~> 0.1)
|
||||
uglifier (2.7.1)
|
||||
uglifier (2.7.2)
|
||||
execjs (>= 0.3.0)
|
||||
json (>= 1.8.0)
|
||||
unf (0.1.4)
|
||||
|
@ -416,25 +423,25 @@ GEM
|
|||
validate_url (1.0.2)
|
||||
activemodel (>= 3.0.0)
|
||||
addressable
|
||||
warden (1.2.3)
|
||||
warden (1.2.6)
|
||||
rack (>= 1.0)
|
||||
web-console (2.2.1)
|
||||
activemodel (>= 4.0)
|
||||
binding_of_caller (>= 0.7.2)
|
||||
railties (>= 4.0)
|
||||
sprockets-rails (>= 2.0, < 4.0)
|
||||
webfinger (1.0.1)
|
||||
webfinger (1.0.2)
|
||||
activesupport
|
||||
httpclient (>= 2.4)
|
||||
multi_json
|
||||
webmock (1.21.0)
|
||||
addressable (>= 2.3.6)
|
||||
crack (>= 0.3.2)
|
||||
websocket (1.2.1)
|
||||
websocket-driver (0.5.3)
|
||||
websocket (1.2.2)
|
||||
websocket-driver (0.6.3)
|
||||
websocket-extensions (>= 0.1.0)
|
||||
websocket-extensions (0.1.2)
|
||||
will_paginate (3.0.7)
|
||||
will_paginate (3.1.0)
|
||||
will_paginate-bootstrap (1.0.1)
|
||||
will_paginate (>= 3.0.3)
|
||||
xpath (2.0.0)
|
||||
|
@ -444,65 +451,66 @@ PLATFORMS
|
|||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
active_model_serializers
|
||||
bootstrap-datepicker-rails
|
||||
active_model_serializers (~> 0.8.3)
|
||||
bootstrap-datepicker-rails (~> 1.4.0)
|
||||
bootstrap-sass (~> 3.3.5)
|
||||
byebug
|
||||
capybara
|
||||
carrierwave
|
||||
chartkick
|
||||
byebug (~> 5.0.0)
|
||||
capybara (~> 2.1)
|
||||
carrierwave (~> 0.10.0)
|
||||
chartkick (~> 1.3.2)
|
||||
coffee-rails (~> 4.1.0)
|
||||
database_cleaner
|
||||
devise
|
||||
draper
|
||||
factory_girl
|
||||
font-awesome-rails
|
||||
guard
|
||||
guard-livereload (~> 2.4)
|
||||
guard-rspec
|
||||
haml-rails
|
||||
hashie
|
||||
jbuilder (~> 2.0)
|
||||
jquery-rails
|
||||
leaflet-draw-rails
|
||||
database_cleaner (~> 1.4.1)
|
||||
devise (~> 3.4.1)
|
||||
draper (~> 2.1.0)
|
||||
factory_girl (~> 4.5.0)
|
||||
font-awesome-rails (~> 4.4.0)
|
||||
guard (~> 2.13.0)
|
||||
guard-livereload (~> 2.5.1)
|
||||
guard-rspec (~> 4.3.1)
|
||||
haml-rails (~> 0.9.0)
|
||||
hashie (~> 3.4.1)
|
||||
jbuilder (~> 2.3.1)
|
||||
jquery-rails (~> 4.1.0)
|
||||
leaflet-draw-rails (~> 0.1.0)
|
||||
leaflet-markercluster-rails (~> 0.7.0)
|
||||
leaflet-rails
|
||||
logstasher
|
||||
mailjet
|
||||
leaflet-rails (~> 0.7.4)
|
||||
logstasher (~> 0.6.5)
|
||||
mailjet (~> 1.1.0)
|
||||
mina!
|
||||
nyan-cat-formatter
|
||||
openid_connect
|
||||
parallel_tests
|
||||
pg
|
||||
poltergeist
|
||||
pry-byebug
|
||||
railroady
|
||||
nyan-cat-formatter (= 0.11)
|
||||
openid_connect (~> 0.9.2)
|
||||
parallel_tests (~> 1.9)
|
||||
pg (~> 0.18.2)
|
||||
poltergeist (~> 1.6.0)
|
||||
pry-byebug (~> 3.2.0)
|
||||
railroady (~> 1.3.0)
|
||||
rails (= 4.2.0)
|
||||
rest-client
|
||||
rgeo-geojson
|
||||
rspec-rails (~> 3.0)
|
||||
rubocop
|
||||
rubocop-checkstyle_formatter
|
||||
rubocop-rspec
|
||||
sass-rails (~> 5.0)
|
||||
rest-client (~> 1.8.0)
|
||||
rgeo-geojson (~> 0.3.1)
|
||||
rspec-rails (~> 3.2.0)
|
||||
rubocop (~> 0.30.1)
|
||||
rubocop-checkstyle_formatter (~> 0.2.0)
|
||||
rubocop-rspec (~> 1.3.0)
|
||||
sass-rails (~> 5.0.3)
|
||||
sdoc (~> 0.4.0)
|
||||
selenium-webdriver
|
||||
sentry-raven
|
||||
shoulda-matchers
|
||||
simplecov
|
||||
smart_listing
|
||||
spring
|
||||
spring-commands-rspec
|
||||
terminal-notifier
|
||||
terminal-notifier-guard
|
||||
therubyracer
|
||||
timecop
|
||||
turbolinks
|
||||
selenium-webdriver (~> 2.44.0)
|
||||
sentry-raven (~> 0.13.1)
|
||||
shoulda-matchers (~> 2.8.0)
|
||||
simplecov (~> 0.9.1)
|
||||
smart_listing (~> 1.1.2)
|
||||
spring (~> 1.3.6)
|
||||
spring-commands-rspec (~> 1.0.4)
|
||||
swagger-docs
|
||||
terminal-notifier (~> 1.6.3)
|
||||
terminal-notifier-guard (~> 1.6.4)
|
||||
therubyracer (~> 0.12.2)
|
||||
timecop (~> 0.7.3)
|
||||
turbolinks (~> 2.5.3)
|
||||
uglifier (>= 1.3.0)
|
||||
unicorn
|
||||
web-console (~> 2.0)
|
||||
webmock
|
||||
will_paginate-bootstrap
|
||||
unicorn (~> 4.9.0)
|
||||
web-console (~> 2.2.1)
|
||||
webmock (~> 1.21.0)
|
||||
will_paginate-bootstrap (~> 1.0.1)
|
||||
|
||||
BUNDLED WITH
|
||||
1.10.6
|
||||
1.11.2
|
||||
|
|
BIN
app/assets/images/keywords/echanger.png
Normal file
After Width: | Height: | Size: 37 KiB |
BIN
app/assets/images/keywords/faciliter.png
Normal file
After Width: | Height: | Size: 114 KiB |
BIN
app/assets/images/keywords/profiter.png
Normal file
After Width: | Height: | Size: 88 KiB |
BIN
app/assets/images/keywords/securiser.png
Normal file
After Width: | Height: | Size: 56 KiB |
BIN
app/assets/images/keywords/simplifier.png
Normal file
After Width: | Height: | Size: 46 KiB |
BIN
app/assets/images/landing_background.jpg
Normal file
After Width: | Height: | Size: 719 KiB |
BIN
app/assets/images/logo_mini_FC.png
Normal file
After Width: | Height: | Size: 35 KiB |
|
@ -26,3 +26,4 @@
|
|||
//= require leaflet.freedraw
|
||||
//= require smart_listing
|
||||
//= require turf
|
||||
//= require franceconnect
|
||||
|
|
|
@ -2,6 +2,6 @@ $(document).on('page:load', franceconnect_kit);
|
|||
$(document).ready(franceconnect_kit);
|
||||
|
||||
function franceconnect_kit() {
|
||||
|
||||
franceConnectKit.init()
|
||||
}
|
||||
|
||||
|
|
|
@ -17,12 +17,44 @@
|
|||
*= require bootstrap-datepicker3
|
||||
*= require leaflet
|
||||
*= require font-awesome
|
||||
*= require franceconnect
|
||||
*/
|
||||
@import "bootstrap-sprockets";
|
||||
@import "bootstrap";
|
||||
|
||||
body {
|
||||
background-color: rgb(255, 255, 255)
|
||||
background-color: rgb(255, 255, 255);
|
||||
}
|
||||
|
||||
html, body {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
padding-top: 50px;
|
||||
}
|
||||
|
||||
#wrap {
|
||||
min-height: 100%;
|
||||
margin-bottom: -50px;
|
||||
}
|
||||
|
||||
#wrap:after {
|
||||
content: "";
|
||||
display: block;
|
||||
}
|
||||
|
||||
#footer, #wrap:after {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
#footer {
|
||||
background-color: rgb(240, 240, 240)
|
||||
}
|
||||
|
||||
.main_div {
|
||||
margin-left: 10rem;
|
||||
margin-right: 10rem;
|
||||
}
|
||||
|
||||
.logo {
|
||||
|
@ -64,14 +96,26 @@ body {
|
|||
margin-right: 105px;
|
||||
}
|
||||
|
||||
.alert.alert-success,
|
||||
.alert.alert-danger {
|
||||
margin-top: -20px
|
||||
|
||||
#header {
|
||||
top: 0;
|
||||
left: -3px;
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
z-index: 10;
|
||||
|
||||
}
|
||||
|
||||
|
||||
.navbar {
|
||||
height: 35px;
|
||||
background-color: rgb(235, 235, 235)
|
||||
background-color: rgba(235, 235, 235, 0.95);
|
||||
|
||||
.sign_in_FC {
|
||||
margin-top: -18px;
|
||||
height: 70px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.btn {
|
||||
|
@ -140,6 +184,7 @@ div.pagination {
|
|||
height: 52px;
|
||||
width: 100%;
|
||||
margin-top: 0px;
|
||||
z-index: 10;
|
||||
|
||||
}
|
||||
|
||||
|
@ -191,7 +236,6 @@ div.pagination {
|
|||
margin-top: -4px;
|
||||
}
|
||||
|
||||
|
||||
#fconnect-access {
|
||||
right: 50px;
|
||||
}
|
||||
|
|
86
app/assets/stylesheets/landing.scss
Normal file
|
@ -0,0 +1,86 @@
|
|||
.max-size {
|
||||
margin-left: -10rem;
|
||||
margin-right: -10rem;
|
||||
}
|
||||
|
||||
#landing {
|
||||
|
||||
background-image: image-url('landing_background.jpg');
|
||||
background-attachment: fixed;
|
||||
background-position: top left;
|
||||
background-repeat: no-repeat;
|
||||
|
||||
#title {
|
||||
h1 {
|
||||
font-size: 65px;
|
||||
}
|
||||
h2 {
|
||||
font-size: 35px;
|
||||
}
|
||||
|
||||
.btn {
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
.btn-lg {
|
||||
font-size: 20px;
|
||||
padding: 12px 18px;
|
||||
}
|
||||
|
||||
color: white;
|
||||
padding-top: 6%;
|
||||
padding-bottom: 7%;
|
||||
text-shadow: 3px 3px 4px rgba(0, 0, 0, .6);
|
||||
}
|
||||
|
||||
.logo img {
|
||||
width: 70px;
|
||||
}
|
||||
}
|
||||
|
||||
#suite {
|
||||
.row{
|
||||
width: 100%;
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
}
|
||||
.word {
|
||||
border-bottom: solid darkgrey 1px;
|
||||
|
||||
img {
|
||||
padding-top: 50px;
|
||||
padding-bottom: 50px;
|
||||
width: 200px;
|
||||
margin-left: 25%;
|
||||
}
|
||||
}
|
||||
|
||||
.simplifier {
|
||||
ul {
|
||||
margin-top: 16%;
|
||||
}
|
||||
}
|
||||
|
||||
.securiser {
|
||||
img {
|
||||
width: 300px;
|
||||
}
|
||||
|
||||
ul {
|
||||
margin-top: 11%;
|
||||
}
|
||||
}
|
||||
|
||||
.echanger {
|
||||
ul {
|
||||
margin-top: 4%;
|
||||
}
|
||||
}
|
||||
.profiter {
|
||||
border-bottom: none;
|
||||
|
||||
ul {
|
||||
margin-top: 11%;
|
||||
}
|
||||
}
|
||||
}
|
20
app/assets/stylesheets/ul.scss
Normal file
|
@ -0,0 +1,20 @@
|
|||
.dynamic_ul {
|
||||
margin-left: 20px;
|
||||
margin-top: 13%;
|
||||
|
||||
li {
|
||||
font: 200 20px/1.5 Helvetica, Verdana, sans-serif;
|
||||
margin-top: 15px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
li:last-child {
|
||||
border: none;
|
||||
}
|
||||
|
||||
li a {
|
||||
text-decoration: none;
|
||||
color: #000;
|
||||
display: block;
|
||||
}
|
||||
}
|
|
@ -2,7 +2,7 @@ class API::V1::DossiersController < APIController
|
|||
|
||||
def index
|
||||
procedure = current_administrateur.procedures.find(params[:procedure_id])
|
||||
dossiers = procedure.dossiers.paginate(page: params[:page])
|
||||
dossiers = procedure.dossiers.where.not(state: :draft).paginate(page: params[:page])
|
||||
render json: dossiers, each_serializer: DossiersSerializer, meta: pagination(dossiers), meta_key: 'pagination', status: 200
|
||||
rescue ActiveRecord::RecordNotFound => e
|
||||
render json: {}, status: 404
|
||||
|
@ -18,9 +18,9 @@ class API::V1::DossiersController < APIController
|
|||
|
||||
def pagination(dossiers)
|
||||
{
|
||||
page: dossiers.current_page,
|
||||
resultats_par_page: dossiers.per_page,
|
||||
nombre_de_page: dossiers.total_pages
|
||||
page: dossiers.current_page,
|
||||
resultats_par_page: dossiers.per_page,
|
||||
nombre_de_page: dossiers.total_pages
|
||||
}
|
||||
end
|
||||
end
|
|
@ -1,6 +1,17 @@
|
|||
class API::V1::ProceduresController < APIController
|
||||
def show
|
||||
|
||||
swagger_controller :procedures, "Procédure API"
|
||||
|
||||
swagger_api :show do
|
||||
summary "Récupérer les informations d'une procédure"
|
||||
param :path, :id, :integer, :required
|
||||
param :path, :token, :string, :required
|
||||
response :ok, "Success", :Procedure
|
||||
response :unauthorized
|
||||
response :not_found
|
||||
end
|
||||
|
||||
def show
|
||||
@procedure = current_administrateur.procedures.find(params[:id]).decorate
|
||||
|
||||
render json: @procedure
|
||||
|
|
|
@ -11,7 +11,7 @@ class RootController < ApplicationController
|
|||
redirect_to admin_procedures_path
|
||||
|
||||
else
|
||||
redirect_to new_user_session_path
|
||||
render 'landing'
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,6 +1,10 @@
|
|||
class UsersController < ApplicationController
|
||||
before_action :authenticate_user!
|
||||
|
||||
def index
|
||||
redirect_to root_path
|
||||
end
|
||||
|
||||
def current_user_dossier dossier_id=nil
|
||||
dossier_id ||= params[:dossier_id] || params[:id]
|
||||
|
||||
|
|
19
app/views/docs/api-docs.json
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"apiVersion": "1.0",
|
||||
"swaggerVersion": "1.2",
|
||||
"basePath": "https://tps.apientreprise.fr",
|
||||
"apis": [
|
||||
{
|
||||
"path": "/api/v1/procedures.{format}",
|
||||
"description": "Procédure API"
|
||||
}
|
||||
],
|
||||
"authorizations": null,
|
||||
"info": {
|
||||
"title": "TPS application",
|
||||
"description": "Doc des APIs de TPS",
|
||||
"contact": "contact@tps.apientreprise.fr",
|
||||
"license": "Apache 2.0",
|
||||
"licenseUrl": "http://www.apache.org/licenses/LICENSE-2.0.html"
|
||||
}
|
||||
}
|
45
app/views/docs/api/v1/procedures.json
Normal file
|
@ -0,0 +1,45 @@
|
|||
{
|
||||
"apiVersion": "1.0",
|
||||
"swaggerVersion": "1.2",
|
||||
"basePath": "https://tps.apientreprise.fr",
|
||||
"resourcePath": "procedures",
|
||||
"apis": [
|
||||
{
|
||||
"path": "/api/v1/procedures/{id}.json",
|
||||
"operations": [
|
||||
{
|
||||
"summary": "Récupérer les informations d'une procédure",
|
||||
"parameters": [
|
||||
{
|
||||
"paramType": "path",
|
||||
"name": "id",
|
||||
"type": "integer",
|
||||
"description": null,
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responseMessages": [
|
||||
{
|
||||
"code": 200,
|
||||
"responseModel": "Procedure",
|
||||
"message": "Success"
|
||||
},
|
||||
{
|
||||
"code": 401,
|
||||
"responseModel": null,
|
||||
"message": "Unauthorized"
|
||||
},
|
||||
{
|
||||
"code": 404,
|
||||
"responseModel": null,
|
||||
"message": "Not Found"
|
||||
}
|
||||
],
|
||||
"nickname": "API::V1::Procedures#show",
|
||||
"method": "get"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"authorizations": null
|
||||
}
|
|
@ -4,16 +4,16 @@
|
|||
%meta{:content => "text/html; charset=UTF-8", "http-equiv" => "Content-Type"}/
|
||||
%title TPS - Téléprocédures simplifiées
|
||||
%meta{'http-equiv' => "X-UA-Compatible", :content => "IE=edge"}
|
||||
%script{src: 'http://fcp.integ01.dev-franceconnect.fr/js/franceconnect.js'}
|
||||
|
||||
= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true
|
||||
= javascript_include_tag 'application', 'data-turbolinks-track' => true
|
||||
= csrf_meta_tags
|
||||
%body
|
||||
#beta
|
||||
Beta
|
||||
%div
|
||||
%div.navbar
|
||||
%div#wrap
|
||||
%div#header.navbar
|
||||
|
||||
#beta
|
||||
Beta
|
||||
= image_tag('marianne_small.png', class: 'logo')
|
||||
%a{href: '/'}
|
||||
= image_tag('logo-tps.png', class: 'logo')
|
||||
|
@ -39,6 +39,10 @@
|
|||
= current_user.email
|
||||
|
||||
= link_to "Déconnexion", '/users/sign_out', method: :delete, :class => 'btn btn-md'
|
||||
- else
|
||||
= link_to "Utilisateur", '/users/sign_in', method: :get, :class => 'btn btn-md'
|
||||
= link_to "Accompagnateur", '/gestionnaires/sign_in', method: :get, :class => 'btn btn-md'
|
||||
= link_to "Administrateur", '/administrateurs/sign_in', method: :get, :class => 'btn btn-md'
|
||||
|
||||
#flash_message.center
|
||||
- if flash.notice
|
||||
|
@ -48,5 +52,23 @@
|
|||
.alert.alert-danger
|
||||
= flash.alert
|
||||
|
||||
%div{:style => 'margin-left:10%; margin-right:10%;'}
|
||||
%div.main_div
|
||||
= yield
|
||||
|
||||
%br
|
||||
|
||||
#footer.navbar
|
||||
.container.center
|
||||
%p{style:'margin-top: 1em;'}
|
||||
%p{class: "copyright text-muted small"}
|
||||
Copyright ©
|
||||
|
||||
=link_to 'SGMAP', "http://etatplateforme.modernisation.gouv.fr"
|
||||
|
||||
2016 - Tous droits réservés
|
||||
|
||||
=link_to 'contact@tps.apientreprise.fr', "mailto:contact@tps.apientreprise.fr"
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
63
app/views/root/landing.html.haml
Normal file
|
@ -0,0 +1,63 @@
|
|||
#landing.max-size
|
||||
#title
|
||||
%h1.center
|
||||
TPS
|
||||
%h2.center
|
||||
TéléProcédure Simplifiée
|
||||
|
||||
%br
|
||||
%h3.center
|
||||
Simplifiez toutes vos démarches pour les rendre 100% en ligne.
|
||||
|
||||
%br
|
||||
%br
|
||||
|
||||
.center
|
||||
=mail_to "contact@tps.apientreprise.fr", 'Ouvrir un compte TPS',{ subject: 'Ouvrir un compte TPS',
|
||||
body: 'Bonjour, je souhaiterais ouvrir un compte TPS. Merci de me recontacter par email ou par téléphone au _____.',
|
||||
class: 'btn btn-lg btn-default' }
|
||||
|
||||
#suite.max-size
|
||||
.row.word.simplifier
|
||||
.col-md-6.col-lg-6
|
||||
= image_tag image_url('keywords/simplifier.png')
|
||||
.col-md-6.col-lg-6
|
||||
%ul.dynamic_ul
|
||||
%li
|
||||
%a Générateur simplifiée de démarches en ligne pour les administrations
|
||||
%li
|
||||
%a Ne demander que les informations strictement nécessaires
|
||||
|
||||
.row.word.securiser
|
||||
.col-md-6.col-lg-6
|
||||
%ul.dynamic_ul
|
||||
%li
|
||||
Profiter d’une identification simplifiée grâce à FranceConnect
|
||||
%li
|
||||
Évoluer sur une plateforme de l'État totalement sécurisée
|
||||
.col-md-6.col-lg-6
|
||||
= image_tag image_url('keywords/securiser.png')
|
||||
|
||||
.row.word.echanger
|
||||
.col-md-6.col-lg-6
|
||||
= image_tag image_url('keywords/echanger.png')
|
||||
.col-md-6.col-lg-6
|
||||
%ul.dynamic_ul
|
||||
%li
|
||||
Tchatter avec les services traitant jusqu’à la complétude du dossier
|
||||
%li
|
||||
Etre notifié de manière électronique
|
||||
%li
|
||||
Accompagner les usagers dans leur démarche
|
||||
%li
|
||||
Vérifier les pièces au fur et à mesure
|
||||
|
||||
.row.word.profiter
|
||||
.col-md-6.col-lg-6
|
||||
%ul.dynamic_ul
|
||||
%li
|
||||
Profiter des ressources cartographiques directement mobilisées, si nécessaire
|
||||
%li
|
||||
Récupérer des informations officielles collectées directement auprès des administrations
|
||||
.col-md-6.col-lg-6
|
||||
= image_tag image_url('keywords/profiter.png')
|
|
@ -34,15 +34,14 @@
|
|||
= render "users/shared/links"
|
||||
|
||||
%div{style:'text-align:center'}
|
||||
\-
|
||||
%br
|
||||
%a{href: '/gestionnaires/sign_in'}
|
||||
= 'Accompagnateur'
|
||||
%br
|
||||
%a{href: '/administrateurs/sign_in'}
|
||||
= 'Administrateur'
|
||||
-#\-
|
||||
-#%br
|
||||
-#%a{href: '/gestionnaires/sign_in'}
|
||||
-# = 'Accompagnateur'
|
||||
-#%br
|
||||
-#%a{href: '/administrateurs/sign_in'}
|
||||
-# = 'Administrateur'
|
||||
|
||||
%br
|
||||
\-
|
||||
%br
|
||||
%a{href: 'https://github.com/sgmap/tps/releases', target: '_blank'}
|
||||
|
|
23
config/initializers/swagger_docs.rb
Normal file
|
@ -0,0 +1,23 @@
|
|||
Swagger::Docs::Config.register_apis(
|
||||
{
|
||||
"1.0" => {
|
||||
# the extension used for the API
|
||||
:api_extension_type => :json,
|
||||
# the output location where your .json files are written to
|
||||
:api_file_path => "app/views/docs/",
|
||||
# the URL base path to your API
|
||||
:base_path => "https://tps.apientreprise.fr",
|
||||
# if you want to delete all .json files at each generation
|
||||
:clean_directory => false,
|
||||
# add custom attributes to api-docs
|
||||
:attributes => {
|
||||
:info => {
|
||||
"title" => "TPS application",
|
||||
"description" => "Doc des APIs de TPS",
|
||||
"contact" => "contact@tps.apientreprise.fr",
|
||||
"license" => "Apache 2.0",
|
||||
"licenseUrl" => "http://www.apache.org/licenses/LICENSE-2.0.html"
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
|
@ -25,6 +25,7 @@ Rails.application.routes.draw do
|
|||
end
|
||||
|
||||
get 'demo' => 'demo#index'
|
||||
get 'users' => 'users#index'
|
||||
|
||||
namespace :users do
|
||||
resources :dossiers do
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
class ChangeDateCreationTypeToEntreprise < ActiveRecord::Migration
|
||||
def up
|
||||
change_column :entreprises, :date_creation, "timestamp USING to_timestamp(date_creation) at time zone 'UTC-2'"
|
||||
end
|
||||
|
||||
def down
|
||||
change_column :entreprises, :date_creation, "integer USING extract(epoch from date_creation::timestamp with time zone)::integer"
|
||||
end
|
||||
end
|
|
@ -15,6 +15,8 @@ class SIADE::EntrepriseAdapter
|
|||
data_source[:entreprise].each do |k, v|
|
||||
params[k] = v if attr_to_fetch.include?(k)
|
||||
end
|
||||
params[:date_creation] = Time.at(params[:date_creation]).to_datetime
|
||||
|
||||
params
|
||||
rescue
|
||||
nil
|
||||
|
|
38
lib/tasks/dev.rake
Normal file
|
@ -0,0 +1,38 @@
|
|||
namespace :dev do
|
||||
desc 'Initialise dev environment'
|
||||
task :init do
|
||||
puts 'start initialisation'
|
||||
Rake::Task['dev:generate_token_file'].invoke
|
||||
Rake::Task['dev:generate_franceconnect_file'].invoke
|
||||
|
||||
puts 'end initialisation'
|
||||
end
|
||||
|
||||
task :generate_token_file do
|
||||
puts 'creating token.rb file'
|
||||
res = `rake secret`.gsub("\n", '')
|
||||
file = File.new('config/initializers/token.rb', 'w+')
|
||||
comment = <<EOF
|
||||
EOF
|
||||
file.write(comment)
|
||||
file.write("TPS::Application.config.SIADETOKEN = '#{res}'")
|
||||
file.close
|
||||
end
|
||||
|
||||
task :generate_franceconnect_file do
|
||||
file = File.new('config/france_connect.yml', 'w+')
|
||||
comment = <<EOF
|
||||
particulier_identifier: plop
|
||||
particulier_secret: plip
|
||||
|
||||
particulier_redirect_uri: 'http://localhost:3000/france_connect/particulier/callback'
|
||||
|
||||
particulier_authorization_endpoint: 'https://fcp.integ01.dev-franceconnect.fr/api/v1/authorize'
|
||||
particulier_token_endpoint: 'https://fcp.integ01.dev-franceconnect.fr/api/v1/token'
|
||||
particulier_userinfo_endpoint: 'https://fcp.integ01.dev-franceconnect.fr/api/v1/userinfo'
|
||||
particulier_logout_endpoint: 'https://fcp.integ01.dev-franceconnect.fr/api/v1/logout'
|
||||
EOF
|
||||
file.write(comment)
|
||||
file.close
|
||||
end
|
||||
end
|
|
@ -144,7 +144,7 @@ describe API::V1::DossiersController do
|
|||
it { expect(subject[:raison_sociale]).to eq('GRTGAZ') }
|
||||
it { expect(subject[:siret_siege_social]).to eq('44011762001530') }
|
||||
it { expect(subject[:code_effectif_entreprise]).to eq('51') }
|
||||
it { expect(subject[:date_creation]).to eq(1_004_914_800) }
|
||||
it { expect(subject[:date_creation]).to eq('2016-01-28T10:16:29.000Z') }
|
||||
it { expect(subject.keys).to match_array(field_list) }
|
||||
end
|
||||
|
||||
|
|
|
@ -29,6 +29,12 @@ describe RootController, type: :controller do
|
|||
end
|
||||
|
||||
context 'when nobody is connected' do
|
||||
it { expect(subject).to redirect_to(new_user_session_path) }
|
||||
render_views
|
||||
|
||||
before do
|
||||
subject
|
||||
end
|
||||
|
||||
it { expect(response.body).to have_css('#landing') }
|
||||
end
|
||||
end
|
|
@ -53,7 +53,7 @@ describe EntrepriseDecorator do
|
|||
|
||||
describe '#pretty_date_creation' do
|
||||
it 'pretty print date creation' do
|
||||
expect(subject.pretty_date_creation).to eq('05-11-2001')
|
||||
expect(subject.pretty_date_creation).to eq('28-01-2016')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -9,6 +9,6 @@ FactoryGirl.define do
|
|||
raison_sociale 'GRTGAZ'
|
||||
siret_siege_social '44011762001530'
|
||||
code_effectif_entreprise '51'
|
||||
date_creation 1_004_914_800
|
||||
date_creation Time.at(1453976189).to_datetime
|
||||
end
|
||||
end
|
||||
|
|
|
@ -32,7 +32,7 @@ feature 'Administrator connection' do
|
|||
page.find_by_id('admin_sign_out').click
|
||||
end
|
||||
scenario 'admin is redireted to home page' do
|
||||
expect(page).to have_css('#login_user')
|
||||
expect(page).to have_css('#landing')
|
||||
end
|
||||
end
|
||||
context 'when clicking on profile' do
|
||||
|
|
|
@ -9,7 +9,7 @@ feature 'user access to the list of his dossier' do
|
|||
|
||||
before do
|
||||
last_updated_dossier.update_attributes(nom_projet: 'salut la compagnie')
|
||||
visit root_path
|
||||
visit new_user_session_path
|
||||
within('#new_user') do
|
||||
page.find_by_id('user_email').set user.email
|
||||
page.find_by_id('user_password').set user.password
|
||||
|
|
|
@ -50,7 +50,7 @@ describe SIADE::EntrepriseAdapter do
|
|||
end
|
||||
|
||||
it 'L\'entreprise contient bien une date_creation' do
|
||||
expect(subject[:date_creation]).to eq(891_381_600)
|
||||
expect(subject[:date_creation]).to eq('Mon, 01 Jan 1900 00:00:00.000000000 +0100')
|
||||
end
|
||||
|
||||
it 'L\'entreprise contient bien un nom' do
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
"raison_sociale": "OCTO-TECHNOLOGY",
|
||||
"siret_siege_social": "41816609600051",
|
||||
"code_effectif_entreprise": "22",
|
||||
"date_creation": 891381600,
|
||||
"date_creation": -2208992400,
|
||||
"nom": "test_nom",
|
||||
"prenom": "test_prenom",
|
||||
"etat_administratif": {
|
||||
|
|
147
vendor/assets/javascripts/franceconnect.js
vendored
Normal file
|
@ -0,0 +1,147 @@
|
|||
var franceConnectKit = {};
|
||||
|
||||
(function (window) {
|
||||
var fconnect = {
|
||||
tracesUrl: '/traces',
|
||||
aboutUrl: ''
|
||||
};
|
||||
|
||||
franceConnectKit.init = function() {
|
||||
//initCurrentHostnameSource();
|
||||
//includeFCCss();
|
||||
|
||||
fconnect.currentHost = 'fcp.integ01.dev-franceconnect.fr'
|
||||
|
||||
var fconnectProfile = document.getElementById('fconnect-profile');
|
||||
if (fconnectProfile) {
|
||||
var linkAccess = document.querySelector('#fconnect-profile > a');
|
||||
var fcLogoutUrl = fconnectProfile.getAttribute('data-fc-logout-url');
|
||||
var access = createFCAccessElement(fcLogoutUrl);
|
||||
fconnectProfile.appendChild(access);
|
||||
linkAccess.onclick = toggleElement.bind(access);
|
||||
}
|
||||
};
|
||||
|
||||
var document = window.document;
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
franceConnectKit.init();
|
||||
});
|
||||
|
||||
function initCurrentHostnameSource() {
|
||||
var currentScript = document.querySelector('script[src^="/assets/franceconnect"]').getAttribute('src');
|
||||
var parseUrl = currentScript.split('/');
|
||||
fconnect.currentHost = parseUrl[2];
|
||||
}
|
||||
|
||||
function includeFCCss() {
|
||||
var ss = document.styleSheets;
|
||||
for (var i = 0, max = ss.length; i < max; i++) {
|
||||
if (ss[i].href == 'http://' + fconnect.currentHost + '/stylesheets/franceconnect.css' || ss[i].href == 'https://' + fconnect.currentHost + '/stylesheets/franceconnect.css')
|
||||
return;
|
||||
}
|
||||
|
||||
var linkCss = document.createElement('link');
|
||||
linkCss.rel = 'stylesheet';
|
||||
linkCss.href = '//' + fconnect.currentHost + '/stylesheets/franceconnect.css';
|
||||
linkCss.type = 'text/css';
|
||||
linkCss.media = 'screen';
|
||||
|
||||
document.getElementsByTagName('head')[0].appendChild(linkCss);
|
||||
}
|
||||
|
||||
function toggleElement(event) {
|
||||
event.preventDefault();
|
||||
if (this.style.display === "block") {
|
||||
this.style.display = "none";
|
||||
} else {
|
||||
this.style.display = "block";
|
||||
}
|
||||
}
|
||||
|
||||
function closeFCPopin(event) {
|
||||
event.preventDefault();
|
||||
fconnect.popin.className = 'fade-out';
|
||||
setTimeout(function () {
|
||||
document.body.removeChild(fconnect.popin);
|
||||
}, 200);
|
||||
}
|
||||
|
||||
function openFCPopin() {
|
||||
fconnect.popin = document.createElement('div');
|
||||
fconnect.popin.id = 'fc-background';
|
||||
|
||||
var iframe = createFCIframe();
|
||||
|
||||
document.body.appendChild(fconnect.popin);
|
||||
|
||||
fconnect.popin.appendChild(iframe);
|
||||
|
||||
setTimeout(function () {
|
||||
fconnect.popin.className = 'fade-in';
|
||||
}, 200);
|
||||
}
|
||||
|
||||
function createFCIframe() {
|
||||
var iframe = document.createElement("iframe");
|
||||
iframe.setAttribute('id', 'fconnect-iframe');
|
||||
iframe.frameBorder = 0;
|
||||
iframe.name = 'fconnect-iframe';
|
||||
return iframe;
|
||||
}
|
||||
|
||||
function createFCAccessElement(logoutUrl) {
|
||||
var access = document.createElement('div');
|
||||
access.id = 'fconnect-access';
|
||||
access.innerHTML = '<h5>Vous êtes identifié grâce à FranceConnect</h5>';
|
||||
access.appendChild(createAboutLink());
|
||||
access.appendChild(document.createElement('hr'));
|
||||
access.appendChild(createHistoryLink());
|
||||
access.appendChild(createLogoutElement(logoutUrl));
|
||||
return access;
|
||||
}
|
||||
|
||||
function createHistoryLink() {
|
||||
|
||||
var historyLink = document.createElement('a');
|
||||
historyLink.target = 'fconnect-iframe';
|
||||
historyLink.href = '//' + fconnect.currentHost + fconnect.tracesUrl;
|
||||
historyLink.onclick = openFCPopin;
|
||||
historyLink.innerHTML = 'Historique des connexions/échanges de données';
|
||||
|
||||
return historyLink;
|
||||
}
|
||||
|
||||
function createAboutLink() {
|
||||
var aboutLink = document.createElement('a');
|
||||
aboutLink.href = fconnect.aboutUrl ? '//' + fconnect.currentHost + fconnect.aboutUrl : '#';
|
||||
if (fconnect.aboutUrl) {
|
||||
aboutLink.target = 'fconnect-iframe';
|
||||
aboutLink.onclick = openFCPopin;
|
||||
}
|
||||
aboutLink.innerHTML = 'Qu\'est-ce-que FranceConnect ?';
|
||||
|
||||
return aboutLink;
|
||||
}
|
||||
|
||||
function createLogoutElement(logoutUrl) {
|
||||
var elm = document.createElement('div');
|
||||
elm.className = 'logout';
|
||||
elm.innerHTML = '<a class="btn btn-default" href="' + logoutUrl + '">Se déconnecter</a>';
|
||||
return elm;
|
||||
}
|
||||
|
||||
var eventMethod = window.addEventListener ? "addEventListener" : "attachEvent";
|
||||
var eventer = window[eventMethod];
|
||||
var messageEvent = eventMethod == "attachEvent" ? "onmessage" : "message";
|
||||
|
||||
// Listen to message from child window
|
||||
eventer(messageEvent, function (e) {
|
||||
var key = e.message ? "message" : "data";
|
||||
var data = e[key];
|
||||
if (data === 'close_popup') {
|
||||
closeFCPopin(e);
|
||||
}
|
||||
}, false);
|
||||
})(this);
|
||||
|
151
vendor/assets/stylesheets/franceconnect.scss
vendored
Normal file
|
@ -0,0 +1,151 @@
|
|||
.btn-fconnect {
|
||||
all: initial;
|
||||
color: #0b6ba8;
|
||||
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
|
||||
background-color: #ffffff;
|
||||
background-image: none;
|
||||
border: 1px solid #ccc;
|
||||
display: inline-block;
|
||||
margin-bottom: 0;
|
||||
line-height: 20px;
|
||||
text-align: center;
|
||||
text-shadow: 0 1px 1px rgba(255,255,255,0.75);
|
||||
vertical-align: middle;
|
||||
cursor: pointer;
|
||||
border-color: rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);
|
||||
box-shadow: inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);
|
||||
}
|
||||
|
||||
.btn-fconnect-full {
|
||||
font-size: 14px;
|
||||
max-width: 175px;
|
||||
padding: 11px 19px;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.btn-fconnect-mini {
|
||||
font-size: 14px;
|
||||
width: 182px;
|
||||
padding: 11px 19px;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.btn-fconnect-full img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.btn-fconnect-mini img {
|
||||
float:left;
|
||||
width: 38px;
|
||||
}
|
||||
|
||||
#fconnect-profile > a {
|
||||
padding: 15px 0 15px 50px;
|
||||
color: #ffffff;
|
||||
margin-right: 10px;
|
||||
font-size: 18px;
|
||||
background: image-url('logo_mini_FC.png') left center no-repeat;
|
||||
background-size: 40px;
|
||||
}
|
||||
|
||||
#fconnect-access {
|
||||
all: initial;
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
font-size: 13px;
|
||||
display: none;
|
||||
position: absolute;
|
||||
background: white;
|
||||
border: 1px solid #ccc;
|
||||
width: 300px;
|
||||
padding: 15px;
|
||||
margin-top: 20px;
|
||||
z-index: 9990;
|
||||
box-shadow: 1px 1px 3px #ccc;
|
||||
}
|
||||
|
||||
#fconnect-access hr {
|
||||
margin: 15px 0;
|
||||
}
|
||||
|
||||
#fconnect-access:after, #fconnect-access:before {
|
||||
bottom: 100%;
|
||||
border: solid transparent;
|
||||
content: "";
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
#fconnect-access:after {
|
||||
border-bottom-color: white;
|
||||
border-width: 13px;
|
||||
left: 10%;
|
||||
}
|
||||
|
||||
#fconnect-access:before {
|
||||
border-bottom-color: #ccc;
|
||||
border-width: 14px;
|
||||
left: 9.70%;
|
||||
}
|
||||
|
||||
#fconnect-access .logout {
|
||||
text-align: center;
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
#fconnect-access .btn {
|
||||
display: inline-block;
|
||||
padding: 6px 12px;
|
||||
margin-bottom: 0;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
line-height: 1.42857143;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
vertical-align: middle;
|
||||
touch-action: manipulation;
|
||||
cursor: pointer;
|
||||
background-image: none;
|
||||
border: 1px solid transparent;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
#fconnect-access .btn-default {
|
||||
color: #333;
|
||||
background-color: #fff;
|
||||
border-color: #ccc;
|
||||
}
|
||||
|
||||
#fconnect-access .btn-default:hover,
|
||||
#fconnect-access .btn-default:focus {
|
||||
color: #333;
|
||||
background-color: #e6e6e6;
|
||||
border-color: #adadad;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#fc-background {
|
||||
all: initial;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(0, 0, 0, 0.80);
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 9999;
|
||||
opacity: 0;
|
||||
transition: opacity 0.2s ease-in;
|
||||
}
|
||||
|
||||
#fc-background.fade-in {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
#fc-background.fade-out {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
#fconnect-iframe {
|
||||
display: block;
|
||||
width: 600px;
|
||||
height: 500px;
|
||||
margin: 60px auto 0 auto;
|
||||
}
|