Skip to content

Commit 3021c3b

Browse files
committed
Converted internal methods to private and standardized to hashrockets
1 parent b666dfa commit 3021c3b

4 files changed

Lines changed: 7 additions & 6 deletions

File tree

lib/buff/core.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@ module Buff
55
ACCESS_TOKEN = File.open(File.expand_path("~/.bufferapprc")).
66
readlines[2].chomp
77
end
8+
rescue => x
9+
raise x, "Bufferapprc appears to be malformed"
810
end
911

1012
class Client
1113
module Core
1214
API_VERSION = "1"
1315

14-
attr_reader :error_table
15-
16+
private
1617

1718
def get(path, options={})
1819
options.merge!(auth_query)

lib/buff/datastructure.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class Info < Hashie::Mash; end
1212
class Schedule < Hashie::Mash; end
1313
Schedules = Class.new(Array) do
1414
def dump
15-
{ schedules: self }.to_json
15+
{ :schedules => self }.to_json
1616
end
1717
end
1818
end

lib/buff/profile.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def profile_schedules_by_id(id)
1818

1919
def set_schedules(id, options)
2020
schedules = Buff::Encode.encode(options.fetch(:schedules) { raise ArgumentError })
21-
response = post("/profiles/#{id}/schedules/update.json", body: {schedules: schedules} )
21+
response = post("/profiles/#{id}/schedules/update.json", :body => {schedules: schedules} )
2222
Buff::Response.new(JSON.parse(response.body))
2323
end
2424
end

lib/buff/update.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ def interactions_by_update_id(id, options={})
2828

2929
def reorder_updates(profile_id, options={})
3030
options.fetch(:order) { raise ArgumentError }
31-
post("/profiles/#{profile_id}/updates/reorder.json", body: options)
31+
post("/profiles/#{profile_id}/updates/reorder.json", :body => options)
3232
end
3333

3434
def shuffle_updates(profile_id, options={})
35-
response = post("/profiles/#{profile_id}/updates/shuffle.json", body: options)
35+
response = post("/profiles/#{profile_id}/updates/shuffle.json", :body => options)
3636
end
3737

3838
def create_update(options={})

0 commit comments

Comments
 (0)