Posts Tagged ‘release’

Release 0.8.0

Monday, October 6th, 2008

Here it is the 0.8.0 release of Mack! What a fun and exciting release it is as well. There are a few big changes under the hood, all for the better of course, but there’s only really one that will cause existing Mack projects some conversion pain. However, we’ve tried to take the sting out of that with a helpful rake task.

Configatron Support

Mack 0.8.0 replaces the old application_configuration system with the new ultra sexy and cool, Configatron system. This is a much better way of doing system configurations, and I’m sure you’ll agree once you give it a spin. We’ve tried to take the edge off the conversion of these configuration systems with a helpful little rake task:

$ rake mack:update:configuration

For most cases, that task should do just fine. There might be a few places you have to tweak, such as in your own code, but once you do that, you’ll love Configatron!

For more information about using Configatron checkout this page:

http://www.mackery.com/configuration/configatron

A New Router

That’s right, the router in Mack has been completely rewritten from the ground up, yet unlike other frameworks, we’ve managed to keep our external API the same, so you don’t have to change your routes.rb at all. :) That’s a bit of good news, isn’t it?

What do you get with the new router? Well, for one, it should be faster, that’s always a plus. You can also now do ‘wildcard’ parameters in routes, use procs, extended ‘resourced’ routes, define ‘host’ and ’scheme’ parameters, use regular expressions, and a few other little nifty things. Plus, because of the rewrite, it’s going to make it easier to extending the routing system to be even more powerful! In a future release, sometime in the 0.8.x series, you’ll even be able to plugin in your own router just by implementing a few API methods.

For more information about the new router, and what you can do, check out:

http://www.mackery.com/routing/index

Asset Management

There is now a really great asset management system that easily allows you to build bundles of CSS and JavaScript files to help keep your code neat and easy to use. Bundle that with the new mack-asset_packager gem, and support for asset hosts, you get a simple, easy, and fast way to compress and deliver your assets. 

For more information, checkout these helpful pages from the user guide:

http://www.mackery.com/views/asset_mgr
http://www.mackery.com/views/asset_host 

Misc.

As always, there’s a bunch of other great stuff just lurking around in this release. A better logger, for a start, more helpers, bug fixes, better error reporting, default 404 and 500 pages, and more. Please download and enjoy the release, I’m sure you’ll find worth it. Enjoy!

