cloudalign-cli 0.1.1 → 0.1.2

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.
data/bin/cloudalign CHANGED
@@ -12,7 +12,10 @@ class ProjectTask < Thor
12
12
  projects = CloudAlign::Project.find_all.map do |p|
13
13
  {
14
14
  :id => p.id,
15
- :name => p.name
15
+ :name => p.name,
16
+ :description => p.description,
17
+ :roles => p.memberships.map(&:project_role),
18
+ :last_modified => p.updated_at
16
19
  }
17
20
  end
18
21
 
@@ -25,6 +28,7 @@ class ProjectTask < Thor
25
28
  {
26
29
  :id => a.id,
27
30
  :name => a.name,
31
+ :last_modified => a.updated_at
28
32
  }
29
33
  end
30
34
 
data/lib/cloudalign.rb CHANGED
@@ -9,6 +9,7 @@ module CloudAlign
9
9
  autoload :Artifact, 'cloudalign/artifact'
10
10
  autoload :File, 'cloudalign/file'
11
11
  autoload :Config, 'cloudalign/config'
12
+ autoload :Membership, 'cloudalign/membership'
12
13
 
13
14
  API_VERSION = 1
14
15
 
@@ -0,0 +1,14 @@
1
+ module CloudAlign
2
+ class Membership < BaseEntity
3
+ attr_accessor :project_role
4
+ class << self
5
+
6
+ def find_memberships(project_id)
7
+ Client.get_json("/projects/#{project_id}/memberships").map do |row|
8
+ Membership.new(row)
9
+ end
10
+ end
11
+
12
+ end
13
+ end
14
+ end
@@ -20,5 +20,8 @@ module CloudAlign
20
20
  Client.post_for_upload(upload_url, post_data)
21
21
  end
22
22
 
23
+ def memberships
24
+ CloudAlign::Membership.find_memberships(id)
25
+ end
23
26
  end
24
27
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudalign-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-08-30 00:00:00.000000000 Z
13
+ date: 2012-09-04 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: thor
@@ -89,6 +89,7 @@ files:
89
89
  - lib/cloudalign/client.rb
90
90
  - lib/cloudalign/config.rb
91
91
  - lib/cloudalign/file.rb
92
+ - lib/cloudalign/membership.rb
92
93
  - lib/cloudalign/project.rb
93
94
  - lib/cloudalign.rb
94
95
  - README.md