toggles 0.0.2 → 0.0.3
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 +4 -4
- data/.gitignore +3 -3
- data/lib/toggles/feature.rb +20 -16
- data/toggles.gemspec +1 -1
- metadata +1 -2
- data/Gemfile.lock +0 -50
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a4ae066034b92038bdbffd7082fdaefb09108ecb
|
4
|
+
data.tar.gz: 3296e6281f6ab89e6e3e75454ebfca6ec72f2d1d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1eefd9031d02acf595957bc6f7fd3254d3dd31d7f1c840490b645d425d4d01d407bb02d0b73f6f55c29dcdfde7d9440d29d7e5a7ae06615e28e836a7563fe92
|
7
|
+
data.tar.gz: eba16fc60170e6b3a43d8422d5ac8b93911a68f466cbed5469ee9315c7f05ba0cf0a6cb75a9103b32d40ecdd5c2908b3a70d0b1f57deccb054a87eeed8e82fc2
|
data/.gitignore
CHANGED
@@ -28,9 +28,9 @@ build/
|
|
28
28
|
|
29
29
|
# for a library or gem, you might want to ignore these files since the code is
|
30
30
|
# intended to run in multiple environments; otherwise, check them in:
|
31
|
-
|
32
|
-
|
33
|
-
|
31
|
+
Gemfile.lock
|
32
|
+
.ruby-version
|
33
|
+
.ruby-gemset
|
34
34
|
|
35
35
|
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
36
36
|
.rvmrc
|
data/lib/toggles/feature.rb
CHANGED
@@ -27,24 +27,28 @@ end
|
|
27
27
|
#
|
28
28
|
# `Feature::Test`, `Feature::Thing::One`, `Feature::Thing::Two` would be
|
29
29
|
# available by default.
|
30
|
-
|
31
|
-
|
32
|
-
|
30
|
+
#
|
31
|
+
# TODO: Make this configurable.
|
32
|
+
if File.directory?("features")
|
33
|
+
Find.find("features") do |path|
|
34
|
+
if path.match(/\.ya?ml\Z/)
|
35
|
+
*directories, filename = path.chomp(File.extname(path)).split("/")
|
33
36
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
37
|
+
previous = Feature
|
38
|
+
directories[1..-1].each do |directory|
|
39
|
+
module_name = directory.split("_").map(&:capitalize).join.to_sym
|
40
|
+
previous = begin
|
41
|
+
previous.const_get(module_name)
|
42
|
+
rescue NameError
|
43
|
+
previous.const_set(module_name, Module.new)
|
44
|
+
end
|
45
|
+
end
|
43
46
|
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
+
cls = Class.new(Feature::Base) do |c|
|
48
|
+
c.const_set(:PERMISSIONS, Feature::Permissions.new(path))
|
49
|
+
end
|
47
50
|
|
48
|
-
|
51
|
+
previous.const_set(filename.split("_").map(&:capitalize).join.to_sym, cls)
|
52
|
+
end
|
49
53
|
end
|
50
54
|
end
|
data/toggles.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: toggles
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Tribone
|
@@ -117,7 +117,6 @@ files:
|
|
117
117
|
- ".gitignore"
|
118
118
|
- ".rspec"
|
119
119
|
- Gemfile
|
120
|
-
- Gemfile.lock
|
121
120
|
- Rakefile
|
122
121
|
- features/collection.yml
|
123
122
|
- features/test.yml
|
data/Gemfile.lock
DELETED
@@ -1,50 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
toggles (0.0.2)
|
5
|
-
|
6
|
-
GEM
|
7
|
-
remote: https://rubygems.org/
|
8
|
-
specs:
|
9
|
-
coderay (1.1.0)
|
10
|
-
diff-lcs (1.2.5)
|
11
|
-
method_source (0.8.2)
|
12
|
-
pry (0.10.1)
|
13
|
-
coderay (~> 1.1.0)
|
14
|
-
method_source (~> 0.8.1)
|
15
|
-
slop (~> 3.4)
|
16
|
-
pry-nav (0.2.4)
|
17
|
-
pry (>= 0.9.10, < 0.11.0)
|
18
|
-
pry-remote (0.1.8)
|
19
|
-
pry (~> 0.9)
|
20
|
-
slop (~> 3.0)
|
21
|
-
rake (10.4.1)
|
22
|
-
rspec (3.1.0)
|
23
|
-
rspec-core (~> 3.1.0)
|
24
|
-
rspec-expectations (~> 3.1.0)
|
25
|
-
rspec-mocks (~> 3.1.0)
|
26
|
-
rspec-core (3.1.7)
|
27
|
-
rspec-support (~> 3.1.0)
|
28
|
-
rspec-expectations (3.1.2)
|
29
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
30
|
-
rspec-support (~> 3.1.0)
|
31
|
-
rspec-its (1.1.0)
|
32
|
-
rspec-core (>= 3.0.0)
|
33
|
-
rspec-expectations (>= 3.0.0)
|
34
|
-
rspec-mocks (3.1.3)
|
35
|
-
rspec-support (~> 3.1.0)
|
36
|
-
rspec-support (3.1.2)
|
37
|
-
slop (3.6.0)
|
38
|
-
|
39
|
-
PLATFORMS
|
40
|
-
ruby
|
41
|
-
|
42
|
-
DEPENDENCIES
|
43
|
-
bundler
|
44
|
-
pry
|
45
|
-
pry-nav
|
46
|
-
pry-remote
|
47
|
-
rake
|
48
|
-
rspec
|
49
|
-
rspec-its
|
50
|
-
toggles!
|