feature_pack 0.1.2 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 48bfeabf660821f1ba14e60c86985bd9082a2075816e7c7d7a046b87d8d979a9
|
4
|
+
data.tar.gz: 3e634e8304a6b9a24faf0b209c953c2f7dbeaff39dd573c9ea9c24938c1301bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fbe55e58df6e1455f1a408c065ae6a1b307750cac4660e00452610b53714acf54853e1bf3f57723e5113b1b0cf27ec9c4e04755ca06284987c776295d2696c5b
|
7
|
+
data.tar.gz: 7587b5738e9c717a5b3105a19bee9e8d187e1a2e8e036d4c19b08336d6b7f124189df013bd2a4b25036a3132f6681f86cf8b1f54bda6d2ca260036f0f27fbbad
|
data/lib/feature_pack.rb
CHANGED
@@ -39,7 +39,7 @@ module FeaturePack
|
|
39
39
|
|
40
40
|
@@ignored_paths << @@path.join('feature_pack/feature_pack_routes.rb')
|
41
41
|
|
42
|
-
raise "No Groups found in: '#{@@features_path}'" if Dir.glob("#{@@features_path}/[!_]*/").empty?
|
42
|
+
# raise "No Groups found in: '#{@@features_path}'" if Dir.glob("#{@@features_path}/[!_]*/").empty?
|
43
43
|
|
44
44
|
@@groups = Dir.glob("#{@@features_path}/[!_]*/").map do |group_path|
|
45
45
|
relative_path = Pathname.new(group_path)
|
@@ -1,3 +1,6 @@
|
|
1
|
+
require 'rails/generators/base'
|
2
|
+
require 'rails/generators/named_base'
|
3
|
+
|
1
4
|
class FeaturePack::AddFeatureGenerator < Rails::Generators::NamedBase
|
2
5
|
desc 'Adds a new Feature'
|
3
6
|
source_root File.expand_path('templates', __dir__)
|
@@ -5,6 +8,8 @@ class FeaturePack::AddFeatureGenerator < Rails::Generators::NamedBase
|
|
5
8
|
argument :name, type: :string, required: true, desc: 'The name (sneak case) of the group to add'
|
6
9
|
|
7
10
|
def add_feature
|
11
|
+
raise "Feature name couldn't have more than one bar '/'" if name.count('/') > 1
|
12
|
+
|
8
13
|
@group_name, @feature_name = name.split('/')
|
9
14
|
@group = FeaturePack.group(@group_name.to_sym)
|
10
15
|
@group_class_name = @group_name.camelcase
|
@@ -1,11 +1,15 @@
|
|
1
|
+
require 'rails/generators/base'
|
2
|
+
require 'rails/generators/named_base'
|
3
|
+
|
1
4
|
class FeaturePack::AddGroupGenerator < Rails::Generators::NamedBase
|
2
|
-
|
5
|
+
|
3
6
|
desc 'Adds a new Feature Group'
|
4
7
|
source_root File.expand_path('templates', __dir__)
|
5
8
|
|
6
9
|
argument :name, type: :string, required: true, desc: 'The name (sneak case) of the group to add'
|
7
10
|
|
8
11
|
def create_feature_group
|
12
|
+
raise "Group name couldn't have '/'" if name.include?('/')
|
9
13
|
raise "Group '#{name}' already exists" if FeaturePack.group(name.to_sym).present?
|
10
14
|
|
11
15
|
@class_name = name.camelcase
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: feature_pack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gedean Dias
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-04-
|
11
|
+
date: 2024-04-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|