Skip to content

Commit

Permalink
Merge pull request #1 from rentzsch/master
Browse files Browse the repository at this point in the history
Sync
  • Loading branch information
hardikdevios authored Sep 29, 2016
2 parents d610ed5 + a65f642 commit 050ab4f
Show file tree
Hide file tree
Showing 101 changed files with 1,111 additions and 7,108 deletions.
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
### Feature Request

_What would you like to see that is not currently available?_

### Question

_What is not clear?_

### Expected Behavior

_What should happen?_

### Actual Behavior

_What happens instead?_

### Additional Information

_Platform / Use Case / etc._
7 changes: 7 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
### Summary of Changes

_Please offer a description of the code changes in your pull request._

### Addresses

_Tag any [issues](https://github.com/rentzch/mogenerator/issues) that are being addressed._
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ dist
**/*.xcodeproj/*
!**/*.xcodeproj/project.pbxproj
/mogenerator.xcodeproj/project.xcworkspace/
!/mogenerator.xcodeproj/xcshareddata/
/mogenerator.xcodeproj/xcuserdata/
/contributed templates/Nikita Zhuk/ponso/sample project/PonsoTest/PonsoTest.xcodeproj/project.xcworkspace/xcuserdata/
/contributed templates/Nikita Zhuk/ponso/sample project/PonsoTest/PonsoTest.xcodeproj/xcuserdata/
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
language: objective-c
osx_image: xcode8
#xcode_project: mogenerator.xcodeproj
#xcode_scheme: mogenerator
script: cd test && rake
12 changes: 11 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Contributing to mogenerator

Thanks for your interest in making mogenerator better.

It's easy to contribute to mogenerator:
Expand All @@ -11,4 +13,12 @@ It's easy to contribute to mogenerator:
* Push your changes to GitHub.
* Issue your Pull Request to me.

Thanks for playing!
Before submitting a pull request with code, I highly recommend opening a new [issue][issue] and checking to make sure it's something we will accept as a new feature or patch. Bug fixes are usually 100% OK, but not every feature is something that will may be relevant to mogenerator's goals.

### Code Guidelines

mogenerator doesn't have any specific coding guidelines at this point. Just do your best to match the existing style in the file you are working in. If you create a new file, try to match what everything else is doing. If it's not perfect, no one will lose much sleep. It can always be fixed later. :)

Thanks for playing!

[issue]: https://github.com/rentzsch/mogenerator/issues/new
2 changes: 1 addition & 1 deletion MiscMerge/FoundationAdditions.m
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
*/

#import "FoundationAdditions.h"
#import <Foundation/Foundation.h>
@import Foundation;
#import "NSString+MiscAdditions.h"


Expand Down
2 changes: 1 addition & 1 deletion MiscMerge/MiscMergeExpression.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// for a list of all applicable permissions and restrictions.
//

#import <Foundation/Foundation.h>
@import Foundation;

@class MiscMergeEngine;

Expand Down
20 changes: 10 additions & 10 deletions MiscMerge/MiscMergeTemplate.m
Original file line number Diff line number Diff line change
Expand Up @@ -65,29 +65,29 @@ @implementation MiscMergeTemplate
"*/

/*"
* Returns the default string used to start a merge command, "«". A
* Returns the default string used to start a merge command, "«". A
* subclass of MiscMergeTemplate could override this method.
"*/
+ (NSString *)defaultStartDelimiter
{
// return @"(";
// return @"«";
// return @"«";
/* This works better for whatever reason. Due to some unknown pecularities,
a constant NSString doesn't work under Windows with Apple's
implementation. */
return [NSString stringWithCString:"«" encoding:NSUTF8StringEncoding];
return [NSString stringWithCString:"«" encoding:NSUTF8StringEncoding];
}

/*"
* Returns the default string used to end a merge command, "»". A
* Returns the default string used to end a merge command, "»". A
* subclass of MiscMergeTemplate could override this method.
"*/
+ (NSString *)defaultEndDelimiter
{
// return @")";
// return @"»";
// return @"»";
/* This works better than a constant NSString for whatever reason. See above. */
return [NSString stringWithCString:"»" encoding:NSUTF8StringEncoding];
return [NSString stringWithCString:"»" encoding:NSUTF8StringEncoding];
}

/*" Creates a new, autoreleased MiscMergeTemplate. "*/
Expand Down Expand Up @@ -133,10 +133,10 @@ + (NSString *)defaultEndDelimiter
- (NSString *) contentsOfFileWithName:(NSString *)filename {
NSError *error = nil;
NSString *fileString = [NSString stringWithContentsOfFile:filename
encoding:NSASCIIStringEncoding
encoding:NSUTF8StringEncoding
error:&error];

if (error != nil) {
if (fileString == nil) {
NSLog(@"%@: Could not read template file %@ because %@", [self class], filename, [error localizedDescription]);
}
return fileString;
Expand Down Expand Up @@ -343,8 +343,8 @@ - (Class)_classForCommand:(NSString *)realCommand
* classes with specific names. The name that is looked up is build from
* the first word found in %{aCommand}. The first word is turned to all
* lower case, with the first letter upper case, and then sandwiched
* between "Merge" and "Command". For example, the merge command "«if xxx
* = y»" has the word "if" as the first word. Thus, the class
* between "Merge" and "Command". For example, the merge command "«if xxx
* = y»" has the word "if" as the first word. Thus, the class
* "MergeIfCommand" will be searched for. If the desired class cannot be
* found, then it is assumed that the merge command is giving the name of a
* field which should be inserted into the output document.
Expand Down
2 changes: 1 addition & 1 deletion MiscMerge/NSNull.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
- (id)copy;

- (void)encodeWithCoder:(NSCoder *)aCoder;
- (id)initWithCoder:(NSCoder *)aDecoder;
- (instancetype)initWithCoder:(NSCoder *)aDecoder;

- (id)replacementObjectForCoder:(NSCoder *)aCoder;

Expand Down
2 changes: 1 addition & 1 deletion MiscMerge/_MiscMergeDebugCommand.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
//

#import "_MiscMergeDebugCommand.h"
#import <Foundation/Foundation.h>
@import Foundation;
#import "NSString+MiscAdditions.h"
#import "NSScanner+MiscMerge.h"

Expand Down
2 changes: 1 addition & 1 deletion MiscMerge/_MiscMergeIfCommand.m
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

@implementation _MiscMergeIfCommand

- (id)init
- (instancetype)init
{
[super init];
trueBlock = [[MiscMergeCommandBlock alloc] initWithOwner:self];
Expand Down
2 changes: 1 addition & 1 deletion MiscMerge/_MiscMergeIncludeCommand.m
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ - (BOOL)parseFromScanner:(NSScanner *)aScanner template:(MiscMergeTemplate *)tem

NSError *error = nil;
if ([resolvedFilename length] > 0)
fileString = [NSString stringWithContentsOfFile:resolvedFilename encoding:NSASCIIStringEncoding error:&error];
fileString = [NSString stringWithContentsOfFile:resolvedFilename encoding:NSUTF8StringEncoding error:&error];

if (fileString)
{
Expand Down
2 changes: 1 addition & 1 deletion MiscMerge/_MiscMergeProcedureCommand.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
//

#import "_MiscMergeProcedureCommand.h"
#import <Foundation/Foundation.h>
@import Foundation;
#import "MiscMergeEngine.h"
#import "MiscMergeTemplate.h"
#import "MiscMergeCommandBlock.h"
Expand Down
Loading

0 comments on commit 050ab4f

Please sign in to comment.