capistrano-scm-jenkins 0.4.0 → 0.5.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 330c9690618bd67702215220bd3405cca27dc320
4
- data.tar.gz: 321660d2fc8ced158e36f833d3706358a3fab91d
3
+ metadata.gz: e3eddcc06310bc70b74ca2571546e19e4d24d62f
4
+ data.tar.gz: 990e07c5aad6d6b388baedb8e36959eee74e76ec
5
5
  SHA512:
6
- metadata.gz: 33b8df5ecd0997e78c1518a954172889c5179b83fc2afbd20f160b628c1d7cbeb5adcabbfe5ec2b6a4d3ce012c0cc00a3944964b76275043f73b9faa8441a761
7
- data.tar.gz: 678b9004ac4fa0b71b5dd066f0ae3a3daeb75c1e6e7b389dcf0fe27603e3ab7de3cd61a74e523f0dcfbbaa089c3398dad24709bccad818390cd3017fc98a8cac
6
+ metadata.gz: 5fed3f286ee7b3153431081cc024b17333491f7f8cd7ede7e1ade0d4b872d2f94d2b77df61283b2b905754667e4695386fa0112bfa3dbbea40f8c627b118cbf9
7
+ data.tar.gz: 80757c0847d24f6406afafb2310d9d54f0851ff093a93fa2cfea0150118fab06024a66c88bd4530fceb0eeec354a48e98252e4e52f4eb0a463039228857c5282
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- capistrano-scm-jenkins (0.4.0)
4
+ capistrano-scm-jenkins (0.5.0)
5
5
  capistrano (~> 3.2.1)
6
6
 
7
7
  GEM
data/NEWS.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 0.5.0 (2014-11-11)
2
+
3
+ * Clean up some Ruby code, thanks to RuboCop
4
+ * Provide a mechanism, using `:deployed_artifact_filename`, to control the name of the deployed artifact’s filename
5
+ - Ties in nicely with [`capistrano-jetty`](https://github.com/evertrue/capistrano-jetty) & [`capistrano-storm`](https://github.com/evertrue/capistrano-storm)
6
+
1
7
  ## 0.4.0 (2014-10-29)
2
8
 
3
9
  * Change default for `:jenkins_artifact_file` to `*zip*/archive.zip` (h/t @lostintime on #22)
@@ -1,3 +1,3 @@
1
1
  module CapistranoScmJenkins
2
- VERSION = '0.4.0'
2
+ VERSION = '0.5.0'
3
3
  end
@@ -64,11 +64,11 @@ class Capistrano::Jenkins < Capistrano::SCM
64
64
  end
65
65
 
66
66
  def artifact_is_zip?
67
- artifact_ext == ".zip"
67
+ artifact_ext == '.zip'
68
68
  end
69
69
 
70
70
  def artifact_file_opt
71
- fetch(:jenkins_artifact_file, "*zip*/archive.zip")
71
+ fetch(:jenkins_artifact_file, '*zip*/archive.zip')
72
72
  end
73
73
 
74
74
  def artifact_filename
@@ -113,7 +113,7 @@ class Capistrano::Jenkins < Capistrano::SCM
113
113
 
114
114
  if allowed_statuses.include? build_status
115
115
  if artifact_is_zip?
116
- unless test! "hash unzip 2>/dev/null"
116
+ unless test! 'hash unzip 2>/dev/null'
117
117
  abort 'unzip required, but not found'
118
118
  end
119
119
  end
@@ -133,22 +133,20 @@ class Capistrano::Jenkins < Capistrano::SCM
133
133
 
134
134
  def update
135
135
  # grab the newest artifact
136
- context.execute :curl, "--silent --fail --show-error #{curl_auth} " +
137
- "#{artifact_url} -o #{fetch(:application)}#{artifact_ext} " +
138
- "#{"--insecure" if fetch(:jenkins_insecure)}"
136
+ context.execute :curl, "--silent --fail --show-error #{curl_auth} " \
137
+ "#{artifact_url} -o #{fetch(:deployed_artifact_filename, artifact_filename)} " \
138
+ "#{'--insecure' if fetch(:jenkins_insecure)}"
139
139
  end
140
140
 
141
141
  def release
142
- downloaded_artifact = "#{fetch(:application)}#{artifact_ext}"
143
-
144
142
  if artifact_is_zip?
145
143
  # is an archive - unpack and deploy
146
- context.execute :rm, "-rf \"out/\""
147
- context.execute :unzip, "\"#{downloaded_artifact}\" -d out/"
148
- context.execute :mv, "out/#{fetch(:jenkins_artifact_path, "*")} \"#{release_path}\""
149
- context.execute :rm, "-rf \"out/\""
144
+ context.execute :rm, '-rf', 'out'
145
+ context.execute :unzip, fetch(:deployed_artifact_filename, artifact_filename), '-d', 'out/'
146
+ context.execute :mv, "out/#{fetch(:jenkins_artifact_path, '*')}", release_path
147
+ context.execute :rm, '-rf', 'out'
150
148
  else
151
- context.execute :cp, downloaded_artifact, release_path
149
+ context.execute :cp, fetch(:deployed_artifact_filename, artifact_filename), release_path
152
150
  end
153
151
  end
154
152
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-scm-jenkins
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - LI Daobing
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-10-29 00:00:00.000000000 Z
12
+ date: 2014-11-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capistrano