ugc 0.9.1 → 0.9.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/Gemfile.lock +1 -1
- data/README.md +6 -0
- data/bin/ugc +5 -0
- data/lib/ugc/commands/delete.rb +1 -1
- data/lib/ugc/commands/get.rb +1 -13
- data/lib/ugc/commands/post.rb +1 -1
- data/lib/ugc/commands/put.rb +1 -1
- data/lib/ugc/version.rb +1 -1
- metadata +4 -4
data/Gemfile.lock
CHANGED
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?
|
data/lib/ugc/commands/delete.rb
CHANGED
data/lib/ugc/commands/get.rb
CHANGED
|
@@ -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 $
|
|
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
|
data/lib/ugc/commands/post.rb
CHANGED
|
@@ -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 $
|
|
10
|
+
format_response $context[args[0]].post parse_data(options[:data] || args[1])
|
|
11
11
|
end
|
|
12
12
|
|
|
13
13
|
end
|
data/lib/ugc/commands/put.rb
CHANGED
|
@@ -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 $
|
|
10
|
+
format_response $context[args[0]].put parse_data(options[:data] || args[1])
|
|
11
11
|
end
|
|
12
12
|
|
|
13
13
|
end
|
data/lib/ugc/version.rb
CHANGED
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.
|
|
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-
|
|
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:
|
|
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:
|
|
195
|
+
hash: -2746687193506333932
|
|
196
196
|
requirements: []
|
|
197
197
|
rubyforge_project:
|
|
198
198
|
rubygems_version: 1.8.24
|