hoe-seattlerb 1.0.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.tar.gz.sig ADDED
Binary file
data/.autotest ADDED
@@ -0,0 +1,23 @@
1
+ # -*- ruby -*-
2
+
3
+ require 'autotest/restart'
4
+
5
+ # Autotest.add_hook :initialize do |at|
6
+ # at.extra_files << "../some/external/dependency.rb"
7
+ #
8
+ # at.libs << ":../some/external"
9
+ #
10
+ # at.add_exception 'vendor'
11
+ #
12
+ # at.add_mapping(/dependency.rb/) do |f, _|
13
+ # at.files_matching(/test_.*rb$/)
14
+ # end
15
+ #
16
+ # %w(TestA TestB).each do |klass|
17
+ # at.extra_class_map[klass] = "test/test_misc.rb"
18
+ # end
19
+ # end
20
+
21
+ # Autotest.add_hook :run_command do |at|
22
+ # system "rake build"
23
+ # end
data/History.txt ADDED
@@ -0,0 +1,6 @@
1
+ === 1.0.0 / 2009-06-14
2
+
3
+ * 1 major enhancement
4
+
5
+ * Birthday!
6
+
data/Manifest.txt ADDED
@@ -0,0 +1,7 @@
1
+ .autotest
2
+ History.txt
3
+ Manifest.txt
4
+ README.txt
5
+ Rakefile
6
+ lib/hoe/minitest.rb
7
+ lib/hoe/perforce.rb
data/README.txt ADDED
@@ -0,0 +1,59 @@
1
+ = hoe_seattlerb
2
+
3
+ * http://seattlerb.rubyforge.org/hoe-seattlerb
4
+
5
+ == DESCRIPTION:
6
+
7
+ Hoe plugins providing tasks used by seattle.rb.
8
+
9
+ == FEATURES/PROBLEMS:
10
+
11
+ * hoe/minitest - switches your project to minitest
12
+ * hoe/perforce - automating how we release with perforce
13
+
14
+ == SYNOPSIS:
15
+
16
+ require 'rubygems'
17
+ require 'hoe'
18
+
19
+ Hoe.plugin :minitest
20
+ Hoe.plugin :perforce
21
+
22
+ Hoe.spec 'hoe-seattlerb' do
23
+ developer('Ryan Davis', 'ryand-ruby@zenspider.com')
24
+
25
+ self.rubyforge_name = 'seattlerb'
26
+ end
27
+
28
+ == REQUIREMENTS:
29
+
30
+ * hoe
31
+
32
+ == INSTALL:
33
+
34
+ * sudo gem install hoe-seattlerb
35
+
36
+ == LICENSE:
37
+
38
+ (The MIT License)
39
+
40
+ Copyright (c) 2009 Ryan Davis, seattle.rb
41
+
42
+ Permission is hereby granted, free of charge, to any person obtaining
43
+ a copy of this software and associated documentation files (the
44
+ 'Software'), to deal in the Software without restriction, including
45
+ without limitation the rights to use, copy, modify, merge, publish,
46
+ distribute, sublicense, and/or sell copies of the Software, and to
47
+ permit persons to whom the Software is furnished to do so, subject to
48
+ the following conditions:
49
+
50
+ The above copyright notice and this permission notice shall be
51
+ included in all copies or substantial portions of the Software.
52
+
53
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
54
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
55
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
56
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
57
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
58
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
59
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile ADDED
@@ -0,0 +1,17 @@
1
+ # -*- ruby -*-
2
+
3
+ $: << 'lib'
4
+
5
+ require 'rubygems'
6
+ require 'hoe'
7
+
8
+ Hoe.plugin :minitest
9
+ Hoe.plugin :perforce
10
+
11
+ Hoe.spec 'hoe-seattlerb' do
12
+ developer('Ryan Davis', 'ryand-ruby@zenspider.com')
13
+
14
+ self.rubyforge_name = 'seattlerb'
15
+ end
16
+
17
+ # vim: syntax=ruby
@@ -0,0 +1,11 @@
1
+ module Hoe::Minitest
2
+ VERSION = "1.0.0"
3
+
4
+ def initialize_minitest
5
+ self.testlib = :minitest
6
+ end
7
+
8
+ def define_minitest_tasks
9
+ # nothing to do
10
+ end
11
+ end
@@ -0,0 +1,120 @@
1
+ require 'find'
2
+
3
+ # TODO: release requirements have been met
4
+ # TODO: passes tests? (with warning or a flag to skip)
5
+
6
+ ##
7
+ # seattle.rb perforce projects are structured as:
8
+ #
9
+ # project_name/
10
+ # dev/
11
+ # History.txt
12
+ # Manifest.txt
13
+ # README.txt
14
+ # Rakefile
15
+ # bin/
16
+ # lib/
17
+ # test/
18
+ # ...
19
+ # 1.0.0/...
20
+ # 1.0.1/...
21
+ # ...
22
+ #
23
+ # Each release is a branch from project_name/dev to
24
+ # project_name/version. In perforce, branches can be explicit (created
25
+ # via a branch spec) or implicit (created by command-line). This
26
+ # structure can accommodate either but the code below is implicit.
27
+
28
+ module Hoe::Perforce
29
+ def define_perforce_tasks
30
+ warn :define_perforce_tasks if $DEBUG
31
+
32
+ desc "branch the project from dev to version dir"
33
+ task :branch do
34
+ Dir.chdir ".."
35
+
36
+ target_dir = File.directory?(version) ? version : "dev"
37
+ branching = target_dir == "dev"
38
+ pkg = File.basename(Dir.pwd)
39
+
40
+ begin
41
+ p4_integrate "dev", version if branching
42
+ validate_manifest_file version
43
+ p4_submit "Branching #{pkg} to version #{version}" if branching
44
+ rescue => e
45
+ p4_revert version
46
+ raise e
47
+ end
48
+
49
+ Dir.chdir version
50
+ end
51
+
52
+ task :prerelease => :branch
53
+
54
+ task :postrelease => :announce do
55
+ system 'rake clean'
56
+ end
57
+
58
+ task :email do
59
+ sh "mv email.txt ..; open -e ../email.txt"
60
+ end
61
+ end
62
+
63
+ ##
64
+ # perforce has an annoying "feature" that reads PWD and chdir's to
65
+ # it. Without either mucking in ENV or forcing a different kind of
66
+ # system call, it'll be in the original rake directory. I don't want
67
+ # that for these recipes, so we tack on ";" in order to force the
68
+ # right type of exec.
69
+
70
+ def p4sh cmd
71
+ sh "#{cmd};"
72
+ end
73
+
74
+ def validate_manifest_file manifest_dir
75
+ manifest_file = "#{manifest_dir}/Manifest.txt"
76
+ raise "#{manifest_file} does not exist" unless test ?f, manifest_file
77
+ manifest = File.new(manifest_file).readlines.map { |x| x.strip }
78
+
79
+ local_manifest = []
80
+
81
+ Dir.chdir manifest_dir do
82
+ system 'rake clean'
83
+ Find.find '.' do |f|
84
+ local_manifest << f.sub(/^\.\//, '') if File.file? f
85
+ end
86
+ end
87
+
88
+ extra_files = local_manifest - manifest
89
+ missing_files = manifest - local_manifest
90
+
91
+ msg = []
92
+
93
+ unless extra_files.empty? then
94
+ msg << "You have files that are not in your manifest"
95
+ msg << " #{extra_files.inspect}"
96
+ end
97
+
98
+ unless missing_files.empty? then
99
+ msg << "You have files that are missing from your manifest"
100
+ msg << " #{missing_files.inspect}"
101
+ end
102
+
103
+ raise msg.join("\n") unless msg.empty?
104
+ end
105
+
106
+ def p4_revert dir
107
+ puts "reverting #{dir}"
108
+ p4sh "p4 revert #{dir}/..."
109
+ end
110
+
111
+ def p4_integrate from, to
112
+ opened = `p4 opened ... 2>&1`
113
+ raise "You have files open" unless opened =~ /file\(s\) not opened/
114
+ p4sh "p4 integrate #{from}/... #{to}/..."
115
+ end
116
+
117
+ def p4_submit description
118
+ p4sh "p4 submit -d #{description.inspect} ..."
119
+ end
120
+ end
metadata ADDED
@@ -0,0 +1,95 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: hoe-seattlerb
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Ryan Davis
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain:
11
+ - |
12
+ -----BEGIN CERTIFICATE-----
13
+ MIIDPjCCAiagAwIBAgIBADANBgkqhkiG9w0BAQUFADBFMRMwEQYDVQQDDApyeWFu
14
+ ZC1ydWJ5MRkwFwYKCZImiZPyLGQBGRYJemVuc3BpZGVyMRMwEQYKCZImiZPyLGQB
15
+ GRYDY29tMB4XDTA5MDMwNjE4NTMxNVoXDTEwMDMwNjE4NTMxNVowRTETMBEGA1UE
16
+ AwwKcnlhbmQtcnVieTEZMBcGCgmSJomT8ixkARkWCXplbnNwaWRlcjETMBEGCgmS
17
+ JomT8ixkARkWA2NvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALda
18
+ b9DCgK+627gPJkB6XfjZ1itoOQvpqH1EXScSaba9/S2VF22VYQbXU1xQXL/WzCkx
19
+ taCPaLmfYIaFcHHCSY4hYDJijRQkLxPeB3xbOfzfLoBDbjvx5JxgJxUjmGa7xhcT
20
+ oOvjtt5P8+GSK9zLzxQP0gVLS/D0FmoE44XuDr3iQkVS2ujU5zZL84mMNqNB1znh
21
+ GiadM9GHRaDiaxuX0cIUBj19T01mVE2iymf9I6bEsiayK/n6QujtyCbTWsAS9Rqt
22
+ qhtV7HJxNKuPj/JFH0D2cswvzznE/a5FOYO68g+YCuFi5L8wZuuM8zzdwjrWHqSV
23
+ gBEfoTEGr7Zii72cx+sCAwEAAaM5MDcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAw
24
+ HQYDVR0OBBYEFEfFe9md/r/tj/Wmwpy+MI8d9k/hMA0GCSqGSIb3DQEBBQUAA4IB
25
+ AQAY59gYvDxqSqgC92nAP9P8dnGgfZgLxP237xS6XxFGJSghdz/nI6pusfCWKM8m
26
+ vzjjH2wUMSSf3tNudQ3rCGLf2epkcU13/rguI88wO6MrE0wi4ZqLQX+eZQFskJb/
27
+ w6x9W1ur8eR01s397LSMexySDBrJOh34cm2AlfKr/jokKCTwcM0OvVZnAutaovC0
28
+ l1SVZ0ecg88bsWHA0Yhh7NFxK1utWoIhtB6AFC/+trM0FQEB/jZkIS8SaNzn96Rl
29
+ n0sZEf77FLf5peR8TP/PtmIg7Cyqz23sLM4mCOoTGIy5OcZ8TdyiyINUHtb5ej/T
30
+ FBHgymkyj/AOSqKRIpXPhjC6
31
+ -----END CERTIFICATE-----
32
+
33
+ date: 2009-06-14 00:00:00 -07:00
34
+ default_executable:
35
+ dependencies:
36
+ - !ruby/object:Gem::Dependency
37
+ name: hoe
38
+ type: :development
39
+ version_requirement:
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ requirements:
42
+ - - ">="
43
+ - !ruby/object:Gem::Version
44
+ version: 2.1.0
45
+ version:
46
+ description: Hoe plugins providing tasks used by seattle.rb.
47
+ email:
48
+ - ryand-ruby@zenspider.com
49
+ executables: []
50
+
51
+ extensions: []
52
+
53
+ extra_rdoc_files:
54
+ - History.txt
55
+ - Manifest.txt
56
+ - README.txt
57
+ files:
58
+ - .autotest
59
+ - History.txt
60
+ - Manifest.txt
61
+ - README.txt
62
+ - Rakefile
63
+ - lib/hoe/minitest.rb
64
+ - lib/hoe/perforce.rb
65
+ has_rdoc: true
66
+ homepage: http://seattlerb.rubyforge.org/hoe-seattlerb
67
+ licenses: []
68
+
69
+ post_install_message:
70
+ rdoc_options:
71
+ - --main
72
+ - README.txt
73
+ require_paths:
74
+ - lib
75
+ required_ruby_version: !ruby/object:Gem::Requirement
76
+ requirements:
77
+ - - ">="
78
+ - !ruby/object:Gem::Version
79
+ version: "0"
80
+ version:
81
+ required_rubygems_version: !ruby/object:Gem::Requirement
82
+ requirements:
83
+ - - ">="
84
+ - !ruby/object:Gem::Version
85
+ version: "0"
86
+ version:
87
+ requirements: []
88
+
89
+ rubyforge_project: seattlerb
90
+ rubygems_version: 1.3.4
91
+ signing_key:
92
+ specification_version: 3
93
+ summary: Hoe plugins providing tasks used by seattle.rb.
94
+ test_files: []
95
+
metadata.gz.sig ADDED
Binary file