feature_pack 0.0.12 → 0.0.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/feature_pack.rb +4 -18
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6179f7660df61e21c40abe3fd488e17a2ab990464f63990e9fd9e3ee1522ccd3
|
4
|
+
data.tar.gz: 76784481d09a8c2a6d4689696cce2d6395252bce483ec38e8b7ffd08b6987e20
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5de380605fddc14a55ab916c5bc6419fb875fc7a1b26ac0485479c534d6bd8291d77a093a1c2e325ff22954ea529ab91d43ef4a1fb57135acb40cd1a9ebd7ed9
|
7
|
+
data.tar.gz: 4c20379664b0857a98c65baa7071bc094f3002790b96e8316423020078a60bad12a7142ce6d83e01df0c023b3f308865e4a753bd8cf65303aeae86a8f26685fb
|
data/lib/feature_pack.rb
CHANGED
@@ -67,14 +67,6 @@ module FeaturePack
|
|
67
67
|
def group.view(view_name) = "#{base_dir}/#{GROUP_METADATA_DIRECTORY}/views/#{view_name}"
|
68
68
|
def group.javascript_module(javascript_file_name) = "#{base_dir}/#{GROUP_METADATA_DIRECTORY}/javascript/#{javascript_file_name}"
|
69
69
|
|
70
|
-
# FIX-ME (decouple Params class)
|
71
|
-
# def group.params_class = "#{name.name.camelize}::Params".constantize
|
72
|
-
# def group.manifest_class = "#{name.name.camelize}::Manifest".constantize
|
73
|
-
|
74
|
-
# FIX-ME (decouple Params class)
|
75
|
-
# def group.params = params_class.new(group.manifest)
|
76
|
-
# def group.manifest = manifest
|
77
|
-
|
78
70
|
group
|
79
71
|
end
|
80
72
|
|
@@ -85,10 +77,6 @@ module FeaturePack
|
|
85
77
|
base_path = File.basename(feature_path, File::SEPARATOR)
|
86
78
|
|
87
79
|
feature_name = base_path.gsub(FEATURE_ID_PATTERN, '').to_sym
|
88
|
-
feature_class_name = "#{group.name.name.camelize}::#{feature_name.name.camelize}"
|
89
|
-
|
90
|
-
# FIX-ME (decouple Params class)
|
91
|
-
# params_class_name = "#{feature_pack_class_name}::Params"
|
92
80
|
|
93
81
|
routes_file_path = relative_path.join('routes.rb')
|
94
82
|
|
@@ -117,15 +105,13 @@ module FeaturePack
|
|
117
105
|
views_absolute_path: absolute_path.join('views'),
|
118
106
|
views_relative_path: relative_path.sub(/^#{Regexp.escape(@@features_path.to_s)}\//, '').join('views'),
|
119
107
|
javascript_relative_path: relative_path.sub(/^#{Regexp.escape(@@features_path.to_s)}\//, '').join('javascript'),
|
120
|
-
class_name: feature_class_name,
|
121
|
-
# FIX-ME (decouple Params class)
|
122
|
-
#params_class_name: params_class_name,
|
123
108
|
manifest: YAML.load_file(File.join(feature_path, MANIFEST_FILE_NAME)).deep_symbolize_keys
|
124
109
|
)
|
125
110
|
|
126
|
-
|
127
|
-
|
128
|
-
|
111
|
+
def feature.class_name = "FeaturePack::#{group.name.name.camelize}::#{name.name.camelize}"
|
112
|
+
def feature.namespace = class_name.constantize
|
113
|
+
|
114
|
+
def feature.view(view_name) = "#{views_relative_path}/#{view_name}"
|
129
115
|
def feature.javascript_module(javascript_file_name) = "#{javascript_relative_path}/#{javascript_file_name}"
|
130
116
|
|
131
117
|
group.features << feature
|