jets 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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: ea729cf2c680bcafc1d8bafec528b5d12297950d
4
+ data.tar.gz: 907b75758d90f747f01ad72e603f2f3259c3044a
5
+ SHA512:
6
+ metadata.gz: cc68a50b42bc8f9188d4393a3cba1b4f24dedf69f38ee30dbb5c523481c561c0d4f83e96fd867119c14d15b3c7f4d9d677a0a412d937850fe96c0b4ce553525b
7
+ data.tar.gz: 148b5348a24575a33fd362940fc3e5b821a14342471e8b38e6463811bffc28aed52f5a8946cb10d820a8c8cd9b62b068bbff29890af3c88f6c9037e5c73738c9
data/.gitignore ADDED
@@ -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 dependencies in jets.gemspec
4
+ gemspec
5
+
6
+ gem "codeclimate-test-reporter", group: :test, require: nil
data/Guardfile ADDED
@@ -0,0 +1,12 @@
1
+ guard "rspec" do
2
+ watch(%r{^spec/.+_spec\.rb$})
3
+ watch(%r{^lib/(.+)\.rb$}) { "spec/jets_spec.rb" }
4
+ watch(%r{^lib/jets/(.+)\.rb$}) { "spec/jets_spec.rb" }
5
+ watch("spec/spec_helper.rb") { "spec/jets_spec.rb" }
6
+ watch(%r{^lib/jets/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
7
+ end
8
+
9
+ guard "bundler" do
10
+ watch("Gemfile")
11
+ watch(/^.+\.gemspec/)
12
+ end
data/LICENSE.txt ADDED
@@ -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.
data/README.md ADDED
@@ -0,0 +1,44 @@
1
+ # Jets
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 jets, 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 "jets"
16
+
17
+ And then execute:
18
+
19
+ $ bundle
20
+
21
+ Or install it yourself as:
22
+
23
+ $ gem install jets
24
+
25
+ ## Usage
26
+
27
+ <pre>
28
+ git clone https://github.com/tongueroo/jets.git
29
+ mv jets <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
data/Rakefile ADDED
@@ -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
data/bin/jets ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # Trap ^C
4
+ Signal.trap("INT") {
5
+ puts "\nCtrl-C detected. Exiting..."
6
+ sleep 1
7
+ exit
8
+ }
9
+
10
+ $:.unshift(File.expand_path("../../lib", __FILE__))
11
+ require "jets"
12
+ require "jets/cli"
13
+
14
+ Jets::CLI.start(ARGV)
data/jets.gemspec ADDED
@@ -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 "jets/version"
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "jets"
8
+ spec.version = Jets::VERSION
9
+ spec.authors = ["Tung Nguyen"]
10
+ spec.email = ["tongueroo@gmail.com"]
11
+ spec.description = %q{}
12
+ spec.summary = %q{}
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
data/lib/jets.rb ADDED
@@ -0,0 +1,7 @@
1
+ $:.unshift(File.expand_path("../", __FILE__))
2
+ require "jets/version"
3
+
4
+ module Jets
5
+ autoload :Command, "jets/command"
6
+ autoload :CLI, "jets/cli"
7
+ end
data/lib/jets/cli.rb ADDED
@@ -0,0 +1,19 @@
1
+ require "thor"
2
+ require "jets/cli/help"
3
+
4
+ module Jets
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 Jets
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 Jets
4
+ class Command < Thor
5
+ class << self
6
+ def dispatch(m, args, options, config)
7
+ # Allow calling for help via:
8
+ # jets command help
9
+ # jets command -h
10
+ # jets command --help
11
+ # jets command -D
12
+ #
13
+ # as well thor's normal way:
14
+ #
15
+ # jets 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 Jets
2
+ VERSION = "0.0.1"
3
+ 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 Jets::CLI do
9
+ before(:all) do
10
+ @args = "--from Tung"
11
+ end
12
+
13
+ describe "jets" do
14
+ it "should hello world" do
15
+ out = execute("bin/jets 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/jets"
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,175 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: jets
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-10-26 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: ''
126
+ email:
127
+ - tongueroo@gmail.com
128
+ executables:
129
+ - jets
130
+ extensions: []
131
+ extra_rdoc_files: []
132
+ files:
133
+ - ".gitignore"
134
+ - ".rspec"
135
+ - Gemfile
136
+ - Guardfile
137
+ - LICENSE.txt
138
+ - README.md
139
+ - Rakefile
140
+ - bin/jets
141
+ - jets.gemspec
142
+ - lib/jets.rb
143
+ - lib/jets/cli.rb
144
+ - lib/jets/cli/help.rb
145
+ - lib/jets/command.rb
146
+ - lib/jets/version.rb
147
+ - spec/lib/cli_spec.rb
148
+ - spec/spec_helper.rb
149
+ homepage: ''
150
+ licenses:
151
+ - MIT
152
+ metadata: {}
153
+ post_install_message:
154
+ rdoc_options: []
155
+ require_paths:
156
+ - lib
157
+ required_ruby_version: !ruby/object:Gem::Requirement
158
+ requirements:
159
+ - - ">="
160
+ - !ruby/object:Gem::Version
161
+ version: '0'
162
+ required_rubygems_version: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ">="
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
167
+ requirements: []
168
+ rubyforge_project:
169
+ rubygems_version: 2.6.14
170
+ signing_key:
171
+ specification_version: 4
172
+ summary: ''
173
+ test_files:
174
+ - spec/lib/cli_spec.rb
175
+ - spec/spec_helper.rb