Merge branch 'develop' into auto_archive_on_date

This commit is contained in:
Mathieu Magnin 2017-03-27 15:35:52 +02:00 committed by GitHub
commit 6a8ca67a83
8 changed files with 27 additions and 96 deletions

1
.gitignore vendored
View file

@ -27,7 +27,6 @@ bin/*
config/initializers/token.rb config/initializers/token.rb
config/initializers/super_admin.rb config/initializers/super_admin.rb
doc/*.svg doc/*.svg
rubocop.html
config/france_connect.yml config/france_connect.yml
config/initializers/mailjet.rb config/initializers/mailjet.rb
config/fog_credentials.yml config/fog_credentials.yml

View file

@ -1,7 +0,0 @@
require: rubocop-rspec
AllCops:
Exclude:
- db/**/*
RunRailsCops: true
Metrics/LineLength:
Enabled: false

43
Gemfile
View file

@ -1,8 +1,5 @@
source 'https://rubygems.org' source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'dotenv-rails', groups: [:development, :test]
gem 'rails', '5.0.0.1' gem 'rails', '5.0.0.1'
gem 'actioncable', '5.0.0.1' gem 'actioncable', '5.0.0.1'
@ -20,30 +17,22 @@ gem 'therubyracer', platforms: :ruby
gem 'jquery-rails' gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks # Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks', '~> 2.5' gem 'turbolinks', '~> 2.5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api. # bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc gem 'sdoc', '~> 0.4.0', group: :doc
# Enable deep clone of active record models # Enable deep clone of active record models
gem 'deep_cloneable', '~> 2.2.1' gem 'deep_cloneable', '~> 2.2.1'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use Unicorn as the app server # Use Unicorn as the app server
gem 'unicorn' gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
# serializer # serializer
gem 'active_model_serializers' gem 'active_model_serializers'
#haml # haml
gem 'haml-rails' gem 'haml-rails'
#bootstrap saas # bootstrap saas
gem 'bootstrap-sass', '~> 3.3.5' gem 'bootstrap-sass', '~> 3.3.5'
# Pagination # Pagination
@ -51,9 +40,10 @@ gem 'will_paginate-bootstrap'
# Decorators # Decorators
gem 'draper', '~> 3.0.0.pre1' gem 'draper', '~> 3.0.0.pre1'
gem 'unicode_utils' gem 'unicode_utils'
#Gestion des comptes utilisateurs # Gestion des comptes utilisateurs
gem 'devise' gem 'devise'
gem 'openid_connect' gem 'openid_connect'
@ -78,13 +68,13 @@ gem 'chartkick'
gem 'logstasher' gem 'logstasher'
gem "font-awesome-rails" gem 'font-awesome-rails'
gem 'hashie' gem 'hashie'
gem 'mailjet' gem 'mailjet'
gem "smart_listing" gem 'smart_listing'
gem 'bootstrap-wysihtml5-rails', '~> 0.3.3.8' gem 'bootstrap-wysihtml5-rails', '~> 0.3.3.8'
@ -92,7 +82,8 @@ gem 'as_csv'
gem 'spreadsheet_architect' gem 'spreadsheet_architect'
gem 'apipie-rails' gem 'apipie-rails'
gem "maruku" # for Markdown support in apipie # For Markdown support in apipie
gem 'maruku'
gem 'openstack' gem 'openstack'
@ -114,10 +105,8 @@ group :test do
gem 'launchy' gem 'launchy'
gem 'factory_girl' gem 'factory_girl'
gem 'database_cleaner' gem 'database_cleaner'
gem 'selenium-webdriver'
gem 'webmock' gem 'webmock'
gem 'shoulda-matchers', require: false gem 'shoulda-matchers', require: false
gem 'simplecov', require: false
gem 'poltergeist' gem 'poltergeist'
gem 'timecop' gem 'timecop'
gem 'guard' gem 'guard'
@ -136,9 +125,6 @@ group :development do
end end
group :development, :test do group :development, :test do
# gem 'terminal-notifier'
# gem 'terminal-notifier-guard'
# Call 'byebug' anywhere in the code to stop execution and get a debugger console # Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug' gem 'byebug'
gem 'pry-byebug' gem 'pry-byebug'
@ -148,18 +134,11 @@ group :development, :test do
gem 'spring-commands-rspec' gem 'spring-commands-rspec'
gem 'rspec-rails', '~> 3.0' gem 'rspec-rails', '~> 3.0'
gem 'railroady'
gem 'rubocop', require: false
gem 'rubocop-checkstyle_formatter', require: false
gem 'rubocop-rspec', require: false
gem 'parallel_tests', '~> 2.10'
gem 'brakeman', require: false
# Deploy # Deploy
gem 'mina', ref: '343a7', git: 'https://github.com/mina-deploy/mina.git' gem 'mina', ref: '343a7', git: 'https://github.com/mina-deploy/mina.git'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'dotenv-rails'
end end
group :production, :staging do group :production, :staging do