Changelog:

  1. [#187] Fixed: When an exception is raised, the request doesn’t get ‘logged’
  2. [#185] Fixed: .html is being appended to logged requests when there’s a 404
  3. [#184] Request logging should also print the message of the status code
  4. [#183] Updates to asset mgr/host
  5. [#181] Content-type can now be set with calling render.
  6. [#179] When configatron.mack.show_exceptions is false you now either the public/404.html or public/500.html file.
  7. [#178] Added a configure parameter to turn off log coloring
  8. [#176] Added a Google Analytics helper.
  9. [#175] Generating urls should use host or scheme if defined
  10. [#171] Ability to extend resources in routes
  11. [#170] Regex support in routes
  12. [#169] Proc support for Routes
  13. [#168] Fixed ERB errors not being reported correctly.
  14. [#167] Rake task to convert app config yamls to configatron
  15. [#165] Asset Packager
  16. [#164] Response helper for ‘attachments’
  17. [#159] Added link_unless_current and link_if helpers
  18. [#156] Added ‘Wildcard’ Routes support
  19. [#152] INCOMPATIBILITY NOTICE: Removed deprecated support for delivered_emails use delivered_notifiers instead.
  20. [#138] Added support for ‘host’ & ’scheme’ parameters in routes
  21. [#135] Replaced log4r with logging gem.
  22. [#119] Freeze gems
  23. [#106] INCOMPATIBILITY NOTICE: Removed deprecated support for droute_url
  24. [#93] INCOMPATIBILITY NOTICE: Removed deprecated support for ‘top’ level ApplicationHelper
  25. [#23] INCOMPATIBILITY NOTICE: Removed support for application_configuration and added support for configatron
  26. gem: logging 0.9.4
  27. gem: thin 1.0.0
  28. gem: rspec 1.1.8
  29. gem: configatron 2.1.4
  30. gem: cachetastic 2.0.0

Release 0.7.1

Monday, September 8th, 2008

Although not as sexy a release as 0.7.0, there are some very important bug fixes and some cool new little features in this release. Rack has been upgraded to v0.4.0. DataMapper to 0.9.5. Facets to 2.4.4, and a few other gems as well.

There is now a much nicer session store API that will allow developers to build their own session stores. There’s also a couple of new session stores that ship with 0.7.1. There’s a DataMapper session store, and a cookie session store, which is now the default session store. The previous Cachetastic based session store can be used by requiring the mack-caching gem in gems.rb and putting the following setting in your app_config/*.yml file:

mack::session_store: cachetastic

There is now built-in support to help prevent cross-site scripting attacks on forms. Some view helper methods have nice updates such as :disable_with and :confirm, and asset hosts.

And a whole host of other little improvements across the board. Enjoy!

Changelog:

  • [#153] Emails with just a single ‘part’ are now being sent correctly.
  • [#147] Added :confirm to button helpers.
  • [#146] [Diogo Almeida] Added :disable_with to submit_button form helper.
  • [#145] Added rake generate:<generator_name>:desc task to ‘describe’ a Genosaurus generator
  • [#144] INCOMPATIBILITY NOTICE: rake server is no more. Please use mackery server instead.
  • [#142] INCOMPATIBILITY NOTICE: rake console is no more. Please use mackery console instead.
  • [#140] Added Mack::BootLoader
  • [#139] Added ability to change the pattern for test files
  • [#137] Added subdomains method on request.
  • [#130] Added ability to ‘reload’ the console
  • [#129] DataMapper 0.9.5 support
  • [#128] Updated json_pure to 1.1.3 and removed ruby-debug dependency
  • [#127] Moved mack-paths into core
  • [#126] XSS Prevention
  • [#125] Cookie store is now the default session store, not cachetastic
  • [#124] Opened up the session store API
  • [#122] Added DataMapper session store.
  • [#121] Cookie session store support.
  • [#120] Added PassengerGenerator to generate the necessary files to run Mack with Passenger Phusion (mod_rails)
  • [#118] Mack/mack-more can be loaded from vendor/framework/mack and vendor/framework/mack-more
  • [#117] Added rake task: mack:freeze:edge
  • [#107] Updated to Rack 0.4.0
  • [#95] Removed deprecated model_* methods
  • [#94] Removed deprecated submit_tag
  • [#40] Added Mack::Utils::ContentLengthHandler so response will now have ‘Content-Length’ in its header.
  • [#21] Asset Hosts
  • gem: rack 0.4.0
  • gem: json_pure 1.1.3
  • gem: data_mapper 0.9.5
  • gem: genosaurus 1.2.4
  • gem: ezcrypto 0.7
  • gem: facets 2.4.4

 

 

Patch Releases 0.7.0.1 and 0.6.1.2

Friday, August 29th, 2008

Today two patches to Mack have been released, 0.7.0.1 and 0.6.1.2. They upgrade the version of application_configuration and are highly recommended. There was a bug with application_configuration that could cause it to stop loading configuration settings, which obviously, would be bad. :) Please update your version of Mack accordingly. 

As a side note, Mack will be moving away from application_configuration to configatron around version 0.8.0, but more on that later.

Release 0.7.0

Monday, August 25th, 2008

I know that with every release I say something like, “This is a big release”, but the fact of the matter is this is a big release. Amongst the 49 tickets that make up release 0.7.0, there are two in particular that are at the core of Mack’s very existence, they are Distributed Objects and Distributed Views/Layouts.

Back on March 26th Mack 0.4.0 was released. This release brought the first of three large distributed features, Distributed Routes. With 0.7.0 Mack fully realizes it’s goal of making it easy to write fully distributed web applications. There is a very nice wiki page, on our new wiki, that shows in detail how to use the new distributed features. That page can found here. Also, don’t forget to watch the screencast of the new distributed features that can be found here.

Distributed Objects

Distributed objects allow you to easily distribute access to your library and model code amongst any of your other Mack applications. Allowing this access is as simple as requiring the mack-distributed gem, adding a few lines to your configuration, and starting the mack_ring_server binary. ‘Client’ applications just need to require the mack-distributed gem.

Distributed Views/Layouts

With distributed views and layouts you can now share the look and feel from one application with all of your applications. Configuration and use is just as easy using distributed objects.

Form and HTML Helpers

People have been requesting more HTML and form helper methods, and we’re more than happy to comply. There are whole bunch of these new methods now to help you more easily build your applications. The generators have been updated to use these new methods, to make your job even easier. There is also now support for doing Date/Time drop downs, similar to Rails and Merb.

‘Tell’ Messaging

Rails folks know ‘tell’ messaging as ‘flash’ messaging and Merb folks know it as ‘message’ messaging. We went with ‘tell’. Tell messages are cleared after any non-redirect request. They’re a great way to send a simple message down to the client.

New Wiki

With this release there is also a new wiki at, http://www.mackwiki.com. This new wiki, incidentally built using Mack 0.7.0, will house all the tutorials and how-to’s for Mack. There are a few entries from the old wiki that still need to brought over during the next day or two.

Changelog:

  • [#114] Javascript link_helper
  • [#112] Error generating mack application
  • [#109] DataMapper 0.9.4
  • [#103] Log colors for the console are now configurable per log level.
  • [#102] New association method in data_factory
  • [#101] Update to file upload testing (build_file -> file_for_upload, and multipart support in put)
  • [#100] Inline routing parameters are being mutated
  • [#99] Upgraded to facets 2.4.3
  • [#98] Fixed mack-facets not being loaded before app_config files.
  • [#97] Fixed sessions only working with ‘local_memory’ mode
  • [#96] Distributed Views module now uses file cache
  • [#92] Removed deprecated app_config.orm code.
  • [#91] Fixed Mack blowing up if there is no config/initializers/gems.rb file.
  • [#90] Added deprecation system.
  • [#89] rake gems:* will now only display warning if any gem required is not installed (and not break)
  • [#88] Implemented pending SQLite3 tests in mack-activerecord
  • [#87] Refactored out common ORM code from mack-active_record and mack-data_mapper into mack-orm
  • [#86] stylesheet link helper
  • [#85] Refactored out Mack::ViewHelpers::HtmlHelpers into Mack::ViewHelpers::HtmlHelpers, Mack::ViewHelpers::FormHelpers and Mack::ViewHelpers::linkHelpers
  • [#84] Added Mack::Distributed.lookup(url) to retrieve specific distributed services.
  • [#83] Added mail_to HTML helper.
  • [#82] Added ACL support to mack-distributed
  • [#81] Fixed sessions working with redirects in testing
  • [#80] Distributed objects present both the DRb::DRbObject inspect and the original object’s inspect when asked.
  • [#79] Renamed app_config.mack.use_distributed_routes to app_config.mack.share_routes
  • [#76] Move mack_ring_server to mack-distributed
  • [#75] Left over mack-distributed rake tasks
  • [#74] Added optional feature to disable initialization logging.
  • [#73] Tests no longer use the functional/unit directories
  • [#69] Added ViewHelperGenerator and ControllerHelperGenerator
  • [#68] Transactional support in mack-AR
  • [#67] Added test:setup tasks for active_record and data_mapper
  • [#62] Removed const redefined warnings if mack-l10n is used along with mack-activerecord
  • [#39] HAML 2.0.2 support
  • [#28] Refactored out encryption into the mack-encryption gem.
  • [#25] Added ControllerGenerator
  • [#19] Added HTML form helpers
  • [#15] File upload testing support (ability to do multipart form post in testing)
  • [#11] Distributed Layout/Views
  • [#10] Added distributed objects to mack-distributed.
  • [#8] Move distributed code from mack-core to mack-more
  • [#5] Added tell messaging
  • gem: genosaurus 1.2.2
  • gem: haml 2.0.2
  • gem: addressable 1.0.4
  • gem: facets 2.4.3
  • gem: data_mapper 0.9.4

Release 0.6.1.1

Monday, August 4th, 2008

Mack 0.6.1.1 features 38 completed tickets and a whole host of really great features and improvements. Here’s a quick overview of a few of the big features in Mack 0.6.1.1.

Page Caching

There is now a mack-caching gem which gives you easy to use page caching when you require it. To use page caching first you need to add it to your gems.rb file like such:

gem.add "mack-caching", :libs => "mack-caching"

That will require the gem and give your app access to the page caching libraries. Next you to turn on page caching in your application. In the appropriate config/*.yml file add the following:

use_page_caching: true

Now, you just need to tell your controllers which actions they should cache:

class FooController
  include Mack::Controller
  cache_pages :o nly => [:index, :show]
end

If you give the cache_pages no optional parameters then it will cache all the actions for that controller. Alternatively, you could give it an :except parameter to list the actions you don’t want cached. 

Notifiers (aka Mailers)

Mack now has a mack-notifier gem that will be the repository for all ‘notification’ systems, the first of which is email. The Mack::Notifier API is simple and easy to use and will allow developers to plugin in different notification systems under the cover without having to change their application code. 

A notifier can look as simple as:

class WelcomeEmail
  include Mack::Notifier
end

With that you can then write the following bit of code:

we = WelcomeEmail.new
we.to = "foo@example.com"
we.from = "bar@example.com"
we.subject = "Hello World"
we.body(:text) = "My plain text body"
we.body(:html) = "My html body"
we.attach(Mack::Notifier::Attachment.new("/path/to/my/file")) 
we.deliver

Obviously there’s a lot more to the API, including a validations module, but that’s a subject for another post. 

JavaScript (aka RJS)

The mack-javascript gem now gives you Rails-like RJS support for Mack. The default library to use with mack-javascript is jQuery, but there is prototype support available as well. 

Data Factory

Creating faux data for testing can be a real nightmare. Fixtures can be difficult to maintain and trying to create your own faux data can be a chore. That’s where the mack-data_factory gem comes in.

For each model that you want to produce, you will need to define a factory class.  

Let’s say that I have 2 models: Item and User, and Item belongs to user.  So the factories will look like the following:

class ItemFactory
  include Mack::Data::Factory
  field :title, "MyItem"
  field :o wner_id, {:user => 'id'}
end

class UserFactory
  include Mack::Data::Factory
  field :username, "planters", :length => 25, :content => :alpha
  field :password, "roastedPeanuts", :immutable => true
end

So, the 2 classes above defined the factory for item and user.  As you can see, each factory will need to explicitly list all the fields that it will populate, and for each field, you can define rules on how the content is generated.

Supported content types: 

  • :alpha –> alphabets.  rules: [:length, :min_length, :max_length]
  • :alphanumeric –> alphabets and number.  rules: same as :alpha
  • :numeric –> numbers [optional, because if the field's default value is number, its content type will automatically set to numeric)
  • :email --> generate random email address
  • :username --> generate random username
  • :domain --> generate random domain name
  • :firstname --> generate first name
  • :lastname --> generate last name
  • :name --> generate full name
  • :city --> generate city name
  • :streetname --> generate street name
  • :state --> generate state.  rules: [:country --> :us or :uk, :abbr --> true if you want a abbreviated state name (us only)]
  • :zipcode –> generate zipcode. rules: [:country --> :us or :uk]
  • :phone –> generate phone number
  • :company –> generate company name.  rules: [:include_bs --> include sales tag line]
    example:  field, “”, :content => :company, :include_bs => true could generate something like:
    Fadel-Larkin monetize cross-media experiences
There’s a lot more to the mack-data_factory gem, so I highly recommend you check it out.

Changelog:

  • [#60] Fixed Mack executable problem
  • [#59] Fixed gems:* tasks
  • [#57] Moved most files under to lib/mack
  • [#56] mack-more: Added Mack::Utils::RegistryMap
  • [#55] mack-more: mack-facets: Mack::Utils::Registry is now Mack::Utils::RegistryList
  • [#54] Added DataMapper 0.9.3 support
  • [#52] mack-more: mack-[orm] should require mack-[orm].rb using its full path.
  • [#51] Application generator should generate orm support in the right place
  • [#50] Mack will now have 2 environment files: mack_core and mack_app.  Mack.rb will load both files, but it gives other module chance to load just the core files and not the application’s files.
  • [#49] Making sure the orm tasks is available when orm_support is removed from the app_config
  • [#49] mack-active_record:  mack-active_record.rb will require mack-active_record_tasks.rb
  • [#49] mack-data_mapper:  mack-data_mapper.rb will require mack-data_mapper_tasks.rb
  • [#49] Updated warning message if orm is defined in app_config (i.e. user only needs to require mack-[orm_name], instead of both that and mack-[orm_name]_tasks).
  • [#48] rake generator:list now displays the correct names for the generator tasks.
  • [#47] rake gems:* tasks now work, and no longer require mack_ruby_core_extensions
  • [#46] Calling .to_param on nil now raises a NoMethodError exception.
  • [#45] rake stats task now works with Test::Unit::TestCase
  • [#44] Mack::Runner has now been extended to allow for greater extension flexibility.
  • [#43] Added a Mack::Utils::Registry class to allow for easy creation of registries.
  • [#42] Sessions can now be turned off globally using the app_config.mack.use_sessions switch.
  • [#41] Deprecate orm_support.rb
  • [#38] There is now a registry of Controllers that are in the system.
  • [#36] Renamed the initialize method in the Mack::Controller module to configure_controller. This gives
  •   control of the initialize method back to the class.
  • [#34] Mack::l10n now raises exception with a fully qualified name.
  • [#33] mack-active_record now requires ActiveRecord 2.0.2 explicitly, not >=2.0.2
  • [#31] Added support for ruby-debug.
  • [#26] Log Coloring for console output.
  • [#24] Added mack-notifier support.
  • [#18] Added Page caching.
  • [#14] Data Factory
  • [#7] Added support for Extlib::Hook in a few places.
  • [#6] RJS support
  • Added a rake tmp:clear task.
  • gem: application_configuration 1.5.1
  • gem: ruby-debug 0.10.0
  • gem: data_mapper 0.9.3