sfdc 3.0.1 → 3.1.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c0777cd578c83c00d2e82e11381cf201beaa77fc
4
- data.tar.gz: 53c8f26b935d9417311c2407a7e7e65f3a7d0531
3
+ metadata.gz: 489a7d94444f62a61fcde3181c4686f5668f868a
4
+ data.tar.gz: 39641f733d89364aedd2f1ad9d6550f895066063
5
5
  SHA512:
6
- metadata.gz: 73424a61e0a4dc7cb3782757e2c016a1d487a52d53c3b4c0817089b30b68f8db3cb02304275bbdd131a54ca2b2fa1d15c54efd3e70d6580f8b0aff6c2e792e11
7
- data.tar.gz: 8f010622a2019db48a46fcd766c2046aa059846885cb6eab6db34b340380f90fa2393c3bdfe58e53c1d62bffc1bf70f3429d1fcf8da1e81f598343564f91ac7c
6
+ metadata.gz: ed4d97ed76e1c1fd5abdd35a44cd7ebc95633f87d95b1732289bf96e78437d010225ca177be88c25f90c1d82d524dc76a731cbf0af48c919b75b8ea53e3fcae2
7
+ data.tar.gz: e6340c84ddbc3ef648e8e44ffa835eea092d5a0a24af99849e900de576924e49571a09aa07ccde74a724904d4a1d3f920b5acb1f94412201f3031634b2c887c6
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
- Copyright (c) 2012 Eric J. Holmes
1
+ Copyright (c) 2013 Bruce Yue
2
2
 
3
- With portions Copyright (c) 2013 Heroku (http://heroku.com)
3
+ With portions Copyright (c) 2013 ShareAllTech (http://www.sharealltech.com)
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining
6
6
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -14,6 +14,7 @@ _A ruby gem for the [Salesforce REST api](http://www.salesforce.com/us/developer
14
14
  - Support for [custom Apex REST endpoints](#custom-apex-rest-endpoints).
15
15
  - Support for dependent picklists.
16
16
  - Support for decoding [force.com Canvas](http://www.salesforce.com/us/developer/docs/platform_connectpre/canvas_framework.pdf) signed requests. (NEW!)
17
+ - Support for Chatter
17
18
 
18
19
  ## Installation
19
20
 
@@ -222,6 +223,12 @@ client.picklist_values('Automobile__c', 'Model__c', :valid_for => 'Honda')
222
223
  # => [#<Sfdc::Mash label="Civic" value="Civic">, ... ]
223
224
  ```
224
225
 
226
+ ### Chatter
227
+
228
+ ```ruby
229
+ client.post_chatter('text', 'url')
230
+ ```
231
+
225
232
  ---
226
233
 
227
234
  ### authenticate!
@@ -397,7 +404,7 @@ ActiveSupport::Notifications.subscribe('request.salesforce') do |*args|
397
404
  end
398
405
  ```
399
406
 
400
- ## Sfdc.com Canvas
407
+ ## force.com Canvas
401
408
 
402
409
  You can use Sfdc to decode signed requests from Salesforce. See [the example app](https://gist.github.com/4052312).
403
410
 
@@ -411,11 +418,6 @@ client = Sfdc.tooling(...)
411
418
  ```
412
419
 
413
420
  ---
414
-
415
- ## Contact
416
-
417
- - Mattt Thompson <mattt@heroku.com>
418
-
419
421
  ## License
420
422
 
421
423
  Sfdc is available under the MIT license. See the LICENSE file for more info.
@@ -138,6 +138,11 @@ module Sfdc
138
138
  api_get('search', :q => sosl).body
139
139
  end
140
140
 
141
+ # get a list of recently viewed records.
142
+ def recent(num)
143
+ api_get('recent', :q => num).body
144
+ end
145
+
141
146
  # Public: Insert a new record.
142
147
  #
143
148
  # sobject - String name of the sobject.
@@ -300,6 +305,14 @@ module Sfdc
300
305
  api_get(field ? "sobjects/#{sobject}/#{field}/#{id}" : "sobjects/#{sobject}/#{id}").body
301
306
  end
302
307
 
308
+ ############### Chatter #####################
309
+ # client.post_chatter("text", "url")
310
+ def post_chatter(text, url=nil)
311
+ base_url = "chatter/feeds/news/me/feed-items?"
312
+ base_url += ((url == nil) ? "text=#{text}" : "text=#{text}&url=#{url}")
313
+ api_post(base_url)
314
+ end
315
+
303
316
  private
304
317
 
305
318
  # Internal: Returns a path to an api endpoint
data/lib/sfdc/config.rb CHANGED
@@ -83,7 +83,7 @@ module Sfdc
83
83
  end
84
84
  end
85
85
 
86
- option :api_version, :default => '26.0'
86
+ option :api_version, :default => '29.0'
87
87
 
88
88
  # The username to use during login.
89
89
  option :username, :default => lambda { ENV['SALESFORCE_USERNAME'] }
data/lib/sfdc/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Sfdc
2
- VERSION = '3.0.1'
2
+ VERSION = '3.1.0'
3
3
  end
data/sfdc-3.0.1.gem ADDED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sfdc
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 3.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bruce Yue
@@ -181,6 +181,7 @@ files:
181
181
  - ./LICENSE
182
182
  - ./Rakefile
183
183
  - ./README.md
184
+ - ./sfdc-3.0.1.gem
184
185
  - ./sfdc.gemspec
185
186
  - spec/fixtures/auth_error_response.json
186
187
  - spec/fixtures/auth_success_response.json