habtm_generator 0.1 → 0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: b240c06d0c86b72373164647ed1f125292dc675b
4
+ data.tar.gz: be957e436140cf06fef5e29db763307e5527abc6
5
+ SHA512:
6
+ metadata.gz: b9e5479263091f96842468b8e7907c641493336db1f9fee8a6df79833bb341dc6c539c2aa6e5009608a08eacfa3b25fff0f0a4b9b4bbcab68b9f39c956b91429
7
+ data.tar.gz: 09d051d3361acacf75a6f9d4eafb6864ebada17abd0c98f4dec3da11a45bf49762f69cf3681481a9a004538f8ac53cf7844bab6e9f6e735e0198b8c116ca2630
data/README.md CHANGED
@@ -5,15 +5,12 @@
5
5
 
6
6
  Add this line to your application's Gemfile:
7
7
 
8
- gem 'habtm_generator'
8
+ gem 'habtm_generator', :group => :development
9
9
 
10
10
  And then execute:
11
11
 
12
12
  $ bundle
13
13
 
14
- Or install it yourself as:
15
-
16
- $ gem install habtm_generator
17
14
 
18
15
  ## Usage
19
16
 
@@ -33,3 +30,4 @@ This process is reversible (with ``rails destroy habtm model1 model2``).
33
30
  ## Potential Caveats
34
31
 
35
32
  * Namespaced models will not work
33
+ * unique-constraint on index. I find this most useful for most situations. Just remove that from the generated migration before rake db:migrate
@@ -12,6 +12,6 @@ Gem::Specification.new do |gem|
12
12
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
13
13
  gem.name = "habtm_generator"
14
14
  gem.require_paths = ["lib"]
15
- gem.version = "0.1"
16
- gem.add_dependency "activerecord", ">3.1"
15
+ gem.version = "0.2"
16
+ gem.add_dependency "activerecord", "~> 4.1.0.rc1"
17
17
  end
@@ -5,7 +5,7 @@ class HabtmGenerator < ActiveRecord::Generators::Base
5
5
  argument :other_model, required: true,
6
6
  type: :string, desc: "List both part of the habtm migration to generate the table"
7
7
 
8
- def create_migration
8
+ def create_migration_file
9
9
  models.map!{|i|i.singularize}
10
10
  migration_template "habtm_migration.rb.erb",
11
11
  "db/migrate/#{migration_name}.rb"
metadata CHANGED
@@ -1,27 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: habtm_generator
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.1'
5
- prerelease:
4
+ version: '0.2'
6
5
  platform: ruby
7
6
  authors:
8
7
  - Stefan Wienert
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-08-10 00:00:00.000000000 Z
11
+ date: 2014-02-24 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: activerecord
16
- requirement: &29538100 !ruby/object:Gem::Requirement
17
- none: false
15
+ requirement: !ruby/object:Gem::Requirement
18
16
  requirements:
19
- - - ! '>'
17
+ - - ~>
20
18
  - !ruby/object:Gem::Version
21
- version: '3.1'
19
+ version: 4.1.0.rc1
22
20
  type: :runtime
23
21
  prerelease: false
24
- version_requirements: *29538100
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: 4.1.0.rc1
25
27
  description: Generates has-and-belongs-to-many migrations. Use rails generate habtm
26
28
  model1 model2
27
29
  email:
@@ -41,28 +43,26 @@ files:
41
43
  - lib/generators/habtm/templates/habtm_migration.rb.erb
42
44
  homepage: https://github.com/zealot128/ruby-habtm-generator
43
45
  licenses: []
46
+ metadata: {}
44
47
  post_install_message:
45
48
  rdoc_options: []
46
49
  require_paths:
47
50
  - lib
48
51
  required_ruby_version: !ruby/object:Gem::Requirement
49
- none: false
50
52
  requirements:
51
- - - ! '>='
53
+ - - '>='
52
54
  - !ruby/object:Gem::Version
53
55
  version: '0'
54
56
  required_rubygems_version: !ruby/object:Gem::Requirement
55
- none: false
56
57
  requirements:
57
- - - ! '>='
58
+ - - '>='
58
59
  - !ruby/object:Gem::Version
59
60
  version: '0'
60
61
  requirements: []
61
62
  rubyforge_project:
62
- rubygems_version: 1.8.10
63
+ rubygems_version: 2.2.0
63
64
  signing_key:
64
- specification_version: 3
65
+ specification_version: 4
65
66
  summary: Generates has-and-belongs-to-many migrations. Use rails generate habtm model1
66
67
  model2
67
68
  test_files: []
68
- has_rdoc: