jpi 0.3.4 → 0.3.5
Sign up to get free protection for your applications and to get access to all the features.
data/jpi.gemspec
CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |s|
|
|
8
8
|
s.platform = Gem::Platform::RUBY
|
9
9
|
s.authors = ["Charles Lowell", "Jørgen P. Tjernø", "Kohsuke Kawaguchi"]
|
10
10
|
s.email = ["cowboyd@thefrontside.net"]
|
11
|
-
s.homepage = "https://github.com/jenkinsci/
|
11
|
+
s.homepage = "https://github.com/jenkinsci/jenkins.rb/tree/master/ruby-tools/jpi"
|
12
12
|
s.summary = %q{Tools for creating and building Jenkins Ruby plugins}
|
13
13
|
s.description = %q{Allows you to generate a new Ruby plugin project, build it, test it in Jenkins and release it to the Jenkins Update Center.}
|
14
14
|
|
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
|
|
21
21
|
s.add_dependency "thor"
|
22
22
|
s.add_dependency "jenkins-war", ">= 1.427"
|
23
23
|
s.add_dependency "bundler", "~> 1.1.0"
|
24
|
-
s.add_dependency "jenkins-plugin-runtime", "~>
|
24
|
+
s.add_dependency "jenkins-plugin-runtime", "~> #{Jenkins::Plugin::RUNTIME_VERSION_DEPENDENCY}"
|
25
25
|
|
26
26
|
s.add_development_dependency "rspec", "~> 2.0"
|
27
27
|
s.add_development_dependency "cucumber", "~> 1.0"
|
data/lib/jenkins/plugin/cli.rb
CHANGED
@@ -5,6 +5,18 @@ require 'jenkins/plugin/cli/formatting'
|
|
5
5
|
require 'jenkins/plugin/cli/new'
|
6
6
|
require 'jenkins/plugin/cli/generate'
|
7
7
|
|
8
|
+
# Until a new version (>= 0.14.6 & 0.15.0rc2) is released, this backports a fix
|
9
|
+
# for JRuby argument handling:
|
10
|
+
# https://github.com/wycats/thor/commit/33490a59ed297eb798381f1c86cbaa3608413eaf
|
11
|
+
class Thor
|
12
|
+
class Task
|
13
|
+
def sans_backtrace(backtrace, caller) #:nodoc:
|
14
|
+
saned = backtrace.reject { |frame| frame =~ FILE_REGEXP || (frame =~ /\.java:/ && RUBY_PLATFORM =~ /java/) }
|
15
|
+
saned -= caller
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
8
20
|
|
9
21
|
module Jenkins
|
10
22
|
class Plugin
|
@@ -63,4 +75,4 @@ module Jenkins
|
|
63
75
|
|
64
76
|
end
|
65
77
|
end
|
66
|
-
end
|
78
|
+
end
|
@@ -1,5 +1,5 @@
|
|
1
|
-
|
2
1
|
require 'thor/group'
|
2
|
+
require 'jenkins/plugin/version'
|
3
3
|
|
4
4
|
module Jenkins
|
5
5
|
class Plugin
|
@@ -11,8 +11,16 @@ module Jenkins
|
|
11
11
|
|
12
12
|
argument :name
|
13
13
|
|
14
|
+
def name
|
15
|
+
@name.gsub(/\s+/, '-').sub(/[_-]plugin$/, '')
|
16
|
+
end
|
17
|
+
|
18
|
+
def repository_name
|
19
|
+
name + '-plugin'
|
20
|
+
end
|
21
|
+
|
14
22
|
def create_gemfile
|
15
|
-
template('templates/Gemfile.tt', "#{
|
23
|
+
template('templates/Gemfile.tt', "#{repository_name}/Gemfile")
|
16
24
|
end
|
17
25
|
|
18
26
|
def create_pluginspec
|
@@ -25,12 +33,15 @@ module Jenkins
|
|
25
33
|
git_name = 'TODO: Put your realname here' if git_name.empty?
|
26
34
|
git_email = 'email@example.com' if git_email.empty?
|
27
35
|
|
36
|
+
display_name_components = repository_name.split(/[-_]/).collect { |w| w.capitalize }
|
37
|
+
|
28
38
|
opts = {
|
29
39
|
:developer_id => developer_id.empty? ? 'TODO: Put your jenkins-ci.org username here.' : developer_id,
|
30
|
-
:developer_name => "#{git_name} <#{git_email}>"
|
40
|
+
:developer_name => "#{git_name} <#{git_email}>",
|
41
|
+
:display_name => display_name_components.join(' ')
|
31
42
|
}
|
32
43
|
|
33
|
-
template('templates/pluginspec.tt', "#{
|
44
|
+
template('templates/pluginspec.tt', "#{repository_name}/#{name}.pluginspec", opts)
|
34
45
|
end
|
35
46
|
|
36
47
|
end
|
@@ -1,28 +1,27 @@
|
|
1
|
-
|
2
1
|
Jenkins::Plugin::Specification.new do |plugin|
|
3
2
|
plugin.name = <%= name.inspect %>
|
4
|
-
plugin.display_name = <%=
|
3
|
+
plugin.display_name = <%= config[:display_name].inspect %>
|
5
4
|
plugin.version = '0.0.1'
|
6
|
-
plugin.description = 'enter description here'
|
5
|
+
plugin.description = 'TODO: enter description here'
|
7
6
|
|
8
7
|
# You should create a wiki-page for your plugin when you publish it, see
|
9
8
|
# https://wiki.jenkins-ci.org/display/JENKINS/Hosting+Plugins#HostingPlugins-AddingaWikipage
|
10
9
|
# This line makes sure it's listed in your POM.
|
11
|
-
plugin.url = 'https://wiki.jenkins-ci.org/display/JENKINS
|
10
|
+
plugin.url = 'https://wiki.jenkins-ci.org/display/JENKINS/<%= config[:display_name].gsub(' ', '+') %>'
|
12
11
|
|
13
12
|
# The first argument is your user name for jenkins-ci.org.
|
14
13
|
plugin.developed_by <%= config[:developer_id].inspect %>, <%= config[:developer_name].inspect %>
|
15
14
|
|
16
15
|
# This specifies where your code is hosted.
|
17
16
|
# Alternatives include:
|
18
|
-
# :github => 'myuser
|
19
|
-
# :git => 'git://repo.or.cz
|
20
|
-
# :svn => 'https://svn.jenkins-ci.org/trunk/hudson/plugins
|
21
|
-
plugin.uses_repository :github =>
|
17
|
+
# :github => 'myuser/<%= repository_name %>' (without myuser it defaults to jenkinsci)
|
18
|
+
# :git => 'git://repo.or.cz/<%= repository_name %>.git'
|
19
|
+
# :svn => 'https://svn.jenkins-ci.org/trunk/hudson/plugins/<%= repository_name %>'
|
20
|
+
plugin.uses_repository :github => <%= repository_name.inspect %>
|
22
21
|
|
23
22
|
# This is a required dependency for every ruby plugin.
|
24
|
-
plugin.depends_on 'ruby-runtime', '0.
|
23
|
+
plugin.depends_on 'ruby-runtime', '0.10'
|
25
24
|
|
26
25
|
# This is a sample dependency for a Jenkins plugin, 'git'.
|
27
|
-
plugin.depends_on 'git', '1.1.11'
|
26
|
+
#plugin.depends_on 'git', '1.1.11'
|
28
27
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jpi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,11 +11,11 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2012-
|
14
|
+
date: 2012-04-04 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rubyzip
|
18
|
-
requirement: &
|
18
|
+
requirement: &2153612260 !ruby/object:Gem::Requirement
|
19
19
|
none: false
|
20
20
|
requirements:
|
21
21
|
- - ! '>='
|
@@ -23,10 +23,10 @@ dependencies:
|
|
23
23
|
version: '0'
|
24
24
|
type: :runtime
|
25
25
|
prerelease: false
|
26
|
-
version_requirements: *
|
26
|
+
version_requirements: *2153612260
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: thor
|
29
|
-
requirement: &
|
29
|
+
requirement: &2153611560 !ruby/object:Gem::Requirement
|
30
30
|
none: false
|
31
31
|
requirements:
|
32
32
|
- - ! '>='
|
@@ -34,10 +34,10 @@ dependencies:
|
|
34
34
|
version: '0'
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
|
-
version_requirements: *
|
37
|
+
version_requirements: *2153611560
|
38
38
|
- !ruby/object:Gem::Dependency
|
39
39
|
name: jenkins-war
|
40
|
-
requirement: &
|
40
|
+
requirement: &2153610700 !ruby/object:Gem::Requirement
|
41
41
|
none: false
|
42
42
|
requirements:
|
43
43
|
- - ! '>='
|
@@ -45,10 +45,10 @@ dependencies:
|
|
45
45
|
version: '1.427'
|
46
46
|
type: :runtime
|
47
47
|
prerelease: false
|
48
|
-
version_requirements: *
|
48
|
+
version_requirements: *2153610700
|
49
49
|
- !ruby/object:Gem::Dependency
|
50
50
|
name: bundler
|
51
|
-
requirement: &
|
51
|
+
requirement: &2153596280 !ruby/object:Gem::Requirement
|
52
52
|
none: false
|
53
53
|
requirements:
|
54
54
|
- - ~>
|
@@ -56,10 +56,10 @@ dependencies:
|
|
56
56
|
version: 1.1.0
|
57
57
|
type: :runtime
|
58
58
|
prerelease: false
|
59
|
-
version_requirements: *
|
59
|
+
version_requirements: *2153596280
|
60
60
|
- !ruby/object:Gem::Dependency
|
61
61
|
name: jenkins-plugin-runtime
|
62
|
-
requirement: &
|
62
|
+
requirement: &2153594900 !ruby/object:Gem::Requirement
|
63
63
|
none: false
|
64
64
|
requirements:
|
65
65
|
- - ~>
|
@@ -67,10 +67,10 @@ dependencies:
|
|
67
67
|
version: 0.2.0
|
68
68
|
type: :runtime
|
69
69
|
prerelease: false
|
70
|
-
version_requirements: *
|
70
|
+
version_requirements: *2153594900
|
71
71
|
- !ruby/object:Gem::Dependency
|
72
72
|
name: rspec
|
73
|
-
requirement: &
|
73
|
+
requirement: &2153593960 !ruby/object:Gem::Requirement
|
74
74
|
none: false
|
75
75
|
requirements:
|
76
76
|
- - ~>
|
@@ -78,10 +78,10 @@ dependencies:
|
|
78
78
|
version: '2.0'
|
79
79
|
type: :development
|
80
80
|
prerelease: false
|
81
|
-
version_requirements: *
|
81
|
+
version_requirements: *2153593960
|
82
82
|
- !ruby/object:Gem::Dependency
|
83
83
|
name: cucumber
|
84
|
-
requirement: &
|
84
|
+
requirement: &2153593000 !ruby/object:Gem::Requirement
|
85
85
|
none: false
|
86
86
|
requirements:
|
87
87
|
- - ~>
|
@@ -89,10 +89,10 @@ dependencies:
|
|
89
89
|
version: '1.0'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
|
-
version_requirements: *
|
92
|
+
version_requirements: *2153593000
|
93
93
|
- !ruby/object:Gem::Dependency
|
94
94
|
name: rake
|
95
|
-
requirement: &
|
95
|
+
requirement: &2153592120 !ruby/object:Gem::Requirement
|
96
96
|
none: false
|
97
97
|
requirements:
|
98
98
|
- - ! '>='
|
@@ -100,7 +100,7 @@ dependencies:
|
|
100
100
|
version: '0'
|
101
101
|
type: :development
|
102
102
|
prerelease: false
|
103
|
-
version_requirements: *
|
103
|
+
version_requirements: *2153592120
|
104
104
|
description: Allows you to generate a new Ruby plugin project, build it, test it in
|
105
105
|
Jenkins and release it to the Jenkins Update Center.
|
106
106
|
email:
|
@@ -142,7 +142,7 @@ files:
|
|
142
142
|
- lib/jenkins/plugin/tools/templates/release-pom.xml.erb
|
143
143
|
- lib/jenkins/plugin/version.rb
|
144
144
|
- lib/jenkins/rake.rb
|
145
|
-
homepage: https://github.com/jenkinsci/
|
145
|
+
homepage: https://github.com/jenkinsci/jenkins.rb/tree/master/ruby-tools/jpi
|
146
146
|
licenses: []
|
147
147
|
post_install_message:
|
148
148
|
rdoc_options: []
|