has_phone_numbers 0.0.3 → 0.0.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.
data/CHANGELOG CHANGED
@@ -1,5 +1,9 @@
1
1
  *SVN*
2
2
 
3
+ *0.0.4* (June 22nd, 2008)
4
+
5
+ * Remove log files from gems
6
+
3
7
  *0.0.3* (May 5th, 2008)
4
8
 
5
9
  * Updated documentation
data/README CHANGED
@@ -46,6 +46,11 @@ modified for your own usage.
46
46
  Before you can run any tests, the following gem must be installed:
47
47
  * plugin_test_helper[http://wiki.pluginaweek.org/Plugin_test_helper]
48
48
 
49
+ To run against a specific version of Rails:
50
+
51
+ rake test RAILS_FRAMEWORK_ROOT=/path/to/rails
52
+
49
53
  == Dependencies
50
54
 
55
+ * Rails 2.1 or later
51
56
  * plugins_plus[http://wiki.pluginaweek.org/Plugins_plus]
data/Rakefile CHANGED
@@ -4,7 +4,7 @@ require 'rake/gempackagetask'
4
4
  require 'rake/contrib/sshpublisher'
5
5
 
6
6
  PKG_NAME = 'has_phone_numbers'
7
- PKG_VERSION = '0.0.3'
7
+ PKG_VERSION = '0.0.4'
8
8
  PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
9
9
  RUBY_FORGE_PROJECT = 'pluginaweek'
10
10
 
@@ -22,6 +22,7 @@ desc 'Generate documentation for the has_phone_numbers plugin.'
22
22
  Rake::RDocTask.new(:rdoc) do |rdoc|
23
23
  rdoc.rdoc_dir = 'rdoc'
24
24
  rdoc.title = 'HasPhoneNumbers'
25
+ rdoc.template = '../rdoc_template.rb'
25
26
  rdoc.options << '--line-numbers' << '--inline-source'
26
27
  rdoc.rdoc_files.include('README')
27
28
  rdoc.rdoc_files.include('lib/**/*.rb')
@@ -33,7 +34,7 @@ spec = Gem::Specification.new do |s|
33
34
  s.platform = Gem::Platform::RUBY
34
35
  s.summary = 'Demonstrates a reference implementation for handling phone numbers.'
35
36
 
36
- s.files = FileList['{app,db,lib,test}/**/*'].to_a + %w(CHANGELOG init.rb MIT-LICENSE Rakefile README)
37
+ s.files = FileList['{app,db,lib,test}/**/*'].to_a - FileList['test/app_root/log/*'].to_a + %w(CHANGELOG init.rb MIT-LICENSE Rakefile README)
37
38
  s.require_path = 'lib'
38
39
  s.autorequire = 'has_phone_numbers'
39
40
  s.has_rdoc = true
@@ -61,13 +62,13 @@ task :pdoc => [:rdoc] do
61
62
  end
62
63
 
63
64
  desc 'Publish the API docs and gem'
64
- task :publish => [:pdoc, :release]
65
+ task :publish => [:pgem, :pdoc, :release]
65
66
 
66
67
  desc 'Publish the release files to RubyForge.'
67
68
  task :release => [:gem, :package] do
68
69
  require 'rubyforge'
69
70
 
70
- ruby_forge = RubyForge.new
71
+ ruby_forge = RubyForge.new.configure
71
72
  ruby_forge.login
72
73
 
73
74
  %w( gem tgz zip ).each do |ext|
@@ -10,8 +10,9 @@ module PluginAWeek #:nodoc:
10
10
  module MacroMethods
11
11
  # Creates the following association:
12
12
  # * +phone_number+ - All phone numbers associated with the current record.
13
- def has_addresses
14
- has_many :phone_numbers
13
+ def has_phone_numbers
14
+ has_many :phone_numbers,
15
+ :as => :phoneable
15
16
  end
16
17
  end
17
18
  end
@@ -4,7 +4,7 @@ require 'rubygems'
4
4
  require 'plugin_test_helper'
5
5
 
6
6
  # Run the migrations
7
- ActiveRecord::Migrator.migrate("#{RAILS_ROOT}/db/migrate")
7
+ ActiveRecord::Migrator.migrate("#{Rails.root}/db/migrate")
8
8
 
9
9
  # Mixin the factory helper
10
10
  require File.expand_path("#{File.dirname(__FILE__)}/factory")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: has_phone_numbers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Pfeifer
@@ -9,7 +9,7 @@ autorequire: has_phone_numbers
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-05-05 00:00:00 -04:00
12
+ date: 2008-06-22 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -27,19 +27,20 @@ files:
27
27
  - db/migrate
28
28
  - db/migrate/001_create_phone_numbers.rb
29
29
  - lib/has_phone_numbers.rb
30
- - test/factory.rb
31
30
  - test/app_root
31
+ - test/app_root/app
32
+ - test/app_root/app/models
33
+ - test/app_root/app/models/person.rb
34
+ - test/app_root/config
35
+ - test/app_root/config/environment.rb
32
36
  - test/app_root/db
33
37
  - test/app_root/db/migrate
34
- - test/app_root/db/migrate/003_add_phone_number_kinds.rb
35
38
  - test/app_root/db/migrate/001_create_people.rb
36
39
  - test/app_root/db/migrate/002_migrate_has_phone_numbers_to_version_1.rb
37
- - test/app_root/config
38
- - test/app_root/config/environment.rb
39
- - test/app_root/app
40
- - test/app_root/app/models
41
- - test/app_root/app/models/person.rb
40
+ - test/app_root/db/migrate/003_add_phone_number_kinds.rb
41
+ - test/app_root/log
42
42
  - test/test_helper.rb
43
+ - test/factory.rb
43
44
  - test/unit
44
45
  - test/unit/phone_number_test.rb
45
46
  - CHANGELOG
@@ -69,7 +70,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
69
70
  requirements: []
70
71
 
71
72
  rubyforge_project:
72
- rubygems_version: 1.1.0
73
+ rubygems_version: 1.1.1
73
74
  signing_key:
74
75
  specification_version: 2
75
76
  summary: Demonstrates a reference implementation for handling phone numbers.