macgap 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +5 -0
- data/Gemfile +4 -0
- data/Rakefile +1 -0
- data/assets/MacGap.app/Contents/Frameworks/Growl.framework/Growl +0 -0
- data/assets/MacGap.app/Contents/Frameworks/Growl.framework/Versions/A/Growl +0 -0
- data/assets/MacGap.app/Contents/Frameworks/Growl.framework/Versions/A/Headers/Growl.h +5 -0
- data/assets/MacGap.app/Contents/Frameworks/Growl.framework/Versions/A/Headers/GrowlApplicationBridge.h +551 -0
- data/assets/MacGap.app/Contents/Frameworks/Growl.framework/Versions/A/Headers/GrowlDefines.h +341 -0
- data/assets/MacGap.app/Contents/Frameworks/Growl.framework/Versions/A/Resources/Info.plist +40 -0
- data/assets/MacGap.app/Contents/Frameworks/Growl.framework/Versions/A/_CodeSignature/CodeResources +34 -0
- data/assets/MacGap.app/Contents/Info.plist +48 -0
- data/assets/MacGap.app/Contents/MacOS/MacGap +0 -0
- data/assets/MacGap.app/Contents/PkgInfo +1 -0
- data/assets/MacGap.app/Contents/Resources/application.icns +0 -0
- data/assets/MacGap.app/Contents/Resources/en.lproj/Credits.rtf +29 -0
- data/assets/MacGap.app/Contents/Resources/en.lproj/InfoPlist.strings +0 -0
- data/assets/MacGap.app/Contents/Resources/en.lproj/MainMenu.nib +0 -0
- data/assets/MacGap.app/Contents/Resources/public/index.html +34 -0
- data/bin/macgap +77 -0
- data/macgap.gemspec +23 -0
- data/test/public/index.html +27 -0
- data/test/test.sh +1 -0
- metadata +71 -0
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
APPL????
|
Binary file
|
@@ -0,0 +1,29 @@
|
|
1
|
+
{\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;}
|
2
|
+
{\colortbl;\red255\green255\blue255;}
|
3
|
+
\paperw9840\paperh8400
|
4
|
+
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
|
5
|
+
|
6
|
+
\f0\b\fs24 \cf0 Engineering:
|
7
|
+
\b0 \
|
8
|
+
Some people\
|
9
|
+
\
|
10
|
+
|
11
|
+
\b Human Interface Design:
|
12
|
+
\b0 \
|
13
|
+
Some other people\
|
14
|
+
\
|
15
|
+
|
16
|
+
\b Testing:
|
17
|
+
\b0 \
|
18
|
+
Hopefully not nobody\
|
19
|
+
\
|
20
|
+
|
21
|
+
\b Documentation:
|
22
|
+
\b0 \
|
23
|
+
Whoever\
|
24
|
+
\
|
25
|
+
|
26
|
+
\b With special thanks to:
|
27
|
+
\b0 \
|
28
|
+
Mom\
|
29
|
+
}
|
Binary file
|
Binary file
|
@@ -0,0 +1,34 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>MacGap</title>
|
5
|
+
<style type="text/css" media="screen">
|
6
|
+
html, body {
|
7
|
+
height: 100%;
|
8
|
+
width: 100%;
|
9
|
+
background: #FFF;
|
10
|
+
padding: 0;
|
11
|
+
margin: 0;
|
12
|
+
overflow: hidden;
|
13
|
+
-webkit-user-select: none;
|
14
|
+
}
|
15
|
+
|
16
|
+
h1 {
|
17
|
+
color: #E0E0E0;
|
18
|
+
margin: 18% 0;
|
19
|
+
text-align: center;
|
20
|
+
font-family: helvetica;
|
21
|
+
}
|
22
|
+
</style>
|
23
|
+
|
24
|
+
<meta http-equiv="refresh" content="5;url=http://postmonk.com">
|
25
|
+
</head>
|
26
|
+
<body>
|
27
|
+
|
28
|
+
<script type="text/javascript" charset="utf-8">
|
29
|
+
macgap.growl.notify({title: "MacGap", content: "Hello World"});
|
30
|
+
</script>
|
31
|
+
|
32
|
+
<h1>MacGap</h1>
|
33
|
+
</body>
|
34
|
+
</html>
|
data/bin/macgap
ADDED
@@ -0,0 +1,77 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "optparse"
|
4
|
+
require "pathname"
|
5
|
+
require "fileutils"
|
6
|
+
|
7
|
+
options = {}
|
8
|
+
|
9
|
+
optparse = OptionParser.new do|opts|
|
10
|
+
opts.banner = "Usage: macgap [options] DIR"
|
11
|
+
|
12
|
+
options[:name] = "MacGap"
|
13
|
+
opts.on( "-n", "--name NAME", "Application name" ) do |name|
|
14
|
+
options[:name] = name
|
15
|
+
end
|
16
|
+
|
17
|
+
options[:output] = Dir.pwd
|
18
|
+
opts.on( "-o", "--output DIR", "Output application to DIR" ) do |dir|
|
19
|
+
options[:output] = dir
|
20
|
+
end
|
21
|
+
|
22
|
+
opts.on( "-h", "--help", "Display this screen" ) do
|
23
|
+
puts opts
|
24
|
+
exit
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
optparse.parse!
|
29
|
+
|
30
|
+
public_dir = ARGV[0]
|
31
|
+
|
32
|
+
unless public_dir
|
33
|
+
puts optparse
|
34
|
+
exit
|
35
|
+
end
|
36
|
+
|
37
|
+
# Setup directories
|
38
|
+
public_dir = Pathname.new(public_dir).expand_path
|
39
|
+
build_dir = Pathname.new(options[:output]).join(options[:name] + ".app")
|
40
|
+
lib_dir = Pathname.new(File.join(__FILE__, *%w{.. ..})).expand_path
|
41
|
+
|
42
|
+
FileUtils.rm_rf build_dir
|
43
|
+
build_dir.parent.mkpath
|
44
|
+
|
45
|
+
# Copy over MacGap
|
46
|
+
FileUtils.cp_r(
|
47
|
+
lib_dir.join("assets", "MacGap.app"),
|
48
|
+
build_dir
|
49
|
+
)
|
50
|
+
|
51
|
+
FileUtils.cd build_dir.join("Contents") do
|
52
|
+
build_dir = Pathname.new(Dir.pwd)
|
53
|
+
|
54
|
+
# Copy over public dir
|
55
|
+
build_public_dir = build_dir.join("Resources", "public")
|
56
|
+
FileUtils.rm_rf build_public_dir
|
57
|
+
FileUtils.cp_r(public_dir, build_public_dir)
|
58
|
+
|
59
|
+
# Copy over icon
|
60
|
+
icon_path = public_dir.join("application.icns")
|
61
|
+
if icon_path.exist?
|
62
|
+
FileUtils.cp_r(
|
63
|
+
icon_path,
|
64
|
+
build_dir.join("Resources", "application.icns")
|
65
|
+
)
|
66
|
+
end
|
67
|
+
|
68
|
+
# Rename MacGap to specified name
|
69
|
+
exe_path = build_dir.join("MacOS", "MacGap")
|
70
|
+
renamed_exe_path = build_dir.join("MacOS", options[:name])
|
71
|
+
exe_path.rename(renamed_exe_path)
|
72
|
+
renamed_exe_path.chmod(0755)
|
73
|
+
|
74
|
+
plist = build_dir.join("Info.plist").read
|
75
|
+
plist.gsub!("MacGap", options[:name])
|
76
|
+
build_dir.join("Info.plist").open("w+") {|io| io.write plist }
|
77
|
+
end
|
data/macgap.gemspec
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
|
4
|
+
Gem::Specification.new do |s|
|
5
|
+
s.name = "macgap"
|
6
|
+
s.version = "0.0.1"
|
7
|
+
s.authors = ["Alex MacCaw"]
|
8
|
+
s.email = ["info@eribium.org"]
|
9
|
+
s.homepage = "http://github.com/maccman/macgap-rb"
|
10
|
+
s.summary = %q{Generate MacGap applications}
|
11
|
+
s.description = %q{Command line utility for generating MacGap applications}
|
12
|
+
|
13
|
+
s.rubyforge_project = "macgap"
|
14
|
+
|
15
|
+
s.files = `git ls-files`.split("\n")
|
16
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
17
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
18
|
+
s.require_paths = ["lib"]
|
19
|
+
|
20
|
+
# specify any dependencies here; for example:
|
21
|
+
# s.add_development_dependency "rspec"
|
22
|
+
# s.add_runtime_dependency "rest-client"
|
23
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>MacGap Test</title>
|
5
|
+
<style type="text/css" media="screen">
|
6
|
+
html, body {
|
7
|
+
height: 100%;
|
8
|
+
width: 100%;
|
9
|
+
background: #FFF;
|
10
|
+
padding: 0;
|
11
|
+
margin: 0;
|
12
|
+
overflow: hidden;
|
13
|
+
-webkit-user-select: none;
|
14
|
+
}
|
15
|
+
|
16
|
+
h1 {
|
17
|
+
color: #E0E0E0;
|
18
|
+
margin: 18% 0;
|
19
|
+
text-align: center;
|
20
|
+
font-family: helvetica;
|
21
|
+
}
|
22
|
+
</style>
|
23
|
+
</head>
|
24
|
+
<body>
|
25
|
+
<h1>MacGap Test</h1>
|
26
|
+
</body>
|
27
|
+
</html>
|
data/test/test.sh
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
macgap ./public/ --name MyApp
|
metadata
ADDED
@@ -0,0 +1,71 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: macgap
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Alex MacCaw
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-01-09 00:00:00.000000000Z
|
13
|
+
dependencies: []
|
14
|
+
description: Command line utility for generating MacGap applications
|
15
|
+
email:
|
16
|
+
- info@eribium.org
|
17
|
+
executables:
|
18
|
+
- macgap
|
19
|
+
extensions: []
|
20
|
+
extra_rdoc_files: []
|
21
|
+
files:
|
22
|
+
- .gitignore
|
23
|
+
- Gemfile
|
24
|
+
- Rakefile
|
25
|
+
- assets/MacGap.app/Contents/Frameworks/Growl.framework/Growl
|
26
|
+
- assets/MacGap.app/Contents/Frameworks/Growl.framework/Versions/A/Growl
|
27
|
+
- assets/MacGap.app/Contents/Frameworks/Growl.framework/Versions/A/Headers/Growl.h
|
28
|
+
- assets/MacGap.app/Contents/Frameworks/Growl.framework/Versions/A/Headers/GrowlApplicationBridge.h
|
29
|
+
- assets/MacGap.app/Contents/Frameworks/Growl.framework/Versions/A/Headers/GrowlDefines.h
|
30
|
+
- assets/MacGap.app/Contents/Frameworks/Growl.framework/Versions/A/Resources/Info.plist
|
31
|
+
- assets/MacGap.app/Contents/Frameworks/Growl.framework/Versions/A/_CodeSignature/CodeResources
|
32
|
+
- assets/MacGap.app/Contents/Info.plist
|
33
|
+
- assets/MacGap.app/Contents/MacOS/MacGap
|
34
|
+
- assets/MacGap.app/Contents/PkgInfo
|
35
|
+
- assets/MacGap.app/Contents/Resources/application.icns
|
36
|
+
- assets/MacGap.app/Contents/Resources/en.lproj/Credits.rtf
|
37
|
+
- assets/MacGap.app/Contents/Resources/en.lproj/InfoPlist.strings
|
38
|
+
- assets/MacGap.app/Contents/Resources/en.lproj/MainMenu.nib
|
39
|
+
- assets/MacGap.app/Contents/Resources/public/index.html
|
40
|
+
- bin/macgap
|
41
|
+
- macgap.gemspec
|
42
|
+
- test/public/index.html
|
43
|
+
- test/test.sh
|
44
|
+
homepage: http://github.com/maccman/macgap-rb
|
45
|
+
licenses: []
|
46
|
+
post_install_message:
|
47
|
+
rdoc_options: []
|
48
|
+
require_paths:
|
49
|
+
- lib
|
50
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
51
|
+
none: false
|
52
|
+
requirements:
|
53
|
+
- - ! '>='
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '0'
|
56
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
requirements: []
|
63
|
+
rubyforge_project: macgap
|
64
|
+
rubygems_version: 1.8.6
|
65
|
+
signing_key:
|
66
|
+
specification_version: 3
|
67
|
+
summary: Generate MacGap applications
|
68
|
+
test_files:
|
69
|
+
- test/public/index.html
|
70
|
+
- test/test.sh
|
71
|
+
has_rdoc:
|