Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Newman committed Apr 13, 2011
0 parents commit 1357a97
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
@@ -0,0 +1,4 @@
*.gem
.bundle
Gemfile.lock
pkg/*
4 changes: 4 additions & 0 deletions Gemfile
@@ -0,0 +1,4 @@
source "http://rubygems.org"

# Specify your gem's dependencies in wox.gemspec
gemspec
2 changes: 2 additions & 0 deletions Rakefile
@@ -0,0 +1,2 @@
require 'bundler'
Bundler::GemHelper.install_tasks
30 changes: 30 additions & 0 deletions lib/wox.rb
@@ -0,0 +1,30 @@
require 'thor'

module Wox
class Tasks
def self.install(opts = {})
resource_file = opts[:resource_file] || 'Resources/Info.plist'
app_name = opts[:app_name] || File.split(Dir.pwd).last
version = Plist::parse_xml(resource_file)['CFBundleVersion']
self.new(app_name, version)
end

attr_reader :app_name, :version

def initialize(app_name, version)
@app_name = app_name
@version = version
end

def install
desc "Builds #{app_name}"
task :build do
build_app
end
end

def build_app
sh "xcodebuild -target '#{app_name}' -configuration Release > build/build.log"
end
end
end
3 changes: 3 additions & 0 deletions lib/wox/version.rb
@@ -0,0 +1,3 @@
module Wox
VERSION = "0.0.1"
end
21 changes: 21 additions & 0 deletions wox.gemspec
@@ -0,0 +1,21 @@
# -*- encoding: utf-8 -*-
$:.push File.expand_path("../lib", __FILE__)
require "wox/version"

Gem::Specification.new do |s|
s.name = "wox"
s.version = Wox::VERSION
s.platform = Gem::Platform::RUBY
s.authors = ["TODO: Write your name"]
s.email = ["TODO: Write your email address"]
s.homepage = ""
s.summary = %q{TODO: Write a gem summary}
s.description = %q{TODO: Write a gem description}

s.rubyforge_project = "wox"

s.files = `git ls-files`.split("\n")
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
s.require_paths = ["lib"]
end

0 comments on commit 1357a97

Please sign in to comment.