defender 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module Defender
2
- VERSION = '1.0.2'
2
+ VERSION = '1.0.3'
3
3
  end
@@ -0,0 +1,9 @@
1
+ Description:
2
+ Creates a migration that adds defender fields to the table of your choice.
3
+ Pass the model name, either CamelCased or under_scored, as an argument.
4
+
5
+ Example:
6
+ rails generate defender Comment
7
+
8
+ creates a migration for the Comment model:
9
+ db/migrate/12345678901234_add_defender_to_comments.rb
@@ -0,0 +1,11 @@
1
+ require 'rails/generators'
2
+
3
+ class DefenderGenerator < Rails::Generators::NamedBase
4
+ def self.source_root
5
+ File.join(File.dirname(__FILE__), 'templates')
6
+ end
7
+
8
+ def create_migration
9
+ generate(:migration, "add_defender_to_#{table_name} defensio_signature:string spaminess:float spam:boolean")
10
+ end
11
+ end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 0
8
- - 2
9
- version: 1.0.2
8
+ - 3
9
+ version: 1.0.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Henrik Hodne
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-04-25 00:00:00 +02:00
17
+ date: 2010-04-28 00:00:00 +02:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -83,9 +83,11 @@ extensions: []
83
83
  extra_rdoc_files: []
84
84
 
85
85
  files:
86
+ - lib/generators/defender/defender_generator.rb
87
+ - lib/generators/defender/USAGE
88
+ - lib/defender.rb
86
89
  - lib/defender/document.rb
87
90
  - lib/defender/version.rb
88
- - lib/defender.rb
89
91
  - LICENSE
90
92
  - README.md
91
93
  has_rdoc: true