csv_import_magic 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/Rakefile +36 -0
- data/app/assets/javascripts/csv_import_magic/application.js +13 -0
- data/app/assets/stylesheets/csv_import_magic/_theme.scss +75 -0
- data/app/assets/stylesheets/csv_import_magic/application.scss +1 -0
- data/app/controllers/csv_import_magic/base_controller.rb +4 -0
- data/app/controllers/csv_import_magic/importers_controller.rb +64 -0
- data/app/models/importer.rb +77 -0
- data/app/services/csv_import_magic/failure.rb +54 -0
- data/app/services/csv_import_magic/importer.rb +53 -0
- data/app/views/csv_import_magic/importers/edit.html.erb +43 -0
- data/app/views/csv_import_magic/importers/show.html.erb +31 -0
- data/app/views/layouts/csv_import_magic.html.erb +31 -0
- data/app/workers/csv_import_magic/importer_worker.rb +13 -0
- data/config/initializers/initializer.rb +1 -0
- data/config/locales/en.yml +71 -0
- data/config/routes.rb +3 -0
- data/db/migrate/20170111145652_create_companies.rb +15 -0
- data/db/migrate/20170111145657_create_importers.rb +15 -0
- data/db/migrate/20170112125734_create_user.rb +8 -0
- data/lib/csv_import_magic/engine.rb +5 -0
- data/lib/csv_import_magic/models.rb +18 -0
- data/lib/csv_import_magic/orm/active_record.rb +5 -0
- data/lib/csv_import_magic/version.rb +3 -0
- data/lib/csv_import_magic.rb +12 -0
- data/lib/generators/active_record/csv_import_magic_generator.rb +35 -0
- data/lib/generators/active_record/templates/csv_parser.rb +19 -0
- data/lib/generators/csv_import_magic/controllers_generator.rb +14 -0
- data/lib/generators/csv_import_magic/csv_import_magic_generator.rb +17 -0
- data/lib/generators/csv_import_magic/install_generator.rb +58 -0
- data/lib/generators/csv_import_magic/orm_helpers.rb +19 -0
- data/lib/generators/csv_import_magic/views_generator.rb +65 -0
- data/lib/generators/templates/migration.rb +10 -0
- data/lib/generators/templates/views/shareds/_csv_importer.html.erb +19 -0
- data/spec/controllers/csv_import_magic/importers_controller_spec.rb +106 -0
- data/spec/dummy/README.rdoc +28 -0
- data/spec/dummy/Rakefile +6 -0
- data/spec/dummy/app/assets/javascripts/application.js +13 -0
- data/spec/dummy/app/assets/stylesheets/application.css +16 -0
- data/spec/dummy/app/controllers/application_controller.rb +7 -0
- data/spec/dummy/app/csv_parsers/company_parser.rb +15 -0
- data/spec/dummy/app/csv_parsers/foo_parser.rb +9 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/models/company.rb +5 -0
- data/spec/dummy/app/models/user.rb +4 -0
- data/spec/dummy/app/views/application/index.html.erb +22 -0
- data/spec/dummy/app/views/layouts/application.html.erb +15 -0
- data/spec/dummy/bin/bundle +3 -0
- data/spec/dummy/bin/rails +4 -0
- data/spec/dummy/bin/rake +4 -0
- data/spec/dummy/bin/setup +29 -0
- data/spec/dummy/config/application.rb +26 -0
- data/spec/dummy/config/boot.rb +5 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +41 -0
- data/spec/dummy/config/environments/production.rb +79 -0
- data/spec/dummy/config/environments/test.rb +42 -0
- data/spec/dummy/config/initializers/assets.rb +11 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/dummy/config/initializers/inflections.rb +16 -0
- data/spec/dummy/config/initializers/mime_types.rb +4 -0
- data/spec/dummy/config/initializers/session_store.rb +3 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/csv_import_magic.pt-BR.yml +71 -0
- data/spec/dummy/config/locales/pt-BR.yml +271 -0
- data/spec/dummy/config/routes.rb +5 -0
- data/spec/dummy/config/secrets.yml +22 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/schema.rb +51 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +5489 -0
- data/spec/dummy/log/test.log +87086 -0
- data/spec/dummy/public/404.html +67 -0
- data/spec/dummy/public/422.html +67 -0
- data/spec/dummy/public/500.html +66 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170117-37276-r4n40q.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170117-38136-8h3q2p.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170117-38466-1nr5kco.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170117-39668-101mi6q.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170117-40284-81g0ud.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170117-40408-17a0uvl.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170117-40523-pj6wl4.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170117-42084-10luep0.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170117-42191-11tldaf.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170117-42321-baundn.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170117-42420-1qm2isf.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170117-42570-gywnhk.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170117-42696-1pg04re.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170117-42823-vekf7j.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170117-42910-ewzmcp.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170117-43235-1fa52ga.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170117-43323-p159hh.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170117-45345-1r8v081.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170117-46182-1dx0tpn.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170117-46278-fd4m8e.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170117-46382-9y135a.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170117-48570-1k4k7t0.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170117-56058-b7otnp.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170117-56173-187smu1.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170117-56280-ax6el0.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170117-56372-pyd0uc.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170117-56475-16dw7ov.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170117-56578-odd4y0.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170117-56672-l11ojb.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170117-56794-88h4nd.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170118-10138-13br6m2.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170118-19400-ra06q5.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170118-19543-rfxxty.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170118-19652-1neho6l.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170118-19786-rxjv36.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170118-21648-ssn05e.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170118-23496-ddy2xt.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170118-30892-1c27rs4.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170118-30994-qfqs3h.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170118-32470-1mk1udp.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170118-32716-13g9myq.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170118-32807-12b8cgg.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170118-32901-1vp2axx.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170118-32992-1jwfjfd.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170118-33081-1j1d591.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170118-33180-36l1t8.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170118-33299-13p8l1x.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170118-38626-sigf3m.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170118-38797-1kqkwkw.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170118-39057-1x8b2fn.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170118-39157-1087rtq.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170118-39268-168s29f.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170118-39355-s8x1si.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170118-39483-r08bs.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170118-40181-vdjtbv.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170118-42041-w1imo1.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170118-42229-1e22hz4.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170118-42996-9neptt.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170118-43889-584l0q.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170118-44738-ew2i2a.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170118-7981-1uei1o4.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170118-8075-15sar1.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170118-8167-zc1h0z.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170118-8265-bnndjd.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170118-8364-4u0il1.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170119-22243-b3wyrt.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170119-22711-1uvny32.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170119-56031-votbjp.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170119-56135-j5mcgr.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170119-56240-l2w835.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170119-57815-i1ahvu.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170119-58056-66wtac.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170119-58268-1dty7ny.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170119-63803-1mc7fo4.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170119-74528-duefru.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170119-82684-glhzzy.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170119-82810-wamt7d.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170119-82946-1vdlbhd.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170119-83065-1u153xf.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170119-83165-1c32fyg.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170119-84188-1wch9sz.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170119-86886-1erfhrx.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170119-87029-1vof5gs.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170120-12481-joulms.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170120-12708-h8hiiu.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170120-12804-h1kvkh.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170120-12985-tjysyw.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170120-13084-3zodzd.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170120-13449-1bpmult.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170120-13540-2g5zwb.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170120-15095-wb4mk0.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170120-15202-8ib7ha.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170120-16523-1s896hk.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170120-16637-eboq9e.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170120-87818-1j4mz4q.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170125-65471-17j2vti.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170125-65694-1kptcuq.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170125-66245-crezgc.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170125-66415-1krzmy1.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170125-66524-ndzegu.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170125-66655-pjqteu.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170125-66854-r2dyv2.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170125-67000-1t9vfos.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170125-67391-15d0sso.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170125-67538-1gbudl.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170125-67640-p8dmlm.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170125-68349-ziyxe9.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170125-68617-14k1fap.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170125-68815-v1izav.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170125-68984-wcittg.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170125-69642-1hi7zb2.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170125-69802-mq57e0.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170125-73509-mbxhb6.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170125-80682-oask81.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170125-80872-1vkh6vb.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170125-81056-63swkp.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170125-81212-1k8weuv.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170125-81379-6lpon9.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170125-82575-1eioq1a.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170125-84919-1qnjxhv.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170125-85131-1g8jrl5.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170125-85343-yezbz5.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170125-85513-1l2pzgy.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170125-86070-pwkn99.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170125-86277-14ckax5.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170125-86458-1u26pb1.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170125-86599-q2d5io.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170125-86739-hfrzzf.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170125-87110-1ky9gnk.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170126-27355-hl9693.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170126-27618-1pqa3bs.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170126-27755-1di5xra.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170126-27974-cx2o7z.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170126-28133-1q0tz4z.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170126-28419-1ia3064.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170126-28556-veg3ez.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170126-28784-15yhmp3.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170126-29002-igofgq.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170126-29143-1v25x8a.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170126-29291-1qs4kex.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170126-29522-5i1a.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170126-29660-165adk7.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170126-29945-1lvmnay.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170126-30103-9qqoc.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170126-30381-1de3q2.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170126-30864-1mthr0r.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/001/original/failures20170126-30993-wxw7ja.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/002/original/failures20170119-55532-1ujy7xh.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/003/original/failures20170119-87695-1j8psm5.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/003/original/failures20170125-84785-u7rdmo.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/006/original/failures20170118-40447-4jsf3l.csv +2 -0
- data/spec/dummy/public/system/importers/attachment_errors/000/000/007/original/failures20170118-44958-l51x0w.csv +2 -0
- data/spec/dummy/public/system/importers/attachments/000/000/001/original/companies.csv +3 -0
- data/spec/dummy/public/system/importers/attachments/000/000/001/original/companies_invalid.csv +3 -0
- data/spec/dummy/public/system/importers/attachments/000/000/002/original/companies.csv +3 -0
- data/spec/dummy/public/system/importers/attachments/000/000/002/original/companies_invalid.csv +3 -0
- data/spec/dummy/public/system/importers/attachments/000/000/003/original/companies.csv +3 -0
- data/spec/dummy/public/system/importers/attachments/000/000/003/original/companies_invalid.csv +3 -0
- data/spec/dummy/public/system/importers/attachments/000/000/004/original/companies.csv +3 -0
- data/spec/dummy/public/system/importers/attachments/000/000/005/original/companies.csv +3 -0
- data/spec/dummy/public/system/importers/attachments/000/000/006/original/companies_invalid.csv +3 -0
- data/spec/dummy/public/system/importers/attachments/000/000/007/original/companies_invalid.csv +3 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/-A/-AzUQ_sdncLrgXJW-mT29l7lXefApIPQNpdCv9ETYkI.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/0f/0fmItA1G7uruwRE5HZE9TzG9K4A0NbbxGakdWz0cpDE.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/2M/2MSWm1oJk8doLU2cxusKHCU78PUDwQ1lrIlu5gXMx_U.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/2k/2kXdUd2P4uN67x_E2mUy-AtGn9Fn_h5rQ0PJZi9HzBU.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/4b/4bvq3aQAVWrr_CUPXfVFCwfZMnmX-ecl9ZtwAisBlFI.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/6-/6-dQ3OmAEd4QXytW4TS1xdUNozHlLKSCawN0oN1oEYw.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/63/63b-SgBWtX-UDgRq-Bsol3W40ijIWiT7uxcHRoVXS-M.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/7l/7lUIJIvW1FW_GFVqqnVsKSxpeMaZ3noc0g8Eca5eHhQ.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/9S/9S1VAatjEVICqM1Cojv-CKBUvl0oELWaNfTyFr_S700.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/A9/A9Vpp3VfKYpkCR6f1lAoM4J-w6QQ3fyn3x3TncKXf7U.cache +3 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Av/AvR3LtLvNoPexMzvvUDPuM1V-yuaMddpBdG1RVgQh9Y.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Df/Dfad3HZGzx9mtzeig2tWlnuHQl9vAzoUutfVJwWKC5I.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Dh/DhZ6bJZj4K7QCbNBTmMjFy3HDpC58SqfiPPoCCsAro4.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Hw/HwRNsYmzR0cy4L_V_8SLZiZ9_G6_8E7XiaDV21i9sjA.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/I9/I97QBZ0SyWLebPjfYrwCNlM-Omla1LKRTGiTgmMKi2Q.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/J7/J7Ihmq6t6WbnmJaBScToEb-AR0U1NqHePsGdxAdJoLo.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/KF/KFqlYW7ohx2fJX05v2au1k6Gw7wuzN7UWz2BN90RsAQ.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/LL/LLb4gLbgLgFS-LgcrmKXC--d1IaGB8XM_Yrm48bkwdw.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/LX/LXS-BomSubWXJSpkNXCH8m0l2y4sB66BaFb2UuAx14o.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Lq/LqbLgHiwEzXq7mJX3Dtq5XicBULM8CtvDJdv4Ye45ZY.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Nh/Nhtorvc2xM84CWBcqtMIxoqKR4NCkCksOUQ_3UiyegA.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Oy/OyEUtus13InbtOxcvt5WdsbydEkrviBwJXD6z9GQaRA.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/P6/P6-U-RxLXuRTDz8kHA2kBc3jUHSnNlbEHBOnUa97wyY.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Po/Pos0iHsH-rUXDrrdalDi2H6yWVQTcz2ZPyRmQ_RnBPM.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Q1/Q1xmk8Ni14zSYsTX_IvrbX1vbGANki_Udrwx7OBgh9w.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Qo/QogFhnK16HrvDyiH323Z3xlwwofVibvzgZDmBjqh5VQ.cache +3 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/RI/RIagqSB7X-LbJU0ZwntNWf_KMkOm3kCkc7zR57rP1Bc.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/T4/T4WcrrL47jCKFOb5Q1cmn1keh_w3X2OguI_ifzRpS3k.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/TA/TAbsAe1o7EI19gckGhtzbtjqOoSVRRLQrc5n3mnCT28.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/TG/TGe7XAuizvtm9LtzDo5fR7GrEnyWPL8nBr2eESxA0x0.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/V8/V8kjWO7PZcVGI9mBNq17FYWc_muWwcDQF9xWGfnSOjM.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/VV/VVtm8HzHyOByhegKNGl09Ak3sHcSr0e70iHSmy75T6A.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Vb/VbBBjIpX-u1j_Fko8QfFQ61-bfDS8BaYgGATVKIfp3I.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/WR/WRP18y_66NlZHU4W5qM0P1MN8oS5eAlN9UEZrXh3vd0.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Wd/WdUHknjRY-ueTBCEgU4-NzM_BFaTimaeFED6MbFfQLE.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/bo/bopbSF0DLQEMLjRvN8Mn4xd-mGx46j9yvENVDA8R9jk.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/e4/e4DrxyTxBlZlpP4PQ0zELpYhl4G2eiBksI0_HwQhrVY.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/gZ/gZp3uXMHuYQC4hzCr7bQfetKNdJAtbQmg3so2KpW1Dw.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/hZ/hZi1k6tpxxCGYxRe7zY74ItcOI8gZrREOpGuA8JSpGg.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/iK/IKrFvYc5CMyfkKHP7JFW_bS4-tOG1rVwPFcC-OUpENU.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/iK/IkTLxpKuWrwxrM98yl3Ddv4RjOLzyUS5QHQvZ0Cniv8.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/iK/iKpMoxBcOmuavL2xUzgc7LQLnT7EKCaZirHx4KMbdw8.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/je/jeA_WQ150_Af65U1CnVdHsqqZefOHl2ObGMLRQp--sc.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/l1/l1LHMvhocUYdhOc0tOfdy4slQYK2SD4fj6x4mH4wkvI.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/lo/loI7P5Fiwnq6YZdxqJFAErc6rV61HWRuL5tVaffS3JY.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/m9/m95ShgmvfDO8RuwZpC7gUW0i-FO-k914CWkXd5-LO3I.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/my/myHmSL0lcXz8Mgm5gNVoigImnF7acMaTlwl3z_g2lPM.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/oo/oocXRRNDTZPTtm859sgr9TxpBrPby6ND88ROtiCfgSU.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/p-/p-3_4sMWwoC1eQcdH2fmcIdmlxQBFx6evUCdgfgPyKM.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/pE/pEhaat2KBd5SrT7szC_8R1_6hK17FTpvoRFkmCRSD3M.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/rn/rnSEYPKQcSZ-D3R7o3aM_1AtiXyLciuL3S3Qa6k_EfI.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/sV/sVzlvz069Fh5_GPu0TcrgDBWIHhnwEZ2Rg1AtpEqA9s.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/uV/uVH7RdIENZh9BUaGeb6OUciC9H0hTIKsRpAxXMG5R28.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/xQ/xQEI_TWc5k3ouSH2fSRrrWRpsLyeG7QQxmcgPjkwbc8.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/xQ/xQUUINnLqsr-zxPaIIULgXPE5jh2QtmbdRSYCnhpER4.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/xb/xblMCu_z727eCkuWjKJEyre92sVUkcGCpQqGThWe2bk.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/yg/ygMyHfDIhhvlowOd5aTDhtXbZCLisqxhDWpdvXd8O5M.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/yg/ygrgsR6-nQLxLaFwAquCXfjIZgUTEoYbI5EFH0KlfW0.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/yh/yh3Aqjs6HjjQubE9-htvIwUg4cFhMRCl7JyBFYBt0xo.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/z0/z0QrtOYRAsWOTFYmpCJqXXyGlHxHUxxKBV3_LMxKV2Y.cache +0 -0
- data/spec/examples.txt +50 -0
- data/spec/factories/importer.rb +10 -0
- data/spec/factories/user.rb +6 -0
- data/spec/fixtures/companies.csv +3 -0
- data/spec/fixtures/companies_invalid.csv +3 -0
- data/spec/lib/csv_import_magic/models_spec.rb +51 -0
- data/spec/lib/generators/active_record/csv_import_magic_generator_spec.rb +74 -0
- data/spec/lib/generators/active_record/namespaced/csv_import_magic_generator_spec.rb +78 -0
- data/spec/lib/generators/csv_import_magic/controllers_generator_spec.rb +34 -0
- data/spec/lib/generators/csv_import_magic/install_generator_spec.rb +79 -0
- data/spec/lib/generators/csv_import_magic/rails_5/install_generator_spec.rb +62 -0
- data/spec/lib/generators/csv_import_magic/views_generator_spec.rb +204 -0
- data/spec/models/importer_spec.rb +82 -0
- data/spec/rails_helper.rb +61 -0
- data/spec/services/csv_import_magic/failure_spec.rb +23 -0
- data/spec/services/csv_import_magic/importer_spec.rb +57 -0
- data/spec/spec_helper.rb +70 -0
- data/spec/support/database_cleaner.rb +12 -0
- data/spec/support/factory_girl.rb +12 -0
- data/spec/support/paperclip.rb +3 -0
- data/spec/support/shoulda_matchers.rb +6 -0
- data/spec/support/simplecov.rb +12 -0
- data/spec/workers/csv_import_magic/importer_worker_spec.rb +31 -0
- metadata +758 -0
@@ -0,0 +1,25 @@
|
|
1
|
+
# SQLite version 3.x
|
2
|
+
# gem install sqlite3
|
3
|
+
#
|
4
|
+
# Ensure the SQLite 3 gem is defined in your Gemfile
|
5
|
+
# gem 'sqlite3'
|
6
|
+
#
|
7
|
+
default: &default
|
8
|
+
adapter: sqlite3
|
9
|
+
pool: 5
|
10
|
+
timeout: 5000
|
11
|
+
|
12
|
+
development:
|
13
|
+
<<: *default
|
14
|
+
database: db/development.sqlite3
|
15
|
+
|
16
|
+
# Warning: The database defined as "test" will be erased and
|
17
|
+
# re-generated from your development database when you run "rake".
|
18
|
+
# Do not set this db to the same as development or production.
|
19
|
+
test:
|
20
|
+
<<: *default
|
21
|
+
database: db/test.sqlite3
|
22
|
+
|
23
|
+
production:
|
24
|
+
<<: *default
|
25
|
+
database: db/production.sqlite3
|
@@ -0,0 +1,41 @@
|
|
1
|
+
Rails.application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
+
|
4
|
+
# In the development environment your application's code is reloaded on
|
5
|
+
# every request. This slows down response time but is perfect for development
|
6
|
+
# since you don't have to restart the web server when you make code changes.
|
7
|
+
config.cache_classes = false
|
8
|
+
|
9
|
+
# Do not eager load code on boot.
|
10
|
+
config.eager_load = false
|
11
|
+
|
12
|
+
# Show full error reports and disable caching.
|
13
|
+
config.consider_all_requests_local = true
|
14
|
+
config.action_controller.perform_caching = false
|
15
|
+
|
16
|
+
# Don't care if the mailer can't send.
|
17
|
+
config.action_mailer.raise_delivery_errors = false
|
18
|
+
|
19
|
+
# Print deprecation notices to the Rails logger.
|
20
|
+
config.active_support.deprecation = :log
|
21
|
+
|
22
|
+
# Raise an error on page load if there are pending migrations.
|
23
|
+
config.active_record.migration_error = :page_load
|
24
|
+
|
25
|
+
# Debug mode disables concatenation and preprocessing of assets.
|
26
|
+
# This option may cause significant delays in view rendering with a large
|
27
|
+
# number of complex assets.
|
28
|
+
config.assets.debug = true
|
29
|
+
|
30
|
+
# Asset digests allow you to set far-future HTTP expiration dates on all assets,
|
31
|
+
# yet still be able to expire them through the digest params.
|
32
|
+
config.assets.digest = true
|
33
|
+
|
34
|
+
# Adds additional error checking when serving assets at runtime.
|
35
|
+
# Checks for improperly declared sprockets dependencies.
|
36
|
+
# Raises helpful error messages.
|
37
|
+
config.assets.raise_runtime_errors = true
|
38
|
+
|
39
|
+
# Raises error for missing translations
|
40
|
+
# config.action_view.raise_on_missing_translations = true
|
41
|
+
end
|
@@ -0,0 +1,79 @@
|
|
1
|
+
Rails.application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
+
|
4
|
+
# Code is not reloaded between requests.
|
5
|
+
config.cache_classes = true
|
6
|
+
|
7
|
+
# Eager load code on boot. This eager loads most of Rails and
|
8
|
+
# your application in memory, allowing both threaded web servers
|
9
|
+
# and those relying on copy on write to perform better.
|
10
|
+
# Rake tasks automatically ignore this option for performance.
|
11
|
+
config.eager_load = true
|
12
|
+
|
13
|
+
# Full error reports are disabled and caching is turned on.
|
14
|
+
config.consider_all_requests_local = false
|
15
|
+
config.action_controller.perform_caching = true
|
16
|
+
|
17
|
+
# Enable Rack::Cache to put a simple HTTP cache in front of your application
|
18
|
+
# Add `rack-cache` to your Gemfile before enabling this.
|
19
|
+
# For large-scale production use, consider using a caching reverse proxy like
|
20
|
+
# NGINX, varnish or squid.
|
21
|
+
# config.action_dispatch.rack_cache = true
|
22
|
+
|
23
|
+
# Disable serving static files from the `/public` folder by default since
|
24
|
+
# Apache or NGINX already handles this.
|
25
|
+
config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?
|
26
|
+
|
27
|
+
# Compress JavaScripts and CSS.
|
28
|
+
config.assets.js_compressor = :uglifier
|
29
|
+
# config.assets.css_compressor = :sass
|
30
|
+
|
31
|
+
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
32
|
+
config.assets.compile = false
|
33
|
+
|
34
|
+
# Asset digests allow you to set far-future HTTP expiration dates on all assets,
|
35
|
+
# yet still be able to expire them through the digest params.
|
36
|
+
config.assets.digest = true
|
37
|
+
|
38
|
+
# `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
|
39
|
+
|
40
|
+
# Specifies the header that your server uses for sending files.
|
41
|
+
# config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
|
42
|
+
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
|
43
|
+
|
44
|
+
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
45
|
+
# config.force_ssl = true
|
46
|
+
|
47
|
+
# Use the lowest log level to ensure availability of diagnostic information
|
48
|
+
# when problems arise.
|
49
|
+
config.log_level = :debug
|
50
|
+
|
51
|
+
# Prepend all log lines with the following tags.
|
52
|
+
# config.log_tags = [ :subdomain, :uuid ]
|
53
|
+
|
54
|
+
# Use a different logger for distributed setups.
|
55
|
+
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
|
56
|
+
|
57
|
+
# Use a different cache store in production.
|
58
|
+
# config.cache_store = :mem_cache_store
|
59
|
+
|
60
|
+
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
61
|
+
# config.action_controller.asset_host = 'http://assets.example.com'
|
62
|
+
|
63
|
+
# Ignore bad email addresses and do not raise email delivery errors.
|
64
|
+
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
65
|
+
# config.action_mailer.raise_delivery_errors = false
|
66
|
+
|
67
|
+
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
68
|
+
# the I18n.default_locale when a translation cannot be found).
|
69
|
+
config.i18n.fallbacks = true
|
70
|
+
|
71
|
+
# Send deprecation notices to registered listeners.
|
72
|
+
config.active_support.deprecation = :notify
|
73
|
+
|
74
|
+
# Use default logging formatter so that PID and timestamp are not suppressed.
|
75
|
+
config.log_formatter = ::Logger::Formatter.new
|
76
|
+
|
77
|
+
# Do not dump schema after migrations.
|
78
|
+
config.active_record.dump_schema_after_migration = false
|
79
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
Rails.application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
+
|
4
|
+
# The test environment is used exclusively to run your application's
|
5
|
+
# test suite. You never need to work with it otherwise. Remember that
|
6
|
+
# your test database is "scratch space" for the test suite and is wiped
|
7
|
+
# and recreated between test runs. Don't rely on the data there!
|
8
|
+
config.cache_classes = true
|
9
|
+
|
10
|
+
# Do not eager load code on boot. This avoids loading your whole application
|
11
|
+
# just for the purpose of running a single test. If you are using a tool that
|
12
|
+
# preloads Rails for running tests, you may have to set it to true.
|
13
|
+
config.eager_load = false
|
14
|
+
|
15
|
+
# Configure static file server for tests with Cache-Control for performance.
|
16
|
+
config.serve_static_files = true
|
17
|
+
config.static_cache_control = 'public, max-age=3600'
|
18
|
+
|
19
|
+
# Show full error reports and disable caching.
|
20
|
+
config.consider_all_requests_local = true
|
21
|
+
config.action_controller.perform_caching = false
|
22
|
+
|
23
|
+
# Raise exceptions instead of rendering exception templates.
|
24
|
+
config.action_dispatch.show_exceptions = false
|
25
|
+
|
26
|
+
# Disable request forgery protection in test environment.
|
27
|
+
config.action_controller.allow_forgery_protection = false
|
28
|
+
|
29
|
+
# Tell Action Mailer not to deliver emails to the real world.
|
30
|
+
# The :test delivery method accumulates sent emails in the
|
31
|
+
# ActionMailer::Base.deliveries array.
|
32
|
+
config.action_mailer.delivery_method = :test
|
33
|
+
|
34
|
+
# Randomize the order test cases are executed.
|
35
|
+
config.active_support.test_order = :random
|
36
|
+
|
37
|
+
# Print deprecation notices to the stderr.
|
38
|
+
config.active_support.deprecation = :stderr
|
39
|
+
|
40
|
+
# Raises error for missing translations
|
41
|
+
# config.action_view.raise_on_missing_translations = true
|
42
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Version of your assets, change this if you want to expire all your assets.
|
4
|
+
Rails.application.config.assets.version = '1.0'
|
5
|
+
|
6
|
+
# Add additional assets to the asset load path
|
7
|
+
# Rails.application.config.assets.paths << Emoji.images_path
|
8
|
+
|
9
|
+
# Precompile additional assets.
|
10
|
+
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
|
11
|
+
# Rails.application.config.assets.precompile += %w( search.js )
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
4
|
+
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
5
|
+
|
6
|
+
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
7
|
+
# Rails.backtrace_cleaner.remove_silencers!
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Add new inflection rules using the following format. Inflections
|
4
|
+
# are locale specific, and you may define rules for as many different
|
5
|
+
# locales as you wish. All of these examples are active by default:
|
6
|
+
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
7
|
+
# inflect.plural /^(ox)$/i, '\1en'
|
8
|
+
# inflect.singular /^(ox)en/i, '\1'
|
9
|
+
# inflect.irregular 'person', 'people'
|
10
|
+
# inflect.uncountable %w( fish sheep )
|
11
|
+
# end
|
12
|
+
|
13
|
+
# These inflection rules are supported but not enabled by default:
|
14
|
+
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
15
|
+
# inflect.acronym 'RESTful'
|
16
|
+
# end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# This file contains settings for ActionController::ParamsWrapper which
|
4
|
+
# is enabled by default.
|
5
|
+
|
6
|
+
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
7
|
+
ActiveSupport.on_load(:action_controller) do
|
8
|
+
wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
|
9
|
+
end
|
10
|
+
|
11
|
+
# To enable root element in JSON for ActiveRecord objects.
|
12
|
+
# ActiveSupport.on_load(:active_record) do
|
13
|
+
# self.include_root_in_json = true
|
14
|
+
# end
|
@@ -0,0 +1,71 @@
|
|
1
|
+
pt-BR:
|
2
|
+
models_and_attributes: &models_and_attributes
|
3
|
+
models:
|
4
|
+
importer:
|
5
|
+
one: Importador
|
6
|
+
other: Importadores
|
7
|
+
attributes:
|
8
|
+
importer:
|
9
|
+
attachment: Anexo CSV
|
10
|
+
attachment_error: Anexo de erro CSV
|
11
|
+
source: Fonte
|
12
|
+
columns: Colunas
|
13
|
+
status: Status
|
14
|
+
message: Messagem
|
15
|
+
|
16
|
+
activerecord:
|
17
|
+
<<: *models_and_attributes
|
18
|
+
activemodel:
|
19
|
+
<<: *models_and_attributes
|
20
|
+
|
21
|
+
csv_import_magic:
|
22
|
+
importers_controller:
|
23
|
+
create:
|
24
|
+
alert: Por favor, informe em quais colunas podemos encontrar as informações que você deseja.
|
25
|
+
update:
|
26
|
+
notice: Arquivo enviado para processamento.
|
27
|
+
alert: Não foi possível processar seu arquivo, revise ele e tente novamente.
|
28
|
+
services:
|
29
|
+
error_label: Erros
|
30
|
+
success: Seus registros foram importados com sucesso!
|
31
|
+
failure:
|
32
|
+
columns_error:
|
33
|
+
one: 'Esta faltando as seguintes colunas: %{columns}'
|
34
|
+
other: 'Esta faltando a coluna %{columns}'
|
35
|
+
records_error: Alguns registros não foram importados pois contém erros!
|
36
|
+
views:
|
37
|
+
importers:
|
38
|
+
new:
|
39
|
+
title: Importador de %{model_translated}
|
40
|
+
description: Transfira seus registros de %{model_translated} de forma fácil
|
41
|
+
hint: 'Envie seu <b>CSV</b> com título e descrição.'
|
42
|
+
buttons:
|
43
|
+
import: Importar
|
44
|
+
show:
|
45
|
+
title: Importador de %{model_translated}
|
46
|
+
waiting: Processando seu arquivo...
|
47
|
+
buttons:
|
48
|
+
success: Continuar
|
49
|
+
back: Voltar
|
50
|
+
error_file: Ver arquivo de erro
|
51
|
+
edit:
|
52
|
+
title: Ajuste da importação
|
53
|
+
description: Indique quais das colunas devemos utilizar
|
54
|
+
ignore_column_label: Ignorar esta coluna
|
55
|
+
empty_values: Vazio
|
56
|
+
column: Coluna
|
57
|
+
hint: Escolha qual tipo de informação esta coluna tem.
|
58
|
+
example_of_values: Exemplo de valores
|
59
|
+
buttons:
|
60
|
+
import:
|
61
|
+
one: 'Importar %{count} registro'
|
62
|
+
other: 'Importar %{count} registros'
|
63
|
+
cancel: Cancelar
|
64
|
+
errors:
|
65
|
+
messages:
|
66
|
+
uniq:
|
67
|
+
one: '%{columns} deve ser única'
|
68
|
+
other: '%{columns} devem ser únicas'
|
69
|
+
missing:
|
70
|
+
one: '%{columns} não foi selecionada'
|
71
|
+
other: '%{columns} não foram selecionadas'
|
@@ -0,0 +1,271 @@
|
|
1
|
+
# Files in the config/locales directory are used for internationalization
|
2
|
+
# and are automatically loaded by Rails. If you want to use locales other
|
3
|
+
# than English, add the necessary files in this directory.
|
4
|
+
#
|
5
|
+
# To use the locales, use `I18n.t`:
|
6
|
+
#
|
7
|
+
# I18n.t 'hello'
|
8
|
+
#
|
9
|
+
# In views, this is aliased to just `t`:
|
10
|
+
#
|
11
|
+
# <%= t('hello') %>
|
12
|
+
#
|
13
|
+
# To use a different locale, set it with `I18n.locale`:
|
14
|
+
#
|
15
|
+
# I18n.locale = :es
|
16
|
+
#
|
17
|
+
# This would use the information in config/locales/es.yml.
|
18
|
+
#
|
19
|
+
# To learn more, please read the Rails Internationalization guide
|
20
|
+
# available at http://guides.rubyonrails.org/i18n.html.
|
21
|
+
|
22
|
+
pt-BR:
|
23
|
+
date:
|
24
|
+
abbr_day_names:
|
25
|
+
- Dom
|
26
|
+
- Seg
|
27
|
+
- Ter
|
28
|
+
- Qua
|
29
|
+
- Qui
|
30
|
+
- Sex
|
31
|
+
- Sáb
|
32
|
+
abbr_month_names:
|
33
|
+
-
|
34
|
+
- Jan
|
35
|
+
- Fev
|
36
|
+
- Mar
|
37
|
+
- Abr
|
38
|
+
- Mai
|
39
|
+
- Jun
|
40
|
+
- Jul
|
41
|
+
- Ago
|
42
|
+
- Set
|
43
|
+
- Out
|
44
|
+
- Nov
|
45
|
+
- Dez
|
46
|
+
day_names:
|
47
|
+
- Domingo
|
48
|
+
- Segunda
|
49
|
+
- Terça
|
50
|
+
- Quarta
|
51
|
+
- Quinta
|
52
|
+
- Sexta
|
53
|
+
- Sábado
|
54
|
+
formats:
|
55
|
+
default: ! '%d/%m/%Y'
|
56
|
+
long: ! '%d %B %Y'
|
57
|
+
short: ! '%d de %B'
|
58
|
+
vr: ! '%d/%m/%Y'
|
59
|
+
month_names:
|
60
|
+
-
|
61
|
+
- Janeiro
|
62
|
+
- Fevereiro
|
63
|
+
- Março
|
64
|
+
- Abril
|
65
|
+
- Maio
|
66
|
+
- Junho
|
67
|
+
- Julho
|
68
|
+
- Agosto
|
69
|
+
- Setembro
|
70
|
+
- Outubro
|
71
|
+
- Novembro
|
72
|
+
- Dezembro
|
73
|
+
order:
|
74
|
+
- :day
|
75
|
+
- :month
|
76
|
+
- :year
|
77
|
+
datetime:
|
78
|
+
distance_in_words:
|
79
|
+
about_x_hours:
|
80
|
+
one: aproximadamente 1 hora
|
81
|
+
other: aproximadamente %{count} horas
|
82
|
+
about_x_months:
|
83
|
+
one: aproximadamente 1 mês
|
84
|
+
other: aproximadamente %{count} meses
|
85
|
+
about_x_years:
|
86
|
+
one: aproximadamente 1 ano
|
87
|
+
other: aproximadamente %{count} anos
|
88
|
+
almost_x_years:
|
89
|
+
one: quase 1 ano
|
90
|
+
other: quase %{count} anos
|
91
|
+
half_a_minute: meio minuto
|
92
|
+
less_than_x_minutes:
|
93
|
+
one: menos de um minuto
|
94
|
+
other: menos de %{count} minutos
|
95
|
+
less_than_x_seconds:
|
96
|
+
one: menos de 1 segundo
|
97
|
+
other: menos de %{count} segundos
|
98
|
+
over_x_years:
|
99
|
+
one: mais de 1 ano
|
100
|
+
other: mais de %{count} anos
|
101
|
+
x_days:
|
102
|
+
one: 1 dia
|
103
|
+
other: ! '%{count} dias'
|
104
|
+
x_minutes:
|
105
|
+
one: 1 minuto
|
106
|
+
other: ! '%{count} minutos'
|
107
|
+
x_months:
|
108
|
+
one: 1 mês
|
109
|
+
other: ! '%{count} meses'
|
110
|
+
x_seconds:
|
111
|
+
one: 1 segundo
|
112
|
+
other: ! '%{count} segundos'
|
113
|
+
prompts:
|
114
|
+
day: Dia
|
115
|
+
hour: Hora
|
116
|
+
minute: Minuto
|
117
|
+
month: Mês
|
118
|
+
second: Segundo
|
119
|
+
year: Ano
|
120
|
+
boolean:
|
121
|
+
"true": Sim
|
122
|
+
"false": Não
|
123
|
+
errors: &errors
|
124
|
+
format: ! '%{attribute} %{message}'
|
125
|
+
messages:
|
126
|
+
accepted: deve ser aceito
|
127
|
+
blank: não pode ficar em branco
|
128
|
+
present: deve ficar em branco
|
129
|
+
confirmation: não está de acordo com a confirmação
|
130
|
+
empty: não pode ficar vazio
|
131
|
+
equal_to: deve ser igual a %{count}
|
132
|
+
even: deve ser par
|
133
|
+
exclusion: não está disponível
|
134
|
+
greater_than: deve ser maior que %{count}
|
135
|
+
greater_than_or_equal_to: deve ser maior ou igual a %{count}
|
136
|
+
inclusion: não está incluído na lista
|
137
|
+
invalid: não é válido
|
138
|
+
less_than: deve ser menor que %{count}
|
139
|
+
less_than_or_equal_to: deve ser menor ou igual a %{count}
|
140
|
+
not_a_number: não é um número
|
141
|
+
not_an_integer: não é um número inteiro
|
142
|
+
odd: deve ser ímpar
|
143
|
+
record_invalid: ! 'A validação falhou: %{errors}'
|
144
|
+
restrict_dependent_destroy:
|
145
|
+
one: "Não é possível excluir o registro pois existe um %{record} dependente"
|
146
|
+
many: "Não é possível excluir o registro pois existem %{record} dependentes"
|
147
|
+
taken: já está em uso
|
148
|
+
too_long: ! 'é muito longo (máximo: %{count} caracteres)'
|
149
|
+
too_short: ! 'é muito curto (mínimo: %{count} caracteres)'
|
150
|
+
wrong_length: não possui o tamanho esperado (%{count} caracteres)
|
151
|
+
already_confirmed: já foi confirmado
|
152
|
+
confirmation_period_expired: É necessário ser confirmado detro do periodo %{period}, por favor requisite um novo usuário.
|
153
|
+
expired: expirou, por favor solicite uma nova
|
154
|
+
not_found: não encontrado
|
155
|
+
not_locked: não foi bloqueado
|
156
|
+
not_saved:
|
157
|
+
one: 'Não foi possível salvar %{resource}: 1 erro'
|
158
|
+
other: 'Não foi possível salvar %{resource}: %{count} erros.'
|
159
|
+
carrierwave_processing_error: falhou em ser processado
|
160
|
+
carrierwave_integrity_error: não é um tipo de arquivo permitido
|
161
|
+
carrierwave_download_error: não pôde ser baixado
|
162
|
+
extension_white_list_error: "Não é permitido o envio de arquivos %{extension}, tipos permitidos: %{allowed_types}"
|
163
|
+
extension_black_list_error: "Não é permitido o envio de arquivos %{extension}, tipos proibidos: %{prohibited_types}"
|
164
|
+
rmagick_processing_error: "Falha ao manipular com RMagick, talvez arquivo não seja uma imagem? Erro original: %{e}"
|
165
|
+
mime_types_processing_error: "Falha ao processar arquivo com MIME::Types, talvez content-type seja inválido? Erro original: %{e}"
|
166
|
+
mini_magick_processing_error: "Falha ao manipular com MiniMagick, talvez arquivo não seja uma imagem? Erro original: %{e}"
|
167
|
+
template:
|
168
|
+
body: ! 'Por favor, verifique o(s) seguinte(s) campo(s):'
|
169
|
+
header:
|
170
|
+
one: ! 'Não foi possível gravar %{model}: 1 erro'
|
171
|
+
other: ! 'Não foi possível gravar %{model}: %{count} erros.'
|
172
|
+
helpers:
|
173
|
+
select:
|
174
|
+
prompt: Por favor selecione
|
175
|
+
submit:
|
176
|
+
create: Criar %{model}
|
177
|
+
submit: Salvar %{model}
|
178
|
+
update: Atualizar %{model}
|
179
|
+
number:
|
180
|
+
currency:
|
181
|
+
format:
|
182
|
+
delimiter: .
|
183
|
+
format: ! '%u %n'
|
184
|
+
precision: 2
|
185
|
+
separator: ! ','
|
186
|
+
significant: false
|
187
|
+
strip_insignificant_zeros: false
|
188
|
+
unit: R$
|
189
|
+
format:
|
190
|
+
delimiter: .
|
191
|
+
precision: 3
|
192
|
+
separator: ! ','
|
193
|
+
significant: false
|
194
|
+
strip_insignificant_zeros: false
|
195
|
+
human:
|
196
|
+
decimal_units:
|
197
|
+
format: ! '%n %u'
|
198
|
+
units:
|
199
|
+
billion:
|
200
|
+
one: bilhão
|
201
|
+
other: bilhões
|
202
|
+
million:
|
203
|
+
one: milhão
|
204
|
+
other: milhões
|
205
|
+
quadrillion:
|
206
|
+
one: quatrilhão
|
207
|
+
other: quatrilhões
|
208
|
+
thousand: mil
|
209
|
+
trillion:
|
210
|
+
one: trilhão
|
211
|
+
other: trilhões
|
212
|
+
unit: ''
|
213
|
+
format:
|
214
|
+
delimiter: .
|
215
|
+
precision: 2
|
216
|
+
significant: true
|
217
|
+
strip_insignificant_zeros: true
|
218
|
+
storage_units:
|
219
|
+
format: ! '%n %u'
|
220
|
+
units:
|
221
|
+
byte:
|
222
|
+
one: Byte
|
223
|
+
other: Bytes
|
224
|
+
gb: GB
|
225
|
+
kb: KB
|
226
|
+
mb: MB
|
227
|
+
tb: TB
|
228
|
+
percentage:
|
229
|
+
format:
|
230
|
+
delimiter: .
|
231
|
+
precision:
|
232
|
+
format:
|
233
|
+
delimiter: .
|
234
|
+
support:
|
235
|
+
array:
|
236
|
+
last_word_connector: ! ' e '
|
237
|
+
two_words_connector: ! ' e '
|
238
|
+
words_connector: ! ', '
|
239
|
+
time:
|
240
|
+
am: ''
|
241
|
+
formats:
|
242
|
+
default: ! '%a, %d de %B de %Y, %H:%M:%S %z'
|
243
|
+
long: ! '%d de %B de %Y, %H:%M'
|
244
|
+
short: ! '%d de %B, %H:%M'
|
245
|
+
simple: ! '%d/%m/%Y'
|
246
|
+
pm: ''
|
247
|
+
|
248
|
+
models_and_attributes: &models_and_attributes
|
249
|
+
models:
|
250
|
+
company:
|
251
|
+
one: Empresa
|
252
|
+
other: Empresas
|
253
|
+
attributes:
|
254
|
+
company:
|
255
|
+
name: Nome
|
256
|
+
street: Rua
|
257
|
+
number: Numero
|
258
|
+
neighborhood: Bairro
|
259
|
+
city: Cidade
|
260
|
+
state: Estado
|
261
|
+
country: Pais
|
262
|
+
active: Ativo?
|
263
|
+
|
264
|
+
activerecord:
|
265
|
+
<<: *models_and_attributes
|
266
|
+
errors:
|
267
|
+
<<: *errors
|
268
|
+
activemodel:
|
269
|
+
<<: *models_and_attributes
|
270
|
+
errors:
|
271
|
+
<<: *errors
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Your secret key is used for verifying the integrity of signed cookies.
|
4
|
+
# If you change this key, all old signed cookies will become invalid!
|
5
|
+
|
6
|
+
# Make sure the secret is at least 30 characters and all random,
|
7
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
8
|
+
# You can use `rake secret` to generate a secure secret key.
|
9
|
+
|
10
|
+
# Make sure the secrets in this file are kept private
|
11
|
+
# if you're sharing your code publicly.
|
12
|
+
|
13
|
+
development:
|
14
|
+
secret_key_base: 7d2f6d53e1bc4ed5d80b558a66d58eba4090c77986c94119a1929220fbd228cc185fdab604782b80f2e22ed22f1db213d2a02302a54641f6f87d88fc2a32abff
|
15
|
+
|
16
|
+
test:
|
17
|
+
secret_key_base: 920dcdc98221a9ffefc032251d5c2078e2c53caa31044ab7853906e154ac8e116ad8032fda3301183887dbfbd6ce4d1dbbb999b7dc38851c1b566c52cd2fd78a
|
18
|
+
|
19
|
+
# Do not keep production secrets in the repository,
|
20
|
+
# instead read values from the environment.
|
21
|
+
production:
|
22
|
+
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
|
Binary file
|