ticketmaster-jira 0.0.5 → 0.0.6
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.
- data/lib/jira/version.rb +1 -1
- data/lib/provider/jira.rb +4 -0
- data/lib/provider/project.rb +5 -6
- data/spec/project_spec.rb +7 -0
- metadata +4 -4
data/lib/jira/version.rb
CHANGED
data/lib/provider/jira.rb
CHANGED
data/lib/provider/project.rb
CHANGED
@@ -35,15 +35,14 @@ module TicketMaster::Provider
|
|
35
35
|
end
|
36
36
|
|
37
37
|
def self.find(*options)
|
38
|
-
|
39
|
-
|
40
|
-
jira_projects.select do |project|
|
38
|
+
if options[0].first.is_a? Array
|
39
|
+
self.find_all.select do |project|
|
41
40
|
project if options.first.any? { |id| project.id == id }
|
42
41
|
end
|
43
|
-
elsif options.first.is_a? Hash
|
44
|
-
find_by_attributes(options.first)
|
42
|
+
elsif options[0].first.is_a? Hash
|
43
|
+
find_by_attributes(options[0].first)
|
45
44
|
else
|
46
|
-
|
45
|
+
self.find_all
|
47
46
|
end
|
48
47
|
end
|
49
48
|
|
data/spec/project_spec.rb
CHANGED
@@ -25,6 +25,13 @@ describe "TicketMaster::Provider::Jira::Project" do
|
|
25
25
|
@tm.projects.first.id.should == 1
|
26
26
|
end
|
27
27
|
|
28
|
+
it "should be load all projects based on attributes" do
|
29
|
+
projects = @tm.projects(:id => 1)
|
30
|
+
projects.should be_an_instance_of(Array)
|
31
|
+
projects.first.should be_an_instance_of(@klass)
|
32
|
+
projects.first.id.should == 1
|
33
|
+
end
|
34
|
+
|
28
35
|
it "should be able to load a single project based on id" do
|
29
36
|
project = @tm.project(1)
|
30
37
|
project.should be_an_instance_of(@klass)
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ticketmaster-jira
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 6
|
10
|
+
version: 0.0.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Charles Lowell
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2011-05-
|
19
|
+
date: 2011-05-25 00:00:00 -04:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|