flip_the_switch 0.3.0
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 +7 -0
- data/.gitignore +146 -0
- data/.rspec +1 -0
- data/.travis.yml +13 -0
- data/CHANGELOG.md +14 -0
- data/Classes/FlipTheSwitch/FlipTheSwitch.h +9 -0
- data/Classes/FlipTheSwitch/FlipTheSwitch.m +88 -0
- data/Example/.gitignore +2 -0
- data/Example/Colors-iOS/AppDelegateiOS.h +3 -0
- data/Example/Colors-iOS/AppDelegateiOS.m +4 -0
- data/Example/Colors-iOS/Base.lproj/Main_iPhone.storyboard +76 -0
- data/Example/Colors-iOS/Colors-iOS-Info.plist +49 -0
- data/Example/Colors-iOS/Colors-iOS-Prefix.pch +16 -0
- data/Example/Colors-iOS/Images.xcassets/AppIcon.appiconset/Contents.json +53 -0
- data/Example/Colors-iOS/Images.xcassets/LaunchImage.launchimage/Contents.json +51 -0
- data/Example/Colors-iOS/ViewControlleriOS.h +2 -0
- data/Example/Colors-iOS/ViewControlleriOS.m +78 -0
- data/Example/Colors-iOS/main.m +8 -0
- data/Example/Colors.xcodeproj/project.pbxproj +358 -0
- data/Example/Colors.xcodeproj/xcshareddata/xcschemes/Colors-iOS.xcscheme +77 -0
- data/Example/Podfile +4 -0
- data/Example/Rakefile +23 -0
- data/Example/features.yml +2 -0
- data/FlipTheSwitch.podspec +16 -0
- data/Gemfile +17 -0
- data/Guardfile.example +15 -0
- data/LICENSE +21 -0
- data/README.md +104 -0
- data/Rakefile +35 -0
- data/Tests/FlipTheSwitchSpec-Mac/Features.plist +8 -0
- data/Tests/FlipTheSwitchSpec-Mac/FlipTheSwitchSpec-Mac-Info.plist +22 -0
- data/Tests/FlipTheSwitchSpec-Mac/FlipTheSwitchSpec-Mac-Prefix.pch +13 -0
- data/Tests/FlipTheSwitchSpec-iOS/Features.plist +8 -0
- data/Tests/FlipTheSwitchSpec-iOS/FlipTheSwitchSpec-iOS-Info.plist +22 -0
- data/Tests/FlipTheSwitchSpec-iOS/FlipTheSwitchSpec-iOS-Prefix.pch +14 -0
- data/Tests/FlipTheSwitchSpec.xcodeproj/project.pbxproj +605 -0
- data/Tests/FlipTheSwitchSpec.xcodeproj/xcshareddata/xcschemes/FlipTheSwitchSpec-Mac.xcscheme +75 -0
- data/Tests/FlipTheSwitchSpec.xcodeproj/xcshareddata/xcschemes/FlipTheSwitchSpec-iOS.xcscheme +75 -0
- data/Tests/Podfile +15 -0
- data/Tests/Rakefile +22 -0
- data/Tests/Spec/Classes/FlipTheSwitch/FlipTheSwitchSpec.m +88 -0
- data/Tests/Spec/Helpers/GcovTestObserver.h +4 -0
- data/Tests/Spec/Helpers/GcovTestObserver.m +12 -0
- data/bin/flip-the-switch +4 -0
- data/flip_the_switch.gemspec +17 -0
- data/lib/flip_the_switch/cli.rb +61 -0
- data/lib/flip_the_switch/errors.rb +12 -0
- data/lib/flip_the_switch/generator/base.rb +13 -0
- data/lib/flip_the_switch/generator/category.rb +71 -0
- data/lib/flip_the_switch/generator/header.h.erb +11 -0
- data/lib/flip_the_switch/generator/implementation.m.erb +26 -0
- data/lib/flip_the_switch/generator/plist.rb +17 -0
- data/lib/flip_the_switch/generator.rb +3 -0
- data/lib/flip_the_switch/reader/yaml.rb +39 -0
- data/lib/flip_the_switch/reader.rb +1 -0
- data/lib/flip_the_switch.rb +3 -0
- data/spec/flip_the_switch/cli_spec.rb +81 -0
- data/spec/flip_the_switch/generator/category_spec.rb +44 -0
- data/spec/flip_the_switch/generator/plist_spec.rb +19 -0
- data/spec/flip_the_switch/reader/yaml_spec.rb +43 -0
- data/spec/resources/ExpectedFeatures.plist +10 -0
- data/spec/resources/expected_header.h +16 -0
- data/spec/resources/expected_implementation.m +46 -0
- data/spec/resources/invalid_layout/features.yml +4 -0
- data/spec/resources/invalid_type/features.yml +7 -0
- data/spec/resources/real/features.yml +2 -0
- data/spec/spec_helper.rb +15 -0
- metadata +166 -0
data/Rakefile
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
require 'rspec/core/rake_task'
|
2
|
+
|
3
|
+
RSpec::Core::RakeTask.new(:spec)
|
4
|
+
|
5
|
+
def subfolders; %w(Tests Example); end
|
6
|
+
|
7
|
+
def subperform(command)
|
8
|
+
subfolders.each do |subfolder|
|
9
|
+
Dir.chdir(subfolder) do
|
10
|
+
sh "rake #{command}"
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
task :default => :test
|
16
|
+
|
17
|
+
task :ci => [:clobber, :test]
|
18
|
+
|
19
|
+
task :clobber do
|
20
|
+
subperform(:clobber)
|
21
|
+
end
|
22
|
+
|
23
|
+
task :clean do
|
24
|
+
subperform(:clean)
|
25
|
+
end
|
26
|
+
|
27
|
+
task :test => :spec do
|
28
|
+
subperform(:test)
|
29
|
+
|
30
|
+
end
|
31
|
+
|
32
|
+
task :coverage do
|
33
|
+
excludes = ['.*/Classes/.*\.h'] + subfolders.map { |subfolder| ".*/#{subfolder}/.*" }
|
34
|
+
sh "coveralls #{excludes.map { |exclude| "-E '#{exclude}'" }.join(' ')}"
|
35
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
3
|
+
<plist version="1.0">
|
4
|
+
<dict>
|
5
|
+
<key>CFBundleDevelopmentRegion</key>
|
6
|
+
<string>en</string>
|
7
|
+
<key>CFBundleExecutable</key>
|
8
|
+
<string>${EXECUTABLE_NAME}</string>
|
9
|
+
<key>CFBundleIdentifier</key>
|
10
|
+
<string>com.github.${PRODUCT_NAME:rfc1034identifier}</string>
|
11
|
+
<key>CFBundleInfoDictionaryVersion</key>
|
12
|
+
<string>6.0</string>
|
13
|
+
<key>CFBundlePackageType</key>
|
14
|
+
<string>BNDL</string>
|
15
|
+
<key>CFBundleShortVersionString</key>
|
16
|
+
<string>1.0</string>
|
17
|
+
<key>CFBundleSignature</key>
|
18
|
+
<string>????</string>
|
19
|
+
<key>CFBundleVersion</key>
|
20
|
+
<string>1</string>
|
21
|
+
</dict>
|
22
|
+
</plist>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
//
|
2
|
+
// Prefix header
|
3
|
+
//
|
4
|
+
// The contents of this file are implicitly included at the beginning of every source file.
|
5
|
+
//
|
6
|
+
|
7
|
+
#ifdef __OBJC__
|
8
|
+
#import <Cocoa/Cocoa.h>
|
9
|
+
#import <Specta/Specta.h>
|
10
|
+
#define EXP_SHORTHAND
|
11
|
+
#import <Expecta/Expecta.h>
|
12
|
+
#import <OCMockito/OCMockito.h>
|
13
|
+
#endif
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
3
|
+
<plist version="1.0">
|
4
|
+
<dict>
|
5
|
+
<key>CFBundleDevelopmentRegion</key>
|
6
|
+
<string>en</string>
|
7
|
+
<key>CFBundleExecutable</key>
|
8
|
+
<string>${EXECUTABLE_NAME}</string>
|
9
|
+
<key>CFBundleIdentifier</key>
|
10
|
+
<string>com.github.${PRODUCT_NAME:rfc1034identifier}</string>
|
11
|
+
<key>CFBundleInfoDictionaryVersion</key>
|
12
|
+
<string>6.0</string>
|
13
|
+
<key>CFBundlePackageType</key>
|
14
|
+
<string>BNDL</string>
|
15
|
+
<key>CFBundleShortVersionString</key>
|
16
|
+
<string>1.0</string>
|
17
|
+
<key>CFBundleSignature</key>
|
18
|
+
<string>????</string>
|
19
|
+
<key>CFBundleVersion</key>
|
20
|
+
<string>1</string>
|
21
|
+
</dict>
|
22
|
+
</plist>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
//
|
2
|
+
// Prefix header
|
3
|
+
//
|
4
|
+
// The contents of this file are implicitly included at the beginning of every source file.
|
5
|
+
//
|
6
|
+
|
7
|
+
#ifdef __OBJC__
|
8
|
+
#import <UIKit/UIKit.h>
|
9
|
+
#import <Foundation/Foundation.h>
|
10
|
+
#import <Specta/Specta.h>
|
11
|
+
#define EXP_SHORTHAND
|
12
|
+
#import <Expecta/Expecta.h>
|
13
|
+
#import <OCMockito/OCMockito.h>
|
14
|
+
#endif
|