written by Eric Davis on January 08, 2010
0 Comments
After reading a post by Giles, I've decided that my primary goal for 2010 will be to build 12 new micro-businesses this year. You might think I'm crazy, since building even one business in a year is difficult but hear me out.
I'm not talking about building 12 Little Stream Softwares (yet). I'm taking about taking an idea, building systems around it, and launching it. These are businesses that will take from a couple of weeks to a few months to build and launch.
I'm not looking to score 12 home runs here. These aren't Twitter or Facebook sized businesses, or anything a VC would be interested in. What I'm looking for are small, simple, and sustainable businesses where I can get experience creating and providing value for a larger group of people. There's a saying:
The fastest way to get what you want from life is to give away more value to more people than you are now.
I already have 27 ideas written down (and 3 more from last night) so it's just a matter to implementing them. A few ideas are extensions to my services at Little Stream Software and a few are completely new products. I'll be posting more about each idea as I work on them but a few ideas I have are:
- Redmine hosting (Contact me if you're interested in this, I'm start to build a pre-launch list)
- Ebooks to help freelance developers get the projects they want to be working on
- Micro-Applications that solve a single problem that no one else is solving
2010 is going to be my year of growth, either growing to some exciting new markets or getting a lot of experience with failure. Either way, growth is good.
Eric Davis
Tagged: business startup entrepreneurship goals
written by Eric Davis on December 30, 2009
0 Comments
I've just uploaded the 0.4.0 release of my Redmine Bulk Time Entry plugin. This is a bug fix release that fixes several issues with the latest Redmine, Redmine 0.8.7, and Postgresql.
Download
The plugin can be download from the Little Stream Software project or GitHub. I've also released this as a gem on gemcutter and Rubyforge if you would like to try out the new Gem Plugin support in Redmine.
Changes
You can see more details on the Roadmap page.
What's next
This is the final release of this plugin for the 0.8.x branch of Redmine. The next version will require Redmine 0.9.0 or above.
Help
If you need help, my Redmine bug tracker is open to the public and you are welcome to ask for help there.
Eric
Tagged: open source redmine redmine plugins
written by Eric Davis on December 16, 2009
0 Comments
I've been doing a lot of integration work with Redmine lately and needed one Redmine plugin to be depend on another plugin. So yesterday I added a new method to the Redmine plugin API called requires_redmine_plugin. It's a simple method that will make sure another Redmine plugin is installed.
Using the API is simple, just call required_redmine_plugin in your init.rb where you register your plugin. For example, if I wanted to make the budget_plugin require the redmine_rate plugin I would register the budget_plugin with:
Redmine::Plugin.register :budget_plugin do
name 'Budget'
author 'Eric Davis'
version '0.2.0'
requires_redmine :version_or_higher => '0.8.0'
requires_redmine_plugin :redmine_rate, :version_or_higher => '0.1.0'
end
This follows the same format as the requires_redmine API so you can define the specific version in several ways:
- Must have a specific version:
requires_redmine_plugin :redmine_rate, :version => '0.1.0'
or
requires_redmine_plugin :redmine_rate, '0.1.0'
- Must be at least a version:
requires_redmine_plugin :redmine_rate, :version_or_higher => '0.1.0'
- May be one of a few versions:
requires_redmine_plugin :redmine_rate, :version => ['0.1.0', '0.1.1', '0.1.2']
I like to define the version requirements as :version_or_higher since it will let the plugin run on newer versions without any changes.
Plugin load order
There is one gotcha with this API right now. The required_redmine_plugin method runs as Redmine is loading plugins alphabetically. This means if your plugin is loaded before the dependent plugin, there is a chance your plugin will not find the dependent plugin. To work around this, you will need to change the load order for the plugins so that the dependent plugin is loaded first.
The example from above is a perfect example of this, since the budget_plugin will be loaded before the redmine_rate plugin. By adding the following line to the config/additional_environment.rb the redmine_rate plugin will be loaded first, before any other plugins:
config.plugins = [ :redmine_rate, :all ]
This new API will be included in Redmine 0.9, so you will be able to take advantage of it with the next major release of Redmine.
Tagged: Redmine plugins development open source
written by Eric Davis on December 10, 2009
0 Comments
I recently asked a question on Twitter and I wanted to get some more feedback on here.
To add a some context: I have about 20 Redmine plugins Open Sourced that are ready for another release. With Redmine 0.9 coming up, I'd like to do a final bugfix release of them for the final 0.8 branch and then start to require Redmine 0.9 from then on. But I also have another dozen or so unreleased plugins that need some final documentation and testing.
Let me know what you think in the comments below or on Twitter. Thanks.
Eric
Tagged: Redmine plugins development open source
written by Eric Davis on December 05, 2009
0 Comments
I've just released a plugin called the Wiki Issue Details Plugin. This plugin adds a wiki macro to Redmine to make it easier to list the details of an issue on a wiki page.
Getting the plugin
A copy of the plugin can be downloaded from my Little Stream Software Projects or from GitHub. Just make sure to follow the Redmine plugin installation steps.
Usage
Once it's installed, just insert the issue_details macro onto any of the wiki textareas (the boxes with the WYSIWYG toolbar). It requires the issue id parameter (e.g. issue_details(100)). When printed, an issue will look like:
Digitized 24 hour firmware - Bug #391 Robust disintermediate customer loyalty - 25.23 hours (In Progress)
Where "Digitized 24 hour firmware" is a link to the project, "Robust disintermediate customer loyalty" is the subject of issue #391, and "25.23 hours" is the estimated time.
License
Like all of my Redmine plugins, this plugin is licensed under the GNU GPL v2.
Project help
If you need help you can contact me on the bug tracker.
Eric
Tagged: open source redmine redmine plugins
written by Eric Davis on November 20, 2009
0 Comments
I'm a big believer in writing automated tests for applications. Whether it's before coding or after, tests keep the application working and easy to maintain. But what can you do when the application and test suite grow and start taking a longer and longer to run? Redmine is starting to be affected by this problem, it's current test suite is taking about 4 minutes to run. That's 3 minutes too long for me.
There are several options for speeding up tests but how do you know which ones to speed up? How do you know if your changes actually helped?
Enter test_benchmark
test_benchmark is:
A ruby gem and rails plugin to show you how slow your Test::Unit tests run. Useful for troubleshooting/isolating slow tests.
It runs tests like normal but adds benchmarking times for each test method and class. With Ruby on Rails 2.3, installation and setup is an easy 3 step process.
1. Install the gem
test_benchmark is available as a Rubygem, named... test_benchmark! You can install it directly into your Rails application as a plugin or a gem but I prefer to install tools like this systemwide so I can use them with any application.
sudo gem install test_benchmark
2. Configure the gem in Rails
Once the gem is installed, you can load it into Rails by adding it to the testing environment. Just edit config/environments/test.rb and add the following line:
config.gem "test_benchmark"
To make sure it's loading, you can run rake gems for the test environment and make sure test_benchmark is shown.
$ rake gems RAILS_ENV=test
(in /home/edavis/dev/redmine/redmine-core)
- [I] thoughtbot-shoulda
- [I] nofxx-object_daddy
- [I] mocha
- [R] rake
- [I] test_benchmark
I = Installed
F = Frozen
R = Framework (loaded before rails starts)
3. Run your tests
To use test_benchmark, you don't need to do any more configuration. Just run your tests and it will print out the benchmarking results right to the console.
rake test:units
(in /home/edavis/dev/redmine/redmine-core)
/usr/bin/ruby1.8 -I"lib:test" "/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb"
Loaded suite /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader
Started
...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Finished in 112.694542 seconds.
475 tests, 2029 assertions, 0 failures, 0 errors
TEST BENCHMARK TIMES: OVERALL
54.475 test_load(DefaultDataTest)
2.904 test_issue_edit(MailerTest)
1.514 test_lost_password(MailerTest)
1.424 test_account_information(MailerTest)
1.311 test_register(MailerTest)
1.242 test_call_hook_should_not_change_the_default_url_for_email_notifications(Redmine::Hook::ManagerTest)
1.210 test_clear_listeners(Redmine::Hook::ManagerTest)
1.204 test_issue_add(MailerTest)
1.190 test_call_hook_with_project_added_to_context(Redmine::Hook::ManagerTest)
1.158 test_call_hook_from_view_with_request_added_to_context(Redmine::Hook::ManagerTest)
1.150 test_call_hook_with_context(Redmine::Hook::ManagerTest)
1.136 test_call_hook_from_view_with_project_added_to_context(Redmine::Hook::ManagerTest)
1.134 test_add_listener(Redmine::Hook::ManagerTest)
1.112 test_call_hook_from_view_with_controller_added_to_context(Redmine::Hook::ManagerTest)
1.107 test_call_hook_from_view_should_join_responses_with_a_space(Redmine::Hook::ManagerTest)
Test Benchmark Times: Suite Totals:
54.485 DefaultDataTest
15.467 Redmine::Hook::ManagerTest
13.373 MailerTest
8.125 ProjectTest
4.165 IssueTest
You'll see two different reports, one for the overall times and one for the suite times (test classes). Looking at Redmine's report above, you can see the test_load from the DefaultDataTest suite is taking almost 55 seconds to run. That's almost 25% of the entire test suite. So if we could optimize that test it would have a significant impact on the speed of the rest of the tests. Next we'll take a look at the test and see what we can do to speed it up.
Eric Davis
Tagged: Rails Ruby Testing Benchmarking Tools
written by Eric Davis on November 10, 2009
0 Comments
After some planning, I'm now offering two new services for Redmine. So if you need some help planning, developing, or reviewing your Redmine projects, please contact me and let me know where I can help you.
Eric Davis
Tagged: Business Little Stream Software Redmine
written by Eric Davis on November 04, 2009
0 Comments
I've been writing about my business, Little Stream Software, here for two years now. This has been good but I've been losing focus on the technical content here, which has caused me to doubt many of my new post ideas. So to keep things simple, I've created a new blog for my business topics, the Little Stream Software Blog.
I'm going to be covering my experiences that I've had from running a one person Ruby on Rails consultancy. Some topic ideas I'm thinking about are:
- Managing customers
- How to price your products and services
- Working with other contractors
- Finding time to do business development while you still code
I have two posts up right now; New Contractor Questions and How to bring in new sales in slow times and am planning to write to it regularly. If you enjoy the content, please subscribe to the RSS feed.
theAdmin.org will still be where to get my technical content about Ruby on Rails and Redmine.
Eric Davis
Tagged: Business Little Stream Software Launching
written by Eric Davis on October 15, 2009
0 Comments
A lot of Rails plugins are starting to be released as RubyGems. I've found using RubyGems to manage plugins has been easy and have several advantages over a standard Rails plugin:
- built in versioning
- easy installation - no more installing plugins to the wrong directory
- pick a specific version to use
- not having to add a bunch of code to the application tree
Since I've created several dozen plugins for Redmine, I decided to start releasing them as RubyGems. I hoping this will make it easier for the user to install and upgrade them. After spending a night converting four plugins, I found I was running the same commands again and again. That meant, I could script it for the remaining 29 plugins.
The process
After a few tweaks, I ended up with a simple procedural script that would:
- Checkout the master branch
- Update the master branch from origin
- Create a new branch called 'gem' to work in
- Add a configuration for jeweler to the Rakefile
- Add a VERSION file based on the version used in
init.rb
- Move the existing
init.rb to rails/init.rb so Rails will load it from the gem
- Generate a valid gemspec for the plugin
- Install the new gem
Finally, I would review the 'gem' branch and test out the newly minted gem in Redmine. If something went wrong, the entire 'gem' branch could be destroyed with git branch -D gem. This let me finish converting the rest of the plugins in just a couple of hours.
The script
This script is still Redmine specific (how it parses the version and description) but it could easily be adapted to work with any Rails plugin. I've also shared this as a Gist, so feel free to fork and modify it there. Let me know if you used it and how it worked for you.
#!/usr/bin/env ruby
# Usage:
# ruby plugin_to_gem.rb my_plugin_directory
require 'fileutils'
@plugin_dir = ARGV[0]
@plugin_name = ARGV[0]
def rakefile_content
description = 'TODO'
redmine_init_content = File.read('init.rb')
if redmine_init_content.match(/description (.*$)/)
description = $1.gsub("'",'').gsub('"','')
end
content =<<-EORAKE
begin
require 'jeweler'
Jeweler::Tasks.new do |s|
s.name = "#{@plugin_name}"
s.summary = "#{description}"
s.email = "edavis@littlestreamsoftware.com"
s.homepage = "https://projects.littlestreamsoftware.com/projects/TODO"
s.description = "#{description}"
s.authors = ["Eric Davis"]
s.rubyforge_project = "#{@plugin_name}" # TODO
s.files = FileList[
"[A-Z]*",
"init.rb",
"rails/init.rb",
"{bin,generators,lib,test,app,assets,config,lang}/**/*",
'lib/jeweler/templates/.gitignore'
]
end
Jeweler::GemcutterTasks.new
Jeweler::RubyforgeTasks.new do |rubyforge|
rubyforge.doc_task = "rdoc"
end
rescue LoadError
puts "Jeweler, or one of its dependencies, is not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
end
EORAKE
end
FileUtils.cd(@plugin_dir, :verbose => true) do |dir|
system('rake clean')
system('git status')
system('git checkout master')
system('git merge origin/master')
system('git checkout -b gem')
# Rakefile
File.open('Rakefile','a') do |file|
file.puts(rakefile_content)
end
system('git commit -am "Updated rakefile for jeweler"')
# VERSION
File.open('VERSION','w') do |version_file|
redmine_init_content = File.read('init.rb')
if redmine_init_content.match(/version (.*$)/)
version = $1.gsub("'",'').gsub('"','')
version_file.puts version
end
end
system('git add VERSION')
system('git commit -am "Added Version file"')
# Rails GemPlugin init.rb
FileUtils.mkdir_p('rails')
system('git mv init.rb rails/init.rb')
File.open('init.rb','w') do |init_file|
init_file.puts('require File.dirname(__FILE__) + "/rails/init"')
end
system('git add init.rb')
system('git commit -am "Added init file for Rails GemPlugin"')
# Gemspec
system('rake gemspec')
system("git add #{@plugin_name}.gemspec")
system('git commit -am "Added generated gemspec"')
# Install to test
system('rake install')
# Back to master to allow merging
system('git checkout master')
end
Eric Davis
Tagged: redmine rails ruby rubygems
written by Eric Davis on September 30, 2009
0 Comments
I've just migrated theAdmin.org to the Jekyll engine. I was running on Mephisto but switched because Mephisto's bugs were starting to get in the way of actual writing. All of the comments have been converted to Disqus but I still have some features to add before the migration is complete. If you notice anything wrong or find a 404 page, please file a bug report for me or leave a comment here. Thanks.
Eric Davis
Tagged: theadmin