power_enum 2.4.0 → 2.5.0

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.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MWJlOGY4NzI4N2U5MWRhOGQwMGY3YjU2MjdlZjc4OTUyZjAxODNlZg==
4
+ MmQ1YzVmODM5NDQ2NjBjNjUyYjQ5NzFkZjMzZmQ0YWE0YzM0NTJkYg==
5
5
  data.tar.gz: !binary |-
6
- ZjYwNzI0MDhkZjFhMzRjOTQ0NDU5YmYxOTNlOGE0YjZjYTA0N2ZmZg==
6
+ ZTg4NjBkM2U0MTA3OWE3NDlkODRjNDUxYjdhNTZhYjVkNDM3MDI1Ng==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- OTdmNzI4ODY4ZjcyNGI5ODhlMmY4N2Y3ZGUxNGIxYTE4MjU5ODFlZjM3MzYz
10
- M2NmZDQ0NzJhYjNlYTlmNmIxMDJhNzc2OTgyY2MyZWFmODlmZDQxZGNhZjY0
11
- N2I1MWQ4MDQzNTUzZTIxNjQ5YTY4MmVmZTZhOGEwMTIwZTk0Mjc=
9
+ Y2U0Mzc0Yjk0NDJjZTllOTgwMzQ0NTQzNzcwZGQ3MTM1YTQ4NTJlY2IyYWIw
10
+ ZTRmNzkyODcyOGI0YmU2OTI5MjFkMzdiYmNlYmNjNTEyODZkODFjMDgzNWFi
11
+ ZWQ2NDE1NWVmNDJiNWUyNWYzZmQ2ZTVmY2NhYjczMzM3NWY0N2M=
12
12
  data.tar.gz: !binary |-
13
- NGJlZWE0M2ZjYjg0OTc2ZGFiYTljYWZjY2ZlODQ1ODZhODkwYTQyZWE4Y2Vh
14
- ZTYyZmUxNDI2ZWZkY2U1NzAzZjI3NTFhOTg5Y2E4ZGNiZGFlMGFiYmVjMTY1
15
- NWM3ZDZlYTI5OTM2NzczNTM5ZDE0ZTExMzg4NGIzM2JlYzczMmI=
13
+ OTk2NWNlMGZkNjk5ZjBmYTE2ZDY0NzU0YzM1ODU0YWQ5NDAyNzFiYzcxYjNh
14
+ Y2NlZGQ5NTQ1MzM0MzYxNGMxZWFhNjZiZTA2MmIzZmZhOTY3OTQyYzM4NjEz
15
+ YmU3NzhkMjg2MjAwYWUxM2ExNzIzN2JmNjdjODhiN2E1NmJkY2Q=
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -12,10 +12,9 @@ class EnumGenerator < Rails::Generators::NamedBase
12
12
  class_option :fixture, :type => :boolean, :default => false, :desc => 'Generate fixture for the enum'
13
13
  class_option :description, :type => :boolean, :default => false, :desc => "Add description to the enum"
14
14
 
15
-
16
15
  # Generates the enum ActiveRecord model.
17
16
  def generate_model
18
- template 'model.rb.erb', "app/models/#{file_name}.rb"
17
+ template 'model.rb.erb', File.join('app/models', class_path, "#{file_name}.rb")
19
18
  end
20
19
 
21
20
  # Generates the migration to create the enum table.
@@ -31,7 +30,7 @@ class EnumGenerator < Rails::Generators::NamedBase
31
30
 
32
31
  hook_for :test_framework, :as => :model do |enum_generator_instance, test_generator_class|
33
32
  # Need to do this because I'm changing the default value of the 'fixture' option.
34
- table_name = enum_generator_instance.send(:table_name)
35
- enum_generator_instance.invoke( test_generator_class, [table_name], { 'fixture' => enum_generator_instance.options.fixture? } )
33
+ class_name = enum_generator_instance.send(:class_name)
34
+ enum_generator_instance.invoke( test_generator_class, [class_name], { 'fixture' => enum_generator_instance.options.fixture? } )
36
35
  end
37
36
  end
@@ -1,3 +1,5 @@
1
+ <% module_namespacing do -%>
1
2
  class <%= class_name %> < ActiveRecord::Base
2
3
  acts_as_enumerated
3
4
  end
5
+ <% end -%>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: power_enum
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.0
4
+ version: 2.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Trevor Squires
@@ -41,7 +41,7 @@ cert_chain:
41
41
  L2xKOGNVV2ZuUytGU0lMVm5tSXJoUGZyRHF3CmluWG9GdW5CNzJFTDZvcHd1
42
42
  a2M3Y0Q5cFVtc05zVjBIZEFTdENHNWpPaGM1VHhMMVpYaFg4UXFlMmlOb25n
43
43
  PT0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo=
44
- date: 2014-03-27 00:00:00.000000000 Z
44
+ date: 2014-03-30 00:00:00.000000000 Z
45
45
  dependencies:
46
46
  - !ruby/object:Gem::Dependency
47
47
  name: rails
metadata.gz.sig CHANGED
@@ -1 +1 @@
1
- ������u�g������r�aFDf��JVZ/��N�I0�qk������>O1����#�K[x��9&%n�;U�/&�=μ�L9=�;�����yt��~���=�QȎ&#�ge*?�
1
+ �7���C�-���g�n�{a�tƩ'j��'l��3-�2�B�:p��{¢S�4����x��$ �{�n��BY-���$��aQ��������𦢽��E(�8�r�tf6r7�7^��h��� N�,/�<��Mvn8��߲$dJ7S!���]v�W���Nz�{�nBOsUn�0�� }P��r�Ӆrg/+��z�^� 1������ ��_1���ci��\