ace-client 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/bin/ace-q2 +32 -0
  3. metadata +16 -14
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.5
1
+ 0.0.6
data/bin/ace-q2 ADDED
@@ -0,0 +1,32 @@
1
+ $:.unshift(File.dirname(__FILE__) + '/../lib') unless $:.include?(File.dirname(__FILE__) + '/../lib')
2
+ require 'ace-client'
3
+ require 'thor'
4
+ require 'nokogiri'
5
+
6
+ BANNER = 'Usage: ace-q2 DescribeSomethings Key1=Value1 Key2=Value2 ...'
7
+
8
+ def validate_env
9
+ %w(ACE_ACCESS_KEY_ID ACE_SECRET_ACCESS_KEY ACE_ENDPOINT).each do |x|
10
+ abort "Error: please set #{x} environment variable" if ENV[x].nil?
11
+ end
12
+ end
13
+
14
+ def main(args)
15
+ abort BANNER if args.size < 1
16
+ validate_env
17
+
18
+ action = args.shift
19
+ params = {}
20
+ args.each do |arg|
21
+ key, value = arg.split('=')
22
+ if value.nil?
23
+ abort 'Error: please specify params like Key=Value'
24
+ end
25
+ params[key] = value
26
+ end
27
+
28
+ response = AceClient::Query2.new.action(action, params)
29
+ puts Nokogiri::XML(response.body).to_xml(:indent => 4)
30
+ end
31
+
32
+ main(ARGV.dup)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ace-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-11-23 00:00:00.000000000Z
12
+ date: 2013-11-25 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
- requirement: &182806060 !ruby/object:Gem::Requirement
16
+ requirement: &225820340 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 2.8.0
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *182806060
24
+ version_requirements: *225820340
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rdoc
27
- requirement: &182804780 !ruby/object:Gem::Requirement
27
+ requirement: &225816980 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '3.12'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *182804780
35
+ version_requirements: *225816980
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: bundler
38
- requirement: &182803780 !ruby/object:Gem::Requirement
38
+ requirement: &225816020 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '1.0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *182803780
46
+ version_requirements: *225816020
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: jeweler
49
- requirement: &182802740 !ruby/object:Gem::Requirement
49
+ requirement: &225815180 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 1.8.7
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *182802740
57
+ version_requirements: *225815180
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: rcov
60
- requirement: &182800860 !ruby/object:Gem::Requirement
60
+ requirement: &225814580 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,11 @@ dependencies:
65
65
  version: '0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *182800860
68
+ version_requirements: *225814580
69
69
  description: Simple ACE(Amazon Compatible Environment) Client
70
70
  email: tily05@gmail.com
71
- executables: []
71
+ executables:
72
+ - ace-q2
72
73
  extensions: []
73
74
  extra_rdoc_files:
74
75
  - LICENSE.txt
@@ -80,6 +81,7 @@ files:
80
81
  - README.md
81
82
  - Rakefile
82
83
  - VERSION
84
+ - bin/ace-q2
83
85
  - lib/ace-client.rb
84
86
  - lib/ace-client/base.rb
85
87
  - lib/ace-client/query2.rb
@@ -101,7 +103,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
101
103
  version: '0'
102
104
  segments:
103
105
  - 0
104
- hash: -3654989663999187690
106
+ hash: -1518106039596095891
105
107
  required_rubygems_version: !ruby/object:Gem::Requirement
106
108
  none: false
107
109
  requirements: