chocbomb 0.0.0 → 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/chocbomb.gemspec +80 -0
- data/lib/chocbomb.rb +8 -3
- data/lib/chocbomb/tools/dmg.rb +13 -8
- data/lib/chocbomb/tools/feed.rb +2 -1
- metadata +5 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.1
|
data/chocbomb.gemspec
ADDED
@@ -0,0 +1,80 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{chocbomb}
|
8
|
+
s.version = "0.0.1"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["glejeune"]
|
12
|
+
s.date = %q{2011-03-26}
|
13
|
+
s.default_executable = %q{chocbomb}
|
14
|
+
s.description = %q{ChocBomb is a shameful copy of ChocTop - Build and deploy tools for Cocoa apps using Sparkle for distributions and upgrades; it’s like Hoe but for Cocoa apps.}
|
15
|
+
s.email = %q{gregoire.lejeune@gmail.com}
|
16
|
+
s.executables = ["chocbomb"]
|
17
|
+
s.extra_rdoc_files = [
|
18
|
+
"LICENSE.txt",
|
19
|
+
"README.rdoc"
|
20
|
+
]
|
21
|
+
s.files = [
|
22
|
+
".document",
|
23
|
+
"LICENSE.txt",
|
24
|
+
"README.rdoc",
|
25
|
+
"Rakefile",
|
26
|
+
"VERSION",
|
27
|
+
"bin/chocbomb",
|
28
|
+
"chocbomb.gemspec",
|
29
|
+
"lib/chocbomb.rb",
|
30
|
+
"lib/chocbomb/rake/tasks.rb",
|
31
|
+
"lib/chocbomb/tools/dmg.rb",
|
32
|
+
"lib/chocbomb/tools/feed.rb",
|
33
|
+
"lib/chocbomb/tools/images.rb",
|
34
|
+
"lib/chocbomb/tools/xcode.rb",
|
35
|
+
"templates/Rakefile.erb",
|
36
|
+
"templates/default_background.jpg",
|
37
|
+
"templates/default_volume.icns",
|
38
|
+
"test/helper.rb",
|
39
|
+
"test/ressources/default_background.jpg",
|
40
|
+
"test/ressources/default_background.png",
|
41
|
+
"test/test_chocbomb.rb"
|
42
|
+
]
|
43
|
+
s.homepage = %q{http://github.com/glejeune/chocbomb}
|
44
|
+
s.licenses = ["MIT"]
|
45
|
+
s.require_paths = ["lib"]
|
46
|
+
s.rubygems_version = %q{1.5.0}
|
47
|
+
s.summary = %q{ChocBomb is a shameful copy of ChocTop}
|
48
|
+
s.test_files = [
|
49
|
+
"test/helper.rb",
|
50
|
+
"test/test_chocbomb.rb"
|
51
|
+
]
|
52
|
+
|
53
|
+
if s.respond_to? :specification_version then
|
54
|
+
s.specification_version = 3
|
55
|
+
|
56
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
57
|
+
s.add_runtime_dependency(%q<plist>, [">= 3.1.0"])
|
58
|
+
s.add_runtime_dependency(%q<escape>, [">= 0.0.4"])
|
59
|
+
s.add_runtime_dependency(%q<builder>, [">= 2.1.2"])
|
60
|
+
s.add_runtime_dependency(%q<RedCloth>, [">= 4.2.3"])
|
61
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
|
62
|
+
s.add_development_dependency(%q<rcov>, [">= 0"])
|
63
|
+
else
|
64
|
+
s.add_dependency(%q<plist>, [">= 3.1.0"])
|
65
|
+
s.add_dependency(%q<escape>, [">= 0.0.4"])
|
66
|
+
s.add_dependency(%q<builder>, [">= 2.1.2"])
|
67
|
+
s.add_dependency(%q<RedCloth>, [">= 4.2.3"])
|
68
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
69
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
70
|
+
end
|
71
|
+
else
|
72
|
+
s.add_dependency(%q<plist>, [">= 3.1.0"])
|
73
|
+
s.add_dependency(%q<escape>, [">= 0.0.4"])
|
74
|
+
s.add_dependency(%q<builder>, [">= 2.1.2"])
|
75
|
+
s.add_dependency(%q<RedCloth>, [">= 4.2.3"])
|
76
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
77
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
data/lib/chocbomb.rb
CHANGED
@@ -15,6 +15,8 @@ module ChocBomb
|
|
15
15
|
attr_accessor :release_notes
|
16
16
|
attr_accessor :private_key
|
17
17
|
|
18
|
+
attr_accessor :minimum_osx_version
|
19
|
+
|
18
20
|
# The background image
|
19
21
|
attr_accessor :background_file
|
20
22
|
|
@@ -53,6 +55,7 @@ module ChocBomb
|
|
53
55
|
def file(*args, &block)
|
54
56
|
path_or_helper, options = args.first.is_a?(Hash) ? [block, args.first] : [args.first, args.last]
|
55
57
|
throw "add_files #{path_or_helper}, :position => [x,y] option is missing" unless options[:position]
|
58
|
+
|
56
59
|
@files[path_or_helper] = options
|
57
60
|
end
|
58
61
|
|
@@ -72,8 +75,8 @@ module ChocBomb
|
|
72
75
|
throw "add_link :name => 'Name' option is missing" unless options[:name]
|
73
76
|
options[:name].gsub!(/(\.webloc|\.url)$/, '')
|
74
77
|
options[:name] += ".webloc"
|
75
|
-
|
76
|
-
files[options[:name]] = options
|
78
|
+
|
79
|
+
@files[options[:name]] = options
|
77
80
|
end
|
78
81
|
|
79
82
|
def initialize
|
@@ -82,7 +85,7 @@ module ChocBomb
|
|
82
85
|
|
83
86
|
yield self if block_given?
|
84
87
|
|
85
|
-
default
|
88
|
+
default
|
86
89
|
define_tasks
|
87
90
|
end
|
88
91
|
|
@@ -146,6 +149,8 @@ module ChocBomb
|
|
146
149
|
@pkg_relative_url = "#{@base_url.gsub(%r{/$}, '')}/#{@pkg_name}".gsub(%r{^.*#{@host}}, '')
|
147
150
|
|
148
151
|
@release_notes_template = "release_notes_template.html.erb"
|
152
|
+
|
153
|
+
@minimum_osx_version ||= nil
|
149
154
|
end
|
150
155
|
end
|
151
156
|
end
|
data/lib/chocbomb/tools/dmg.rb
CHANGED
@@ -6,7 +6,7 @@ module ChocBomb
|
|
6
6
|
attr_accessor :chocbomb
|
7
7
|
def initialize(cb)
|
8
8
|
@chocbomb = cb
|
9
|
-
@
|
9
|
+
@files_for_dmg = {}
|
10
10
|
end
|
11
11
|
|
12
12
|
def self.detach(cb)
|
@@ -33,8 +33,8 @@ module ChocBomb
|
|
33
33
|
end
|
34
34
|
end
|
35
35
|
|
36
|
-
def make
|
37
|
-
@
|
36
|
+
def make
|
37
|
+
@files_for_dmg = chocbomb.files.inject({}) do |files, file|
|
38
38
|
path_or_helper, options = file
|
39
39
|
path = case path_or_helper
|
40
40
|
when Symbol
|
@@ -48,13 +48,18 @@ module ChocBomb
|
|
48
48
|
files[path] = options
|
49
49
|
options[:name] ||= File.basename(path)
|
50
50
|
end
|
51
|
+
if path =~ %r{\.webloc$}
|
52
|
+
files[path] = options
|
53
|
+
options[:name] ||= File.basename(path)
|
54
|
+
options[:link] = true
|
55
|
+
end
|
51
56
|
files
|
52
57
|
end
|
53
|
-
|
58
|
+
|
54
59
|
FileUtils.rm_r(chocbomb.dmg_src_folder) if File.exists? chocbomb.dmg_src_folder
|
55
60
|
FileUtils.mkdir_p(chocbomb.dmg_src_folder)
|
56
61
|
|
57
|
-
@
|
62
|
+
@files_for_dmg.each do |path, options|
|
58
63
|
if options[:link]
|
59
64
|
webloc = <<-WEBLOC.gsub(/^ /, '')
|
60
65
|
<?xml version="1.0" encoding="UTF-8"?>
|
@@ -67,8 +72,8 @@ module ChocBomb
|
|
67
72
|
</plist>
|
68
73
|
WEBLOC
|
69
74
|
|
70
|
-
target
|
71
|
-
File.
|
75
|
+
target = File.join(chocbomb.dmg_src_folder, options[:name])
|
76
|
+
File.open(target, 'w').write(webloc)
|
72
77
|
else
|
73
78
|
target = File.join(chocbomb.dmg_src_folder, options[:name])
|
74
79
|
FileUtils.copy_entry(path, target)
|
@@ -166,7 +171,7 @@ module ChocBomb
|
|
166
171
|
end
|
167
172
|
|
168
173
|
def set_position_of_files
|
169
|
-
@
|
174
|
+
@files_for_dmg.map do |file_options|
|
170
175
|
path, options = file_options
|
171
176
|
target = options[:name]
|
172
177
|
position = options[:position].join(", ")
|
data/lib/chocbomb/tools/feed.rb
CHANGED
@@ -34,7 +34,8 @@ module ChocBomb
|
|
34
34
|
'xmlns:sparkle' => "http://www.andymatuschak.org/xml-namespaces/sparkle",
|
35
35
|
:version => "2.0") do
|
36
36
|
xml.channel do
|
37
|
-
xml.title(
|
37
|
+
xml.title(chocbomb.name)
|
38
|
+
xml.tag! "sparkle:minimumSystemVersion", chocbomb.minimum_osx_version unless chocbomb.minimum_osx_version.nil?
|
38
39
|
xml.description("#{chocbomb.name} updates")
|
39
40
|
xml.link(chocbomb.base_url)
|
40
41
|
xml.language('en')
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chocbomb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 1
|
10
|
+
version: 0.0.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- glejeune
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-03-
|
18
|
+
date: 2011-03-26 00:00:00 +01:00
|
19
19
|
default_executable: chocbomb
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -128,6 +128,7 @@ files:
|
|
128
128
|
- Rakefile
|
129
129
|
- VERSION
|
130
130
|
- bin/chocbomb
|
131
|
+
- chocbomb.gemspec
|
131
132
|
- lib/chocbomb.rb
|
132
133
|
- lib/chocbomb/rake/tasks.rb
|
133
134
|
- lib/chocbomb/tools/dmg.rb
|