Skip to content
Browse files

Now using Bundler.

  • Loading branch information...
1 parent 6dbc66c commit 77306c804ab97f7b9958d38564e6532d1443ff23 @fnando committed Aug 15, 2011
Showing with 69 additions and 68 deletions.
  1. +2 −0 Gemfile
  2. +43 −0 Gemfile.lock
  3. +5 −20 Rakefile
  4. +15 −37 browser.gemspec
  5. +1 −11 test/browser_test.rb
  6. +3 −0 test/test_helper.rb
View
2 Gemfile
@@ -0,0 +1,2 @@
+source "http://gems.simplesideias.com.br"
+gemspec
View
43 Gemfile.lock
@@ -0,0 +1,43 @@
+PATH
+ remote: .
+ specs:
+ browser (0.1.3)
+
+GEM
+ remote: http://gems.simplesideias.com.br/
+ specs:
+ abstract (1.0.0)
+ actionpack (3.0.9)
+ activemodel (= 3.0.9)
+ activesupport (= 3.0.9)
+ builder (~> 2.1.2)
+ erubis (~> 2.6.6)
+ i18n (~> 0.5.0)
+ rack (~> 1.2.1)
+ rack-mount (~> 0.6.14)
+ rack-test (~> 0.5.7)
+ tzinfo (~> 0.3.23)
+ activemodel (3.0.9)
+ activesupport (= 3.0.9)
+ builder (~> 2.1.2)
+ i18n (~> 0.5.0)
+ activesupport (3.0.9)
+ builder (2.1.2)
+ erubis (2.6.6)
+ abstract (>= 1.0.0)
+ i18n (0.5.0)
+ rack (1.2.3)
+ rack-mount (0.6.14)
+ rack (>= 1.0.0)
+ rack-test (0.5.7)
+ rack (>= 1.0)
+ rake (0.9.2)
+ tzinfo (0.3.29)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ actionpack (~> 3.0)
+ browser!
+ rake (~> 0.9)
View
25 Rakefile
@@ -1,7 +1,9 @@
-require "rake/testtask"
-require "rake/rdoctask"
+require "bundler"
+Bundler::GemHelper.install_tasks
+
require "./lib/browser/version"
+require "rake/testtask"
Rake::TestTask.new do |t|
t.libs << "lib"
t.libs << "test"
@@ -10,6 +12,7 @@ Rake::TestTask.new do |t|
t.ruby_opts = %w[-rubygems]
end
+require "rdoc/task"
Rake::RDocTask.new do |rdoc|
rdoc.main = "README.rdoc"
rdoc.rdoc_dir = "doc"
@@ -18,21 +21,3 @@ Rake::RDocTask.new do |rdoc|
rdoc.rdoc_files.include("README.rdoc")
rdoc.rdoc_files.include("lib/**/*.rb")
end
-
-begin
- require "jeweler"
-
- Jeweler::Tasks.new do |gem|
- gem.name = "browser"
- gem.email = "fnando.vieira@gmail.com"
- gem.homepage = "http://github.com/fnando/browser"
- gem.authors = ["Nando Vieira"]
- gem.version = Browser::Version::STRING
- gem.summary = "Do some browser detection with Ruby."
- gem.files = FileList["README.rdoc", "{lib,test}/**/*", "Rakefile"]
- end
-
- Jeweler::GemcutterTasks.new
-rescue LoadError => e
- puts "You need to install jeweler to build this gem."
-end
View
52 browser.gemspec
@@ -1,44 +1,22 @@
-# Generated by jeweler
-# DO NOT EDIT THIS FILE DIRECTLY
-# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
# -*- encoding: utf-8 -*-
+$:.push File.expand_path("../lib", __FILE__)
+require "browser/version"
Gem::Specification.new do |s|
- s.name = %q{browser}
- s.version = "0.1.2"
+ s.name = "browser"
+ s.version = Browser::Version::STRING
+ s.platform = Gem::Platform::RUBY
+ s.authors = ["Nando Vieira"]
+ s.email = ["fnando.vieira@gmail.com"]
+ s.homepage = "http://github.com/fnando/browser"
+ s.summary = "Do some browser detection with Ruby."
+ s.description = s.summary
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
- s.authors = ["Nando Vieira"]
- s.date = %q{2010-10-28}
- s.email = %q{fnando.vieira@gmail.com}
- s.extra_rdoc_files = [
- "README.rdoc"
- ]
- s.files = [
- "README.rdoc",
- "Rakefile",
- "lib/browser.rb",
- "lib/browser/action_controller.rb",
- "lib/browser/version.rb",
- "test/browser_test.rb"
- ]
- s.homepage = %q{http://github.com/fnando/browser}
- s.rdoc_options = ["--charset=UTF-8"]
+ s.files = `git ls-files`.split("\n")
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
s.require_paths = ["lib"]
- s.rubygems_version = %q{1.3.7}
- s.summary = %q{Do some browser detection with Ruby.}
- s.test_files = [
- "test/browser_test.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
+ s.add_development_dependency "actionpack" , "~> 3.0"
+ s.add_development_dependency "rake" , "~> 0.9"
end
-
View
12 test/browser_test.rb
@@ -1,14 +1,4 @@
-require "test/unit"
-
-begin
- require "action_controller"
-rescue LoadError => e
- require "rubygems"
- require "action_controller"
-end
-
-require "browser"
-
+require "test_helper"
class BrowserTest < Test::Unit::TestCase
IPHONE = "Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_0 like Mac OS X; en-us) AppleWebKit/420.1 (KHTML, like Gecko) Version/3.0 Mobile/1A542a Safari/419.3"
View
3 test/test_helper.rb
@@ -0,0 +1,3 @@
+require "test/unit"
+require "action_controller"
+require "browser"

0 comments on commit 77306c8

Please sign in to comment.
Something went wrong with that request. Please try again.