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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/feature_pack.rb +4 -18
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3bf9d3aa6e820a6f742b4711972ba1909f29ad24bcf713b7d0cd6fe892acb2ba
4
- data.tar.gz: a051faf9458a3d1bff180b2496e86ac6c162d11f27d3f3291aa784ee29686d90
3
+ metadata.gz: 6179f7660df61e21c40abe3fd488e17a2ab990464f63990e9fd9e3ee1522ccd3
4
+ data.tar.gz: 76784481d09a8c2a6d4689696cce2d6395252bce483ec38e8b7ffd08b6987e20
5
5
  SHA512:
6
- metadata.gz: 5db3e14640c50ca3e28cbadba86aff2f6d4e81d45df876367531fe627c97d585ee1d22368dbc3c6f391265c05ffce1794d234c60fc752cdbd536f81fc3a1205a
7
- data.tar.gz: 2849317fc4a961625923871146fba9c48d8b91d15e8ba819c3b07a87a7cf57c40c966fd668ca18cf390befaed544193f5b4cc6598e08aa5e4dbc238fcdf7398f
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
- # FIX-ME (decouple Params class)
127
- # def feature.params_class = params_class_name.constantize
128
- def feature.view(view_name) = "#{views_relative_path}/#{view_name}"
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
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.12
4
+ version: 0.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gedean Dias