atlassian_app_versions 0.1.4 → 0.2.5
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 +4 -4
- data/atlassian_app_versions.gemspec +1 -0
- data/exe/atl_latestver +17 -0
- data/lib/atlassian_app_versions.rb +21 -13
- metadata +20 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8df606b67da87d908770227dc6d550c5a5624a84
|
4
|
+
data.tar.gz: 7e7567da7e4ee9c22e0e34a8074d3126d2bc9a4a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 725d052b8d9008fd89ed547dfa3afa7f0ccf3ae2c6cb32e6b0563ce545845faee4760186671f1c756dc38ebbd30e42163e5fb812dfc4dbcfa43db9bf0298c832
|
7
|
+
data.tar.gz: 90a541b1c01c57f51c510a3932a041584ee868cededc575ba8f4eeae6551a679f64f9b9b7d58c2abc1e6b7f9af7461e29f381819ede23ff247e6b9f55971c3c5
|
data/exe/atl_latestver
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'atlassian_app_versions'
|
3
|
+
include AtlassianAppVersions
|
4
|
+
|
5
|
+
def usage(msg = nil)
|
6
|
+
$stderr.puts msg if msg
|
7
|
+
$stderr.puts "Purpose: prints latest information about an Atlassian product or plugin"
|
8
|
+
$stderr.puts "Usage: atl_latestver <pluginkey> | #{App::VALID_PRODUCTS.join(' | ')}> ..."
|
9
|
+
exit 1
|
10
|
+
end
|
11
|
+
|
12
|
+
require 'pry'
|
13
|
+
ARGV.length>0 || usage
|
14
|
+
ARGV.each { |product|
|
15
|
+
app = App::VALID_PRODUCTS.member?(ARGV[0]) ? App.new(product) : Plugin.new(product)
|
16
|
+
printf "%s\t\t%s\n", app.name, app.latest.to_s
|
17
|
+
}
|
@@ -12,7 +12,7 @@ require 'cgi'
|
|
12
12
|
|
13
13
|
module AtlassianAppVersions
|
14
14
|
|
15
|
-
VERSION = "0.
|
15
|
+
VERSION = "0.2.5"
|
16
16
|
|
17
17
|
# A Plugin or App. This class assumes the MPAC API will have info about the product.
|
18
18
|
class AbstractProduct
|
@@ -68,6 +68,18 @@ module AtlassianAppVersions
|
|
68
68
|
JAC_URL + "/issues/?jql=#{CGI::escape(recentbugsJQL(fromVer, toVer))}"
|
69
69
|
end
|
70
70
|
|
71
|
+
# Fetch the versions as they exist on JAC
|
72
|
+
def jacVersions
|
73
|
+
if ! @jacVersions then
|
74
|
+
@jacVersions = jacKey.collect { |jacKey|
|
75
|
+
url = JAC_URL + "/rest/api/2/project/#{jacKey}/versions"
|
76
|
+
jsonStr = open(url).read
|
77
|
+
JSON.parse(jsonStr).collect { |v| v["name"] }
|
78
|
+
}.flatten.uniq
|
79
|
+
end
|
80
|
+
@jacVersions
|
81
|
+
end
|
82
|
+
|
71
83
|
def marketplaceJSON
|
72
84
|
if !@marketplaceJSON then
|
73
85
|
mpacKey = case key
|
@@ -140,18 +152,18 @@ module AtlassianAppVersions
|
|
140
152
|
keys.member? name.to_s || super
|
141
153
|
end
|
142
154
|
|
143
|
-
private
|
155
|
+
#private
|
144
156
|
|
145
157
|
def jacKey
|
146
158
|
case @key
|
147
|
-
when "jira-core" then "
|
148
|
-
when "jira-software" then ["
|
149
|
-
when "confluence" then ["
|
159
|
+
when "jira-core" then "JRASERVER"
|
160
|
+
when "jira-software" then ["JRASERVER", "JSWSERVER"]
|
161
|
+
when "confluence" then ["CONFSERVER", "CRA"]
|
150
162
|
when "gh" then"GHS"
|
151
163
|
when "stash" then "BSERV"
|
152
164
|
when "bitbucket" then "BSERV"
|
153
165
|
when "fisheye" then "FE"
|
154
|
-
when "com.pyxis.greenhopper.jira" then "
|
166
|
+
when "com.pyxis.greenhopper.jira" then "JSWSERVER"
|
155
167
|
end
|
156
168
|
end
|
157
169
|
|
@@ -168,13 +180,9 @@ module AtlassianAppVersions
|
|
168
180
|
|
169
181
|
# Return a comma-separated list of JAC version strings, given an Array of versions
|
170
182
|
def versionsListJQL(versions)
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
(new.map { |v| "'#{v} Server'" } + old).join(", ")
|
175
|
-
else
|
176
|
-
versions.join(", ")
|
177
|
-
end
|
183
|
+
versions.inject([]) { |all, v|
|
184
|
+
all << jacVersions.select { |jacVer| jacVer.start_with? v.version }
|
185
|
+
}.flatten.uniq.collect { |vstr| "'#{vstr}'" }.join(", ")
|
178
186
|
end
|
179
187
|
|
180
188
|
# JQL common between bugs and features
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: atlassian_app_versions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeff Turner
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-02-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -94,11 +94,26 @@ dependencies:
|
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: pry
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
97
111
|
description: Wraps the marketplace.atlassian.com and my.atlassian.com REST APIs to
|
98
112
|
obtain info about JIRA releases. See commented-out code near end for examples.
|
99
113
|
email:
|
100
114
|
- jeff@redradishtech.com
|
101
|
-
executables:
|
115
|
+
executables:
|
116
|
+
- atl_latestver
|
102
117
|
extensions: []
|
103
118
|
extra_rdoc_files: []
|
104
119
|
files:
|
@@ -112,6 +127,7 @@ files:
|
|
112
127
|
- atlassian_app_versions.gemspec
|
113
128
|
- bin/console
|
114
129
|
- bin/setup
|
130
|
+
- exe/atl_latestver
|
115
131
|
- lib/atlassian_app_versions.rb
|
116
132
|
homepage:
|
117
133
|
licenses:
|
@@ -133,7 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
133
149
|
version: '0'
|
134
150
|
requirements: []
|
135
151
|
rubyforge_project:
|
136
|
-
rubygems_version: 2.5.1
|
152
|
+
rubygems_version: 2.5.2.1
|
137
153
|
signing_key:
|
138
154
|
specification_version: 4
|
139
155
|
summary: Obtain info about Atlassian JIRA and other product releases.
|