protolink 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -58,8 +58,14 @@ module Protolink
58
58
  end
59
59
 
60
60
  # Creates and returns a new user with the given attributes
61
- def create_user(login, password, name, email, avatar_url = nil, channels = nil)
62
- connection.post('/api/v1/users/create.json', {:login => login, :name => name, :password => password, :email => email, :avatar_url => avatar_url, :channels => channels } )
61
+ def create_user(login, password = nil, name = nil, email = nil, avatar_url = nil, channels = nil)
62
+ if channels
63
+ # not implemented yet
64
+ no_channels = "true"
65
+ else
66
+ no_channels = "true"
67
+ end
68
+ connection.post('/api/v1/users/create.json', {:login => login, :name => name, :password => password, :email => email, :avatar_url => avatar_url, :no_channels => no_channels, :channels_to_subscribe => nil } )
63
69
  find_user_by_login(login)
64
70
  end
65
71
 
@@ -68,8 +74,8 @@ module Protolink
68
74
  users.detect { |user| user.login == login }
69
75
  end
70
76
 
71
- def find_or_create_user_by_login(login, password, name, email, avatar_url = nil, channels = nil)
72
- find_user_by_login(name) || create_user(login, password, name, email, avatar_url = nil, channels = nil)
77
+ def find_or_create_user_by_login(login, password = nil, name = nil, email = nil, avatar_url = nil, channels = nil)
78
+ find_user_by_login(login) || create_user(login, password, name, email, avatar_url = nil, channels = nil)
73
79
  end
74
80
 
75
81
 
@@ -1,3 +1,3 @@
1
1
  module Protolink
2
- VERSION = '0.1.0' unless defined?(::Protolink::VERSION)
2
+ VERSION = '0.1.1' unless defined?(::Protolink::VERSION)
3
3
  end
data/protolink.gemspec CHANGED
@@ -6,7 +6,7 @@ Gem::Specification.new do |s|
6
6
  s.name = %q{protolink}
7
7
  s.version = Protolink::VERSION
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
9
- s.authors = ["Björn B. Dorra"]
9
+ s.authors = ["Björn B. Dorra", "Ali Jelveh"]
10
10
  s.description = %q{A Ruby API for interfacing with Protonet, the next-gen internet infrastructure. Truly social and people-powered.}
11
11
  s.email = %q{dorra@d-1.comg}
12
12
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,21 +1,22 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: protolink
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - "Bj\xC3\xB6rn B. Dorra"
14
+ - Ali Jelveh
14
15
  autorequire:
15
16
  bindir: bin
16
17
  cert_chain: []
17
18
 
18
- date: 2011-06-14 00:00:00 +02:00
19
+ date: 2011-06-15 00:00:00 +02:00
19
20
  default_executable:
20
21
  dependencies:
21
22
  - !ruby/object:Gem::Dependency