forked from rrouse/has_friends
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
123 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,25 @@ | ||
require 'spec/rake/spectask' | ||
if defined?(Rspec) | ||
require 'spec/rake/spectask' | ||
|
||
namespace :has_friends do | ||
desc "Run all specs in spec directory (excluding plugin specs)" | ||
Spec::Rake::SpecTask.new(:spec) do |t| | ||
t.spec_files = FileList["spec/**/*_spec.rb"] | ||
namespace :has_friends do | ||
desc "Run all specs in spec directory (excluding plugin specs)" | ||
Spec::Rake::SpecTask.new(:spec) do |t| | ||
t.spec_files = FileList["spec/**/*_spec.rb"] | ||
end | ||
end | ||
end | ||
|
||
begin | ||
require 'jeweler' | ||
Jeweler::Tasks.new do |gemspec| | ||
gemspec.name = "has_friends-rails3" | ||
gemspec.summary = "Rails 3 version of has_friends gem" | ||
gemspec.description = "Rails 3 version of has_friends gem" | ||
gemspec.email = "[email protected]" | ||
gemspec.homepage = "http://github.com/rrouse/has_friends" | ||
gemspec.authors = ["Robert Rouse"] | ||
gemspec.files.include %w(lib/generators/**/*.rb) | ||
end | ||
rescue LoadError | ||
puts "Jeweler not available. Install it with: gem install jeweler" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# 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{has_friends-rails3} | ||
s.version = "0.0.0" | ||
|
||
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= | ||
s.authors = ["Robert Rouse"] | ||
s.date = %q{2010-07-24} | ||
s.description = %q{Rails 3 version of has_friends gem} | ||
s.email = %q{[email protected]} | ||
s.extra_rdoc_files = [ | ||
"README.markdown" | ||
] | ||
s.files = [ | ||
"MIT-LICENSE", | ||
"README.markdown", | ||
"RakeFile", | ||
"VERSION", | ||
"init.rb", | ||
"lib/exceptions.rb", | ||
"lib/friendship.rb", | ||
"lib/friendship_message.rb", | ||
"lib/friendship_relation_type.rb", | ||
"lib/generators/has_friends.rb", | ||
"lib/generators/has_friends/migration/migration_generator.rb", | ||
"lib/generators/has_friends/migration/templates/create_has_friends_tables.rb", | ||
"lib/has_friends.rb", | ||
"lib/relation_type.rb", | ||
"spec/fixtures/relation_types.yml", | ||
"spec/fixtures/users.yml", | ||
"spec/friendship_message_spec.rb", | ||
"spec/friendship_relation_type_spec.rb", | ||
"spec/friendship_spec.rb", | ||
"spec/has_friends_spec.rb", | ||
"spec/relation_type_spec.rb", | ||
"spec/schema.rb", | ||
"spec/spec_helper.rb" | ||
] | ||
s.homepage = %q{http://github.com/rrouse/has_friends} | ||
s.rdoc_options = ["--charset=UTF-8"] | ||
s.require_paths = ["lib"] | ||
s.rubygems_version = %q{1.3.7} | ||
s.summary = %q{Rails 3 version of has_friends gem} | ||
s.test_files = [ | ||
"spec/friendship_message_spec.rb", | ||
"spec/friendship_relation_type_spec.rb", | ||
"spec/friendship_spec.rb", | ||
"spec/has_friends_spec.rb", | ||
"spec/relation_type_spec.rb", | ||
"spec/schema.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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
require 'rails/generators/migration' | ||
|
||
module HasFriends | ||
module Generators | ||
class Base < Rails::Generators::Base | ||
|
||
include Rails::Generators::Migration | ||
|
||
def self.source_root | ||
@_has_friends_source_root ||= File.expand_path(File.join(File.dirname(__FILE__), 'has_friends', generator_name, 'templates')) | ||
end | ||
|
||
def self.next_migration_number(path) | ||
Time.now.utc.strftime("%Y%m%d%H%M%S") | ||
end | ||
|
||
end | ||
end | ||
end |
14 changes: 14 additions & 0 deletions
14
lib/generators/has_friends/migration/migration_generator.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
require 'generators/has_friends' | ||
|
||
module HasFriends | ||
module Generators | ||
class MigrationGenerator < Base | ||
desc "Generate has_friends migration" | ||
|
||
def create_migration_file | ||
migration_template "create_has_friends_tables.rb", File.join('db', 'migrate', "create_has_friends_tables.rb") | ||
end | ||
|
||
end | ||
end | ||
end |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
lib/generators/has_friends_migration/has_friends_migration_generator.rb
This file was deleted.
Oops, something went wrong.