leankitkanban 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
  require 'rake'
3
3
  require 'echoe'
4
4
 
5
- Echoe.new('leankitkanban', '0.0.3') do |p|
5
+ Echoe.new('leankitkanban', '0.0.4') do |p|
6
6
  p.description = "Ruby Wrapper around LeanKitKanban Api"
7
7
  p.url = "http://github.com/mlainez/leankitkanban"
8
8
  p.author = "Marc Lainez"
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{leankitkanban}
5
- s.version = "0.0.3"
5
+ s.version = "0.0.4"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = [%q{Marc Lainez}]
9
- s.date = %q{2011-10-28}
9
+ s.date = %q{2011-10-29}
10
10
  s.description = %q{Ruby Wrapper around LeanKitKanban Api}
11
11
  s.email = %q{ml@theotherguys.be}
12
12
  s.extra_rdoc_files = [%q{README.md}, %q{lib/leankitkanban.rb}, %q{lib/leankitkanban/board.rb}, %q{lib/leankitkanban/config.rb}]
@@ -2,10 +2,11 @@ module LeanKitKanban
2
2
  module Board
3
3
  include HTTParty
4
4
 
5
- ALL_BOARDS = "/Boards"
6
- ONE_BOARD = "/Boards/{boardID}"
7
- IDENTIFIERS = "/Board/{boardID}/GetBoardIdentifiers"
8
- REPLY_DATA_KEY = "ReplyData"
5
+ ALL_BOARDS = "/Boards"
6
+ ONE_BOARD = "/Boards/{boardID}"
7
+ IDENTIFIERS = "/Board/{boardID}/GetBoardIdentifiers"
8
+ NEWER_IF_EXISTS = "/Board/{boardID}/BoardVersion/{versionID}/GetNewerIfExists"
9
+ REPLY_DATA_KEY = "ReplyData"
9
10
 
10
11
  def self.all
11
12
  get(ALL_BOARDS)
@@ -21,6 +22,11 @@ module LeanKitKanban
21
22
  get(api_call)
22
23
  end
23
24
 
25
+ def self.get_newer_if_exists(board_id, version_id)
26
+ api_call = NEWER_IF_EXISTS.gsub("{boardID}", board_id.to_s).gsub("{versionID}", version_id.to_s)
27
+ get(api_call)
28
+ end
29
+
24
30
  private
25
31
  def self.get(api_call)
26
32
  url = "#{LeanKitKanban::Config.uri}#{api_call}"
@@ -36,4 +36,17 @@ describe LeanKitKanban::Board do
36
36
  LeanKitKanban::Board.get_identifiers(@board_id)
37
37
  end
38
38
  end
39
+
40
+ describe :get_newer_if_exists do
41
+ before :each do
42
+ @board_id = mock("boardID")
43
+ @version_id = mock("versionID")
44
+ end
45
+
46
+ it "gets a greater version of the board than the one passed" do
47
+ api_call = "/Board/#{@board_id}/BoardVersion/#{@version_id}/GetNewerIfExists"
48
+ LeanKitKanban::Board.should_receive(:get).with(api_call)
49
+ LeanKitKanban::Board.get_newer_if_exists(@board_id, @version_id)
50
+ end
51
+ end
39
52
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: leankitkanban
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.3
5
+ version: 0.0.4
6
6
  platform: ruby
7
7
  authors:
8
8
  - Marc Lainez
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-10-28 00:00:00 Z
13
+ date: 2011-10-29 00:00:00 Z
14
14
  dependencies: []
15
15
 
16
16
  description: Ruby Wrapper around LeanKitKanban Api