Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Modernize!

  • Loading branch information...
commit 6a3f233524da4db56835b95e0c7d429b9046cf4d 1 parent 03a2a1b
@ezkl ezkl authored
Showing with 21 additions and 74 deletions.
  1. +6 −1 Gemfile
  2. +5 −50 Rakefile
  3. +10 −18 feedzirra.gemspec
  4. +0 −5 lib/feedzirra.rb
View
7 Gemfile
@@ -1,2 +1,7 @@
-source "http://rubygems.org"
+source :rubygems
+
gemspec
+
+group :development, :test do
+ gem 'rake'
+end
View
55 Rakefile
@@ -1,51 +1,6 @@
-require 'bundler'
-Bundler.setup
-
-require 'rake'
-require 'rdoc/task'
-require 'rspec'
+#!/usr/bin/env rake
+require "bundler/gem_tasks"
require 'rspec/core/rake_task'
-
-$LOAD_PATH.unshift File.expand_path('../lib', __FILE__)
-require 'feedzirra/version'
-
-def recent_specs(touched_since)
- recent_specs = FileList['app/**/*'].map do |path|
-
- if File.mtime(path) > touched_since
- spec = File.join('spec', File.dirname(path).split("/")[1..-1].join('/'),
- "#{File.basename(path, ".*")}_spec.rb")
- spec if File.exists?(spec)
- end
- end.compact
-
- recent_specs += FileList['spec/**/*_spec.rb'].select do |path|
- File.mtime(path) > touched_since
- end
- recent_specs.uniq
-end
-
-RSpec::Core::RakeTask.new do |t|
- t.pattern = FileList['spec/**/*_spec.rb']
-end
-
-desc 'Run recent specs'
-RSpec::Core::RakeTask.new("spec:recent") do |t|
- t.pattern = recent_specs(Time.now - 600) # 10 min.
-end
-
-RSpec::Core::RakeTask.new('spec:rcov') do |t|
- t.pattern = FileList['spec/**/*_spec.rb']
- t.rcov = true
- t.rcov_opts = ['--exclude', 'spec,/usr/lib/ruby,/usr/local,/var/lib,/Library', '--text-report']
-end
-
-RDoc::Task.new do |rd|
- rd.title = 'Feedzirra'
- rd.rdoc_dir = 'rdoc'
- rd.rdoc_files.include('README.rdoc', 'lib/feedzirra.rb', 'lib/feedzirra/**/*.rb')
- rd.options = ["--quiet", "--opname", "index.html", "--line-numbers", "--inline-source", '--main', 'README.rdoc']
-end
-
-desc "Run all the tests"
-task :default => :spec
+RSpec::Core::RakeTask.new(:spec)
+task :test => :spec
+task :default => :test
View
28 feedzirra.gemspec
@@ -1,36 +1,28 @@
# -*- encoding: utf-8 -*-
-lib = File.expand_path('../lib/', __FILE__)
-$:.unshift(lib) unless $:.include?(lib)
-
-require 'feedzirra/version'
+require File.expand_path('../lib/feedzirra/version', __FILE__)
Gem::Specification.new do |s|
s.name = 'feedzirra'
s.version = Feedzirra::VERSION
s.authors = ['Paul Dix', 'Julien Kirch']
- s.date = '2011-09-30'
+ s.date = Date.today
s.email = 'feedzirra@googlegroups.com'
s.homepage = 'http://github.com/pauldix/feedzirra'
s.summary = 'A feed fetching and parsing library'
s.description = 'A feed fetching and parsing library that treats the internet like Godzilla treats Japan: it dominates and eats all.'
+ s.files = `git ls-files`.split("\n")
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
s.require_paths = ['lib']
- s.files = Dir['{lib,spec}/**/*.rb'] + %w[README.rdoc Rakefile .rspec]
- s.test_files = Dir['spec/**/*.rb']
-
+
s.platform = Gem::Platform::RUBY
- s.add_runtime_dependency 'nokogiri', ['>= 1.4.4']
- s.add_runtime_dependency 'sax-machine', ['~> 0.1.0']
- s.add_runtime_dependency 'curb', ['~> 0.7.15']
- s.add_runtime_dependency 'builder', ['>= 2.1.2']
- s.add_runtime_dependency 'activesupport', ['~> 3.1.1']
- s.add_runtime_dependency 'loofah', ['~> 1.2.0']
- s.add_runtime_dependency 'rdoc', ['~> 3.8']
- s.add_runtime_dependency 'rake', ['>= 0.8.7']
- s.add_runtime_dependency 'i18n', ['>= 0.5.0']
+ s.add_dependency 'nokogiri', '~> 1.5.2'
+ s.add_dependency 'sax-machine', '~> 0.1.0'
+ s.add_dependency 'curb', '~> 0.8.0'
+ s.add_dependency 'loofah', '~> 1.2.1'
- s.add_development_dependency 'rspec', ['~> 2.6.0']
+ s.add_development_dependency 'rspec', '~> 2.10.0'
end
View
5 lib/feedzirra.rb
@@ -4,11 +4,6 @@
require 'loofah'
require 'uri'
-require 'active_support/basic_object'
-require 'active_support/core_ext/module'
-require 'active_support/core_ext/object'
-require 'active_support/time'
-
require 'feedzirra/core_ext'
module Feedzirra
Please sign in to comment.
Something went wrong with that request. Please try again.