Skip to content

Commit

Permalink
+ experimental MacRuby-specific extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
floere committed Feb 1, 2012
1 parent 1ae4aad commit 5fb64fb
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 7 deletions.
5 changes: 5 additions & 0 deletions history.textile
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
h2. Upcoming Version

h2. Version 4.2.1 "fries with that"

* hanke: (server) Experimental extensions to get Picky run on MacRuby 0.12.
* hanke: (server) Unfortunately, we dom't have the resources to always run the tests – please use with caution.

h2. Version 4.2.0 "talk to the hand"

* hanke: (server) Redesigned how Picky logs: Picky itself logs its index handling (tokenizing/dumping/loading) using one of its built-in loggers. Set a logger after requiring 'picky' like this: @Picky.logger = Picky::Loggers::Verbose.new(STDOUT) # or any IO@. Default is @Picky::Loggers::Concise.new(STDOUT)@ aka @Picky::Loggers::Default@. Also an option is @Picky::Loggers::Silent@. This closes "issue 70":https://github.com/floere/picky/issues/70.
Expand Down
12 changes: 7 additions & 5 deletions install
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ local_or_remote = ARGV.include?('REMOTE') ? '' : '--local'

require File.expand_path '../version', __FILE__

gem_command = 'gem'

puts "Installing all gems."
system "cd server; gem build picky.gemspec; gem install picky-*.gem #{local_or_remote} --no-rdoc --no-ri; rm picky-*.gem"
system "cd client; gem build picky-client.gemspec; gem install picky-client-*.gem #{local_or_remote} --no-rdoc --no-ri; rm picky-client-*.gem"
system "cd statistics; gem build picky-statistics.gemspec; gem install picky-statistics-*.gem #{local_or_remote} --no-rdoc --no-ri; rm picky-statistics-*.gem"
system "cd generators; gem build picky-generators.gemspec; gem install picky-generators-*.gem #{local_or_remote} --no-rdoc --no-ri; rm picky-generators-*.gem"
system "cd live; gem build picky-live.gemspec; gem install picky-live-*.gem #{local_or_remote} --no-rdoc --no-ri; rm picky-live-*.gem"
system "cd server; #{gem_command} build picky.gemspec; #{gem_command} install picky-*.gem #{local_or_remote} --no-rdoc --no-ri; rm picky-*.gem"
system "cd client; #{gem_command} build picky-client.gemspec; #{gem_command} install picky-client-*.gem #{local_or_remote} --no-rdoc --no-ri; rm picky-client-*.gem"
system "cd statistics; #{gem_command} build picky-statistics.gemspec; #{gem_command} install picky-statistics-*.gem #{local_or_remote} --no-rdoc --no-ri; rm picky-statistics-*.gem"
system "cd generators; #{gem_command} build picky-generators.gemspec; #{gem_command} install picky-generators-*.gem #{local_or_remote} --no-rdoc --no-ri; rm picky-generators-*.gem"
system "cd live; #{gem_command} build picky-live.gemspec; #{gem_command} install picky-live-*.gem #{local_or_remote} --no-rdoc --no-ri; rm picky-live-*.gem"
10 changes: 9 additions & 1 deletion server/lib/picky.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,15 @@ module Picky
require 'yajl'
require 'procrastinate'
require 'rack_fast_escape' if defined? Rack


# Check if platform specific modifiers need to be installed.
#

# Note: We don't use require_relative because MacRuby doesn't
# have it.
#
require File.expand_path '../picky/platforms/macruby', __FILE__

# Require the constants.
#
require_relative 'picky/constants'
Expand Down
20 changes: 20 additions & 0 deletions server/lib/picky/platforms/macruby.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# This tests if we are using MacRuby.
# If yes, it checks if we already have require_relative.
#
# TODO Remove (too verbose) message as soon as it is final.
#
if Kernel.respond_to?(:to_plist) && !Kernel.respond_to?(:require_relative)

puts "Installing Picky specific MacRuby extensions."

module Kernel

def require_relative relative_feature
file = caller.first.split(/:\d/,2).first
raise LoadError, "require_relative is called in #{$1}" if /\A\((.*)\)/ =~ file
require File.expand_path relative_feature, File.dirname(file)
end

end

end
2 changes: 1 addition & 1 deletion version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Picky
VERSION = '4.2.0'
VERSION = '4.2.1'
end

0 comments on commit 5fb64fb

Please sign in to comment.