From abfa1924dceec1e3ff777f199c0bb47853fe2ef5 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Thu, 24 Mar 2016 11:44:54 +0100 Subject: [PATCH 1/8] Revert "fix readme TOC" This reverts commit 32449306cc1508dbf678efffe6128ea87380763c. --- README.md | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 215956518..47180fb60 100644 --- a/README.md +++ b/README.md @@ -6,23 +6,23 @@ FabManager is the FabLab management solution. It is web-based, open-source and t ##### Table of Contents 1. [Software stack](#software-stack) 2. [Contributing](#contributing) -3. [Setup a development environment](#setup-a-development-environment) -3.1. [General Guidelines](#general-guidelines) +3. [Setup a development environment](#setup-a-development-environment)
+3.1. [General Guidelines](#general-guidelines)
3.2. [Environment Configuration](#environment-configuration) -4. [PostgreSQL](#postgresql) -4.1. [Install PostgreSQL 9.4 on Ubuntu/Debian](#postgresql-on-debian) -4.2. [Install and launch PostgreSQL on MacOS X](#postgresql-on-macosx) +4. [PostgreSQL](#postgresql)
+4.1. [Install PostgreSQL 9.4 on Ubuntu/Debian](#postgresql-on-debian)
+4.2. [Install and launch PostgreSQL on MacOS X](#postgresql-on-macosx)
4.3. [Setup the FabManager database in PostgreSQL](#setup-fabmanager-in-postgresql) -5. [ElasticSearch](#elasticsearch) -5.1. [Install ElasticSearch on Ubuntu/Debian](#elasticsearch-on-debian) -5.2. [Install ElasticSearch on MacOS X](#elasticsearch-on-macosx) +5. [ElasticSearch](#elasticsearch)
+5.1. [Install ElasticSearch on Ubuntu/Debian](#elasticsearch-on-debian)
+5.2. [Install ElasticSearch on MacOS X](#elasticsearch-on-macosx)
5.3. [Setup ElasticSearch for the FabManager](#setup-fabmanager-in-elasticsearch) -6. [Internationalization (i18n)](#i18n) -6.1. [Translation](#i18n-translation) -6.1.1. [Front-end translations](#i18n-translation-front) -6.1.2. [Back-end translations](#i18n-translation-back) -6.2. [Configuration](#i18n-configuration) -6.2.1. [Settings](#i18n-settings) +6. [Internationalization (i18n)](#i18n)
+6.1. [Translation](#i18n-translation)
+6.1.1. [Front-end translations](#i18n-translation-front)
+6.1.2. [Back-end translations](#i18n-translation-back)
+6.2. [Configuration](#i18n-configuration)
+6.2.1. [Settings](#i18n-settings)
6.2.2. [Applying changes](#i18n-apply) 7. [Known issues](#known-issues) 8. [Related Documentation](#related-documentation) From 27af39ed5caba5cf4a3fe3c25290b9e7c886c461 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Thu, 24 Mar 2016 11:45:33 +0100 Subject: [PATCH 2/8] Gemfile.lock --- Gemfile.lock | 3 --- 1 file changed, 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 7972ef6e6..fbad9569e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -532,6 +532,3 @@ DEPENDENCIES uglifier (>= 1.3.0) unicorn web-console (~> 2.0) - -BUNDLED WITH - 1.10.6 From 64ab18bad749e49daef1c5a1f427b0139676f5f4 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Thu, 24 Mar 2016 12:06:07 +0100 Subject: [PATCH 3/8] fix typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 47180fb60..d1642b835 100644 --- a/README.md +++ b/README.md @@ -159,7 +159,7 @@ You can generate such a random key by running `rake secret`. STRIPE_API_KEY & STRIPE_PUBLISHABLE_KEY -Key an secret used to identify you Stripe account through the API. +Key and secret used to identify you Stripe account through the API. Retrieve them from https://dashboard.stripe.com/account/apikeys. STRIPE_CURRENCY From ac0712e5bb714b0ff1a04699f6f05a9551d3c80d Mon Sep 17 00:00:00 2001 From: Sylvain Date: Thu, 24 Mar 2016 14:29:31 +0100 Subject: [PATCH 4/8] i18n plan duration --- CONTRIBUTING.md | 2 +- app/assets/javascripts/filters/filters.coffee | 20 +------------------ 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index da8498683..775c27bae 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -17,7 +17,7 @@ The [issue tracker](https://github.com/LaCasemate/fab-manager/issues) is the pre [features requests](#features) and [submitting pull requests](#pull-requests), but please respect the following restrictions: -* Please **do not** use the issue tracker for personal support requests (use [the forum](http://www.fab-manager.com/forum)). +* Please **do not** use the issue tracker for personal support requests (use [the forum](https://forum.fab-manager.com)). * Please **do not** derail or troll issues. Keep the discussion on topic and respect the opinions of others. diff --git a/app/assets/javascripts/filters/filters.coffee b/app/assets/javascripts/filters/filters.coffee index 2f3090870..686d9e40b 100644 --- a/app/assets/javascripts/filters/filters.coffee +++ b/app/assets/javascripts/filters/filters.coffee @@ -112,25 +112,7 @@ Application.Filters.filter "toTrusted", [ "$sce", ($sce) -> Application.Filters.filter "planIntervalFilter", [ -> (interval, intervalCount) -> - if typeof intervalCount != 'number' - switch interval - when 'day' then return 'jour' - when 'week' then return 'semaine' - when 'month' then return 'mois' - when 'year' then return 'année' - else - if intervalCount == 1 - switch interval - when 'day' then return 'un jour' - when 'week' then return 'une semaine' - when 'month' then return 'un mois' - when 'year' then return 'un an' - else - switch interval - when 'day' then return intervalCount+ ' jours' - when 'week' then return intervalCount+ ' semaines' - when 'month' then return intervalCount+ ' mois' - when 'year' then return intervalCount+ ' ans' + moment.duration(intervalCount, interval).humanize() ] Application.Filters.filter "humanReadablePlanName", ['$filter', ($filter)-> From e81cc1597a0172ad184f9f31ec7ee2d53f2e0822 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Thu, 24 Mar 2016 15:39:24 +0100 Subject: [PATCH 5/8] various fix - handle stripe limitation: plan cannot exceed 1 year - [bug] unable to change password - [bug] incorrect value of plans durations in admin list - [css] plan price was exceeding width of the container --- README.md | 2 + .../controllers/admin/members.coffee.erb | 8 +++ .../javascripts/controllers/members.coffee | 4 ++ app/assets/stylesheets/app.base.scss | 8 +-- app/assets/stylesheets/app.components.scss | 6 +- app/assets/stylesheets/app.layout.scss | 2 +- app/assets/stylesheets/app.nav.scss | 8 +-- .../templates/admin/pricing/index.html.erb | 2 +- .../templates/profile/complete.html.erb | 2 +- .../templates/shared/_member_form.html.erb | 11 ++-- app/controllers/api/plans_controller.rb | 62 ++++++++++--------- 11 files changed, 67 insertions(+), 48 deletions(-) diff --git a/README.md b/README.md index d1642b835..3d778b6a6 100644 --- a/README.md +++ b/README.md @@ -525,6 +525,8 @@ After modifying any values concerning the localisation, restart the application This may happens when the `application.yml` file is missing. To solve this issue copy `config/application.yml.default` to `config/application.yml`. This is required before the first start. + +- Due to a stripe limitation, you won't be ble to create plans longer than one year. diff --git a/app/assets/javascripts/controllers/admin/members.coffee.erb b/app/assets/javascripts/controllers/admin/members.coffee.erb index 7e135ce54..6571e0d7f 100644 --- a/app/assets/javascripts/controllers/admin/members.coffee.erb +++ b/app/assets/javascripts/controllers/admin/members.coffee.erb @@ -207,6 +207,10 @@ Application.Controllers.controller "EditMemberController", ["$scope", "$state", ## The user to edit $scope.user = memberPromise + ## Should the passord be modified? + $scope.password = + change: false + ## the user subscription if $scope.user.subscribed_plan? and $scope.user.subscription? $scope.subscription = $scope.user.subscription @@ -371,6 +375,10 @@ Application.Controllers.controller "NewMemberController", ["$scope", "$state", " ## Form action on the above URL $scope.method = 'post' + ## Should the passord be set manually or generated? + $scope.password = + change: false + ## Default member's profile parameters $scope.user = plan_interval: '' diff --git a/app/assets/javascripts/controllers/members.coffee b/app/assets/javascripts/controllers/members.coffee index bef2e9bed..8417cc2fd 100644 --- a/app/assets/javascripts/controllers/members.coffee +++ b/app/assets/javascripts/controllers/members.coffee @@ -50,6 +50,10 @@ Application.Controllers.controller "EditProfileController", ["$scope", "$rootSco ## mapping of fields to disable $scope.preventField = {} + ## Should the passord be modified? + $scope.password = + change: false + ## Angular-Bootstrap datepicker configuration for birthday $scope.datePicker = format: $locale.DATETIME_FORMATS.shortDate diff --git a/app/assets/stylesheets/app.base.scss b/app/assets/stylesheets/app.base.scss index 4ff669009..168c90161 100644 --- a/app/assets/stylesheets/app.base.scss +++ b/app/assets/stylesheets/app.base.scss @@ -31,7 +31,7 @@ h5 { &:after { position: absolute; top: 18px; - left: 0px; + left: 0; content: ''; width: 35%; height: 1px; @@ -65,7 +65,7 @@ p { font-family: $font-proxima-condensed; font-size: rem-calc(16); line-height: rem-calc(24); - margin: 1.038em 0px 30px 0px; + margin: 1.038em 0 30px 0; font-weight: 600; } } @@ -79,7 +79,7 @@ dd { } -// +// // ------------------------- .col-0{clear:left;} @@ -151,7 +151,7 @@ dd { [ui-view].ng-leave { opacity: 1; - /*padding-left: 0px;*/ + /*padding-left: 0px;*/ // -webkit-transform:translate3d(0, 0, 0); // -moz-transform:translate3d(0, 0, 0); // transform:translate3d(0, 0, 0); diff --git a/app/assets/stylesheets/app.components.scss b/app/assets/stylesheets/app.components.scss index f4b3b2076..abcf2e9f2 100644 --- a/app/assets/stylesheets/app.components.scss +++ b/app/assets/stylesheets/app.components.scss @@ -220,13 +220,13 @@ .amount { padding-top: 16px; font-weight: bold; - font-size: rem-calc(26); + font-size: 1vw; color: white; } .period { position: relative; - top: -14px; - font-size: rem-calc(14); + top: -6px; + font-size: 0.75vw; color: white; } } diff --git a/app/assets/stylesheets/app.layout.scss b/app/assets/stylesheets/app.layout.scss index 3fe0d7907..8228e8902 100644 --- a/app/assets/stylesheets/app.layout.scss +++ b/app/assets/stylesheets/app.layout.scss @@ -9,7 +9,7 @@ } > .btn, > .btn-group, - > .btn-toolbar, + > .btn-toolbar { margin-top: 14px; } diff --git a/app/assets/stylesheets/app.nav.scss b/app/assets/stylesheets/app.nav.scss index 097b83f52..89a505b0e 100644 --- a/app/assets/stylesheets/app.nav.scss +++ b/app/assets/stylesheets/app.nav.scss @@ -169,7 +169,7 @@ &:hover, &:focus, &:active, - &.active, + &.active { > a{ i{ @@ -191,7 +191,7 @@ } li:hover, li:focus, - li:active, + li:active { > ul{ display: block !important; @@ -349,7 +349,7 @@ display: block !important; position: absolute; left: 0; - top: 0px; + top: 0; bottom: 0; width: $off-screen-nav-width; visibility: visible; @@ -384,7 +384,7 @@ overflow: hidden; position: absolute; width: 100%; - top: 0px; + top: 0; bottom: 0; left: 0; right: 0; diff --git a/app/assets/templates/admin/pricing/index.html.erb b/app/assets/templates/admin/pricing/index.html.erb index 4a5ce4acf..9f771348f 100644 --- a/app/assets/templates/admin/pricing/index.html.erb +++ b/app/assets/templates/admin/pricing/index.html.erb @@ -47,7 +47,7 @@ {{getPlanType(plan.type)}} {{plan.base_name}} - {{ plan.interval | planIntervalFilter }} + {{ plan.interval | planIntervalFilter:plan.interval_count }} {{getGroupFromId(groups, plan.group_id).name}} {{plan.ui_weight}} {{plan.amount | currency}} diff --git a/app/assets/templates/profile/complete.html.erb b/app/assets/templates/profile/complete.html.erb index 17ed28d1d..91d4c4bed 100644 --- a/app/assets/templates/profile/complete.html.erb +++ b/app/assets/templates/profile/complete.html.erb @@ -74,7 +74,7 @@ {{ 'i_authorize_Fablab_users_registered_on_the_site_to_contact_me' }} + value="true"/> {{ 'i_authorize_Fablab_users_registered_on_the_site_to_contact_me' | translate }} diff --git a/app/assets/templates/shared/_member_form.html.erb b/app/assets/templates/shared/_member_form.html.erb index ba7b55c16..1a4e3f6cc 100644 --- a/app/assets/templates/shared/_member_form.html.erb +++ b/app/assets/templates/shared/_member_form.html.erb @@ -5,7 +5,7 @@
-
+
" class="img-circle"> @@ -123,11 +123,12 @@
+ ng-click="password.change = !password.change; $event.stopPropagation(); $event.preventDefault()" + translate>{{ 'change_password' }}
- -
+ +
{{ 'password_is_too_short_(minimum_8_characters)' }}
-
+
e + render json: {error: e.message}, status: :unprocessable_entity end end From 0ea7e97bd7158d2871b77372b2b880c12d1c8a45 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Thu, 24 Mar 2016 16:23:10 +0100 Subject: [PATCH 6/8] [fix] fit plan price to bubble width --- app/assets/javascripts/app.js.erb | 2 +- app/assets/javascripts/application.js | 1 + app/assets/stylesheets/app.components.scss | 4 +- app/assets/templates/plans/index.html.erb | 2 +- bower.json | 3 +- .../assets/components/ngFitText/.bower.json | 37 ++++++ vendor/assets/components/ngFitText/.gitignore | 3 + vendor/assets/components/ngFitText/.npmignore | 8 ++ vendor/assets/components/ngFitText/LICENSE | 20 ++++ vendor/assets/components/ngFitText/README.md | 108 ++++++++++++++++++ vendor/assets/components/ngFitText/bower.json | 26 +++++ .../ngFitText/dist/ng-FitText.min.js | 1 + 12 files changed, 210 insertions(+), 5 deletions(-) create mode 100644 vendor/assets/components/ngFitText/.bower.json create mode 100644 vendor/assets/components/ngFitText/.gitignore create mode 100644 vendor/assets/components/ngFitText/.npmignore create mode 100644 vendor/assets/components/ngFitText/LICENSE create mode 100644 vendor/assets/components/ngFitText/README.md create mode 100644 vendor/assets/components/ngFitText/bower.json create mode 100644 vendor/assets/components/ngFitText/dist/ng-FitText.min.js diff --git a/app/assets/javascripts/app.js.erb b/app/assets/javascripts/app.js.erb index 6d87c37c8..8a9e14be1 100644 --- a/app/assets/javascripts/app.js.erb +++ b/app/assets/javascripts/app.js.erb @@ -20,7 +20,7 @@ angular.module('application', ['ngCookies', 'ngResource', 'ngSanitize', 'ngAnima 'ui.select', 'ui.calendar', 'angularMoment', 'Devise', 'DeviseModal', 'angular-growl', 'xeditable', 'checklist-model', 'unsavedChanges', 'angular-loading-bar', 'ngTouch', 'angular-google-analytics', 'angularUtils.directives.dirDisqus', 'summernote', 'elasticsearch', 'angular-medium-editor', 'naif.base64', - 'minicolors', 'pascalprecht.translate']). + 'minicolors', 'pascalprecht.translate', 'ngFitText']). config(['$httpProvider', 'AuthProvider', "growlProvider", "unsavedWarningsConfigProvider", "AnalyticsProvider", "uibDatepickerPopupConfig", "$provide", "$translateProvider", function($httpProvider, AuthProvider, growlProvider, unsavedWarningsConfigProvider, AnalyticsProvider, uibDatepickerPopupConfig, $provide, $translateProvider) { diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 55ab68983..cbeb714a9 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -67,6 +67,7 @@ //= require angular-translate-loader-partial/angular-translate-loader-partial //= require messageformat/messageformat //= require angular-translate-interpolation-messageformat/angular-translate-interpolation-messageformat +//= require ngFitText/dist/ng-FitText.min //= require_tree ./controllers //= require_tree ./services //= require_tree ./directives diff --git a/app/assets/stylesheets/app.components.scss b/app/assets/stylesheets/app.components.scss index abcf2e9f2..d504d954a 100644 --- a/app/assets/stylesheets/app.components.scss +++ b/app/assets/stylesheets/app.components.scss @@ -220,13 +220,13 @@ .amount { padding-top: 16px; font-weight: bold; - font-size: 1vw; + font-size: rem-calc(20); color: white; } .period { position: relative; top: -6px; - font-size: 0.75vw; + font-size: rem-calc(14); color: white; } } diff --git a/app/assets/templates/plans/index.html.erb b/app/assets/templates/plans/index.html.erb index aaa1d3c61..29c43907e 100644 --- a/app/assets/templates/plans/index.html.erb +++ b/app/assets/templates/plans/index.html.erb @@ -35,7 +35,7 @@
-
{{plan.amount | currency}}
+
{{plan.amount | currency}}
{{ plan.interval | planIntervalFilter: plan.interval_count }}
diff --git a/bower.json b/bower.json index 9aeb8c634..e60a3e1a9 100644 --- a/bower.json +++ b/bower.json @@ -52,7 +52,8 @@ "angular-translate-loader-partial": "~2.8.1", "angular-translate-interpolation-messageformat": "~2.8.1", "messageformat": "=0.1.8", - "moment-timezone": "~0.5.0" + "moment-timezone": "~0.5.0", + "ngFitText": "~4.1.1" }, "resolutions": { "jquery": ">=1.10.2", diff --git a/vendor/assets/components/ngFitText/.bower.json b/vendor/assets/components/ngFitText/.bower.json new file mode 100644 index 000000000..2bbed55dc --- /dev/null +++ b/vendor/assets/components/ngFitText/.bower.json @@ -0,0 +1,37 @@ +{ + "name": "ngFitText", + "version": "4.1.1", + "main": [ + "dist/ng-FitText.min.js" + ], + "keywords": [ + "angular", + "javascript", + "typography" + ], + "ignore": [ + "demo", + "lib", + "node_modules", + "src", + "test", + ".bowerrc", + "gulpfile.js", + "package.json", + "index.html" + ], + "dependencies": { + "angular": "1.x" + }, + "homepage": "https://github.com/patrickmarabeas/ng-FitText.js", + "_release": "4.1.1", + "_resolution": { + "type": "version", + "tag": "v4.1.1", + "commit": "0af12af4b129c9b9b9bac119e8dfbf105a8f4ade" + }, + "_source": "git://github.com/patrickmarabeas/ng-FitText.js.git", + "_target": "~4.1.1", + "_originalSource": "ngFitText", + "_direct": true +} \ No newline at end of file diff --git a/vendor/assets/components/ngFitText/.gitignore b/vendor/assets/components/ngFitText/.gitignore new file mode 100644 index 000000000..f51886490 --- /dev/null +++ b/vendor/assets/components/ngFitText/.gitignore @@ -0,0 +1,3 @@ +.idea +lib/ +node_modules/ \ No newline at end of file diff --git a/vendor/assets/components/ngFitText/.npmignore b/vendor/assets/components/ngFitText/.npmignore new file mode 100644 index 000000000..bcd0556f2 --- /dev/null +++ b/vendor/assets/components/ngFitText/.npmignore @@ -0,0 +1,8 @@ +demo +lib +node_modules +test +.bowerrc +bower.json +gulpfile.js +index.html \ No newline at end of file diff --git a/vendor/assets/components/ngFitText/LICENSE b/vendor/assets/components/ngFitText/LICENSE new file mode 100644 index 000000000..1a02d2499 --- /dev/null +++ b/vendor/assets/components/ngFitText/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2013 Patrick Marabeas + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/assets/components/ngFitText/README.md b/vendor/assets/components/ngFitText/README.md new file mode 100644 index 000000000..147bfaaf7 --- /dev/null +++ b/vendor/assets/components/ngFitText/README.md @@ -0,0 +1,108 @@ +# ng-FitText.js + +### ng-FitText.js makes font-sizes flexible. Use this AngularJS directive in your fluid or responsive layout to achieve scalable headlines that fill the width of a parent element. + +This is a rework of the original jQuery plugin which can be found here: https://github.com/davatron5000/FitText.js. + +### Install and Inclusion + +Grab it with Bower: `bower install ngFitText` + +Include it in your AngularJS application + +```javascript +var myApp = angular.module('myApp', ['ngFitText']); +``` + +### Implementation + +```html + +

FitText

+ + +

+ + +

FitText

+ + +

FitText

+ + +

FitText

+ + +

FitText

+ + +

FitText

+

FitText

+

FitText

+ + +
+
Short line
+
Font size of this element will be used
+
Short
+
+ + + + Single + line of text + spans 100% width + + + +

Custom font

+ + +

Custom font

+``` + +### FitText Config Provider + +Because MODULARIZATION, this module doesn't come with debounce functionality included. Instead you will need to specify the functionality in the `fitTextConfigProvider`: + +```javascript +module.config(['fitTextConfigProvider', function(fitTextConfigProvider) { + fitTextConfigProvider.config = { + debounce: _.debounce, // include a vender function like underscore or lodash + debounce: function(a,b,c) { // specify your own function + var d;return function(){var e=this,f=arguments;clearTimeout(d),d=setTimeout(function(){d=null,c||a.apply(e,f)},b),c&&!d&&a.apply(e,f)} + }, + delay: 1000, // debounce delay + loadDelay: 10, // global default delay before initial calculation + compressor: 1, // global default calculation multiplier + min: 0, // global default min + max: Number.POSITIVE_INFINITY // global default max + }; +}]); +``` + +### Changelog + +#### [v4.1.0](https://github.com/patrickmarabeas/ng-FitText.js/releases/tag/v4.1.0) ++ Replace `'initial'` value with more semantic `'inherit'` ++ Both `data-fittext-min` and `data-fittext-max` can use the inherited CSS value by using `'inherit'` + +#### [v4.0.0](https://github.com/patrickmarabeas/ng-FitText.js/releases/tag/v4.0.0) ++ `data-fittext-max` can now take `'initial'` as a value to use inherited CSS value. This allows for PX, EM or REM to be used. ++ Line heights are preserved ++ Display property is now preserved ++ New lines no longer need to be specified with an attribute ++ `ng-model` was mistakenly used for `ng-bind` - No longer need to use both `ng-model` and `{{}}` for dynamic values ++ Minified version now delivered via Bower ++ Config provider namespaced to avoid conflicts + +#### [v3.0.0](https://github.com/patrickmarabeas/ng-FitText.js/releases/tag/v3.0.0) ++ Element now defaults to 100% width ++ Compressor now fine tunes from this point ++ Debounce functionality now needs to be passed in via fitTextConfigProvider + +#### < v2.4.0 ++ Specifying a value for data-fittext allows you to fine tune the text size. Defaults to 1. Increasing this number (ie 1.5) will resize the text more aggressively. Decreasing this number (ie 0.5) will reduce the aggressiveness of resize. data-fittext-min and data-fittext-max allow you to set upper and lower limits. ++ The element needs to either be a block element or an inline-block element with a width specified (% or px). ++ Font sizes can be limited with `data-fittext-max` and `data-fittext-max` ++ Debouncing addded diff --git a/vendor/assets/components/ngFitText/bower.json b/vendor/assets/components/ngFitText/bower.json new file mode 100644 index 000000000..372b7e2f2 --- /dev/null +++ b/vendor/assets/components/ngFitText/bower.json @@ -0,0 +1,26 @@ +{ + "name": "ngFitText", + "version": "4.1.1", + "main": [ + "dist/ng-FitText.min.js" + ], + "keywords": [ + "angular", + "javascript", + "typography" + ], + "ignore": [ + "demo", + "lib", + "node_modules", + "src", + "test", + ".bowerrc", + "gulpfile.js", + "package.json", + "index.html" + ], + "dependencies": { + "angular": "1.x" + } +} diff --git a/vendor/assets/components/ngFitText/dist/ng-FitText.min.js b/vendor/assets/components/ngFitText/dist/ng-FitText.min.js new file mode 100644 index 000000000..384548f63 --- /dev/null +++ b/vendor/assets/components/ngFitText/dist/ng-FitText.min.js @@ -0,0 +1 @@ +!function(t,e,i,n){"use strict";i.module("ngFitText",[]).value("fitTextDefaultConfig",{debounce:!1,delay:250,loadDelay:10,compressor:1,min:0,max:Number.POSITIVE_INFINITY}).directive("fittext",["$timeout","fitTextDefaultConfig","fitTextConfig",function(e,n,o){return{restrict:"A",scope:!0,link:function(f,a,l){function r(){var t=T*h/s.offsetWidth/h;return Math.max(Math.min((c[0].offsetWidth-6)*t*p,parseFloat(y)),parseFloat(m))}function u(){s.offsetHeight*s.offsetWidth!==0&&(d.fontSize=T+"px",d.lineHeight="1",d.display="inline-block",d.fontSize=r()+"px",d.lineHeight=b,d.display=v)}i.extend(n,o.config);var c=a.parent(),s=a[0],d=s.style,x=t.getComputedStyle(a[0],null),h=a.children().length||1,g=l.fittextLoadDelay||n.loadDelay,p=l.fittext||n.compressor,m=("inherit"===l.fittextMin?x["font-size"]:l.fittextMin)||n.min,y=("inherit"===l.fittextMax?x["font-size"]:l.fittextMax)||n.max,b=x["line-height"],v=x.display,T=10;e(function(){u()},g),f.$watch(l.ngBind,function(){u()}),n.debounce?i.element(t).bind("resize",n.debounce(function(){f.$apply(u)},n.delay)):i.element(t).bind("resize",function(){f.$apply(u)})}}}]).provider("fitTextConfig",function(){var t=this;return this.config={},this.$get=function(){var e={};return e.config=t.config,e},this})}(window,document,angular); \ No newline at end of file From efe813945a68983084ac9ba92f168d6a07790251 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Thu, 24 Mar 2016 17:02:42 +0100 Subject: [PATCH 7/8] fixes - english typo - [bug] unable to send devise mail --- config/initializers/devise_mailer.rb | 3 +++ config/locales/app.shared.en.yml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 config/initializers/devise_mailer.rb diff --git a/config/initializers/devise_mailer.rb b/config/initializers/devise_mailer.rb new file mode 100644 index 000000000..cd595d25b --- /dev/null +++ b/config/initializers/devise_mailer.rb @@ -0,0 +1,3 @@ +Devise::Mailer.class_eval do + helper :application +end \ No newline at end of file diff --git a/config/locales/app.shared.en.yml b/config/locales/app.shared.en.yml index ea671c1aa..c97a750c5 100644 --- a/config/locales/app.shared.en.yml +++ b/config/locales/app.shared.en.yml @@ -65,7 +65,7 @@ en: name: "Name" step_N: "Step {{INDEX}}" # angular interpolation themes: "Themes" - tags: "Tages" + tags: "Tags" technical_specifications: "Technical specifications" online_payment: "Online payment" type: "Type" From c77916b4af0ccf4a846e32ab53127ce447ff215a Mon Sep 17 00:00:00 2001 From: cyril Date: Thu, 24 Mar 2016 23:01:40 +0100 Subject: [PATCH 8/8] remove newrelic gem --- Gemfile | 2 - Gemfile.lock | 5 +- config/newrelic.yml | 224 -------------------------------------------- 3 files changed, 3 insertions(+), 228 deletions(-) delete mode 100644 config/newrelic.yml diff --git a/Gemfile b/Gemfile index 7479895fc..0a4c19a8d 100644 --- a/Gemfile +++ b/Gemfile @@ -115,8 +115,6 @@ gem 'stripe', '1.30.2' gem 'recurrence' -gem 'newrelic_rpm' - # PDF gem 'prawn' gem 'prawn-table' diff --git a/Gemfile.lock b/Gemfile.lock index fbad9569e..2d6b1b45e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -242,7 +242,6 @@ GEM net-ssh-gateway (1.2.0) net-ssh (>= 2.6.5) netrc (0.10.3) - newrelic_rpm (3.11.1.284) nokogiri (1.6.6.4) mini_portile (~> 0.6.0) notiffany (0.0.6) @@ -497,7 +496,6 @@ DEPENDENCIES letter_opener message_format mini_magick - newrelic_rpm notify_with oj omniauth @@ -532,3 +530,6 @@ DEPENDENCIES uglifier (>= 1.3.0) unicorn web-console (~> 2.0) + +BUNDLED WITH + 1.10.6 diff --git a/config/newrelic.yml b/config/newrelic.yml deleted file mode 100644 index 352e764fa..000000000 --- a/config/newrelic.yml +++ /dev/null @@ -1,224 +0,0 @@ -# -# This file configures the New Relic Agent. New Relic monitors Ruby, Java, -# .NET, PHP, Python and Node applications with deep visibility and low -# overhead. For more information, visit www.newrelic.com. -# -# Generated December 11, 2014 -# -# This configuration file is custom generated for sleede - - -# Here are the settings that are common to all environments -common: &default_settings - # ============================== LICENSE KEY =============================== - - # You must specify the license key associated with your New Relic - # account. This key binds your Agent's data to your account in the - # New Relic service. - license_key: '3394fafbd05532f2f3c4869fd8125f2da4177f72' - - # Agent Enabled (Ruby/Rails Only) - # Use this setting to force the agent to run or not run. - # Default is 'auto' which means the agent will install and run only - # if a valid dispatcher such as Mongrel is running. This prevents - # it from running with Rake or the console. Set to false to - # completely turn the agent off regardless of the other settings. - # Valid values are true, false and auto. - # - # agent_enabled: auto - - # Application Name Set this to be the name of your application as - # you'd like it show up in New Relic. The service will then auto-map - # instances of your application into an "application" on your - # dashboard page. If you want to map this instance into multiple - # apps, like "AJAX Requests" and "All UI" then specify a semicolon - # separated list of up to three distinct names, or a yaml list. - # Defaults to the capitalized RAILS_ENV or RACK_ENV (i.e., - # Production, Staging, etc) - # - # Example: - # - # app_name: - # - Ajax Service - # - All Services - # - # Caution: If you change this name, a new application will appear in the New - # Relic user interface with the new name, and data will stop reporting to the - # app with the old name. - # - # See https://newrelic.com/docs/site/renaming-applications for more details - # on renaming your New Relic applications. - # - app_name: FABLAB - - # When "true", the agent collects performance data about your - # application and reports this data to the New Relic service at - # newrelic.com. This global switch is normally overridden for each - # environment below. (formerly called 'enabled') - monitor_mode: true - - # Developer mode should be off in every environment but - # development as it has very high overhead in memory. - developer_mode: false - - # The newrelic agent generates its own log file to keep its logging - # information separate from that of your application. Specify its - # log level here. - log_level: info - - # Optionally set the path to the log file This is expanded from the - # root directory (may be relative or absolute, e.g. 'log/' or - # '/var/log/') The agent will attempt to create this directory if it - # does not exist. - # log_file_path: 'log' - - # Optionally set the name of the log file, defaults to 'newrelic_agent.log' - # log_file_name: 'newrelic_agent.log' - - # The newrelic agent communicates with the service via https by default. This - # prevents eavesdropping on the performance metrics transmitted by the agent. - # The encryption required by SSL introduces a nominal amount of CPU overhead, - # which is performed asynchronously in a background thread. If you'd prefer - # to send your metrics over http uncomment the following line. - # ssl: false - - #============================== Browser Monitoring =============================== - # New Relic Real User Monitoring gives you insight into the performance real users are - # experiencing with your website. This is accomplished by measuring the time it takes for - # your users' browsers to download and render your web pages by injecting a small amount - # of JavaScript code into the header and footer of each page. - browser_monitoring: - # By default the agent automatically injects the monitoring JavaScript - # into web pages. Set this attribute to false to turn off this behavior. - auto_instrument: true - - # Proxy settings for connecting to the New Relic server. - # - # If a proxy is used, the host setting is required. Other settings - # are optional. Default port is 8080. - # - # proxy_host: hostname - # proxy_port: 8080 - # proxy_user: - # proxy_pass: - - # The agent can optionally log all data it sends to New Relic servers to a - # separate log file for human inspection and auditing purposes. To enable this - # feature, change 'enabled' below to true. - # See: https://newrelic.com/docs/ruby/audit-log - audit_log: - enabled: false - - # Tells transaction tracer and error collector (when enabled) - # whether or not to capture HTTP params. When true, frameworks can - # exclude HTTP parameters from being captured. - # Rails: the RoR filter_parameter_logging excludes parameters - # Java: create a config setting called "ignored_params" and set it to - # a comma separated list of HTTP parameter names. - # ex: ignored_params: credit_card, ssn, password - capture_params: false - - # Transaction tracer captures deep information about slow - # transactions and sends this to the New Relic service once a - # minute. Included in the transaction is the exact call sequence of - # the transactions including any SQL statements issued. - transaction_tracer: - - # Transaction tracer is enabled by default. Set this to false to - # turn it off. This feature is only available at the Professional - # and above product levels. - enabled: true - - # Threshold in seconds for when to collect a transaction - # trace. When the response time of a controller action exceeds - # this threshold, a transaction trace will be recorded and sent to - # New Relic. Valid values are any float value, or (default) "apdex_f", - # which will use the threshold for an dissatisfying Apdex - # controller action - four times the Apdex T value. - transaction_threshold: apdex_f - - # When transaction tracer is on, SQL statements can optionally be - # recorded. The recorder has three modes, "off" which sends no - # SQL, "raw" which sends the SQL statement in its original form, - # and "obfuscated", which strips out numeric and string literals. - record_sql: obfuscated - - # Threshold in seconds for when to collect stack trace for a SQL - # call. In other words, when SQL statements exceed this threshold, - # then capture and send to New Relic the current stack trace. This is - # helpful for pinpointing where long SQL calls originate from. - stack_trace_threshold: 0.500 - - # Determines whether the agent will capture query plans for slow - # SQL queries. Only supported in mysql and postgres. Should be - # set to false when using other adapters. - # explain_enabled: true - - # Threshold for query execution time below which query plans will - # not be captured. Relevant only when `explain_enabled` is true. - # explain_threshold: 0.5 - - # Error collector captures information about uncaught exceptions and - # sends them to New Relic for viewing - error_collector: - - # Error collector is enabled by default. Set this to false to turn - # it off. This feature is only available at the Professional and above - # product levels. - enabled: true - - # To stop specific errors from reporting to New Relic, set this property - # to comma-separated values. Default is to ignore routing errors, - # which are how 404's get triggered. - ignore_errors: "ActionController::RoutingError,Sinatra::NotFound" - - # If you're interested in capturing memcache keys as though they - # were SQL uncomment this flag. Note that this does increase - # overhead slightly on every memcached call, and can have security - # implications if your memcached keys are sensitive - # capture_memcache_keys: true - -# Application Environments -# ------------------------------------------ -# Environment-specific settings are in this section. -# For Rails applications, RAILS_ENV is used to determine the environment. -# For Java applications, pass -Dnewrelic.environment to set -# the environment. - -# NOTE if your application has other named environments, you should -# provide newrelic configuration settings for these environments here. - -development: - <<: *default_settings - # Turn on communication to New Relic service in development mode - monitor_mode: true - app_name: FABLAB (Development) - - # Rails Only - when running in Developer Mode, the New Relic Agent will - # present performance information on the last 100 transactions you have - # executed since starting the mongrel. - # NOTE: There is substantial overhead when running in developer mode. - # Do not use for production or load testing. - developer_mode: true - -test: - <<: *default_settings - # It almost never makes sense to turn on the agent when running - # unit, functional or integration tests or the like. - monitor_mode: false - -# Turn on the agent in production for 24x7 monitoring. NewRelic -# testing shows an average performance impact of < 5 ms per -# transaction, you can leave this on all the time without -# incurring any user-visible performance degradation. -production: - <<: *default_settings - monitor_mode: true - -# Many applications have a staging environment which behaves -# identically to production. Support for that environment is provided -# here. By default, the staging environment has the agent turned on. -staging: - <<: *default_settings - monitor_mode: true - app_name: FABLAB (Staging)