feature_pack 0.0.11 → 0.0.12
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 +3 -1
- 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: 3bf9d3aa6e820a6f742b4711972ba1909f29ad24bcf713b7d0cd6fe892acb2ba
|
4
|
+
data.tar.gz: a051faf9458a3d1bff180b2496e86ac6c162d11f27d3f3291aa784ee29686d90
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5db3e14640c50ca3e28cbadba86aff2f6d4e81d45df876367531fe627c97d585ee1d22368dbc3c6f391265c05ffce1794d234c60fc752cdbd536f81fc3a1205a
|
7
|
+
data.tar.gz: 2849317fc4a961625923871146fba9c48d8b91d15e8ba819c3b07a87a7cf57c40c966fd668ca18cf390befaed544193f5b4cc6598e08aa5e4dbc238fcdf7398f
|
data/lib/feature_pack.rb
CHANGED
@@ -65,7 +65,7 @@ module FeaturePack
|
|
65
65
|
def group.feature(feature_name) = features.find { |p| p.name.eql?(feature_name) }
|
66
66
|
def group.views_path = "#{base_dir}/#{GROUP_METADATA_DIRECTORY}/views"
|
67
67
|
def group.view(view_name) = "#{base_dir}/#{GROUP_METADATA_DIRECTORY}/views/#{view_name}"
|
68
|
-
def group.
|
68
|
+
def group.javascript_module(javascript_file_name) = "#{base_dir}/#{GROUP_METADATA_DIRECTORY}/javascript/#{javascript_file_name}"
|
69
69
|
|
70
70
|
# FIX-ME (decouple Params class)
|
71
71
|
# def group.params_class = "#{name.name.camelize}::Params".constantize
|
@@ -116,6 +116,7 @@ module FeaturePack
|
|
116
116
|
# controller_path: relative_path.join('controller'),
|
117
117
|
views_absolute_path: absolute_path.join('views'),
|
118
118
|
views_relative_path: relative_path.sub(/^#{Regexp.escape(@@features_path.to_s)}\//, '').join('views'),
|
119
|
+
javascript_relative_path: relative_path.sub(/^#{Regexp.escape(@@features_path.to_s)}\//, '').join('javascript'),
|
119
120
|
class_name: feature_class_name,
|
120
121
|
# FIX-ME (decouple Params class)
|
121
122
|
#params_class_name: params_class_name,
|
@@ -125,6 +126,7 @@ module FeaturePack
|
|
125
126
|
# FIX-ME (decouple Params class)
|
126
127
|
# def feature.params_class = params_class_name.constantize
|
127
128
|
def feature.view(view_name) = "#{views_relative_path}/#{view_name}"
|
129
|
+
def feature.javascript_module(javascript_file_name) = "#{javascript_relative_path}/#{javascript_file_name}"
|
128
130
|
|
129
131
|
group.features << feature
|
130
132
|
end
|