flip_the_switch 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +5 -0
- data/CHANGELOG.md +4 -0
- data/FlipTheSwitch.podspec +1 -1
- data/flip_the_switch.gemspec +1 -1
- data/lib/flip_the_switch/generator/base.rb +13 -0
- data/lib/flip_the_switch/generator/category.rb +0 -12
- data/lib/flip_the_switch/generator/plist.rb +1 -1
- data/spec/flip_the_switch/generator/plist_spec.rb +1 -1
- data/spec/resources/ExpectedFeatures.plist +7 -0
- metadata +14 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 085ed1422d134624971fbdc8310ae1674a496e16
|
4
|
+
data.tar.gz: 43bad8158c8b276de07cae16d20fdebb1e3bcd07
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6f6107f709de083f18d2a208974fe2061a2d92cfa7042a2b6e34dd789f2dd384172e4819665360721950022ae1f6f3a83981bfa77c387ef1488da973b4b04e0
|
7
|
+
data.tar.gz: 957750c1ad0296b9d547d111a8a0df802085977d420d04e346be231c3b8818559ae39c491afa58db00885d08a3c8ab5a0ed18a282a0837842003e7996d6e83c8
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
data/FlipTheSwitch.podspec
CHANGED
data/flip_the_switch.gemspec
CHANGED
@@ -4,7 +4,7 @@ Gem::Specification.new do |s|
|
|
4
4
|
s.email = %w(mg.england@gmail.com rob@robsiwek.com)
|
5
5
|
s.summary = 'A simple library to help enabling/disabling features on iOS/Mac applications.'
|
6
6
|
s.homepage = 'https://github.com/michaelengland/FlipTheSwitch'
|
7
|
-
s.version = '1.0.
|
7
|
+
s.version = '1.0.2'
|
8
8
|
s.license = 'MIT'
|
9
9
|
|
10
10
|
s.add_dependency 'thor', '~> 0.19'
|
@@ -8,6 +8,19 @@ module FlipTheSwitch
|
|
8
8
|
|
9
9
|
protected
|
10
10
|
attr_reader :output, :features
|
11
|
+
|
12
|
+
def all_features
|
13
|
+
features.flat_map { |feature|
|
14
|
+
feature_and_sub_features(feature)
|
15
|
+
}
|
16
|
+
end
|
17
|
+
|
18
|
+
private
|
19
|
+
def feature_and_sub_features(feature)
|
20
|
+
[feature] + feature.sub_features.flat_map { |sub_feature|
|
21
|
+
feature_and_sub_features(sub_feature)
|
22
|
+
}
|
23
|
+
end
|
11
24
|
end
|
12
25
|
end
|
13
26
|
end
|
@@ -65,18 +65,6 @@ module FlipTheSwitch
|
|
65
65
|
File.read(File.expand_path("../#{name}.erb", __FILE__))
|
66
66
|
end
|
67
67
|
|
68
|
-
def all_features
|
69
|
-
features.flat_map { |feature|
|
70
|
-
feature_and_sub_features(feature)
|
71
|
-
}
|
72
|
-
end
|
73
|
-
|
74
|
-
def feature_and_sub_features(feature)
|
75
|
-
[feature] + feature.sub_features.flat_map { |sub_feature|
|
76
|
-
feature_and_sub_features(sub_feature)
|
77
|
-
}
|
78
|
-
end
|
79
|
-
|
80
68
|
def lower_camelize(string)
|
81
69
|
str = camelize(string)
|
82
70
|
if str.empty?
|
@@ -3,7 +3,7 @@ require 'spec_helper'
|
|
3
3
|
describe FlipTheSwitch::Generator::Plist do
|
4
4
|
subject(:plist) { described_class.new(output, features) }
|
5
5
|
let(:features) { [
|
6
|
-
FlipTheSwitch::Feature.new('enabled_feature', true, nil),
|
6
|
+
FlipTheSwitch::Feature.new('enabled_feature', true, nil, [ FlipTheSwitch::Feature.new('disabled_subfeature', false, 'subfeature') ]),
|
7
7
|
FlipTheSwitch::Feature.new('disabled_feature', false, 'is disabled description')
|
8
8
|
] }
|
9
9
|
let(:output_file) { 'tmp/Features.plist' }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flip_the_switch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael England
|
@@ -9,48 +9,48 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-12-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: thor
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- - ~>
|
18
|
+
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
20
|
version: '0.19'
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- - ~>
|
25
|
+
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: '0.19'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: plist
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
|
-
- - ~>
|
32
|
+
- - "~>"
|
33
33
|
- !ruby/object:Gem::Version
|
34
34
|
version: '3.1'
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
|
-
- - ~>
|
39
|
+
- - "~>"
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: '3.1'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: json-schema
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
|
-
- - ~>
|
46
|
+
- - "~>"
|
47
47
|
- !ruby/object:Gem::Version
|
48
48
|
version: '2.5'
|
49
49
|
type: :runtime
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
|
-
- - ~>
|
53
|
+
- - "~>"
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: '2.5'
|
56
56
|
description:
|
@@ -62,9 +62,9 @@ executables:
|
|
62
62
|
extensions: []
|
63
63
|
extra_rdoc_files: []
|
64
64
|
files:
|
65
|
-
- .gitignore
|
66
|
-
- .rspec
|
67
|
-
- .travis.yml
|
65
|
+
- ".gitignore"
|
66
|
+
- ".rspec"
|
67
|
+
- ".travis.yml"
|
68
68
|
- CHANGELOG.md
|
69
69
|
- Classes/FlipTheSwitch/Shared/FTSFeature.h
|
70
70
|
- Classes/FlipTheSwitch/Shared/FTSFeature.m
|
@@ -188,17 +188,17 @@ require_paths:
|
|
188
188
|
- lib
|
189
189
|
required_ruby_version: !ruby/object:Gem::Requirement
|
190
190
|
requirements:
|
191
|
-
- -
|
191
|
+
- - ">="
|
192
192
|
- !ruby/object:Gem::Version
|
193
193
|
version: '0'
|
194
194
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
195
195
|
requirements:
|
196
|
-
- -
|
196
|
+
- - ">="
|
197
197
|
- !ruby/object:Gem::Version
|
198
198
|
version: '0'
|
199
199
|
requirements: []
|
200
200
|
rubyforge_project:
|
201
|
-
rubygems_version: 2.4.
|
201
|
+
rubygems_version: 2.4.6
|
202
202
|
signing_key:
|
203
203
|
specification_version: 4
|
204
204
|
summary: A simple library to help enabling/disabling features on iOS/Mac applications.
|