View file

@ -78,7 +78,6 @@ GEM
actionpack (>= 3.0) actionpack (>= 3.0)
activemodel (>= 3.0) activemodel (>= 3.0)
responders responders
ast (2.3.0)
attr_required (1.0.1) attr_required (1.0.1)
autoprefixer-rails (6.5.4) autoprefixer-rails (6.5.4)
execjs execjs
@ -95,7 +94,6 @@ GEM
sass (>= 3.3.4) sass (>= 3.3.4)
bootstrap-wysihtml5-rails (0.3.3.8) bootstrap-wysihtml5-rails (0.3.3.8)
railties (>= 3.0) railties (>= 3.0)
brakeman (3.4.1)
browser (2.3.0) browser (2.3.0)
builder (3.2.2) builder (3.2.2)
byebug (9.0.6) byebug (9.0.6)
@ -113,8 +111,6 @@ GEM
mime-types (>= 1.16) mime-types (>= 1.16)
mimemagic (>= 0.3.0) mimemagic (>= 0.3.0)
chartkick (2.2.1) chartkick (2.2.1)
childprocess (0.5.9)
ffi (~> 1.0, >= 1.0.11)
clamav-client (3.1.0) clamav-client (3.1.0)
cliver (0.3.2) cliver (0.3.2)
coderay (1.1.1) coderay (1.1.1)
@ -140,7 +136,6 @@ GEM
responders responders
warden (~> 1.2.3) warden (~> 1.2.3)
diff-lcs (1.2.5) diff-lcs (1.2.5)
docile (1.1.5)
domain_name (0.5.20161129) domain_name (0.5.20161129)
unf (>= 0.0.5, < 1.0.0) unf (>= 0.0.5, < 1.0.0)
dotenv (2.2.0) dotenv (2.2.0)
@ -339,9 +334,6 @@ GEM
i18n (0.7.0) i18n (0.7.0)
inflecto (0.0.2) inflecto (0.0.2)
ipaddress (0.8.3) ipaddress (0.8.3)
jbuilder (2.6.1)
activesupport (>= 3.0.0, < 5.1)
multi_json (~> 1.2)
jquery-rails (4.2.1) jquery-rails (4.2.1)
rails-dom-testing (>= 1, < 3) rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0) railties (>= 4.2.0)
@ -420,17 +412,11 @@ GEM
openstack (3.3.7) openstack (3.3.7)
json json
orm_adapter (0.5.0) orm_adapter (0.5.0)
parallel (1.10.0)
parallel_tests (2.10.0)
parallel
parser (2.3.3.1)
ast (~> 2.2)
pg (0.19.0) pg (0.19.0)
poltergeist (1.12.0) poltergeist (1.12.0)
capybara (~> 2.1) capybara (~> 2.1)
cliver (~> 0.3.1) cliver (~> 0.3.1)
websocket-driver (>= 0.2.0) websocket-driver (>= 0.2.0)
powerpack (0.1.1)
pry (0.10.4) pry (0.10.4)
coderay (~> 1.1.0) coderay (~> 1.1.0)
method_source (~> 0.8.1) method_source (~> 0.8.1)
@ -450,7 +436,6 @@ GEM
rack (>= 1.1) rack (>= 1.1)
rack-test (0.6.3) rack-test (0.6.3)
rack (>= 1.0) rack (>= 1.0)
railroady (1.5.2)
rails (5.0.0.1) rails (5.0.0.1)
actioncable (= 5.0.0.1) actioncable (= 5.0.0.1)
actionmailer (= 5.0.0.1) actionmailer (= 5.0.0.1)
@ -478,7 +463,6 @@ GEM
method_source method_source
rake (>= 0.8.7) rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0) thor (>= 0.18.1, < 2.0)
rainbow (2.1.0)
raindrops (0.17.0) raindrops (0.17.0)
rake (12.0.0) rake (12.0.0)
rb-fsevent (0.9.8) rb-fsevent (0.9.8)
@ -529,17 +513,6 @@ GEM
rspec-mocks (~> 3.5.0) rspec-mocks (~> 3.5.0)
rspec-support (~> 3.5.0) rspec-support (~> 3.5.0)
rspec-support (3.5.0) rspec-support (3.5.0)
rubocop (0.46.0)
parser (>= 2.3.1.1, < 3.0)
powerpack (~> 0.1)
rainbow (>= 1.99.1, < 3.0)
ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.0, >= 1.0.1)
rubocop-checkstyle_formatter (0.3.0)
rubocop (>= 0.30.1)
rubocop-rspec (1.8.0)
rubocop (>= 0.42.0)
ruby-progressbar (1.8.1)
ruby_dep (1.5.0) ruby_dep (1.5.0)
ruby_parser (3.8.3) ruby_parser (3.8.3)
sexp_processor (~> 4.1) sexp_processor (~> 4.1)
@ -563,10 +536,6 @@ GEM
securecompare (1.0.0) securecompare (1.0.0)
select2-rails (4.0.3) select2-rails (4.0.3)
thor (~> 0.14) thor (~> 0.14)
selenium-webdriver (3.0.3)
childprocess (~> 0.5)
rubyzip (~> 1.0)
websocket (~> 1.0)
sentry-raven (2.2.0) sentry-raven (2.2.0)
faraday (>= 0.7.6, < 1.0) faraday (>= 0.7.6, < 1.0)
sexp_processor (4.7.0) sexp_processor (4.7.0)
@ -585,11 +554,6 @@ GEM
simple_form (3.4.0) simple_form (3.4.0)
actionpack (> 4, < 5.1) actionpack (> 4, < 5.1)
activemodel (> 4, < 5.1) activemodel (> 4, < 5.1)
simplecov (0.12.0)
docile (~> 1.1.0)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.0)
slop (3.6.0) slop (3.6.0)
smart_listing (1.2.0) smart_listing (1.2.0)
coffee-rails coffee-rails
@ -634,7 +598,6 @@ GEM
unf (0.1.4) unf (0.1.4)
unf_ext unf_ext
unf_ext (0.0.7.2) unf_ext (0.0.7.2)
unicode-display_width (1.1.2)
unicode_utils (1.4.0) unicode_utils (1.4.0)
unicorn (5.2.0) unicorn (5.2.0)
kgio (~> 2.6) kgio (~> 2.6)
@ -662,7 +625,6 @@ GEM
addressable (>= 2.3.6) addressable (>= 2.3.6)
crack (>= 0.3.2) crack (>= 0.3.2)
hashdiff hashdiff
websocket (1.2.3)
websocket-driver (0.6.4) websocket-driver (0.6.4)
websocket-extensions (>= 0.1.0) websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.2) websocket-extensions (0.1.2)
@ -686,7 +648,6 @@ DEPENDENCIES
bootstrap-datepicker-rails bootstrap-datepicker-rails
bootstrap-sass (~> 3.3.5) bootstrap-sass (~> 3.3.5)
bootstrap-wysihtml5-rails (~> 0.3.3.8) bootstrap-wysihtml5-rails (~> 0.3.3.8)
brakeman
browser browser
byebug byebug
capybara capybara
@ -707,7 +668,6 @@ DEPENDENCIES
guard-rspec guard-rspec
haml-rails haml-rails
hashie hashie
jbuilder (~> 2.0)
jquery-rails jquery-rails
launchy launchy
leaflet-draw-rails leaflet-draw-rails
@ -720,26 +680,20 @@ DEPENDENCIES
newrelic_rpm newrelic_rpm
openid_connect openid_connect
openstack openstack
parallel_tests (~> 2.10)
pg pg
poltergeist poltergeist
pry-byebug pry-byebug
rack-handlers rack-handlers
railroady
rails (= 5.0.0.1) rails (= 5.0.0.1)
rails-controller-testing rails-controller-testing
redis redis
rest-client rest-client
rgeo-geojson rgeo-geojson
rspec-rails (~> 3.0) rspec-rails (~> 3.0)
rubocop
rubocop-checkstyle_formatter
rubocop-rspec
sass-rails (~> 5.0) sass-rails (~> 5.0)
scenic scenic
sdoc (~> 0.4.0) sdoc (~> 0.4.0)
select2-rails select2-rails
selenium-webdriver
sentry-raven sentry-raven
shoulda-matchers shoulda-matchers
sidekiq sidekiq
@ -765,4 +719,4 @@ DEPENDENCIES
xray-rails xray-rails
BUNDLED WITH BUNDLED WITH
1.14.4 1.14.6

