jenkins-plugin 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  module Jenkins
2
2
  class Plugin
3
- VERSION = "0.1.4"
3
+ VERSION = "0.1.5"
4
4
  end
5
5
  end
data/lib/jenkins/rake.rb CHANGED
@@ -1,10 +1,16 @@
1
1
  require 'jenkins/plugin/version'
2
+ require 'jenkins/plugin/specification'
2
3
  require 'jenkins/plugin/tools/hpi'
3
4
  require 'jenkins/plugin/tools/loadpath'
4
5
  require 'zip/zip'
5
6
 
6
7
  module Jenkins
7
8
  # given the IO handle, produce the basic manifest entries that are common between hpi and hpl formats
9
+
10
+ def self.spec
11
+ @spec ||= Jenkins::Plugin::Specification.load(Dir['*.pluginspec'].first)
12
+ end
13
+
8
14
  def self.generate_manifest(f)
9
15
  f.puts "Manifest-Version: 1.0"
10
16
  f.puts "Created-By: #{Jenkins::Plugin::VERSION}"
@@ -12,15 +18,15 @@ module Jenkins
12
18
  f.puts "Build-Ruby-Version: #{RUBY_VERSION}"
13
19
 
14
20
  f.puts "Group-Id: org.jenkins-ci.plugins"
15
- f.puts "Short-Name: #{::PluginName}"
16
- f.puts "Long-Name: #{::PluginName}" # TODO: better name
21
+ f.puts "Short-Name: #{Jenkins.spec.name}"
22
+ f.puts "Long-Name: #{Jenkins.spec.name}" # TODO: better name
17
23
  f.puts "Url: http://jenkins-ci.org/" # TODO: better value
18
24
  # f.puts "Compatible-Since-Version:"
19
25
  f.puts "Plugin-Class: ruby.RubyPlugin"
20
- f.puts "Plugin-Version: #{::PluginVersion}"
26
+ f.puts "Plugin-Version: #{Jenkins.spec.version}"
21
27
  f.puts "Jenkins-Version: 1.426"
22
28
 
23
- f.puts "Plugin-Dependencies: " + ::PluginDeps.map{|k,v| "#{k}:#{v}"}.join(",")
29
+ f.puts "Plugin-Dependencies: " + Jenkins.spec.dependencies.map{|k,v| "#{k}:#{v}"}.join(",")
24
30
  # f.puts "Plugin-Developers:"
25
31
  end
26
32
 
@@ -71,7 +77,7 @@ module Jenkins
71
77
  desc "package up stuff into HPI file"
72
78
  task :package => [:verify_constants, target, :bundle] do
73
79
 
74
- file_name = "#{target}/#{::PluginName}.hpi"
80
+ file_name = "#{target}/#{Jenkins.spec.name}.hpi"
75
81
  File.delete file_name if File.exists?(file_name)
76
82
 
77
83
  Zip::ZipFile.open(file_name, Zip::ZipFile::CREATE) do |zipfile|
@@ -89,7 +95,7 @@ module Jenkins
89
95
  end
90
96
  end
91
97
  end
92
- puts "#{::PluginName} plugin #{::PluginVersion} built to #{file_name}"
98
+ puts "#{Jenkins.spec.name} plugin #{Jenkins.spec.version} built to #{file_name}"
93
99
  end
94
100
 
95
101
  desc "resolve dependency plugins into #{work}/plugins"
@@ -97,7 +103,7 @@ module Jenkins
97
103
  FileUtils.mkdir_p("#{work}/plugins")
98
104
 
99
105
  puts "Copying plugin dependencies into #{work}/plugins"
100
- ::PluginDeps.each do |short_name,version|
106
+ Jenkins.spec.dependencies.each do |short_name,version|
101
107
  FileUtils.cp Jenkins::Plugin::Tools::Hpi::resolve(short_name,version), "#{work}/plugins/#{short_name}.hpi", :verbose=>true
102
108
  end
103
109
  end
@@ -112,7 +118,7 @@ module Jenkins
112
118
 
113
119
  # generate the plugin manifest
114
120
  FileUtils.mkdir_p("#{work}/plugins")
