Skip to content

Commit

Permalink
Start changes to calatrava to allow builds to run on a *nix only envi…
Browse files Browse the repository at this point in the history
…ronment
  • Loading branch information
patkua-mas authored and gga committed Jan 14, 2013
1 parent b0e7c87 commit 99f471e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions calatrava.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
$:.push File.expand_path("../lib", __FILE__)
require "calatrava/version"

def is_mac(platform)
platform.to_s =~ /darwin/ # allow android build only on darwin
end

Gem::Specification.new do |s|
s.name = "calatrava"
s.version = Calatrava::Version
Expand All @@ -28,6 +32,6 @@ Gem::Specification.new do |s|
s.add_runtime_dependency "mustache", "~> 0.99.4"
s.add_runtime_dependency "cucumber", "~> 1.2.1"
s.add_runtime_dependency "watir-webdriver", "~> 0.6.1"
s.add_runtime_dependency "xcodeproj", "~> 0.4.0"
s.add_runtime_dependency "cocoapods", "~> 0.16.0"
s.add_runtime_dependency "xcodeproj", "~> 0.4.0" if is_mac(s.platform)
s.add_runtime_dependency "cocoapods", "~> 0.16.0" if is_mac(s.platform)
end
2 changes: 1 addition & 1 deletion lib/calatrava/project_script.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'mustache'
require 'yaml'
require 'xcodeproj'
require 'xcodeproj' if RUBY_PLATFORM =~ /darwin/

module Calatrava

Expand Down
2 changes: 1 addition & 1 deletion lib/calatrava/tasks/bootstrap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
sh "bundle install"
sh "npm install"
cd "ios" do
sh "pod install"
sh "pod install" if RUBY_PLATFORM =~ /darwin/
end

Rake::Task['configure:development'].invoke
Expand Down

0 comments on commit 99f471e

Please sign in to comment.