ugc 0.9.9 → 0.9.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +15 -0
- data/Gemfile.lock +1 -1
- data/README.md +13 -11
- data/Rakefile +15 -0
- data/bin/ugc +15 -0
- data/features/step_definitions/ugc_steps.rb +15 -0
- data/features/support/env.rb +15 -0
- data/lib/ugc.rb +15 -0
- data/lib/ugc/application.rb +15 -0
- data/lib/ugc/commands/delete.rb +15 -0
- data/lib/ugc/commands/get.rb +15 -0
- data/lib/ugc/commands/login.rb +15 -0
- data/lib/ugc/commands/post.rb +15 -0
- data/lib/ugc/commands/profile.rb +15 -0
- data/lib/ugc/commands/put.rb +16 -1
- data/lib/ugc/commands/query.rb +15 -0
- data/lib/ugc/commands/target.rb +15 -0
- data/lib/ugc/helpers/curl.rb +16 -1
- data/lib/ugc/helpers/format.rb +15 -0
- data/lib/ugc/helpers/history.rb +15 -0
- data/lib/ugc/helpers/parse.rb +15 -0
- data/lib/ugc/helpers/rest.rb +16 -1
- data/lib/ugc/management.rb +15 -0
- data/lib/ugc/settings.rb +16 -1
- data/lib/ugc/version.rb +16 -1
- data/test/default_test.rb +15 -0
- data/test/test_helper.rb +15 -0
- data/ugc.gemspec +15 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f0244c51d3e127a953ac70f9d02709daffad95d4
|
4
|
+
data.tar.gz: 0b0a6b0fec412a9b9168361cde95ce8a496ee39b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 156c8e2f667c8071cc4b849345c464fea7d8eb8900a30c948cdeb432692235fd3992396a969413d353b83ad3aa0418370a4f1551067afe1aae9943dae2286e66
|
7
|
+
data.tar.gz: 12cf63ded9c2c5a1202b1e9455d3043231c7f1e2e498c30a9188004061c1cc15e3dc4d4ec7ac6bf5752e3326fd00d979be08f2d8f8853e87abfdd60c876417d0
|
data/Gemfile
CHANGED
@@ -1,2 +1,17 @@
|
|
1
|
+
#Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
2
|
+
#license agreements. See the NOTICE.txt file distributed with this work for
|
3
|
+
#additional information regarding copyright ownership. The ASF licenses this
|
4
|
+
#file to you under the Apache License, Version 2.0 (the "License"); you may not
|
5
|
+
#use this file except in compliance with the License. You may obtain a copy of
|
6
|
+
#the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
#Unless required by applicable law or agreed to in writing, software
|
11
|
+
#distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
12
|
+
#WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
13
|
+
#License for the specific language governing permissions and limitations under
|
14
|
+
#the License.
|
15
|
+
|
1
16
|
source 'https://rubygems.org'
|
2
17
|
gemspec
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Usergrid Command Line (ugc)
|
2
2
|
|
3
|
-
ugc enables convenient terminal access to
|
3
|
+
ugc enables convenient terminal access to Apache Usergrid.
|
4
4
|
|
5
5
|
## Features
|
6
6
|
|
@@ -261,16 +261,18 @@ If you specify column names in your query, you will be unable to reference the r
|
|
261
261
|
|
262
262
|
|
263
263
|
## Copyright
|
264
|
-
|
264
|
+
Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
265
|
+
license agreements. See the NOTICE.txt file distributed with this work for
|
266
|
+
additional information regarding copyright ownership. The ASF licenses this
|
267
|
+
file to you under the Apache License, Version 2.0 (the "License"); you may not
|
268
|
+
use this file except in compliance with the License. You may obtain a copy of
|
269
|
+
the License at
|
265
270
|
|
266
|
-
|
267
|
-
you may not use the included files except in compliance with the License.
|
271
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
268
272
|
|
269
|
-
|
273
|
+
Unless required by applicable law or agreed to in writing, software
|
274
|
+
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
275
|
+
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
276
|
+
License for the specific language governing permissions and limitations under
|
277
|
+
the License.
|
270
278
|
|
271
|
-
<http://www.apache.org/licenses/LICENSE-2.0>
|
272
|
-
|
273
|
-
Unless required by applicable law or agreed to in writing, software distributed under
|
274
|
-
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
|
275
|
-
either express or implied. See the License for the specific language governing permissions and
|
276
|
-
limitations under the License.
|
data/Rakefile
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
#Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
2
|
+
#license agreements. See the NOTICE.txt file distributed with this work for
|
3
|
+
#additional information regarding copyright ownership. The ASF licenses this
|
4
|
+
#file to you under the Apache License, Version 2.0 (the "License"); you may not
|
5
|
+
#use this file except in compliance with the License. You may obtain a copy of
|
6
|
+
#the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
#Unless required by applicable law or agreed to in writing, software
|
11
|
+
#distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
12
|
+
#WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
13
|
+
#License for the specific language governing permissions and limitations under
|
14
|
+
#the License.
|
15
|
+
|
1
16
|
require "bundler/gem_tasks"
|
2
17
|
|
3
18
|
require 'rake/clean'
|
data/bin/ugc
CHANGED
@@ -1,5 +1,20 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
+
#Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
4
|
+
#license agreements. See the NOTICE.txt file distributed with this work for
|
5
|
+
#additional information regarding copyright ownership. The ASF licenses this
|
6
|
+
#file to you under the Apache License, Version 2.0 (the "License"); you may not
|
7
|
+
#use this file except in compliance with the License. You may obtain a copy of
|
8
|
+
#the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
#Unless required by applicable law or agreed to in writing, software
|
13
|
+
#distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
14
|
+
#WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
15
|
+
#License for the specific language governing permissions and limitations under
|
16
|
+
#the License.
|
17
|
+
|
3
18
|
require 'gli'
|
4
19
|
require 'yaml'
|
5
20
|
require 'usergrid_iron'
|
@@ -1,3 +1,18 @@
|
|
1
|
+
#Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
2
|
+
#license agreements. See the NOTICE.txt file distributed with this work for
|
3
|
+
#additional information regarding copyright ownership. The ASF licenses this
|
4
|
+
#file to you under the Apache License, Version 2.0 (the "License"); you may not
|
5
|
+
#use this file except in compliance with the License. You may obtain a copy of
|
6
|
+
#the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
#Unless required by applicable law or agreed to in writing, software
|
11
|
+
#distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
12
|
+
#WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
13
|
+
#License for the specific language governing permissions and limitations under
|
14
|
+
#the License.
|
15
|
+
|
1
16
|
When /^I get help for "([^"]*)"$/ do |app_name|
|
2
17
|
@app_name = app_name
|
3
18
|
step %(I run `#{app_name} help`)
|
data/features/support/env.rb
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
#Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
2
|
+
#license agreements. See the NOTICE.txt file distributed with this work for
|
3
|
+
#additional information regarding copyright ownership. The ASF licenses this
|
4
|
+
#file to you under the Apache License, Version 2.0 (the "License"); you may not
|
5
|
+
#use this file except in compliance with the License. You may obtain a copy of
|
6
|
+
#the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
#Unless required by applicable law or agreed to in writing, software
|
11
|
+
#distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
12
|
+
#WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
13
|
+
#License for the specific language governing permissions and limitations under
|
14
|
+
#the License.
|
15
|
+
|
1
16
|
require 'aruba/cucumber'
|
2
17
|
|
3
18
|
ENV['PATH'] = "#{File.expand_path(File.dirname(__FILE__) + '/../../bin')}#{File::PATH_SEPARATOR}#{ENV['PATH']}"
|
data/lib/ugc.rb
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
#Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
2
|
+
#license agreements. See the NOTICE.txt file distributed with this work for
|
3
|
+
#additional information regarding copyright ownership. The ASF licenses this
|
4
|
+
#file to you under the Apache License, Version 2.0 (the "License"); you may not
|
5
|
+
#use this file except in compliance with the License. You may obtain a copy of
|
6
|
+
#the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
#Unless required by applicable law or agreed to in writing, software
|
11
|
+
#distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
12
|
+
#WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
13
|
+
#License for the specific language governing permissions and limitations under
|
14
|
+
#the License.
|
15
|
+
|
1
16
|
require 'ugc/version.rb'
|
2
17
|
|
3
18
|
# Add requires for other files you add to your project here, so
|
data/lib/ugc/application.rb
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
#Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
2
|
+
#license agreements. See the NOTICE.txt file distributed with this work for
|
3
|
+
#additional information regarding copyright ownership. The ASF licenses this
|
4
|
+
#file to you under the Apache License, Version 2.0 (the "License"); you may not
|
5
|
+
#use this file except in compliance with the License. You may obtain a copy of
|
6
|
+
#the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
#Unless required by applicable law or agreed to in writing, software
|
11
|
+
#distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
12
|
+
#WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
13
|
+
#License for the specific language governing permissions and limitations under
|
14
|
+
#the License.
|
15
|
+
|
1
16
|
module Ugc
|
2
17
|
class Application < Usergrid::Application
|
3
18
|
|
data/lib/ugc/commands/delete.rb
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
#Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
2
|
+
#license agreements. See the NOTICE.txt file distributed with this work for
|
3
|
+
#additional information regarding copyright ownership. The ASF licenses this
|
4
|
+
#file to you under the Apache License, Version 2.0 (the "License"); you may not
|
5
|
+
#use this file except in compliance with the License. You may obtain a copy of
|
6
|
+
#the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
#Unless required by applicable law or agreed to in writing, software
|
11
|
+
#distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
12
|
+
#WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
13
|
+
#License for the specific language governing permissions and limitations under
|
14
|
+
#the License.
|
15
|
+
|
1
16
|
desc 'delete an entity'
|
2
17
|
arg_name 'url'
|
3
18
|
|
data/lib/ugc/commands/get.rb
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
#Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
2
|
+
#license agreements. See the NOTICE.txt file distributed with this work for
|
3
|
+
#additional information regarding copyright ownership. The ASF licenses this
|
4
|
+
#file to you under the Apache License, Version 2.0 (the "License"); you may not
|
5
|
+
#use this file except in compliance with the License. You may obtain a copy of
|
6
|
+
#the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
#Unless required by applicable law or agreed to in writing, software
|
11
|
+
#distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
12
|
+
#WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
13
|
+
#License for the specific language governing permissions and limitations under
|
14
|
+
#the License.
|
15
|
+
|
1
16
|
desc 'retrieve and display a collection or entity'
|
2
17
|
|
3
18
|
command :get,:show,:ls,:list do |c|
|
data/lib/ugc/commands/login.rb
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
#Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
2
|
+
#license agreements. See the NOTICE.txt file distributed with this work for
|
3
|
+
#additional information regarding copyright ownership. The ASF licenses this
|
4
|
+
#file to you under the Apache License, Version 2.0 (the "License"); you may not
|
5
|
+
#use this file except in compliance with the License. You may obtain a copy of
|
6
|
+
#the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
#Unless required by applicable law or agreed to in writing, software
|
11
|
+
#distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
12
|
+
#WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
13
|
+
#License for the specific language governing permissions and limitations under
|
14
|
+
#the License.
|
15
|
+
|
1
16
|
require 'io/console'
|
2
17
|
|
3
18
|
desc 'Performs a login to the current profile'
|
data/lib/ugc/commands/post.rb
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
#Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
2
|
+
#license agreements. See the NOTICE.txt file distributed with this work for
|
3
|
+
#additional information regarding copyright ownership. The ASF licenses this
|
4
|
+
#file to you under the Apache License, Version 2.0 (the "License"); you may not
|
5
|
+
#use this file except in compliance with the License. You may obtain a copy of
|
6
|
+
#the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
#Unless required by applicable law or agreed to in writing, software
|
11
|
+
#distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
12
|
+
#WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
13
|
+
#License for the specific language governing permissions and limitations under
|
14
|
+
#the License.
|
15
|
+
|
1
16
|
desc 'non-idempotent create or update (post is usually create)'
|
2
17
|
arg_name '[path] [data]'
|
3
18
|
|
data/lib/ugc/commands/profile.rb
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
#Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
2
|
+
#license agreements. See the NOTICE.txt file distributed with this work for
|
3
|
+
#additional information regarding copyright ownership. The ASF licenses this
|
4
|
+
#file to you under the Apache License, Version 2.0 (the "License"); you may not
|
5
|
+
#use this file except in compliance with the License. You may obtain a copy of
|
6
|
+
#the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
#Unless required by applicable law or agreed to in writing, software
|
11
|
+
#distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
12
|
+
#WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
13
|
+
#License for the specific language governing permissions and limitations under
|
14
|
+
#the License.
|
15
|
+
|
1
16
|
desc "set the current profile (creates if it doesn't exist)"
|
2
17
|
arg_name 'profile name'
|
3
18
|
|
data/lib/ugc/commands/put.rb
CHANGED
@@ -1,9 +1,24 @@
|
|
1
|
+
#Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
2
|
+
#license agreements. See the NOTICE.txt file distributed with this work for
|
3
|
+
#additional information regarding copyright ownership. The ASF licenses this
|
4
|
+
#file to you under the Apache License, Version 2.0 (the "License"); you may not
|
5
|
+
#use this file except in compliance with the License. You may obtain a copy of
|
6
|
+
#the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
#Unless required by applicable law or agreed to in writing, software
|
11
|
+
#distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
12
|
+
#WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
13
|
+
#License for the specific language governing permissions and limitations under
|
14
|
+
#the License.
|
15
|
+
|
1
16
|
desc 'idempotent create or update (put is usually an update)'
|
2
17
|
arg_name '[path] [data]'
|
3
18
|
|
4
19
|
command :put,:update do |c|
|
5
20
|
c.flag [:d,:data], :desc => 'does nothing: for ease of conversion from curl'
|
6
|
-
c.flag [:f,:file], :must_match =>
|
21
|
+
c.flag [:f,:file], :must_match => /.*=.*/, :arg_name => 'field_name=file_name', :desc => 'will force multipart upload'
|
7
22
|
|
8
23
|
c.action do |global_options,options,args|
|
9
24
|
help_now! unless args[0]
|
data/lib/ugc/commands/query.rb
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
#Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
2
|
+
#license agreements. See the NOTICE.txt file distributed with this work for
|
3
|
+
#additional information regarding copyright ownership. The ASF licenses this
|
4
|
+
#file to you under the Apache License, Version 2.0 (the "License"); you may not
|
5
|
+
#use this file except in compliance with the License. You may obtain a copy of
|
6
|
+
#the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
#Unless required by applicable law or agreed to in writing, software
|
11
|
+
#distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
12
|
+
#WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
13
|
+
#License for the specific language governing permissions and limitations under
|
14
|
+
#the License.
|
15
|
+
|
1
16
|
desc 'query (uses sql-like syntax)'
|
2
17
|
long_desc 'query may contain "from" clause instead of specifying collection_name'
|
3
18
|
arg_name '[collection_name] query'
|
data/lib/ugc/commands/target.rb
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
#Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
2
|
+
#license agreements. See the NOTICE.txt file distributed with this work for
|
3
|
+
#additional information regarding copyright ownership. The ASF licenses this
|
4
|
+
#file to you under the Apache License, Version 2.0 (the "License"); you may not
|
5
|
+
#use this file except in compliance with the License. You may obtain a copy of
|
6
|
+
#the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
#Unless required by applicable law or agreed to in writing, software
|
11
|
+
#distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
12
|
+
#WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
13
|
+
#License for the specific language governing permissions and limitations under
|
14
|
+
#the License.
|
15
|
+
|
1
16
|
desc 'set the base url, org, and app for the current profile'
|
2
17
|
|
3
18
|
command :target do |c|
|
data/lib/ugc/helpers/curl.rb
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
#Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
2
|
+
#license agreements. See the NOTICE.txt file distributed with this work for
|
3
|
+
#additional information regarding copyright ownership. The ASF licenses this
|
4
|
+
#file to you under the Apache License, Version 2.0 (the "License"); you may not
|
5
|
+
#use this file except in compliance with the License. You may obtain a copy of
|
6
|
+
#the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
#Unless required by applicable law or agreed to in writing, software
|
11
|
+
#distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
12
|
+
#WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
13
|
+
#License for the specific language governing permissions and limitations under
|
14
|
+
#the License.
|
15
|
+
|
1
16
|
def puts_curl(command, resource, payload=nil, file=nil)
|
2
17
|
headers = resource.options[:headers] || {}
|
3
18
|
req = RestClient::Request.new(resource.options.merge(
|
@@ -18,4 +33,4 @@ def puts_curl(command, resource, payload=nil, file=nil)
|
|
18
33
|
curl = %Q[#{curl} -d '#{payload}'] if (payload)
|
19
34
|
end
|
20
35
|
puts "#{curl} '#{URI::encode resource.url}'"
|
21
|
-
end
|
36
|
+
end
|
data/lib/ugc/helpers/format.rb
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
#Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
2
|
+
#license agreements. See the NOTICE.txt file distributed with this work for
|
3
|
+
#additional information regarding copyright ownership. The ASF licenses this
|
4
|
+
#file to you under the Apache License, Version 2.0 (the "License"); you may not
|
5
|
+
#use this file except in compliance with the License. You may obtain a copy of
|
6
|
+
#the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
#Unless required by applicable law or agreed to in writing, software
|
11
|
+
#distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
12
|
+
#WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
13
|
+
#License for the specific language governing permissions and limitations under
|
14
|
+
#the License.
|
15
|
+
|
1
16
|
SKIP_ATTRS = %w(metadata uri type)
|
2
17
|
INDEX_COL_WIDTH = 2
|
3
18
|
|
data/lib/ugc/helpers/history.rb
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
#Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
2
|
+
#license agreements. See the NOTICE.txt file distributed with this work for
|
3
|
+
#additional information regarding copyright ownership. The ASF licenses this
|
4
|
+
#file to you under the Apache License, Version 2.0 (the "License"); you may not
|
5
|
+
#use this file except in compliance with the License. You may obtain a copy of
|
6
|
+
#the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
#Unless required by applicable law or agreed to in writing, software
|
11
|
+
#distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
12
|
+
#WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
13
|
+
#License for the specific language governing permissions and limitations under
|
14
|
+
#the License.
|
15
|
+
|
1
16
|
def save_response(response)
|
2
17
|
if response && response.multiple_entities? && response.collection.size > 1
|
3
18
|
paths = response.entities.collect {|e| e['metadata']['path'][1..-1] } rescue []
|
data/lib/ugc/helpers/parse.rb
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
#Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
2
|
+
#license agreements. See the NOTICE.txt file distributed with this work for
|
3
|
+
#additional information regarding copyright ownership. The ASF licenses this
|
4
|
+
#file to you under the Apache License, Version 2.0 (the "License"); you may not
|
5
|
+
#use this file except in compliance with the License. You may obtain a copy of
|
6
|
+
#the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
#Unless required by applicable law or agreed to in writing, software
|
11
|
+
#distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
12
|
+
#WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
13
|
+
#License for the specific language governing permissions and limitations under
|
14
|
+
#the License.
|
15
|
+
|
1
16
|
require 'json'
|
2
17
|
|
3
18
|
def parse_sql(query)
|
data/lib/ugc/helpers/rest.rb
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
#Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
2
|
+
#license agreements. See the NOTICE.txt file distributed with this work for
|
3
|
+
#additional information regarding copyright ownership. The ASF licenses this
|
4
|
+
#file to you under the Apache License, Version 2.0 (the "License"); you may not
|
5
|
+
#use this file except in compliance with the License. You may obtain a copy of
|
6
|
+
#the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
#Unless required by applicable law or agreed to in writing, software
|
11
|
+
#distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
12
|
+
#WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
13
|
+
#License for the specific language governing permissions and limitations under
|
14
|
+
#the License.
|
15
|
+
|
1
16
|
def multipart_payload(payload, file)
|
2
17
|
payload = payload.is_a?(Hash) ? payload : MultiJson.load(payload)
|
3
18
|
filename = 'file'
|
@@ -19,4 +34,4 @@ def multipart_upload(resource, payload, file, method=:post, additional_headers =
|
|
19
34
|
resource.instance_variable_set :@response, response
|
20
35
|
response.resource = resource
|
21
36
|
response
|
22
|
-
end
|
37
|
+
end
|
data/lib/ugc/management.rb
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
#Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
2
|
+
#license agreements. See the NOTICE.txt file distributed with this work for
|
3
|
+
#additional information regarding copyright ownership. The ASF licenses this
|
4
|
+
#file to you under the Apache License, Version 2.0 (the "License"); you may not
|
5
|
+
#use this file except in compliance with the License. You may obtain a copy of
|
6
|
+
#the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
#Unless required by applicable law or agreed to in writing, software
|
11
|
+
#distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
12
|
+
#WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
13
|
+
#License for the specific language governing permissions and limitations under
|
14
|
+
#the License.
|
15
|
+
|
1
16
|
module Ugc
|
2
17
|
class Management < Usergrid::Management
|
3
18
|
|
data/lib/ugc/settings.rb
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
#Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
2
|
+
#license agreements. See the NOTICE.txt file distributed with this work for
|
3
|
+
#additional information regarding copyright ownership. The ASF licenses this
|
4
|
+
#file to you under the Apache License, Version 2.0 (the "License"); you may not
|
5
|
+
#use this file except in compliance with the License. You may obtain a copy of
|
6
|
+
#the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
#Unless required by applicable law or agreed to in writing, software
|
11
|
+
#distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
12
|
+
#WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
13
|
+
#License for the specific language governing permissions and limitations under
|
14
|
+
#the License.
|
15
|
+
|
1
16
|
module Ugc
|
2
17
|
class Settings
|
3
18
|
|
@@ -136,4 +151,4 @@ module Ugc
|
|
136
151
|
end
|
137
152
|
|
138
153
|
end
|
139
|
-
end
|
154
|
+
end
|
data/lib/ugc/version.rb
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
#Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
2
|
+
#license agreements. See the NOTICE.txt file distributed with this work for
|
3
|
+
#additional information regarding copyright ownership. The ASF licenses this
|
4
|
+
#file to you under the Apache License, Version 2.0 (the "License"); you may not
|
5
|
+
#use this file except in compliance with the License. You may obtain a copy of
|
6
|
+
#the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
#Unless required by applicable law or agreed to in writing, software
|
11
|
+
#distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
12
|
+
#WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
13
|
+
#License for the specific language governing permissions and limitations under
|
14
|
+
#the License.
|
15
|
+
|
1
16
|
module Ugc
|
2
|
-
VERSION = '0.9.
|
17
|
+
VERSION = '0.9.10'
|
3
18
|
end
|
data/test/default_test.rb
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
#Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
2
|
+
#license agreements. See the NOTICE.txt file distributed with this work for
|
3
|
+
#additional information regarding copyright ownership. The ASF licenses this
|
4
|
+
#file to you under the Apache License, Version 2.0 (the "License"); you may not
|
5
|
+
#use this file except in compliance with the License. You may obtain a copy of
|
6
|
+
#the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
#Unless required by applicable law or agreed to in writing, software
|
11
|
+
#distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
12
|
+
#WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
13
|
+
#License for the specific language governing permissions and limitations under
|
14
|
+
#the License.
|
15
|
+
|
1
16
|
require 'test_helper'
|
2
17
|
|
3
18
|
class DefaultTest < Test::Unit::TestCase
|
data/test/test_helper.rb
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
#Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
2
|
+
#license agreements. See the NOTICE.txt file distributed with this work for
|
3
|
+
#additional information regarding copyright ownership. The ASF licenses this
|
4
|
+
#file to you under the Apache License, Version 2.0 (the "License"); you may not
|
5
|
+
#use this file except in compliance with the License. You may obtain a copy of
|
6
|
+
#the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
#Unless required by applicable law or agreed to in writing, software
|
11
|
+
#distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
12
|
+
#WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
13
|
+
#License for the specific language governing permissions and limitations under
|
14
|
+
#the License.
|
15
|
+
|
1
16
|
require 'test/unit'
|
2
17
|
|
3
18
|
# Add test libraries you want to use here, e.g. mocha
|
data/ugc.gemspec
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
#Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
2
|
+
#license agreements. See the NOTICE.txt file distributed with this work for
|
3
|
+
#additional information regarding copyright ownership. The ASF licenses this
|
4
|
+
#file to you under the Apache License, Version 2.0 (the "License"); you may not
|
5
|
+
#use this file except in compliance with the License. You may obtain a copy of
|
6
|
+
#the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
#Unless required by applicable law or agreed to in writing, software
|
11
|
+
#distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
12
|
+
#WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
13
|
+
#License for the specific language governing permissions and limitations under
|
14
|
+
#the License.
|
15
|
+
|
1
16
|
# Ensure we require the local version and not one we might have installed already
|
2
17
|
require File.join([File.dirname(__FILE__),'lib','ugc','version.rb'])
|
3
18
|
spec = Gem::Specification.new do |s|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
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.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Scott Ganyo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-05-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|