zenbe-flareshow 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- data/Flareshow.gemspec +4 -5
- data/README.md +28 -1
- data/VERSION +1 -1
- data/lib/flow.rb +3 -3
- data/lib/service.rb +1 -1
- metadata +5 -6
data/Flareshow.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{flareshow}
|
8
|
-
s.version = "0.2.
|
8
|
+
s.version = "0.2.4"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Will Bailey"]
|
12
|
-
s.date = %q{2009-09-
|
12
|
+
s.date = %q{2009-09-11}
|
13
13
|
s.description = %q{TODO: a ruby gem for interacting with the shareflow collaboration service by Zenbe}
|
14
14
|
s.email = %q{will.bailey@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -42,12 +42,11 @@ Gem::Specification.new do |s|
|
|
42
42
|
"test/flareshow_test.rb",
|
43
43
|
"test/test_helper.rb"
|
44
44
|
]
|
45
|
-
s.has_rdoc = true
|
46
45
|
s.homepage = %q{http://github.com/willbailey/flareshow}
|
47
46
|
s.rdoc_options = ["--charset=UTF-8"]
|
48
47
|
s.require_paths = ["lib"]
|
49
48
|
s.rubyforge_project = %q{flareshow}
|
50
|
-
s.rubygems_version = %q{1.3.
|
49
|
+
s.rubygems_version = %q{1.3.5}
|
51
50
|
s.summary = %q{TODO: a ruby gem for interacting with the shareflow collaboration service}
|
52
51
|
s.test_files = [
|
53
52
|
"test/flareshow_test.rb",
|
@@ -56,7 +55,7 @@ Gem::Specification.new do |s|
|
|
56
55
|
|
57
56
|
if s.respond_to? :specification_version then
|
58
57
|
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
59
|
-
s.specification_version =
|
58
|
+
s.specification_version = 3
|
60
59
|
|
61
60
|
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
62
61
|
s.add_development_dependency(%q<thoughtbot-shoulda>, [">= 0"])
|
data/README.md
CHANGED
@@ -89,4 +89,31 @@ Flareshow offers an ActiveRecord like syntax for retrieving and manipulating mod
|
|
89
89
|
|
90
90
|
f=Flow.find_by_name('test')
|
91
91
|
f.name = 'a different name'
|
92
|
-
f.save
|
92
|
+
f.save
|
93
|
+
|
94
|
+
### Inviting someone to a flow (only available if you are the creator of the flow)
|
95
|
+
|
96
|
+
f=Flow.find_by_name('test')
|
97
|
+
f.send_invitations('test@test.com')
|
98
|
+
|
99
|
+
# this also works
|
100
|
+
f.send_invitations(['test1@test.com', 'test2@test.com'])
|
101
|
+
|
102
|
+
### Canceling an invitation to a flow (only available if you are the creator of the flow)
|
103
|
+
|
104
|
+
f=Flow.find_by_name('test')
|
105
|
+
# revoke an invitation by the email address that was invited
|
106
|
+
f.revoke_invitations('test@test.com')
|
107
|
+
|
108
|
+
|
109
|
+
### Removing a user from a flow (only available if you are the creator of the flow)
|
110
|
+
|
111
|
+
f = Flow.find_by_name('test')
|
112
|
+
users = f.list_users # get a listing of the users on the flow
|
113
|
+
# remove the last user in the list from the flow...you cant remove yourself in this way
|
114
|
+
f.remove_members(users.last.id)
|
115
|
+
|
116
|
+
### listing all the users on a flow
|
117
|
+
|
118
|
+
f=Flow.first
|
119
|
+
f.list_users
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.4
|
data/lib/flow.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
class Flow < Flareshow::Resource
|
2
2
|
|
3
|
-
@attr_accessible = [:name]
|
3
|
+
@attr_accessible = [:name, :remove_members, :uninvite, :invite]
|
4
4
|
@attr_required = [:name]
|
5
5
|
|
6
6
|
# =================
|
@@ -23,7 +23,7 @@ class Flow < Flareshow::Resource
|
|
23
23
|
end
|
24
24
|
|
25
25
|
#invite/reinvite a user to a flow by email address
|
26
|
-
def
|
26
|
+
def send_invitations(email_addresses)
|
27
27
|
self.invite = [email_addresses].flatten
|
28
28
|
self.save
|
29
29
|
end
|
@@ -38,7 +38,7 @@ class Flow < Flareshow::Resource
|
|
38
38
|
# you must be the owner of the flow to perform
|
39
39
|
# this action
|
40
40
|
def remove_members(member_ids)
|
41
|
-
self.remove_members = [
|
41
|
+
self.remove_members = [member_ids].flatten
|
42
42
|
self.save
|
43
43
|
end
|
44
44
|
|
data/lib/service.rb
CHANGED
@@ -8,7 +8,7 @@ class Flareshow::Service
|
|
8
8
|
attr_accessor :server
|
9
9
|
|
10
10
|
# setup the service to use a particular host and domain
|
11
|
-
def configure(subdomain=nil, host='
|
11
|
+
def configure(subdomain=nil, host='api.zenbe.com')
|
12
12
|
raise Flareshow::ConfigurationException unless subdomain
|
13
13
|
self.server=Server.new(host, subdomain)
|
14
14
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zenbe-flareshow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Will Bailey
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-09-
|
12
|
+
date: 2009-09-11 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -106,9 +106,8 @@ files:
|
|
106
106
|
- lib/util.rb
|
107
107
|
- test/flareshow_test.rb
|
108
108
|
- test/test_helper.rb
|
109
|
-
has_rdoc:
|
109
|
+
has_rdoc: false
|
110
110
|
homepage: http://github.com/willbailey/flareshow
|
111
|
-
licenses:
|
112
111
|
post_install_message:
|
113
112
|
rdoc_options:
|
114
113
|
- --charset=UTF-8
|
@@ -129,9 +128,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
129
128
|
requirements: []
|
130
129
|
|
131
130
|
rubyforge_project: flareshow
|
132
|
-
rubygems_version: 1.
|
131
|
+
rubygems_version: 1.2.0
|
133
132
|
signing_key:
|
134
|
-
specification_version:
|
133
|
+
specification_version: 3
|
135
134
|
summary: "TODO: a ruby gem for interacting with the shareflow collaboration service"
|
136
135
|
test_files:
|
137
136
|
- test/flareshow_test.rb
|