party_boy 0.3.3 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,11 +4,13 @@ Models relationships between AR models. Allows you to follow, friend, and block
4
4
 
5
5
  == Installation
6
6
 
7
+ If you're running rails 2 use gem version 0.3.2 or the rails-2 branch.
8
+
7
9
  Install the gem
8
10
  gem install party_boy
9
11
 
10
12
  Run the generator
11
- script/generate party_boy
13
+ rails generate party_boy
12
14
 
13
15
  This will generate a migration file as well as the necessary Relationship class in your models folder.
14
16
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.3
1
+ 0.3.4
@@ -0,0 +1,20 @@
1
+ require 'rails/generators/migration'
2
+
3
+ class PartyBoyGenerator < Rails::Generators::Base
4
+ include Rails::Generators::Migration
5
+
6
+ source_root File.expand_path('../templates', __FILE__)
7
+
8
+ def self.next_migration_number(dirname)
9
+ if ActiveRecord::Base.timestamped_migrations
10
+ Time.now.utc.strftime("%Y%m%d%H%M%S")
11
+ else
12
+ "%.3d" % (current_migration_number(dirname) + 1)
13
+ end
14
+ end
15
+
16
+ def create_model_file
17
+ copy_file "model.rb", "app/models/relationship.rb"
18
+ migration_template "migration.rb", "db/migrate/create_relationship.rb"
19
+ end
20
+ end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{party_boy}
8
- s.version = "0.3.3"
8
+ s.version = "0.3.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Mike Nelson"]
12
- s.date = %q{2012-01-17}
12
+ s.date = %q{2012-02-01}
13
13
  s.description = %q{Models relationships between AR models. Allows you to follow, friend, and block other AR's. Consists of two mixins: acts_as_followable and acts_as_friend. These options allow an AR to inherit either a twitter-like follower system or a facebook-like friend system.}
14
14
  s.email = %q{mdnelson30@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -22,9 +22,9 @@ Gem::Specification.new do |s|
22
22
  "README.rdoc",
23
23
  "Rakefile",
24
24
  "VERSION",
25
- "generators/party_boy/party_boy_generator.rb",
26
- "generators/party_boy/templates/migration.rb",
27
- "generators/party_boy/templates/model.rb",
25
+ "lib/generators/party_boy/party_boy_generator.rb",
26
+ "lib/generators/party_boy/templates/migration.rb",
27
+ "lib/generators/party_boy/templates/model.rb",
28
28
  "lib/party_boy.rb",
29
29
  "party_boy.gemspec",
30
30
  "spec/models/both_class.rb",
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: party_boy
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 3
10
- version: 0.3.3
9
+ - 4
10
+ version: 0.3.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Mike Nelson
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-01-17 00:00:00 -05:00
18
+ date: 2012-02-01 00:00:00 -08:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -49,9 +49,9 @@ files:
49
49
  - README.rdoc
50
50
  - Rakefile
51
51
  - VERSION
52
- - generators/party_boy/party_boy_generator.rb
53
- - generators/party_boy/templates/migration.rb
54
- - generators/party_boy/templates/model.rb
52
+ - lib/generators/party_boy/party_boy_generator.rb
53
+ - lib/generators/party_boy/templates/migration.rb
54
+ - lib/generators/party_boy/templates/model.rb
55
55
  - lib/party_boy.rb
56
56
  - party_boy.gemspec
57
57
  - spec/models/both_class.rb
@@ -1,14 +0,0 @@
1
- class PartyBoyGenerator < Rails::Generator::Base
2
- def manifest
3
- record do |m|
4
- m.directory "app/models"
5
- m.template "model.rb", "app/models/relationship.rb"
6
-
7
- m.migration_template 'migration.rb', 'db/migrate'
8
- end
9
- end
10
-
11
- def file_name
12
- "party_boy_migration"
13
- end
14
- end