115
- File.open("#{work}/plugins/#{::PluginName}.hpl",mode="w+") do |f|
121
+ File.open("#{work}/plugins/#{Jenkins.spec.name}.hpl",mode="w+") do |f|
116
122
  Jenkins.generate_manifest f
117
123
 
118
124
  f.puts "Load-Path: #{loadpath.to_a.join(':')}"
metadata CHANGED
@@ -1,16 +1,11 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jenkins-plugin
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
5
4
  prerelease:
6
- segments:
7
- - 0
8
- - 1
9
- - 4
10
- version: 0.1.4
5
+ version: 0.1.5
11
6
  platform: ruby
12
7
  authors:
13
- - Charles Lowell
8
+ - Charles Lowell
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
@@ -18,116 +13,93 @@ cert_chain: []
18
13
  date: 2011-09-16 00:00:00 -05:00
19
14
  default_executable:
20
15
  dependencies:
21
- - !ruby/object:Gem::Dependency
22
- name: rubyzip
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- hash: 3
30
- segments:
31
- - 0
32
- version: "0"
33
- type: :runtime
34
- version_requirements: *id001
35
- - !ruby/object:Gem::Dependency
36
- name: thor
37
- prerelease: false
38
- requirement: &id002 !ruby/object:Gem::Requirement
39
- none: false
40
- requirements:
41
- - - ">="
42
- - !ruby/object:Gem::Version
43
- hash: 3
44
- segments:
45
- - 0
46
- version: "0"
47
- type: :runtime
48
- version_requirements: *id002
49
- - !ruby/object:Gem::Dependency
50
- name: jenkins-war
51
- prerelease: false
52
- requirement: &id003 !ruby/object:Gem::Requirement
53
- none: false
54
- requirements:
55
- - - ">="
56
- - !ruby/object:Gem::Version
57
- hash: 857
58
- segments:
59
- - 1
60
- - 427
61
- version: "1.427"
62
- type: :runtime
63
- version_requirements: *id003
64
- - !ruby/object:Gem::Dependency
65
- name: bundler
66
- prerelease: false
67
- requirement: &id004 !ruby/object:Gem::Requirement
68
- none: false
69
- requirements:
70
- - - ~>
71
- - !ruby/object:Gem::Version
72
- hash: 23
73
- segments:
74
- - 1
75
- - 0
76
- - 0
77
- version: 1.0.0
78
- type: :runtime
79
- version_requirements: *id004
80
- - !ruby/object:Gem::Dependency
81
- name: rspec
82
- prerelease: false
83
- requirement: &id005 !ruby/object:Gem::Requirement
84
- none: false
85
- requirements:
86
- - - ~>
87
- - !ruby/object:Gem::Version
88
- hash: 3
89
- segments:
90
- - 2
91
- - 0
92
- version: "2.0"
93
- type: :development
94
- version_requirements: *id005
95
- - !ruby/object:Gem::Dependency
96
- name: cucumber
97
- prerelease: false
98
- requirement: &id006 !ruby/object:Gem::Requirement
99
- none: false
100
- requirements:
101
- - - ~>
102
- - !ruby/object:Gem::Version
103
- hash: 15
104
- segments:
105
- - 1
106
- - 0
107
- version: "1.0"
108
- type: :development
109
- version_requirements: *id006
16
+ - !ruby/object:Gem::Dependency
17
+ name: rubyzip
18
+ prerelease: false
19
+ requirement: &id001 !ruby/object:Gem::Requirement
20
+ none: false
21
+ requirements:
22
+ - - ">="
23
+ - !ruby/object:Gem::Version
24
+ version: "0"
25
+ type: :runtime
26
+ version_requirements: *id001
27
+ - !ruby/object:Gem::Dependency
28
+ name: thor
29
+ prerelease: false
30
+ requirement: &id002 !ruby/object:Gem::Requirement
31
+ none: false
32
+ requirements:
33
+ - - ">="
34
+ - !ruby/object:Gem::Version
35
+ version: "0"
36
+ type: :runtime
37
+ version_requirements: *id002
38
+ - !ruby/object:Gem::Dependency
39
+ name: jenkins-war
40
+ prerelease: false
41
+ requirement: &id003 !ruby/object:Gem::Requirement
42
+ none: false
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: "1.427"
47
+ type: :runtime
48
+ version_requirements: *id003
49
+ - !ruby/object:Gem::Dependency
50
+ name: bundler
51
+ prerelease: false
52
+ requirement: &id004 !ruby/object:Gem::Requirement
53
+ none: false
54
+ requirements:
55
+ - - ~>
56
+ - !ruby/object:Gem::Version
57
+ version: 1.0.0
58
+ type: :runtime
59
+ version_requirements: *id004
60
+ - !ruby/object:Gem::Dependency
61
+ name: rspec
62
+ prerelease: false
63
+ requirement: &id005 !ruby/object:Gem::Requirement
64
+ none: false
65
+ requirements:
66
+ - - ~>
67
+ - !ruby/object:Gem::Version
68
+ version: "2.0"
69
+ type: :development
70
+ version_requirements: *id005
71
+ - !ruby/object:Gem::Dependency
72
+ name: cucumber
73
+ prerelease: false
74
+ requirement: &id006 !ruby/object:Gem::Requirement
75
+ none: false
76
+ requirements:
77
+ - - ~>
78
+ - !ruby/object:Gem::Version
79
+ version: "1.0"
80
+ type: :development
81
+ version_requirements: *id006
110
82
  description: I'll think of a better description later, but if you're reading this, then I haven't
