trumpet-trumpet 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
- :patch: 5
2
+ :patch: 6
3
3
  :major: 0
4
4
  :minor: 0
@@ -99,7 +99,8 @@ class Hash #:nodoc:
99
99
  # }
100
100
  # }.to_params
101
101
  # #=> "name=Bob&address[city]=Ruby Central&address[phones][]=111-111-1111&address[phones][]=222-222-2222&address[street]=111 Ruby Ave."
102
- def to_params
102
+ def to_params(remove_blanks=true)
103
+ self.reject! { |k,v| v.blank? } if remove_blanks
103
104
  params = self.map { |k,v| normalize_param(k,v) }.join
104
105
  params.chop! # trailing &
105
106
  params
@@ -1,7 +1,7 @@
1
1
  module Trumpet
2
2
  class Message
3
3
  @@attributes = [
4
- :url , :creator_id,
4
+ :url , :created_by_id,
5
5
  :author , :author_name,
6
6
  :avatar_url , :authored_at,
7
7
  :title , :description,
@@ -32,10 +32,6 @@ module Trumpet
32
32
 
33
33
  # Post a message to the server, but only if it didn't come from the server
34
34
  def broadcast
35
-
36
- puts "Self to h: #{self.to_h}"
37
- puts "And plain to h: #{to_h}"
38
-
39
35
  unless @id
40
36
  Trumpet::Request.post('/messages', :parameters => self.to_h, :parse_response => false)
41
37
  end
@@ -4,7 +4,7 @@ module Trumpet
4
4
 
5
5
  @@attributes = [
6
6
  :id , :url,
7
- :source_url , :creator_id ,
7
+ :source_url , :created_by_id ,
8
8
  :author , :author_name ,
9
9
  :avatar_url , :authored_at ,
10
10
  :title , :description ,
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trumpet-trumpet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Taras
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-05-03 00:00:00 -07:00
12
+ date: 2009-05-04 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency