uservoice-ruby 0.0.10 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,10 +3,20 @@ module UserVoice
3
3
 
4
4
  def initialize(*args)
5
5
  case args.size
6
- when 3,4
7
- init_subdomain_and_api_keys(*args)
8
6
  when 1,2
9
- init_consumer_and_access_token(*args)
7
+ if args[1].is_a?(String)
8
+ init_subdomain_and_api_keys(args[0], args[1])
9
+ else
10
+ init_consumer_and_access_token(*args)
11
+ end
12
+ when 3
13
+ if args[2].is_a?(String)
14
+ init_subdomain_and_api_keys(args[0], args[1], args[2])
15
+ else
16
+ init_subdomain_and_api_keys(args[0], args[1], nil, args[2])
17
+ end
18
+ when 4
19
+ init_subdomain_and_api_keys(*args)
10
20
  end
11
21
  end
12
22
 
@@ -1,3 +1,3 @@
1
1
  module UserVoice
2
- VERSION = "0.0.10"
2
+ VERSION = "0.0.11"
3
3
  end
@@ -13,6 +13,13 @@ describe UserVoice::Client do
13
13
  user_names.all?.should == true
14
14
  user_names.size.should == 3
15
15
  end
16
+ it "should get first non-private forum as unsigned client" do
17
+ unsigned_client = UserVoice::Client.new(config['subdomain_name'],
18
+ config['api_key'],
19
+ :uservoice_domain => config['uservoice_domain'],
20
+ :protocol => config['protocol'])
21
+ unsigned_client.get_collection('/api/v1/forums', :limit => 1).first['private'].should == false
22
+ end
16
23
 
17
24
  it "should not get current user without logged in user" do
18
25
  lambda do
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
7
7
  s.version = UserVoice::VERSION
8
8
  s.authors = ["Raimo Tuisku"]
9
9
  s.email = ["dev@usevoice.com"]
10
- s.homepage = "http://developer.uservoice.com"
10
+ s.homepage = "http://developer.uservoice.com/docs/api/ruby-sdk/"
11
11
  s.summary = %q{Client library for UserVoice API}
12
12
  s.description = %q{The gem provides Ruby-bindings to UserVoice API and helps generating Single-Sign-On tokens.}
13
13
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uservoice-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-14 00:00:00.000000000 Z
12
+ date: 2012-12-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
@@ -98,7 +98,7 @@ files:
98
98
  - spec/lib/uservoice/collection_spec.rb
99
99
  - spec/spec_helper.rb
100
100
  - uservoice-ruby.gemspec
101
- homepage: http://developer.uservoice.com
101
+ homepage: http://developer.uservoice.com/docs/api/ruby-sdk/
102
102
  licenses: []
103
103
  post_install_message:
104
104
  rdoc_options: []