This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// TS 2.4 min | |
type Diff<T extends string, U extends string> = ({[P in T]: P } & {[P in U]: never } & { [x: string]: never })[T]; | |
type Omit<T, K extends keyof T> = Pick<T, Diff<keyof T, K>>; | |
namespace ReactAutosuggest { | |
type Match = [number, number]; // start, finish | |
type Value = string; | |
interface InputProps<Suggestion = any> extends Omit<React.HTMLProps<HTMLInputElement>, "value" | "onChange" | "onBlur"> { | |
value: Value; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// modified from https://github.com/erikras/redux-form/pull/1318 | |
// You may want to add a few more things from RF's ever expending API, but the basics are sound, fantastic job from @CarsonF | |
declare module 'redux-form' { | |
import { | |
Component, | |
ComponentClass, | |
DragEventHandler, | |
FocusEventHandler, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from 'react' | |
import { Field, WrappedFieldProps } from 'redux-form' | |
export interface OwnProps { | |
name: string, | |
type?: string, | |
label?: string, | |
help?: string, | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(Benoit Benezech 2014-10-27 16:17:33 +0100 177) it "returns the availability and correct prices" do | |
(Benoit Benezech 2014-10-27 16:17:33 +0100 178) get :extension_availability, id: @rental.id, format: :json, end_date: (@rental.ends_at + 3.days).strftime("%d/%m/%Y"), end_time: "am", distance: '10' | |
(Valentin Rabanelly 2013-06-03 15:51:01 +0200 179) parsed_body = JSON.parse(response.body) | |
(Michael Bensoussan 2014-06-23 11:11:51 +0200 180) expect(parsed_body["availability"]["available"]).to be true | |
(Marc G Gauthier 2013-09-23 12:38:14 +0200 181) expected_message = t("cars.availability.messages.#{status.info}") | |
(Alexandru Keszeg 2013-07-31 18:40:46 +0300 182) expect(parsed_body["availability"]["message"]).to eq(expected_message) | |
(Benoit Benezech 2014-10-27 16:17:33 +0100 183) expect(parsed_body["charges"]["rental_price"]["total"]).to eq(61.1) | |
(Nicolas Mondollot 2013-06-09 16:34:56 +0200 184) end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fr: | |
admin: | |
home: | |
name: Home | |
pagination: | |
previous: "« Préc." | |
next: "Suiv. »" | |
truncate: "…" | |
misc: | |
search: "Rechercher" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
say "Create stub for '#{field_name = name.sub('rails_admin_', '')}' in gem '#{name}'. This may take a while" | |
run "rm -rf script/ config/ lib/tasks/" | |
run "rm -rf app/assets app/controllers app/helpers app/mailers app/models" | |
run "mkdir -p app/views/rails_admin/main" | |
inside "app/views/rails_admin/main" do | |
create_file "_form_#{field_name}.html.haml", <<-END | |
= form.send field.view_helper, field.method_name, field._html_attributes | |
END | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
say "Create stub for '#{action_name = name.sub('rails_admin_', '')}' in gem '#{name}'. This may take a while" | |
run "rm -rf script/ config/ lib/tasks/" | |
run "rm -rf app/assets app/controllers app/helpers app/mailers app/models" | |
run "mkdir -p app/views/rails_admin/main" | |
inside "app/views/rails_admin/main" do | |
create_file "#{action_name}.html.haml", <<-END | |
%h2 Custom action loaded and active | |
%pre @abstract_model.inspect | |
%pre @object.inspect | |
END |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
say "Create theme stub for '#{theme_name = name.sub('rails_admin_', '')}' in gem '#{name}'. This may take a while" | |
run "rm -rf app/ script/ config/ lib/tasks/" | |
run "mkdir -p vendor/assets/stylesheets/rails_admin/themes/#{theme_name}/" | |
inside "vendor/assets/stylesheets/rails_admin/themes/#{theme_name}/" do | |
get "https://github.com/sferik/rails_admin/raw/master/app/assets/stylesheets/rails_admin/themes/default/mixins.scss", "mixins.scss" | |
get "https://github.com/sferik/rails_admin/raw/master/app/assets/stylesheets/rails_admin/themes/default/variables.scss", "variables.scss" | |
get "https://github.com/sferik/rails_admin/raw/master/app/assets/stylesheets/rails_admin/themes/default/theming.scss", "theming.scss" | |
end | |
run "mkdir -p vendor/assets/images/rails_admin/themes/#{theme_name}/" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rubinius Crash Report #rbxcrashreport | |
Error: signal SIGSEGV | |
[[Backtrace]] | |
0 rbx 0x0000000100022341 _ZN8rubiniusL12segv_handlerEi + 241 | |
1 libSystem.B.dylib 0x00007fff827ad1ba _sigtramp + 26 | |
2 ??? 0x00007fff5fbeea60 0x0 + 140734799735392 | |
3 rbx 0x000000010003890a _ZN8rubinius8VMMethod11interpreterEPNS_2VMEPS0_PNS_20InterpreterCallFrameE + 12106 | |
4 rbx 0x0000000100116284 _ZN8rubinius8VMMethod19execute_specializedINS_11NoArgumentsEEEPNS_6ObjectEPNS_2VMEPNS_9CallFrameERNS_8DispatchERNS_9ArgumentsE + 452 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fr: | |
errors: | |
messages: | |
not_found: "n'a pas été trouvé(e)" | |
already_confirmed: "a déjà été validé(e)" | |
not_locked: "n'était pas verrouillé(e)" | |
not_saved: | |
one: "1 erreur a empêché ce(tte) %{resource} d'être sauvegardé(e) :" | |
other: "%{count} erreurs ont empêché ce(tte) %{resource} d'être sauvegardé(e) :" | |
devise: |