View file

@ -6,7 +6,7 @@ class DemoController < ApplicationController
return redirect_to root_path if Rails.env.production? return redirect_to root_path if Rails.env.production?
smart_listing_create :procedures, smart_listing_create :procedures,
Procedure.where(archived: false, published: true), Procedure.where(archived: false, published: true).order("id DESC"),
partial: "demo/list", partial: "demo/list",
array: true array: true
end end

View file

@ -13,4 +13,4 @@ test:
adapter: sqlite3 adapter: sqlite3
pool: 5 pool: 5
timeout: 5000 timeout: 5000
database: db/test<%= ENV['TEST_ENV_NUMBER'] %>.sqlite3 database: db/test.sqlite3

View file

@ -86,6 +86,18 @@
} }
} }
], ],
"champs_private": [
{
"value": null,
"type_de_champ": {
"id": 1,
"libelle": "Description privée",
"type_champ": "text",
"order_place": 0,
"description": "description privée"
}
}
],
"pieces_justificatives": [ "pieces_justificatives": [
{ {
"url": null, "url": null,

View file

@ -19,12 +19,6 @@
ENV['RAILS_ENV'] ||= 'test' ENV['RAILS_ENV'] ||= 'test'
if ENV['COV']
require 'simplecov'
SimpleCov.start 'rails'
puts "required simplecov"
end
require File.expand_path('../../config/environment', __FILE__) require File.expand_path('../../config/environment', __FILE__)
require 'rspec/rails' require 'rspec/rails'
require 'capybara/rspec' require 'capybara/rspec'
@ -38,7 +32,7 @@ require 'capybara/poltergeist'
Capybara.javascript_driver = :poltergeist Capybara.javascript_driver = :poltergeist
Capybara.ignore_hidden_elements = false Capybara.ignore_hidden_elements = false
Capybara.register_driver :poltergeist do |app| Capybara.register_driver :poltergeist do |app|
Capybara::Poltergeist::Driver.new(app, js_errors: true, port: 44_678 + ENV['TEST_ENV_NUMBER'].to_i, phantomjs_options: ['--proxy-type=none'], timeout: 180) Capybara::Poltergeist::Driver.new(app, js_errors: true, port: 44_678, phantomjs_options: ['--proxy-type=none'], timeout: 180)
end end
ActiveSupport::Deprecation.silenced = true ActiveSupport::Deprecation.silenced = true