Released some small improvements:
- somehow it was impossible to save tags: that is now fixed
- links are now opened in a new tab/window
Released some small improvements:
This new version contains a new layout setup. I see some room still for further improvement, but for now we get
Hope you like it.
What is next:
As always, I am happy to hear your suggestions and ideas.
Released 0.0.18 includes:
Nextup I will most likely tackle the general layout. Replace the tabs by something smaller. Make more use of the screen in general.
Release 0.0.16 includes:
Note that you can always follow-up on the status and vote for changes on my ticket-board.
Yesterday I released 0.0.15, nothing much new, just further improved the import from Google Notebook, after I received some feedback.
I also started using Trello to keep track of “things to do”. Check it out here.
When you check the Trello-board, you will notice I plan to work on some search functionality next, and I want to do something about the layout. Too much space is lost now.
Release 0.0.14:
<link rel="related" href="http://some.link.com" title="Some title">
These can now be imported correctly. Note that if you want to click links inside a note, it will immediately try to edit the note. Currently the work-around is to right-click on the link. I am thinking about a cleaner solution.
Also, if you would be worried, you can export your Google Notebook for at least a few months.
Release 0.0.13:
If you have more suggestions, problems, ideas: I would be happy to hear them.
I just released 0.0.12.
Importing from Google Notebook now is decent.
And I guess a lot more will come up later. If you have any suggestions, let me know.
Until recently I was an avid Google Notebook user. I liked the simplicity. I just used it to collect ideas, links, scraps, jottings, but also important stuff I should not forget. I never really used the formatting, and neither the tags. Plain and simple.
When I heard it would be discontinued, I looked around for a plain and simple alternative, and decided to build my own. Jottinx is the result of this.
Jottinx in short:
For the moment it still very much is a work in progress, but I hope you will give it a try.
I normally do not do a lot of view specs, but at least I want to make sure that my view renders without errors. And sometimes I really need to make sure that some link is shown or hidden depending on e.g. the role of the user or linked objects.
For example,
describe "posts/show.html.haml" do
context "without any comments" do
it "displays no comments" do
@post = Factory(:post)
render
rendered.should contain(I18n.t('posts.show.no_comments'))
end
end
end
So we check the rendered result, whether it contains a specific text.
But what happens if your view is rendering different yield regions? Like a body (the default region) and a sidebar.
Let’s use a view like this :
=show_for @post do |p|
= p.attribute :title
= p.attribute :content
- if @post.comments
= render :partial => 'comments'
- else
= t('posts.show.no_comments')
=content_for :sidebar do
= link_to 'Edit', edit_post(@post) if is_allowed_to?(:edit)
It renders the attributes using the show_for gem, and then renders inside the sidebar a link if the current user is allowed to edit it.
Now I want to test what is rendered into the sidebar. To my dismay I found that neither content_for or content_for?
worked at all inside rspec. And rendered does not contain the data for the other regions.
So somehow I would want to get to the content for :sidebar.
It appears that the different regions are actually stored inside an instance variable of the view. Once I figured that out, the rest was easy:
describe "posts/show.html.haml" do
def rendered_content_for(name)
view.instance_variable_get(:@_content_for)[name]
end
context "with enough rights" do
it "displays a link to edit the post" do
@post = Factory(:post)
view.stub(:is_allowed_to?) { true }
render
rendered_content_for(:sidebar).should contain('Edit')
end
end
context "with no rights" do
it "does not display a link to edit the post" do
@post = Factory(:post)
view.stub(:is_allowed_to?) { false }
render
rendered_content_for(:sidebar).should_not contain('Edit')
end
end
end
Hope that this helps somebody. Or did you find a better way?