ugc 0.9.1 → 0.9.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ugc (0.9.1)
4
+ ugc (0.9.2)
5
5
  command_line_reporter
6
6
  gli (= 2.5.0)
7
7
  highline
data/README.md CHANGED
@@ -6,6 +6,7 @@ ugc enables convenient terminal access to Apigee's App Services (aka Usergrid).
6
6
 
7
7
  * Multiple connection/login profiles
8
8
  * Simple syntax to Usergrid data
9
+ * Will automatically perform paging on long query results
9
10
  * Use relative or absolute URLs
10
11
  * Convenient path reference '@n' to previous list entities
11
12
  * Easy-to-read tabular output
@@ -171,6 +172,11 @@ If you specify column names in your query, you will be unable to reference the r
171
172
 
172
173
  ## Release notes
173
174
 
175
+ ### 0.9.2
176
+ * New features
177
+ 1. access management functions with -m (--management) global switch
178
+ * eg. `$ ugc -m get orgs/my-org`
179
+
174
180
  ### 0.9.1
175
181
  * New features
176
182
  1. allow non-interactive password on login (-p or --password)
data/bin/ugc CHANGED
@@ -15,6 +15,9 @@ version Ugc::VERSION
15
15
  desc 'verbose'
16
16
  switch [:v,:verbose], negatable: false
17
17
 
18
+ desc 'management'
19
+ switch [:m,:management], negatable: false
20
+
18
21
  desc 'draw table border'
19
22
  default_value true
20
23
  switch [:b,:border]
@@ -45,6 +48,8 @@ pre do |global_options,command,options,args|
45
48
  else
46
49
  if $settings.configured? && $settings.logged_in?
47
50
  $application = Ugc::Application.new
51
+ $management = Ugc::Management.new
52
+ $context = global_options[:management] ? $management : $application
48
53
  true
49
54
  else
50
55
  if $settings.configured?
@@ -6,7 +6,7 @@ command :rm,:del,:delete do |c|
6
6
  c.action do |global_options,options,args|
7
7
  help_now! unless args[0]
8
8
 
9
- format_response $application[args[0]].delete
9
+ format_response $context[args[0]].delete
10
10
  end
11
11
 
12
12
  end
@@ -8,7 +8,7 @@ command :get,:show,:ls,:list do |c|
8
8
  c2.action do |global_options,options,args|
9
9
  help_now! unless args[0]
10
10
 
11
- format_response $application[args[0]].get
11
+ format_response $context[args[0]].get
12
12
  end
13
13
  end
14
14
 
@@ -35,18 +35,6 @@ command :get,:show,:ls,:list do |c|
35
35
  end
36
36
  end
37
37
 
38
- default_names = %w(assets users events roles folders activities devices groups)
39
- default_names.each do |e|
40
- c.desc e
41
- c.command [e.to_sym] do |c2|
42
- c2.action do |global_options,options,args|
43
- response = $application[e].get
44
- format_collection response.collection
45
- save_response response
46
- end
47
- end
48
- end
49
-
50
38
  c.default_command :url
51
39
 
52
40
  end
@@ -7,7 +7,7 @@ command :post,:create do |c|
7
7
  c.action do |global_options,options,args|
8
8
  help_now! unless args[0]
9
9
 
10
- format_response $application[args[0]].post parse_data(options[:data] || args[1])
10
+ format_response $context[args[0]].post parse_data(options[:data] || args[1])
11
11
  end
12
12
 
13
13
  end
@@ -7,7 +7,7 @@ command :put,:update do |c|
7
7
  c.action do |global_options,options,args|
8
8
  help_now! unless args[0]
9
9
 
10
- format_response $application[args[0]].put parse_data(options[:data] || args[1])
10
+ format_response $context[args[0]].put parse_data(options[:data] || args[1])
11
11
  end
12
12
 
13
13
  end
@@ -1,3 +1,3 @@
1
1
  module Ugc
2
- VERSION = '0.9.1'
2
+ VERSION = '0.9.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ugc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.2
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: 2013-01-18 00:00:00.000000000 Z
12
+ date: 2013-02-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -183,7 +183,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
183
183
  version: '0'
184
184
  segments:
185
185
  - 0
186
- hash: 1880156411111521140
186
+ hash: -2746687193506333932
187
187
  required_rubygems_version: !ruby/object:Gem::Requirement
188
188
  none: false
189
189
  requirements:
@@ -192,7 +192,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
192
192
  version: '0'
193
193
  segments:
194
194
  - 0
195
- hash: 1880156411111521140
195
+ hash: -2746687193506333932
196
196
  requirements: []
197
197
  rubyforge_project:
198
198
  rubygems_version: 1.8.24