From fd080736f2bffeac027da52dc0f0409bb163409b Mon Sep 17 00:00:00 2001 From: Jon Guymon Date: Thu, 7 Oct 2010 17:12:41 -0400 Subject: [PATCH 1/3] gem config --- Rakefile | 15 ++++++++++++++ init.rb | 8 +------ mobile_fu.gemspec | 53 +++++++++++++++++++++++++++++++++++++++++++++++ rails/init.rb | 7 +++++++ 4 files changed, 76 insertions(+), 7 deletions(-) create mode 100644 mobile_fu.gemspec create mode 100644 rails/init.rb diff --git a/Rakefile b/Rakefile index de861dd..ddfcdc9 100644 --- a/Rakefile +++ b/Rakefile @@ -2,6 +2,20 @@ require 'rake' require 'rake/testtask' require 'rake/rdoctask' +begin + require 'jeweler' + Jeweler::Tasks.new do |gemspec| + gemspec.name = "mobile_fu" + gemspec.summary = "Automatically detect mobile devices that access your Rails application" + gemspec.description = "Want to automatically detect mobile devices that access your Rails application? Mobile Fu allows you to do just that. People can access your site from a Palm, Blackberry, iPhone, iPad, Nokia, etc. and it will automatically adjust the format of the request from :html to :mobile." + gemspec.email = "brendangl@gmail.com" + gemspec.homepage = "http://github.com/brendanlim/mobile-fu" + gemspec.authors = ["Brendan G. Lim"] + end +rescue LoadError + puts "Jeweler not available. Install it with: gem install jeweler" +end + desc 'Default: run unit tests.' task :default => :test @@ -20,3 +34,4 @@ Rake::RDocTask.new(:rdoc) do |rdoc| rdoc.rdoc_files.include('README') rdoc.rdoc_files.include('lib/**/*.rb') end + diff --git a/init.rb b/init.rb index d34defd..e4a03c2 100644 --- a/init.rb +++ b/init.rb @@ -1,7 +1 @@ -require File.dirname(__FILE__) + '/lib/mobile_fu_helper.rb' -require File.dirname(__FILE__) + '/lib/mobilized_styles' -require File.dirname(__FILE__) + '/lib/mobile_fu' - -ActionView::Base.send(:include, MobileFuHelper) -ActionView::Base.send(:include, MobilizedStyles) -ActionView::Base.send(:alias_method_chain, :stylesheet_link_tag, :mobilization) \ No newline at end of file +require File.dirname(__FILE__)+'/rails/init.rb' diff --git a/mobile_fu.gemspec b/mobile_fu.gemspec new file mode 100644 index 0000000..53b9d86 --- /dev/null +++ b/mobile_fu.gemspec @@ -0,0 +1,53 @@ +# Generated by jeweler +# DO NOT EDIT THIS FILE DIRECTLY +# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command +# -*- encoding: utf-8 -*- + +Gem::Specification.new do |s| + s.name = %q{mobile_fu} + s.version = "0.3.0" + + s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= + s.authors = ["Brendan G. Lim"] + s.date = %q{2010-10-07} + s.description = %q{Want to automatically detect mobile devices that access your Rails application? Mobile Fu allows you to do just that. People can access your site from a Palm, Blackberry, iPhone, iPad, Nokia, etc. and it will automatically adjust the format of the request from :html to :mobile.} + s.email = %q{brendangl@gmail.com} + s.extra_rdoc_files = [ + "README.rdoc" + ] + s.files = [ + "CHANGELOG", + "MIT-LICENSE", + "README.rdoc", + "Rakefile", + "init.rb", + "install.rb", + "lib/mobile_fu.rb", + "lib/mobile_fu_helper.rb", + "lib/mobilized_styles.rb", + "spec/mobilized_styles_spec.rb", + "spec/spec.opts", + "spec/spec_helper.rb", + "uninstall.rb" + ] + s.homepage = %q{http://github.com/brendanlim/mobile-fu} + s.rdoc_options = ["--charset=UTF-8"] + s.require_paths = ["lib"] + s.rubygems_version = %q{1.3.7} + s.summary = %q{Automatically detect mobile devices that access your Rails application} + s.test_files = [ + "spec/mobilized_styles_spec.rb", + "spec/spec_helper.rb" + ] + + if s.respond_to? :specification_version then + current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION + s.specification_version = 3 + + if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then + else + end + else + end +end + diff --git a/rails/init.rb b/rails/init.rb new file mode 100644 index 0000000..d34defd --- /dev/null +++ b/rails/init.rb @@ -0,0 +1,7 @@ +require File.dirname(__FILE__) + '/lib/mobile_fu_helper.rb' +require File.dirname(__FILE__) + '/lib/mobilized_styles' +require File.dirname(__FILE__) + '/lib/mobile_fu' + +ActionView::Base.send(:include, MobileFuHelper) +ActionView::Base.send(:include, MobilizedStyles) +ActionView::Base.send(:alias_method_chain, :stylesheet_link_tag, :mobilization) \ No newline at end of file From c928fe90335e6ad358eb10df667276af05ccade6 Mon Sep 17 00:00:00 2001 From: Jon Guymon Date: Thu, 7 Oct 2010 17:19:30 -0400 Subject: [PATCH 2/3] gem config --- VERSION | 1 + 1 file changed, 1 insertion(+) create mode 100644 VERSION diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..0d91a54 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +0.3.0 From f6375b7986e5e1f93206e31226d69444ed6abc83 Mon Sep 17 00:00:00 2001 From: Jon Guymon Date: Fri, 8 Oct 2010 09:42:55 -0400 Subject: [PATCH 3/3] working on correct gemspec --- mobile_fu.gemspec | 5 ++++- rails/init.rb | 8 ++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/mobile_fu.gemspec b/mobile_fu.gemspec index 53b9d86..6b7cb68 100644 --- a/mobile_fu.gemspec +++ b/mobile_fu.gemspec @@ -9,7 +9,7 @@ Gem::Specification.new do |s| s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.authors = ["Brendan G. Lim"] - s.date = %q{2010-10-07} + s.date = %q{2010-10-08} s.description = %q{Want to automatically detect mobile devices that access your Rails application? Mobile Fu allows you to do just that. People can access your site from a Palm, Blackberry, iPhone, iPad, Nokia, etc. and it will automatically adjust the format of the request from :html to :mobile.} s.email = %q{brendangl@gmail.com} s.extra_rdoc_files = [ @@ -20,11 +20,14 @@ Gem::Specification.new do |s| "MIT-LICENSE", "README.rdoc", "Rakefile", + "VERSION", "init.rb", "install.rb", "lib/mobile_fu.rb", "lib/mobile_fu_helper.rb", "lib/mobilized_styles.rb", + "mobile_fu.gemspec", + "rails/init.rb", "spec/mobilized_styles_spec.rb", "spec/spec.opts", "spec/spec_helper.rb", diff --git a/rails/init.rb b/rails/init.rb index d34defd..4aa97bf 100644 --- a/rails/init.rb +++ b/rails/init.rb @@ -1,7 +1,7 @@ -require File.dirname(__FILE__) + '/lib/mobile_fu_helper.rb' -require File.dirname(__FILE__) + '/lib/mobilized_styles' -require File.dirname(__FILE__) + '/lib/mobile_fu' +require File.dirname(__FILE__) + '/../lib/mobile_fu_helper.rb' +require File.dirname(__FILE__) + '/../lib/mobilized_styles' +require File.dirname(__FILE__) + '/../lib/mobile_fu' ActionView::Base.send(:include, MobileFuHelper) ActionView::Base.send(:include, MobilizedStyles) -ActionView::Base.send(:alias_method_chain, :stylesheet_link_tag, :mobilization) \ No newline at end of file +ActionView::Base.send(:alias_method_chain, :stylesheet_link_tag, :mobilization)