flip_the_switch 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 085ed1422d134624971fbdc8310ae1674a496e16
4
- data.tar.gz: 43bad8158c8b276de07cae16d20fdebb1e3bcd07
3
+ metadata.gz: c0663cc5c7460abee71d86a8b0b8976352a2efeb
4
+ data.tar.gz: 40f1f4a3177c56f92211c94c76cc1a97d21e9496
5
5
  SHA512:
6
- metadata.gz: a6f6107f709de083f18d2a208974fe2061a2d92cfa7042a2b6e34dd789f2dd384172e4819665360721950022ae1f6f3a83981bfa77c387ef1488da973b4b04e0
7
- data.tar.gz: 957750c1ad0296b9d547d111a8a0df802085977d420d04e346be231c3b8818559ae39c491afa58db00885d08a3c8ab5a0ed18a282a0837842003e7996d6e83c8
6
+ metadata.gz: 6dd22507c1dde8495f43c6888d261295a49a10956e40d5b037735d010f6fe52ac9310b34be1d4e463d9a968f1ce3f9c468eb01928ea95cf3cc05f1fb06999eb3
7
+ data.tar.gz: 2a211aa6cf41da80bf08060e1082159561a2abfa3f91d3f4aa4fc1f596dc85ef22a96b4fc4a6758d9f2b63650eef29271c335704ad2419a067a4119573f967fb
@@ -1,5 +1,6 @@
1
1
  language: objective-c
2
- osx_image: xcode7
2
+ rvm:
3
+ - 2.3.3
3
4
  before_install:
4
5
  - sudo easy_install cpp-coveralls
5
6
  - gem install bundler
@@ -1,3 +1,7 @@
1
+ # 1.0.3 / 2017-02-15
2
+
3
+ # [ENHANCEMENT] Format feature toggle title
4
+
1
5
  # 1.0.1 / 2015-12-07
2
6
 
3
7
  # [BUGFIX] Generate all subfeatures as well as features in plist #44
@@ -1,5 +1,5 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
3
  <plist version="1.0">
4
4
  <dict>
5
5
  <key>features_controller</key>
@@ -1,6 +1,6 @@
1
1
  Pod::Spec.new do |s|
2
2
  s.name = 'FlipTheSwitch'
3
- s.version = '1.0.2'
3
+ s.version = '1.0.3'
4
4
  s.summary = 'A simple library to help enabling/disabling features on iOS/Mac applications.'
5
5
  s.authors = {
6
6
  'Michael England' => 'mg.england@gmail.com',
data/Gemfile CHANGED
@@ -1,7 +1,7 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gem 'travis', '~> 1.6.11'
4
- gem 'cocoapods', '~> 0.37.2'
4
+ gem 'cocoapods', '~> 1.0.0'
5
5
  gem 'rake', '~> 10.3.2'
6
6
 
7
7
  gemspec
@@ -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.2'
7
+ s.version = '1.0.3'
8
8
  s.license = 'MIT'
9
9
 
10
10
  s.add_dependency 'thor', '~> 0.19'
@@ -27,7 +27,7 @@ module FlipTheSwitch
27
27
  end
28
28
 
29
29
  desc 'settings', 'Auto-generates settings.bundle files for enabling/disabling features from iOS settings menu'
30
- method_option :output, type: :string, aliases: '-o', default: defaults['settings_output'], desc: 'Location of the directory in which FlipTheSwitch+Features.{h,m} files will be created'
30
+ method_option :output, type: :string, aliases: '-o', default: defaults['settings_output'], desc: 'Location of the directory in which the Settings.bundle will be modified'
31
31
 
32
32
  def settings
33
33
  settings_generator.generate
@@ -89,13 +89,17 @@ module FlipTheSwitch
89
89
  features.map { |feature|
90
90
  {
91
91
  'Type' => 'PSToggleSwitchSpecifier',
92
- 'Title' => feature.name,
92
+ 'Title' => feature_title(feature),
93
93
  'Key' => "FTS_FEATURE_#{feature.name}",
94
94
  'DefaultValue' => feature.enabled
95
95
  }
96
96
  }
97
97
  end
98
98
 
99
+ def feature_title(feature)
100
+ feature.name.gsub('_', ' ').capitalize
101
+ end
102
+
99
103
  def current_plist
100
104
  @current_plist ||= if File.exists?(root_plist)
101
105
  ::Plist::parse_xml(root_plist)
@@ -14,7 +14,7 @@ describe FlipTheSwitch::Reader::Features do
14
14
  FlipTheSwitch::Feature.new('sub_sub_feature', false, nil, [], 'sub_feature')
15
15
  ], 'enabled_feature')
