power_enum 2.4.0 → 2.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/generators/enum/enum_generator.rb +3 -4
- data/lib/generators/enum/templates/model.rb.erb +2 -0
- metadata +2 -2
- metadata.gz.sig +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MmQ1YzVmODM5NDQ2NjBjNjUyYjQ5NzFkZjMzZmQ0YWE0YzM0NTJkYg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZTg4NjBkM2U0MTA3OWE3NDlkODRjNDUxYjdhNTZhYjVkNDM3MDI1Ng==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
Y2U0Mzc0Yjk0NDJjZTllOTgwMzQ0NTQzNzcwZGQ3MTM1YTQ4NTJlY2IyYWIw
|
10
|
+
ZTRmNzkyODcyOGI0YmU2OTI5MjFkMzdiYmNlYmNjNTEyODZkODFjMDgzNWFi
|
11
|
+
ZWQ2NDE1NWVmNDJiNWUyNWYzZmQ2ZTVmY2NhYjczMzM3NWY0N2M=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OTk2NWNlMGZkNjk5ZjBmYTE2ZDY0NzU0YzM1ODU0YWQ5NDAyNzFiYzcxYjNh
|
14
|
+
Y2NlZGQ5NTQ1MzM0MzYxNGMxZWFhNjZiZTA2MmIzZmZhOTY3OTQyYzM4NjEz
|
15
|
+
YmU3NzhkMjg2MjAwYWUxM2ExNzIzN2JmNjdjODhiN2E1NmJkY2Q=
|
checksums.yaml.gz.sig
CHANGED
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',
|
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
|
-
|
35
|
-
enum_generator_instance.invoke( test_generator_class, [
|
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
|
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
|
+
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-
|
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
|
-
|
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�,/�<��M�v�n8��߲$dJ7S!���]�v�W���Nz�{�nBOsUn�0�� }�P��r�Ӆr�g/+��z�^�1������ ��_1���ci��\�
|