Site update
Reflected the last changes made:
- Language support
- Full French translation
- Notes module (255ch. texts)
- Integrated PHPUnit tests
- Integrated Code coverage
- Bug corrections
Legal stuff about this site and your private life:
If you're not OK with this, move your way.
Site update
Reflected the last changes made:
Site update (6c32082):
Site update (fe0797f)
Site update (222db47):
Site update(98da9c1):
New gist : Battleship game in C Game made as training exercise : Sources on Github. Linux only.
Flash info : Nearly a month working with Laravel after work... And my first spam on the site.
Site update(c31b499)
Site update (v0.1.0)
A new Userstyle hightlighting GAFA links has been created from the Firefox addon Gafalink, by Baptiste Gelez, for users of other browsers
Create a PDF file from resized images:
for file in *.png; do convert $file -resize 600 "imgtemp-$file"; done && convert imgtemp-*.png all_pngs.pdf && rm imgtemp-*.png
ExperimentsLabs is going Rails !
The new version is going to be a Rails engine. A pre-release version is already available if you want to test it.
Following VueX Modulator - Part 1: generating VueX modules (en)
I tested the "modulator" on a Nativescript-vue application and it works well. Use it like this:
// app/store.js
import Vue from 'nativescript-vue'
import Vuex from 'vuex'
import Modulator from './modulator'
Vue.use(Vuex)
export default new Vuex.Store({
state: {},
modules: {
users: Modulator.generateModule('users', 'user', 'users', false, false),
},
})
After testing Vuex(3.0.1) in a Nativescript-vue (2.0) app I noticed that when using ModalView
s or ListView
s,
$store
is not available in the list items components or modal component. For now, use a StackLayout
for lists and I pass the $store
as a prop to the ModalView
:
<!-- Instead of a ListView -->
<StackLayout class="list-group">
<MyComponent v-for="item in items" :item="item" :key="item.id" class="list-group-item"/>
</StackLayout>
In MyComponent
, the method to open the modal is like:
import ItemForm from '../forms/ItemForm'
export default {
name: 'MyComponent',
props: {
item: { required: true, type: Object },
},
methods: {
openForm () {
const props = {item: this.item, store: this.$store} // props for ItemForm
this.$showModal(ItemForm, { props }) // Show ItemForm as a ModalView
},
},
}
If you have issues with the KDE menu / KRunner items (items not appearing, wrong targets on .desktop
entries, ...), you can try to rebuild the cache by running kbuildsycoca5
as an user.
I heard that finding names for projects is "the hardest thing in development, after cache invaliadation". And that's right.
"Site compare" was a bad name because of two things: it compares sites, that's true. But it does not compare sites. So that's false.
"Capyxel"? After all, that does not mean anything, but it's about Capybara and pixels. Without being too obvious. So why not?
Rail: sending emails via a rake task won't work if you use the_mail.deliver_later
. Use the_mail.deliver
, instead.
Keep in mind that .deliver
will be blocking in the context of the Rails server.
Rails: Check Pundit authorization in RSpec
Pundit provide two helper methods to help you ensure the actions are authorized/scoped: verify_authorized
and verify_policy_scoped
. They are meant to be used in an after_action
hook.
As the check is made after the action, I see no point of using it in production, so I use it in RSpec:
# rails_helper.rb
# ...
config.before(:suite) do
FactoryBot.create :user, :known
ApplicationController.send(:after_action, :verify_authorized, {except: [:index]})
ApplicationController.send(:after_action, :verify_policy_scoped, {only: [:index]})
end
# ...
This way, it's still checked during all the tests using controllers.