sonic-screwdriver 0.0.1

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: d74c2f1afc6d149f9939ba2c14a3d0994b764da9
4
+ data.tar.gz: b5427517877def31a8f04d75ffb500a6f06dc38d
5
+ SHA512:
6
+ metadata.gz: 91ce81d1298f9235c7fbddf58990ae0cf5b199a1215660a61e81a324402204582cbf71682570f1e606e6abd7e2401c7b1bcb5293fbd6e3fded1d1aa6fd27d326
7
+ data.tar.gz: e7f9c7d8671adffa763ff2606d275ff0c4a3b79c3a25a94090fedbaf0c6682c860b99627617ab1e7104c07815d9fd446aff455aa546449f4bab075cde4799cf3
@@ -0,0 +1,16 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ InstalledFiles
7
+ _yardoc
8
+ coverage
9
+ doc/
10
+ lib/bundler/man
11
+ pkg
12
+ rdoc
13
+ spec/reports
14
+ test/tmp
15
+ test/version_tmp
16
+ tmp
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --format documentation
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in sonic.gemspec
4
+ gemspec
5
+
6
+ gem "codeclimate-test-reporter", group: :test, require: nil
@@ -0,0 +1,94 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ sonic-screwdriver (0.0.1)
5
+ colorize
6
+ hashie
7
+ thor
8
+
9
+ GEM
10
+ remote: https://rubygems.org/
11
+ specs:
12
+ codeclimate-test-reporter (1.0.8)
13
+ simplecov (<= 0.13)
14
+ coderay (1.1.1)
15
+ colorize (0.8.1)
16
+ diff-lcs (1.3)
17
+ docile (1.1.5)
18
+ ffi (1.9.18)
19
+ formatador (0.2.5)
20
+ guard (2.14.1)
21
+ formatador (>= 0.2.4)
22
+ listen (>= 2.7, < 4.0)
23
+ lumberjack (~> 1.0)
24
+ nenv (~> 0.1)
25
+ notiffany (~> 0.0)
26
+ pry (>= 0.9.12)
27
+ shellany (~> 0.0)
28
+ thor (>= 0.18.1)
29
+ guard-bundler (2.1.0)
30
+ bundler (~> 1.0)
31
+ guard (~> 2.2)
32
+ guard-compat (~> 1.1)
33
+ guard-compat (1.2.1)
34
+ guard-rspec (4.7.3)
35
+ guard (~> 2.1)
36
+ guard-compat (~> 1.1)
37
+ rspec (>= 2.99.0, < 4.0)
38
+ hashie (3.5.5)
39
+ json (2.1.0)
40
+ listen (3.1.5)
41
+ rb-fsevent (~> 0.9, >= 0.9.4)
42
+ rb-inotify (~> 0.9, >= 0.9.7)
43
+ ruby_dep (~> 1.2)
44
+ lumberjack (1.0.12)
45
+ method_source (0.8.2)
46
+ nenv (0.3.0)
47
+ notiffany (0.1.1)
48
+ nenv (~> 0.1)
49
+ shellany (~> 0.0)
50
+ pry (0.10.4)
51
+ coderay (~> 1.1.0)
52
+ method_source (~> 0.8.1)
53
+ slop (~> 3.4)
54
+ rake (12.0.0)
55
+ rb-fsevent (0.9.8)
56
+ rb-inotify (0.9.8)
57
+ ffi (>= 0.5.0)
58
+ rspec (3.6.0)
59
+ rspec-core (~> 3.6.0)
60
+ rspec-expectations (~> 3.6.0)
61
+ rspec-mocks (~> 3.6.0)
62
+ rspec-core (3.6.0)
63
+ rspec-support (~> 3.6.0)
64
+ rspec-expectations (3.6.0)
65
+ diff-lcs (>= 1.2.0, < 2.0)
66
+ rspec-support (~> 3.6.0)
67
+ rspec-mocks (3.6.0)
68
+ diff-lcs (>= 1.2.0, < 2.0)
69
+ rspec-support (~> 3.6.0)
70
+ rspec-support (3.6.0)
71
+ ruby_dep (1.5.0)
72
+ shellany (0.0.1)
73
+ simplecov (0.13.0)
74
+ docile (~> 1.1.0)
75
+ json (>= 1.8, < 3)
76
+ simplecov-html (~> 0.10.0)
77
+ simplecov-html (0.10.1)
78
+ slop (3.6.0)
79
+ thor (0.19.4)
80
+
81
+ PLATFORMS
82
+ ruby
83
+
84
+ DEPENDENCIES
85
+ bundler (~> 1.3)
86
+ codeclimate-test-reporter
87
+ guard
88
+ guard-bundler
89
+ guard-rspec
90
+ rake
91
+ sonic-screwdriver!
92
+
93
+ BUNDLED WITH
94
+ 1.15.1
@@ -0,0 +1,12 @@
1
+ guard 'rspec' do
2
+ watch(%r{^spec/.+_spec\.rb$})
3
+ watch(%r{^lib/(.+)\.rb$}) { "spec/sonic_spec.rb" }
4
+ watch(%r{^lib/sonic/(.+)\.rb$}) { "spec/sonic_spec.rb" }
5
+ watch('spec/spec_helper.rb') { "spec/sonic_spec.rb" }
6
+ watch(%r{^lib/sonic/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
7
+ end
8
+
9
+ guard 'bundler' do
10
+ watch('Gemfile')
11
+ watch(/^.+\.gemspec/)
12
+ end
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 Tung Nguyen
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,44 @@
1
+ # Sonic
2
+
3
+ [![Build Status](https://magnum.travis-ci.com/)](https://magnum.travis-ci.com/)
4
+ [![Code Climate](https://codeclimate.com/)](https://codeclimate.com/)
5
+ [![Code Climate](https://codeclimate.com/)](https://codeclimate.com/)
6
+
7
+ To these the sonic, run these commands:
8
+
9
+ TODO: Write a gem description
10
+
11
+ ## Installation
12
+
13
+ Add this line to your application's Gemfile:
14
+
15
+ gem 'sonic'
16
+
17
+ And then execute:
18
+
19
+ $ bundle
20
+
21
+ Or install it yourself as:
22
+
23
+ $ gem install sonic
24
+
25
+ ## Usage
26
+
27
+ <pre>
28
+ git clone https://github.com/tongueroo/sonic.git
29
+ mv sonic <project_name>
30
+ cd <project_name>
31
+ rake rename
32
+ rm -rf .git
33
+ git init
34
+ git add .
35
+ git commit -m 'init commit'
36
+ </pre>
37
+
38
+ ## Contributing
39
+
40
+ 1. Fork it
41
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
42
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
43
+ 4. Push to the branch (`git push origin my-new-feature`)
44
+ 5. Create new Pull Request
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ task :default => :spec
5
+
6
+ RSpec::Core::RakeTask.new
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ $:.unshift(File.expand_path('../../lib', __FILE__))
4
+ require 'sonic'
5
+ require 'sonic/cli'
6
+
7
+ Sonic::CLI.start(ARGV)
@@ -0,0 +1,7 @@
1
+ $:.unshift(File.expand_path("../", __FILE__))
2
+ require "sonic/version"
3
+
4
+ module Sonic
5
+ autoload :Command, 'sonic/command'
6
+ autoload :CLI, 'sonic/cli'
7
+ end
@@ -0,0 +1,19 @@
1
+ require 'thor'
2
+ require 'sonic/cli/help'
3
+
4
+ module Sonic
5
+
6
+ class CLI < Command
7
+ class_option :verbose, type: :boolean
8
+ class_option :noop, type: :boolean
9
+
10
+ desc "hello NAME", "say hello to NAME"
11
+ long_desc Help.hello
12
+ option :from, desc: 'from person'
13
+ def hello(name)
14
+ puts "from: #{options[:from]}" if options[:from]
15
+ puts "Hello #{name}"
16
+ end
17
+
18
+ end
19
+ end
@@ -0,0 +1,13 @@
1
+ module Sonic
2
+ class CLI < Command
3
+ class Help
4
+ class << self
5
+ def hello
6
+ <<-EOL
7
+ Hello world example
8
+ EOL
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,25 @@
1
+ require 'thor'
2
+
3
+ module Sonic
4
+ class Command < Thor
5
+ class << self
6
+ def dispatch(m, args, options, config)
7
+ # Allow calling for help via:
8
+ # sonic command help
9
+ # sonic command -h
10
+ # sonic command --help
11
+ # sonic command -D
12
+ #
13
+ # as well thor's normal way:
14
+ #
15
+ # sonic help command
16
+ help_flags = Thor::HELP_MAPPINGS + ["help"]
17
+ if args.length > 1 && !(args & help_flags).empty?
18
+ args -= help_flags
19
+ args.insert(-2, "help")
20
+ end
21
+ super
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,3 @@
1
+ module Sonic
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,30 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'sonic/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "sonic-screwdriver"
8
+ spec.version = Sonic::VERSION
9
+ spec.authors = ["Tung Nguyen"]
10
+ spec.email = ["tongueroo@gmail.com"]
11
+ spec.description = %q{Multi-functional tool to manage AWS infrastructure}
12
+ spec.summary = %q{Multi-functional tool to manage AWS infrastructure}
13
+ spec.homepage = ""
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files`.split($/)
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_dependency "thor"
22
+ spec.add_dependency "hashie"
23
+ spec.add_dependency "colorize"
24
+
25
+ spec.add_development_dependency "bundler", "~> 1.3"
26
+ spec.add_development_dependency "rake"
27
+ spec.add_development_dependency "guard"
28
+ spec.add_development_dependency "guard-bundler"
29
+ spec.add_development_dependency "guard-rspec"
30
+ end
@@ -0,0 +1,19 @@
1
+ require 'spec_helper'
2
+
3
+ # to run specs with what's remembered from vcr
4
+ # $ rake
5
+ #
6
+ # to run specs with new fresh data from aws api calls
7
+ # $ rake clean:vcr ; time rake
8
+ describe Sonic::CLI do
9
+ before(:all) do
10
+ @args = "--from Tung"
11
+ end
12
+
13
+ describe "sonic" do
14
+ it "should hello world" do
15
+ out = execute("bin/sonic hello world #{@args}")
16
+ expect(out).to include("from: Tung\nHello world")
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,22 @@
1
+ ENV['TEST'] = '1'
2
+
3
+ require 'simplecov'
4
+ SimpleCov.start
5
+
6
+ require "pp"
7
+
8
+ root = File.expand_path('../../', __FILE__)
9
+ require "#{root}/lib/sonic"
10
+
11
+ module Helpers
12
+ def execute(cmd)
13
+ puts "Running: #{cmd}" if ENV['DEBUG']
14
+ out = `#{cmd}`
15
+ puts out if ENV['DEBUG']
16
+ out
17
+ end
18
+ end
19
+
20
+ RSpec.configure do |c|
21
+ c.include Helpers
22
+ end
metadata ADDED
@@ -0,0 +1,176 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: sonic-screwdriver
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Tung Nguyen
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2017-06-13 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: thor
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: hashie
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: colorize
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: bundler
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '1.3'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '1.3'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rake
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: guard
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: guard-bundler
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: guard-rspec
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ description: Multi-functional tool to manage AWS infrastructure
126
+ email:
127
+ - tongueroo@gmail.com
128
+ executables:
129
+ - sonic
130
+ extensions: []
131
+ extra_rdoc_files: []
132
+ files:
133
+ - ".gitignore"
134
+ - ".rspec"
135
+ - Gemfile
136
+ - Gemfile.lock
137
+ - Guardfile
138
+ - LICENSE.txt
139
+ - README.md
140
+ - Rakefile
141
+ - bin/sonic
142
+ - lib/sonic.rb
143
+ - lib/sonic/cli.rb
144
+ - lib/sonic/cli/help.rb
145
+ - lib/sonic/command.rb
146
+ - lib/sonic/version.rb
147
+ - sonic.gemspec
148
+ - spec/lib/cli_spec.rb
149
+ - spec/spec_helper.rb
150
+ homepage: ''
151
+ licenses:
152
+ - MIT
153
+ metadata: {}
154
+ post_install_message:
155
+ rdoc_options: []
156
+ require_paths:
157
+ - lib
158
+ required_ruby_version: !ruby/object:Gem::Requirement
159
+ requirements:
160
+ - - ">="
161
+ - !ruby/object:Gem::Version
162
+ version: '0'
163
+ required_rubygems_version: !ruby/object:Gem::Requirement
164
+ requirements:
165
+ - - ">="
166
+ - !ruby/object:Gem::Version
167
+ version: '0'
168
+ requirements: []
169
+ rubyforge_project:
170
+ rubygems_version: 2.6.11
171
+ signing_key:
172
+ specification_version: 4
173
+ summary: Multi-functional tool to manage AWS infrastructure
174
+ test_files:
175
+ - spec/lib/cli_spec.rb
176
+ - spec/spec_helper.rb