Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Singularize Client#find path names

  • Loading branch information...
commit 1f3d3e55cad159fdaac1f2fe940b7f7e8cebf756 1 parent 309a35e
@rossta authored
View
2  lib/trello/action.rb
@@ -8,7 +8,7 @@ class Action < BasicData
class << self
# Locate a specific action and return a new Action object.
def find(id)
- client.find(:actions, id)
+ client.find(:action, id)
end
end
View
2  lib/trello/board.rb
@@ -11,7 +11,7 @@ class Board < BasicData
class << self
# Finds a board.
def find(id)
- client.find(:boards, id)
+ client.find(:board, id)
end
def create(fields)
View
2  lib/trello/card.rb
@@ -12,7 +12,7 @@ class Card < BasicData
class << self
# Find a specific card by its id.
def find(id)
- client.find(:cards, id)
+ client.find(:card, id)
end
# Create a new card and save it on Trello.
View
4 lib/trello/checklist.rb
@@ -9,11 +9,11 @@ class Checklist < BasicData
class << self
# Locate a specific checklist by its id.
def find(id)
- client.find(:checklists, id)
+ client.find(:checklist, id)
end
def create(options)
- client.create(:checklist,
+ client.create(:checklists,
'name' => options[:name],
'idBoard' => options[:board_id])
end
View
2  lib/trello/list.rb
@@ -10,7 +10,7 @@ class List < BasicData
class << self
# Finds a specific list, given an id.
def find(id)
- client.find(:lists, id)
+ client.find(:list, id)
end
def create(options)
View
2  lib/trello/member.rb
@@ -13,7 +13,7 @@ class << self
#
# The argument may be specified as either an _id_ or a _username_.
def find(id_or_username)
- client.find(:members, id_or_username)
+ client.find(:member, id_or_username)
end
end
View
2  lib/trello/notification.rb
@@ -7,7 +7,7 @@ class Notification < BasicData
class << self
# Locate a notification by its id
def find(id)
- client.find(:notifications, id)
+ client.find(:notification, id)
end
end
View
2  lib/trello/organization.rb
@@ -10,7 +10,7 @@ class Organization < BasicData
class << self
# Find an organization by its id.
def find(id)
- client.find(:organizations, id)
+ client.find(:organization, id)
end
end
View
2  lib/trello/token.rb
@@ -6,7 +6,7 @@ class Token < BasicData
class << self
# Finds a token
def find(token)
- client.find(:tokens, token)
+ client.find(:token, token)
end
end
View
4 spec/action_spec.rb
@@ -4,7 +4,7 @@ module Trello
describe Action do
include Helpers
- let(:action) { client.find(:actions, '4ee2482134a81a757a08af47') }
+ let(:action) { client.find(:action, '4ee2482134a81a757a08af47') }
let(:client) { Client.new }
before(:each) do
@@ -16,7 +16,7 @@ module Trello
let(:client) { Trello.client }
it "delegates to Trello.client#find" do
- client.should_receive(:find).with(:actions, '4ee2482134a81a757a08af47')
+ client.should_receive(:find).with(:action, '4ee2482134a81a757a08af47')
Action.find('4ee2482134a81a757a08af47')
end
View
4 spec/board_spec.rb
@@ -4,7 +4,7 @@ module Trello
describe Board do
include Helpers
- let(:board) { client.find(:boards, 'abcdef123456789123456789') }
+ let(:board) { client.find(:board, 'abcdef123456789123456789') }
let(:client) { Client.new }
before(:each) do
@@ -16,7 +16,7 @@ module Trello
let(:client) { Trello.client }
it "delegates to client#find" do
- client.should_receive(:find).with(:boards, 'abcdef123456789123456789')
+ client.should_receive(:find).with(:board, 'abcdef123456789123456789')
Board.find('abcdef123456789123456789')
end
View
4 spec/card_spec.rb
@@ -4,7 +4,7 @@ module Trello
describe Card do
include Helpers
- let(:card) { client.find(:cards, 'abcdef123456789123456789') }
+ let(:card) { client.find(:card, 'abcdef123456789123456789') }
let(:client) { Client.new }
before(:each) do
@@ -16,7 +16,7 @@ module Trello
let(:client) { Trello.client }
it "delegates to Trello.client#find" do
- client.should_receive(:find).with(:cards, 'abcdef123456789123456789')
+ client.should_receive(:find).with(:card, 'abcdef123456789123456789')
Card.find('abcdef123456789123456789')
end
View
4 spec/checklist_spec.rb
@@ -4,7 +4,7 @@ module Trello
describe Checklist do
include Helpers
- let(:checklist) { client.find(:checklists, 'abcdef123456789123456789') }
+ let(:checklist) { client.find(:checklist, 'abcdef123456789123456789') }
let(:client) { Client.new }
before(:each) do
@@ -16,7 +16,7 @@ module Trello
let(:client) { Trello.client }
it "delegates to Trello.client#find" do
- client.should_receive(:find).with(:checklists, 'abcdef123456789123456789')
+ client.should_receive(:find).with(:checklist, 'abcdef123456789123456789')
Checklist.find('abcdef123456789123456789')
end
View
4 spec/list_spec.rb
@@ -4,7 +4,7 @@ module Trello
describe List do
include Helpers
- let(:list) { client.find(:lists, "abcdef123456789123456789") }
+ let(:list) { client.find(:list, "abcdef123456789123456789") }
let(:client) { Client.new }
before(:each) do
@@ -16,7 +16,7 @@ module Trello
let(:client) { Trello.client }
it "delegates to client#find" do
- client.should_receive(:find).with(:lists, 'abcdef123456789123456789')
+ client.should_receive(:find).with(:list, 'abcdef123456789123456789')
List.find('abcdef123456789123456789')
end
View
4 spec/member_spec.rb
@@ -6,7 +6,7 @@ module Trello
describe Member do
include Helpers
- let(:member) { client.find(:members, 'abcdef123456789012345678') }
+ let(:member) { client.find(:member, 'abcdef123456789012345678') }
let(:client) { Client.new }
before(:each) do
@@ -17,7 +17,7 @@ module Trello
let(:client) { Trello.client }
it "delegates to Trello.client#find" do
- client.should_receive(:find).with(:members, 'abcdef123456789012345678')
+ client.should_receive(:find).with(:member, 'abcdef123456789012345678')
Member.find('abcdef123456789012345678')
end
View
2  spec/notification_spec.rb
@@ -5,7 +5,7 @@ module Trello
include Helpers
let(:notification) { member.notifications.first }
- let(:member) { client.find(:members, "abcdef123456789012345678") }
+ let(:member) { client.find(:member, "abcdef123456789012345678") }
let(:client) { Client.new }
before(:each) do
View
4 spec/organization_spec.rb
@@ -5,7 +5,7 @@ module Trello
describe Organization do
include Helpers
- let(:organization) { client.find(:organizations, "4ee7e59ae582acdec8000291") }
+ let(:organization) { client.find(:organization, "4ee7e59ae582acdec8000291") }
let(:client) { Client.new }
before(:each) do
@@ -17,7 +17,7 @@ module Trello
let(:client) { Trello.client }
it "delegates to Trello.client#find" do
- client.should_receive(:find).with(:organizations, '4ee7e59ae582acdec8000291')
+ client.should_receive(:find).with(:organization, '4ee7e59ae582acdec8000291')
Organization.find('4ee7e59ae582acdec8000291')
end
View
4 spec/token_spec.rb
@@ -4,7 +4,7 @@ module Trello
describe Token do
include Helpers
- let(:token) { client.find(:tokens, "1234") }
+ let(:token) { client.find(:token, "1234") }
let(:client) { Client.new }
before(:each) do
@@ -15,7 +15,7 @@ module Trello
let(:client) { Trello.client }
it "delegates to Trello.client#find" do
- client.should_receive(:find).with(:tokens, '1234')
+ client.should_receive(:find).with(:token, '1234')
Token.find('1234')
end
Please sign in to comment.
Something went wrong with that request. Please try again.