16
16
  ]),
17
- FlipTheSwitch::Feature.new('disabled_feature', false)
17
+ FlipTheSwitch::Feature.new('disabled_feature', false, 'This feature is disabled')
18
18
  ])
19
19
  end
20
20
  end
@@ -30,7 +30,7 @@ describe FlipTheSwitch::Reader::Features do
30
30
  FlipTheSwitch::Feature.new('sub_sub_feature', false, nil, [], 'sub_feature')
31
31
  ], 'enabled_feature')
32
32
  ]),
33
- FlipTheSwitch::Feature.new('disabled_feature', false)
33
+ FlipTheSwitch::Feature.new('disabled_feature', false, 'This feature is disabled')
34
34
  ])
35
35
  end
36
36
  end
@@ -45,7 +45,7 @@ describe FlipTheSwitch::Reader::Features do
45
45
  FlipTheSwitch::Feature.new('sub_sub_feature', false, nil, [], 'sub_feature')
46
46
  ], 'enabled_feature')
47
47
  ]),
48
- FlipTheSwitch::Feature.new('disabled_feature', false)
48
+ FlipTheSwitch::Feature.new('disabled_feature', false, 'This feature is disabled')
49
49
  ])
50
50
  end
51
51
  end
@@ -1,5 +1,5 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
3
  <plist version="1.0">
4
4
  <dict>
5
5
  <key>disabled_feature</key>
@@ -1,5 +1,5 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
3
  <plist version="1.0">
4
4
  <dict>
5
5
  <key>PreferenceSpecifiers</key>
@@ -1,5 +1,5 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
3
  <plist version="1.0">
4
4
  <dict>
5
5
  <key>PreferenceSpecifiers</key>
@@ -10,7 +10,7 @@
10
10
  <key>Key</key>
11
11
  <string>FTS_FEATURE_first_feature</string>
12
12
  <key>Title</key>
13
- <string>first_feature</string>
13
+ <string>First feature</string>
14
14
  <key>Type</key>
15
15
  <string>PSToggleSwitchSpecifier</string>
16
16
  </dict>
@@ -20,7 +20,7 @@
20
20
  <key>Key</key>
21
21
  <string>FTS_FEATURE_second_feature</string>
22
22
  <key>Title</key>
23
- <string>second_feature</string>
23
+ <string>Second feature</string>
24
24
  <key>Type</key>
25
25
  <string>PSToggleSwitchSpecifier</string>
26
26
  </dict>
@@ -1,5 +1,5 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
3
  <plist version="1.0">
4
4
  <dict>
5
5
  <key>PreferenceSpecifiers</key>
@@ -11,7 +11,8 @@
11
11
  }
12
12
  },
13
13
  "disabled_feature": {
14
- "enabled": false
14
+ "enabled": false,
15
+ "description": "This feature is disabled"
15
16
  }
16
17
  },
17
18
  "alpha": {
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.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael England
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-12-07 00:00:00.000000000 Z
12
+ date: 2017-02-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thor
@@ -198,7 +198,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
198
198
  version: '0'
199
199
  requirements: []
200
200
  rubyforge_project:
201
- rubygems_version: 2.4.6
201
+ rubygems_version: 2.5.1
202
202
  signing_key:
203
203
  specification_version: 4
204
204
  summary: A simple library to help enabling/disabling features on iOS/Mac applications.