111
83
  email:
112
- - cowboyd@thefrontside.net
84
+ - cowboyd@thefrontside.net
113
85
  executables:
114
- - jpi
86
+ - jpi
115
87
  extensions: []
116
88
 
117
89
  extra_rdoc_files: []
118
90
 
119
91
  files:
120
- - .gitignore
121
- - Gemfile
122
- - README.md
123
- - Rakefile
124
- - bin/jpi
125
- - features/create-new-plugin.feature
126
- - jenkins-plugin.gemspec
127
- - lib/jenkins/plugin/tools/hpi.rb
128
- - lib/jenkins/plugin/tools/loadpath.rb
129
- - lib/jenkins/plugin/version.rb
130
- - lib/jenkins/rake.rb
92
+ - .gitignore
93
+ - Gemfile
94
+ - README.md
95
+ - Rakefile
96
+ - bin/jpi
97
+ - features/create-new-plugin.feature
98
+ - jenkins-plugin.gemspec
99
+ - lib/jenkins/plugin/tools/hpi.rb
100
+ - lib/jenkins/plugin/tools/loadpath.rb
101
+ - lib/jenkins/plugin/version.rb
102
+ - lib/jenkins/rake.rb
131
103
  has_rdoc: true
132
104
  homepage: http://github.com/cowboyd/jenkins-plugin
133
105
  licenses: []
@@ -136,31 +108,25 @@ post_install_message:
136
108
  rdoc_options: []
137
109
 
138
110
  require_paths:
139
- - lib
111
+ - lib
140
112
  required_ruby_version: !ruby/object:Gem::Requirement
141
113
  none: false
142
114
  requirements:
143
- - - ">="
144
- - !ruby/object:Gem::Version
145
- hash: 3
146
- segments:
147
- - 0
148
- version: "0"
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: "0"
149
118
  required_rubygems_version: !ruby/object:Gem::Requirement
150
119
  none: false
151
120
  requirements:
152
- - - ">="
153
- - !ruby/object:Gem::Version
154
- hash: 3
155
- segments:
156
- - 0
157
- version: "0"
121
+ - - ">="
122
+ - !ruby/object:Gem::Version
123
+ version: "0"
158
124
  requirements: []
159
125
 
160
126
  rubyforge_project: jenkins-plugin
161
- rubygems_version: 1.6.2
127
+ rubygems_version: 1.5.1
162
128
  signing_key:
163
129
  specification_version: 3
164
130
  summary: Tools for creating and building Jenkins Ruby plugins
165
131
  test_files:
166
- - features/create-new-plugin.feature
132
+ - features/create-new-plugin.feature