Skip to content

Instantly share code, notes, and snippets.

/Users/mac/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- git (LoadError)
from /Users/mac/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/mac/Documents/Projects/BitBucket/KulaTechAutomaticBuildService/GitManager/GitManager.rb:3:in `<module:GitManipulations>'
from /Users/mac/Documents/Projects/BitBucket/KulaTechAutomaticBuildService/GitManager/GitManager.rb:1:in `<top (required)>'
from /Users/mac/Documents/Projects/BitBucket/KulaTechAutomaticBuildService/BuildService.rb:6:in `require_relative'
from /Users/mac/Documents/Projects/BitBucket/KulaTechAutomaticBuildService/BuildService.rb:6:in `<module:BuildService>'
from /Users/mac/Documents/Projects/BitBucket/KulaTechAutomaticBuildService/BuildService.rb:1:in `<top (required)>'
from /Users/mac/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/mac/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/
# ------------------ Gemfile ------------------ #
source 'https://rubygems.org'
ruby '2.1.2'
gem 'git', :git => 'https://github.com/schacon/ruby-git.git', :tag => 'v1.2.8'
gem 'json'
gem 'xcodeproj', :git => 'https://github.com/CocoaPods/Xcodeproj.git', :tag => '0.18.0'
self.images =
images
.select{
|image|
image.kind_of?(ImageClass)
}
.map{
|image|
self.generate_image_object_from_image
}
Project/Helpers/Helpers.rb
Component/ComponentModule.rb
Component/ComponentParts/FirstPart.rb
Component/ComponentParts/SecondPart.rb
# how to solve dependency: SecondPart.rb use Helpers.rb ( module NecessaryHelp ) ?)
attr_accessor(
:path,
:name
)
def initialize(path,name)
self.path = path
if name
@name = name
end
class A
cattr_reader(
:dictionary
)
@@dictionary = {}
end
class B < A
# gem 'xcodeproj'
# native_target.rb
# @return [String] the name of the build product.
#
attribute :product_name, String
class A
def needToCallAsInstanceAndClass# or no arguments
self.class.needToCallAsInstanceAndClass(self.getArgs)
end
def self.needToCallAsInstanceAndClass(*args)
# wowowow
# implementation here
end
end
class A
def relativePath(path)
self.relativePath(path,self.path)
end
def self.relativePath(path,to_path)
Pathname.new(path).relative_path_from(Pathname.new(to_path))
end
end
@lolgear
lolgear / C fgets stop at eof and newline
Created December 5, 2012 04:33
fgets normal input from stdin with stop at newline
char* inputStringWithStopChar(char stopChar){
int n = 5;
int size = n;
char* const_str = (char*)malloc(n*sizeof(char));
char* substring = (char*)malloc((n+n)*sizeof(char));
char*p;
while((fgets(const_str,n,stdin)!=NULL)&&(strchr(const_str,stopChar)==NULL)){
strcat(substring,const_str);
size += n;
substring = (char*)realloc(substring,size*sizeof(char));