choctop 0.9.6 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +10 -0
- data/Manifest.txt +16 -7
- data/README.rdoc +7 -3
- data/app_generators/install_choctop/templates/Rakefile.erb +2 -3
- data/features/development.feature +5 -5
- data/features/dmg.feature +34 -28
- data/features/fixtures/SampleApp/README.txt +1 -0
- data/features/fixtures/SampleApp/build/Release/README.txt +1 -0
- data/features/fixtures/SampleApp/build/Release/dmg/README.txt +1 -0
- data/features/initial_generator.feature +10 -10
- data/features/rake_tasks.feature +15 -15
- data/features/sparkle_feed.feature +25 -25
- data/features/step_definitions/common_steps.rb +177 -0
- data/features/{steps → step_definitions}/dmg_steps.rb +12 -4
- data/features/{steps → step_definitions}/file_attribute_steps.rb +2 -2
- data/features/{steps/generator.rb → step_definitions/generator_steps.rb} +2 -2
- data/features/{steps/remote.rb → step_definitions/remote_steps.rb} +2 -2
- data/features/{steps → step_definitions}/xcode_steps.rb +1 -1
- data/features/support/common.rb +44 -0
- data/features/{steps → support}/env.rb +0 -0
- data/features/support/matchers.rb +11 -0
- data/lib/choctop.rb +66 -28
- data/lib/choctop/appcast.rb +1 -1
- data/lib/choctop/dmg.rb +22 -3
- data/spec/choctop_spec.rb +85 -0
- data/spec/spec.opts +1 -0
- data/spec/spec_helper.rb +5 -0
- data/tasks/rspec.rake +21 -0
- metadata +44 -13
- data/features/steps/common.rb +0 -248
data/spec/spec.opts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--colour
|
data/spec/spec_helper.rb
ADDED
data/tasks/rspec.rake
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
begin
|
2
|
+
require 'spec'
|
3
|
+
rescue LoadError
|
4
|
+
require 'rubygems'
|
5
|
+
require 'spec'
|
6
|
+
end
|
7
|
+
begin
|
8
|
+
require 'spec/rake/spectask'
|
9
|
+
rescue LoadError
|
10
|
+
puts <<-EOS
|
11
|
+
To use rspec for testing you must install rspec gem:
|
12
|
+
gem install rspec
|
13
|
+
EOS
|
14
|
+
exit(0)
|
15
|
+
end
|
16
|
+
|
17
|
+
desc "Run the specs under spec/models"
|
18
|
+
Spec::Rake::SpecTask.new do |t|
|
19
|
+
t.spec_opts = ['--options', "spec/spec.opts"]
|
20
|
+
t.spec_files = FileList['spec/**/*_spec.rb']
|
21
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: choctop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dr Nic Williams
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2009-
|
13
|
+
date: 2009-06-11 00:00:00 +10:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -51,7 +51,7 @@ dependencies:
|
|
51
51
|
requirements:
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 1.
|
54
|
+
version: 1.4.1
|
55
55
|
version:
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: hoe
|
@@ -63,7 +63,24 @@ dependencies:
|
|
63
63
|
- !ruby/object:Gem::Version
|
64
64
|
version: 1.8.0
|
65
65
|
version:
|
66
|
-
description:
|
66
|
+
description: |-
|
67
|
+
Package up your OS X/Cocoa applications into Custom DMGs, generate Sparkle XML, and
|
68
|
+
upload. Instead of hours, its only 30 seconds to release each new version of an application.
|
69
|
+
|
70
|
+
Build and deploy tools for Cocoa apps using Sparkle for distributions and upgrades; it's
|
71
|
+
like Hoe but for Cocoa apps.
|
72
|
+
|
73
|
+
The main feature is a powerful rake task "rake appcast" which builds a release of your
|
74
|
+
application, creates a DMG package, generates a Sparkle XML file, and posts the package
|
75
|
+
and XML file to your remote host via rsync.
|
76
|
+
|
77
|
+
All rake tasks:
|
78
|
+
|
79
|
+
rake appcast # Create dmg, update appcast file, and upload to host
|
80
|
+
rake build # Build Xcode Release
|
81
|
+
rake dmg # Create the dmg file for appcasting
|
82
|
+
rake feed # Create/update the appcast file
|
83
|
+
rake upload # Upload the appcast file to the host
|
67
84
|
email:
|
68
85
|
- drnicwilliams@gmail.com
|
69
86
|
- chris@cobaltedge.com
|
@@ -75,6 +92,9 @@ extra_rdoc_files:
|
|
75
92
|
- History.txt
|
76
93
|
- Manifest.txt
|
77
94
|
- README.rdoc
|
95
|
+
- features/fixtures/SampleApp/README.txt
|
96
|
+
- features/fixtures/SampleApp/build/Release/README.txt
|
97
|
+
- features/fixtures/SampleApp/build/Release/dmg/README.txt
|
78
98
|
files:
|
79
99
|
- History.txt
|
80
100
|
- Manifest.txt
|
@@ -116,27 +136,36 @@ files:
|
|
116
136
|
- features/fixtures/SampleApp/English.lproj/InfoPlist.strings
|
117
137
|
- features/fixtures/SampleApp/English.lproj/MainMenu.xib
|
118
138
|
- features/fixtures/SampleApp/Info.plist
|
139
|
+
- features/fixtures/SampleApp/README.txt
|
119
140
|
- features/fixtures/SampleApp/SampleApp.xcodeproj/TemplateIcon.icns
|
120
141
|
- features/fixtures/SampleApp/SampleApp.xcodeproj/project.pbxproj
|
121
142
|
- features/fixtures/SampleApp/SampleApp_Prefix.pch
|
143
|
+
- features/fixtures/SampleApp/build/Release/README.txt
|
144
|
+
- features/fixtures/SampleApp/build/Release/dmg/README.txt
|
122
145
|
- features/fixtures/SampleApp/main.m
|
123
146
|
- features/fixtures/custom_assets/appicon.icns
|
124
147
|
- features/initial_generator.feature
|
125
148
|
- features/rake_tasks.feature
|
126
149
|
- features/sparkle_feed.feature
|
127
|
-
- features/
|
128
|
-
- features/
|
129
|
-
- features/
|
130
|
-
- features/
|
131
|
-
- features/
|
132
|
-
- features/
|
133
|
-
- features/
|
150
|
+
- features/step_definitions/common_steps.rb
|
151
|
+
- features/step_definitions/dmg_steps.rb
|
152
|
+
- features/step_definitions/file_attribute_steps.rb
|
153
|
+
- features/step_definitions/generator_steps.rb
|
154
|
+
- features/step_definitions/remote_steps.rb
|
155
|
+
- features/step_definitions/xcode_steps.rb
|
156
|
+
- features/support/common.rb
|
157
|
+
- features/support/env.rb
|
158
|
+
- features/support/matchers.rb
|
134
159
|
- lib/choctop.rb
|
135
160
|
- lib/choctop/appcast.rb
|
136
161
|
- lib/choctop/dmg.rb
|
137
162
|
- script/console
|
138
163
|
- script/destroy
|
139
164
|
- script/generate
|
165
|
+
- spec/choctop_spec.rb
|
166
|
+
- spec/spec.opts
|
167
|
+
- spec/spec_helper.rb
|
168
|
+
- tasks/rspec.rake
|
140
169
|
- website/_layouts/default.html
|
141
170
|
- website/_layouts/post.html
|
142
171
|
- website/_posts/2009-02-02-first-post.markdown
|
@@ -165,6 +194,8 @@ files:
|
|
165
194
|
- website/index.markdown
|
166
195
|
has_rdoc: true
|
167
196
|
homepage: http://drnic.github.com/choctop
|
197
|
+
licenses: []
|
198
|
+
|
168
199
|
post_install_message:
|
169
200
|
rdoc_options:
|
170
201
|
- --main
|
@@ -186,9 +217,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
186
217
|
requirements: []
|
187
218
|
|
188
219
|
rubyforge_project: choctop
|
189
|
-
rubygems_version: 1.3.
|
220
|
+
rubygems_version: 1.3.4
|
190
221
|
signing_key:
|
191
|
-
specification_version:
|
222
|
+
specification_version: 3
|
192
223
|
summary: Package up your OS X/Cocoa applications into Custom DMGs, generate Sparkle XML, and upload
|
193
224
|
test_files: []
|
194
225
|
|
data/features/steps/common.rb
DELETED
@@ -1,248 +0,0 @@
|
|
1
|
-
def in_project_folder(&block)
|
2
|
-
project_folder = @active_project_folder || @tmp_root
|
3
|
-
FileUtils.chdir(project_folder, &block)
|
4
|
-
end
|
5
|
-
|
6
|
-
def in_home_folder(&block)
|
7
|
-
FileUtils.chdir(@home_path, &block)
|
8
|
-
end
|
9
|
-
|
10
|
-
Given %r{^a safe folder} do
|
11
|
-
FileUtils.rm_rf @tmp_root = File.dirname(__FILE__) + "/../../tmp"
|
12
|
-
FileUtils.mkdir_p @tmp_root
|
13
|
-
FileUtils.mkdir_p @home_path = File.expand_path(File.join(@tmp_root, "home"))
|
14
|
-
@lib_path = File.expand_path(File.dirname(__FILE__) + '/../../lib')
|
15
|
-
Given "env variable $HOME set to '#{@home_path}'"
|
16
|
-
end
|
17
|
-
|
18
|
-
Given %r{^this project is active project folder} do
|
19
|
-
Given "a safe folder"
|
20
|
-
@active_project_folder = File.expand_path(File.dirname(__FILE__) + "/../..")
|
21
|
-
end
|
22
|
-
|
23
|
-
Given %r{^env variable \$([\w_]+) set to '(.*)'} do |env_var, value|
|
24
|
-
ENV[env_var] = value
|
25
|
-
end
|
26
|
-
|
27
|
-
def prepend_to_file(filename, text)
|
28
|
-
file = File.read(filename)
|
29
|
-
File.open(filename, "w+") do |f|
|
30
|
-
f << text + "\n"
|
31
|
-
f << file
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
def append_to_file(filename, text)
|
36
|
-
File.open(filename, "a") do |f|
|
37
|
-
f << text + "\n"
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
|
-
def setup_active_project_folder project_name
|
42
|
-
@active_project_folder = File.join(@tmp_root, project_name)
|
43
|
-
FileUtils.mkdir_p @active_project_folder
|
44
|
-
@project_name = project_name
|
45
|
-
end
|
46
|
-
|
47
|
-
Given %r{'(.*)' folder is deleted} do |folder|
|
48
|
-
in_project_folder do
|
49
|
-
FileUtils.rm_rf folder
|
50
|
-
end
|
51
|
-
end
|
52
|
-
|
53
|
-
Given %r{file '(.*)' is deleted} do |file|
|
54
|
-
in_project_folder do
|
55
|
-
FileUtils.rm_rf file
|
56
|
-
end
|
57
|
-
end
|
58
|
-
|
59
|
-
When %r{^'(.*)' generator is invoked with arguments '(.*)'$} do |generator, arguments|
|
60
|
-
@stdout = StringIO.new
|
61
|
-
FileUtils.chdir(@active_project_folder) do
|
62
|
-
if Object.const_defined?("APP_ROOT")
|
63
|
-
APP_ROOT.replace(FileUtils.pwd)
|
64
|
-
else
|
65
|
-
APP_ROOT = FileUtils.pwd
|
66
|
-
end
|
67
|
-
run_generator(generator, arguments.split(' '), SOURCES, :stdout => @stdout)
|
68
|
-
end
|
69
|
-
File.open(File.join(@tmp_root, "generator.out"), "w") do |f|
|
70
|
-
@stdout.rewind
|
71
|
-
f << @stdout.read
|
72
|
-
end
|
73
|
-
end
|
74
|
-
|
75
|
-
When %r{run executable '(.*)' with arguments '(.*)'} do |executable, arguments|
|
76
|
-
@stdout = File.expand_path(File.join(@tmp_root, "executable.out"))
|
77
|
-
in_project_folder do
|
78
|
-
system "#{executable} #{arguments} > #{@stdout} 2> #{@stdout}"
|
79
|
-
end
|
80
|
-
end
|
81
|
-
|
82
|
-
When %r{run project executable '(.*)' with arguments '(.*)'} do |executable, arguments|
|
83
|
-
@stdout = File.expand_path(File.join(@tmp_root, "executable.out"))
|
84
|
-
in_project_folder do
|
85
|
-
system "ruby #{executable} #{arguments} > #{@stdout} 2> #{@stdout}"
|
86
|
-
end
|
87
|
-
end
|
88
|
-
|
89
|
-
When %r{run local executable '(.*)' with arguments '(.*)'} do |executable, arguments|
|
90
|
-
@stdout = File.expand_path(File.join(@tmp_root, "executable.out"))
|
91
|
-
executable = File.expand_path(File.join(File.dirname(__FILE__), "/../../bin", executable))
|
92
|
-
in_project_folder do
|
93
|
-
system "ruby #{executable} #{arguments} > #{@stdout} 2> #{@stdout}"
|
94
|
-
end
|
95
|
-
end
|
96
|
-
|
97
|
-
When %r{^task 'rake (.*)' is invoked$} do |task|
|
98
|
-
@stdout = File.expand_path(File.join(@tmp_root, "tests.out"))
|
99
|
-
FileUtils.chdir(@active_project_folder) do
|
100
|
-
system "rake #{task} --trace > #{@stdout} 2> #{@stdout}"
|
101
|
-
end
|
102
|
-
end
|
103
|
-
|
104
|
-
Then %r{^folder '(.*)' (is|is not) created} do |folder, is|
|
105
|
-
in_project_folder do
|
106
|
-
File.exists?(folder).should(is == 'is' ? be_true : be_false)
|
107
|
-
end
|
108
|
-
end
|
109
|
-
|
110
|
-
Then %r{^file '(.*)' (is|is not) created} do |file, is|
|
111
|
-
in_project_folder do
|
112
|
-
File.exists?(file).should(is == 'is' ? be_true : be_false)
|
113
|
-
end
|
114
|
-
end
|
115
|
-
|
116
|
-
Then %r{^file with name matching '(.*)' is created} do |pattern|
|
117
|
-
in_project_folder do
|
118
|
-
Dir[pattern].should_not be_empty
|
119
|
-
end
|
120
|
-
end
|
121
|
-
|
122
|
-
Then %r{gem file '(.*)' and generated file '(.*)' should be the same} do |gem_file, project_file|
|
123
|
-
File.exists?(gem_file).should be_true
|
124
|
-
File.exists?(project_file).should be_true
|
125
|
-
gem_file_contents = File.read(File.dirname(__FILE__) + "/../../#{gem_file}")
|
126
|
-
project_file_contents = File.read(File.join(@active_project_folder, project_file))
|
127
|
-
project_file_contents.should == gem_file_contents
|
128
|
-
end
|
129
|
-
|
130
|
-
Then %r{^output same as contents of '(.*)'$} do |file|
|
131
|
-
expected_output = File.read(File.join(File.dirname(__FILE__) + "/../expected_outputs", file))
|
132
|
-
actual_output = File.read(@stdout)
|
133
|
-
actual_output.should == expected_output
|
134
|
-
end
|
135
|
-
|
136
|
-
Then %r{^(does|does not) invoke generator '(.*)'$} do |does_invoke, generator|
|
137
|
-
actual_output = File.read(@stdout)
|
138
|
-
does_invoke == "does" ?
|
139
|
-
actual_output.should(match(/dependency\s+#{generator}/)) :
|
140
|
-
actual_output.should_not(match(/dependency\s+#{generator}/))
|
141
|
-
end
|
142
|
-
|
143
|
-
Then %r{help options '(.*)' and '(.*)' are displayed} do |opt1, opt2|
|
144
|
-
actual_output = File.read(@stdout)
|
145
|
-
actual_output.should match(/#{opt1}/)
|
146
|
-
actual_output.should match(/#{opt2}/)
|
147
|
-
end
|
148
|
-
|
149
|
-
Then %r{^output (does|does not) match \/(.*)\/} do |does, regex|
|
150
|
-
actual_output = File.read(@stdout)
|
151
|
-
(does == 'does') ?
|
152
|
-
actual_output.should(match(/#{regex}/)) :
|
153
|
-
actual_output.should_not(match(/#{regex}/))
|
154
|
-
end
|
155
|
-
|
156
|
-
Then %r{^contents of file '(.*)' (does|does not) match \/(.*)\/} do |file, does, regex|
|
157
|
-
in_project_folder do
|
158
|
-
actual_output = File.read(file)
|
159
|
-
(does == 'does') ?
|
160
|
-
actual_output.should(match(/#{regex}/)) :
|
161
|
-
actual_output.should_not(match(/#{regex}/))
|
162
|
-
end
|
163
|
-
end
|
164
|
-
|
165
|
-
Then %r{^all (\d+) tests pass} do |expected_test_count|
|
166
|
-
expected = %r{^#{expected_test_count} tests, \d+ assertions, 0 failures, 0 errors}
|
167
|
-
actual_output = File.read(@stdout)
|
168
|
-
actual_output.should match(expected)
|
169
|
-
end
|
170
|
-
|
171
|
-
Then %r{^all (\d+) examples pass} do |expected_test_count|
|
172
|
-
expected = %r{^#{expected_test_count} examples?, 0 failures}
|
173
|
-
actual_output = File.read(@stdout)
|
174
|
-
actual_output.should match(expected)
|
175
|
-
end
|
176
|
-
|
177
|
-
Then %r{^yaml file '(.*)' contains (\{.*\})} do |file, yaml|
|
178
|
-
in_project_folder do
|
179
|
-
yaml = eval yaml
|
180
|
-
YAML.load(File.read(file)).should == yaml
|
181
|
-
end
|
182
|
-
end
|
183
|
-
|
184
|
-
Then %r{^Rakefile can display tasks successfully} do
|
185
|
-
@stdout = File.expand_path(File.join(@tmp_root, "rakefile.out"))
|
186
|
-
FileUtils.chdir(@active_project_folder) do
|
187
|
-
system "rake -T > #{@stdout} 2> #{@stdout}"
|
188
|
-
end
|
189
|
-
actual_output = File.read(@stdout)
|
190
|
-
actual_output.should match(/^rake\s+\w+\s+#\s.*/)
|
191
|
-
end
|
192
|
-
|
193
|
-
Then %r{^task 'rake (.*)' is executed successfully} do |task|
|
194
|
-
@stdout.should_not be_nil
|
195
|
-
actual_output = File.read(@stdout)
|
196
|
-
actual_output.should_not match(/^Don't know how to build task '#{task}'/)
|
197
|
-
actual_output.should_not match(/Error/i)
|
198
|
-
end
|
199
|
-
|
200
|
-
Then %r{^gem spec key '(.*)' contains \/(.*)\/} do |key, regex|
|
201
|
-
in_project_folder do
|
202
|
-
gem_file = Dir["pkg/*.gem"].first
|
203
|
-
gem_spec = Gem::Specification.from_yaml(`gem spec #{gem_file}`)
|
204
|
-
spec_value = gem_spec.send(key.to_sym)
|
205
|
-
spec_value.to_s.should match(/#{regex}/)
|
206
|
-
end
|
207
|
-
end
|
208
|
-
|
209
|
-
Given /^file '(.*)' timestamp remembered$/ do |file|
|
210
|
-
in_project_folder do
|
211
|
-
@timestamp = File.new(file).mtime
|
212
|
-
end
|
213
|
-
end
|
214
|
-
|
215
|
-
Then /^file '(.*)' is unchanged$/ do |file|
|
216
|
-
raise %Q{ERROR: need to use "Given file '#{file}' timestamp remembered" to set the timestamp} unless @timestamp
|
217
|
-
in_project_folder do
|
218
|
-
File.new(file).mtime.should == @timestamp
|
219
|
-
end
|
220
|
-
end
|
221
|
-
|
222
|
-
Then /^file '(.*)' is modified$/ do |file|
|
223
|
-
raise %Q{ERROR: need to use "Given file '#{file}' timestamp remembered" to set the timestamp} unless @timestamp
|
224
|
-
in_project_folder do
|
225
|
-
File.new(file).mtime.should_not == @timestamp
|
226
|
-
end
|
227
|
-
end
|
228
|
-
|
229
|
-
When %r{^in file '(.*)' replace /(.*)/ with '(.*)'$} do |file, from, to|
|
230
|
-
in_project_folder do
|
231
|
-
contents = File.read(file)
|
232
|
-
File.open(file, "w") do |f|
|
233
|
-
f << contents.gsub(/#{from}/, to)
|
234
|
-
end
|
235
|
-
end
|
236
|
-
end
|
237
|
-
|
238
|
-
Then /^file '(.*)' (is|is not) invisible$/ do |file, is|
|
239
|
-
`GetFileInfo -aV '#{file}'`.to_i.should_not == (is == 'is' ? 0 : 1)
|
240
|
-
end
|
241
|
-
|
242
|
-
Then /^file '(.*)' is a symlink to '(.*)'$/ do |path, target_path|
|
243
|
-
in_project_folder do
|
244
|
-
stdout = `ls -al #{path}`
|
245
|
-
stdout =~ /\s([^\s]+)\s->\s(.+)$/
|
246
|
-
target_path.should == $2
|
247
|
-
end
|
248
|
-
end
|