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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/feature_pack.rb +3 -1
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a23dab74045521da6f6195a32de0488b7b06c486e6c8761cae51e3b9c99fa19c
4
- data.tar.gz: 3e4f1e817575fadbf590fb1ab06882d297f6bacac5deb2a3386a4a338881b5d8
3
+ metadata.gz: 3bf9d3aa6e820a6f742b4711972ba1909f29ad24bcf713b7d0cd6fe892acb2ba
4
+ data.tar.gz: a051faf9458a3d1bff180b2496e86ac6c162d11f27d3f3291aa784ee29686d90
5
5
  SHA512:
6
- metadata.gz: 848a1bb410d23e07a400821552e2ac6f0c48325c522dfce9120f6011ed54501c6976525191619b49ed512f076dbb61b0f6537d932f4bce54df3127bccb501d68
7
- data.tar.gz: 2776ee2dd7ebf44304cdd3420d6068dee0ef0422c44b02f3dfc5734b117fd27c2733c0a973fb3cfcfcde3674d1ef1ced76630840965d2373fc655e96fb1ae723
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.javascript(javascript_file_name) = "#{base_dir}/#{GROUP_METADATA_DIRECTORY}/javascript/#{javascript_file_name}"
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: feature_pack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gedean Dias