errbit_jira_plugin 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fe3ab66c61ed8f181f4dc45959d82019de7dfff1
4
- data.tar.gz: 02e598074ac1afc4eaf1c0014c61bba68962ed82
3
+ metadata.gz: 1bcf8273fd95778975222385be1617e15275469a
4
+ data.tar.gz: c4a194902031ce8067bbfd08ee908c9cf1fc3671
5
5
  SHA512:
6
- metadata.gz: 4757304301513b11fd561fb2ad9d3db32eb7dda90ad29623ac94e299060bcde3ece50984bb97327ad20b7b38956b9dcca8b6e49b79d67dfe971c68e1437cfff9
7
- data.tar.gz: c52722cdb327daf4a8e2781a09e8cc34728703ee8127822ba01a8657d89baad03a89949f822ff622e465ac9010f92aac31ffc57686861328aaf977a1375be6b7
6
+ metadata.gz: cc23d18b8b2f3126a4a83df08e2eeb8cbefe228ff7606fb5f15a808686053929349cf322e57062069fcc7fb9c5cd256f106c51dcf7a196f2b9685bd09acb4cc7
7
+ data.tar.gz: 30a3e86542ea4b5f3605fe8fb0fd7b669cb2e4ce448c27d73fb1a84b06b7b48d2e5c9da60511e32efb62d4fc5448a5ba02b33cf8ade9c43b073fb3a02397ea66
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # ErrbitJiraPlugin
2
2
 
3
- TODO: Write a gem description
3
+ This gem adds support for JIRA to Errbit.
4
4
 
5
5
  ## Installation
6
6
 
@@ -7,6 +7,10 @@ module ErrbitJiraPlugin
7
7
  def self.root
8
8
  File.expand_path '../..', __FILE__
9
9
  end
10
+
11
+ def self.read_static_file(file)
12
+ File.read(File.join(self.root, 'vendor/assets/images', file))
13
+ end
10
14
  end
11
15
 
12
16
  ErrbitPlugin::Registry.add_issue_tracker(ErrbitJiraPlugin::IssueTracker)
@@ -6,33 +6,33 @@ module ErrbitJiraPlugin
6
6
 
7
7
  NOTE = 'Please configure Jira by entering the information below.'
8
8
 
9
- FIELDS = [
10
- [:base_url, {
11
- :label => 'Jira URL without trailing slash',
12
- :placeholder => 'https://jira.example.org'
13
- }],
14
- [:context_path, {
15
- :optional => true,
16
- :label => 'Context Path (Just "/" if empty otherwise with leading slash)',
17
- :placeholder => "/jira"
18
- }],
19
- [:username, {
20
- :label => 'Username',
21
- :placeholder => 'johndoe'
22
- }],
23
- [:password, {
24
- :label => 'Password',
25
- :placeholder => 'p@assW0rd'
26
- }],
27
- [:project_id, {
28
- :label => 'Project Key',
29
- :placeholder => 'The project Key where the issue will be created'
30
- }],
31
- [:issue_priority, {
32
- :label => 'Priority',
33
- :placeholder => 'Normal'
34
- }]
35
- ]
9
+ FIELDS = {
10
+ :base_url => {
11
+ :label => 'Jira URL without trailing slash',
12
+ :placeholder => 'https://jira.example.org'
13
+ },
14
+ :context_path => {
15
+ :optional => true,
16
+ :label => 'Context Path (Just "/" if empty otherwise with leading slash)',
17
+ :placeholder => "/jira"
18
+ },
19
+ :username => {
20
+ :label => 'Username',
21
+ :placeholder => 'johndoe'
22
+ },
23
+ :password => {
24
+ :label => 'Password',
25
+ :placeholder => 'p@assW0rd'
26
+ },
27
+ :project_id => {
28
+ :label => 'Project Key',
29
+ :placeholder => 'The project Key where the issue will be created'
30
+ },
31
+ :issue_priority => {
32
+ :label => 'Priority',
33
+ :placeholder => 'Normal'
34
+ }
35
+ }
36
36
 
37
37
  def self.label
38
38
  LABEL
@@ -46,6 +46,20 @@ module ErrbitJiraPlugin
46
46
  FIELDS
47
47
  end
48
48
 
49
+ def self.icons
50
+ @icons ||= {
51
+ create: [
52
+ 'image/png', ErrbitJiraPlugin.read_static_file('jira_create.png')
53
+ ],
54
+ goto: [
55
+ 'image/png', ErrbitJiraPlugin.read_static_file('jira_goto.png'),
56
+ ],
57
+ inactive: [
58
+ 'image/png', ErrbitJiraPlugin.read_static_file('jira_inactive.png'),
59
+ ]
60
+ }
61
+ end
62
+
49
63
  def self.body_template
50
64
  @body_template ||= ERB.new(File.read(
51
65
  File.join(
@@ -60,7 +74,7 @@ module ErrbitJiraPlugin
60
74
 
61
75
  def errors
62
76
  errors = []
63
- if self.class.fields.detect {|f| params[f[0]].blank? && !f[1][:optional]}
77
+ if self.class.fields.detect {|f| options[f[0]].blank? }
64
78
  errors << [:base, 'You must specify all non optional values!']
65
79
  end
66
80
  errors
@@ -1,3 +1,3 @@
1
1
  module ErrbitJiraPlugin
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: errbit_jira_plugin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew McFarling
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-22 00:00:00.000000000 Z
11
+ date: 2016-04-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: errbit_plugin
@@ -109,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
109
109
  version: '0'
110
110
  requirements: []
111
111
  rubyforge_project:
112
- rubygems_version: 2.2.2
112
+ rubygems_version: 2.4.6
113
113
  signing_key:
114
114
  specification_version: 4
115
115
  summary: Jira integration for Errbit.