snippy 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ YjEwMTFjY2VkZTg0ZGZlNjEyNjM5ZmI1YWJjMzI3NzYxMWJmNDQ0MQ==
5
+ data.tar.gz: !binary |-
6
+ NjRhNjEwNGE2YWY5Yzc2ZDNlOWZkMDVlNzZmMGNiNTc5ZTA0MWRkNQ==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ ZjE0OTdmMTNmZmEzZTMyMzcwNWJiZTA4MTZiOTk5NmI5ZGFjYzAzM2ZiOWYy
10
+ MGYzOGY4MmM3ZTFlNDNlMjcxNWE4YTEyMmRjOTgxODFjZjIzNThlMzI3Yjcx
11
+ NTgxNGJkNGYzNzU0N2U5ZmY5MTdmNzFiNzE2ZDI1NmM0NGQwYjM=
12
+ data.tar.gz: !binary |-
13
+ OTc0MWM5NGY1ZDk2ODk5MzE2NDlmNTdmZTZlMTdjZjc4OWY3ZGIwYjllMmJh
14
+ NTRhMmQ3NGMyYjY3M2NjOWQ0NTEwOWRkODJlZDY0MzRiYzk3Y2QxNGI0YjUz
15
+ NTU5MWI4N2NkYmU4NWZjMmZkYTc0M2NmZjI4ZmM1ZjcxY2RjMzM=
data/.gitignore ADDED
@@ -0,0 +1,16 @@
1
+ .*
2
+ *~
3
+ *.gem
4
+ Gemfile.lock
5
+ InstalledFiles
6
+ _yardoc
7
+ coverage
8
+ doc/
9
+ lib/bundler/man
10
+ pkg
11
+ rdoc
12
+ spec/reports
13
+ test/tmp
14
+ test/version_tmp
15
+ tmp
16
+ !.git*
data/Gemfile ADDED
@@ -0,0 +1,5 @@
1
+ ruby "1.9.3"
2
+ source "https://rubygems.org"
3
+
4
+ # Specify your gem's dependencies in snippy.gemspec
5
+ gemspec
data/LICENSE-MIT ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 franklin
2
+
3
+ Permission is hereby granted, free of charge, to any person
4
+ obtaining a copy of this software and associated documentation
5
+ files (the "Software"), to deal in the Software without
6
+ restriction, including without limitation the rights to use,
7
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the
9
+ Software is furnished to do so, subject to the following
10
+ conditions:
11
+
12
+ The above copyright notice and this permission notice shall be
13
+ included in all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
17
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
+ OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,53 @@
1
+ # snippy
2
+
3
+ > Gem with some useful command line tools.
4
+
5
+ ## Installation
6
+
7
+ ```
8
+ $ gem install snippy
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```
14
+ $ snippy
15
+ Commands:
16
+ snippy apache SUBCOMMAND ...ARGS # Snippets & Tools for apache
17
+ snippy help [COMMAND] # Describe available commands or one specific command
18
+
19
+ Options:
20
+ [--verbose]
21
+ ```
22
+
23
+ ### Apache
24
+
25
+ ```
26
+ $ snippy apache
27
+ Commands:
28
+ snippy apache certificate FILENAME # Create self signed openssl certificate.
29
+ snippy apache help [COMMAND] # Describe subcommands or one specific subcommand
30
+ ```
31
+
32
+ ## Development
33
+
34
+ When developing you can use the given `rake` tasks:
35
+
36
+ ```
37
+ $ rake -T
38
+ rake build # Build ccextension-0.1.1.gem into the pkg directory.
39
+ rake install # Build and install ccextension-0.1.1.gem into system gems.
40
+ rake release # Create tag v0.1.1 and build and push ccextension-0.1.1.gem to Rubygems```
41
+ ```
42
+
43
+ ## Contributing
44
+ In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality.
45
+
46
+ 1. Fork it
47
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
48
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
49
+ 4. Push to the branch (`git push origin my-new-feature`)
50
+ 5. Create new Pull Request
51
+
52
+ ## License
53
+ Copyright (c) 2013 franklin under the MIT license.
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
data/bin/snippy ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+ # -*- mode: ruby -*-
3
+
4
+ require 'snippy'
5
+ Snippy::Cli.start
@@ -0,0 +1,15 @@
1
+ require "thor"
2
+
3
+ module Snippy
4
+ class Apache < Thor
5
+
6
+ desc "certificate FILENAME", "Create self signed openssl certificate."
7
+ def certificate(filename)
8
+ system "openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout #{filename}.key -out #{filename}.crt"
9
+ puts "Generated files:"
10
+ puts " #{filename}.key"
11
+ puts " #{filename}.crt"
12
+ end
13
+
14
+ end
15
+ end
data/lib/snippy/cli.rb ADDED
@@ -0,0 +1,11 @@
1
+ require "thor"
2
+ require "snippy/apache"
3
+
4
+ module Snippy
5
+ class Cli < Thor
6
+ class_option :verbose, :type => :boolean
7
+
8
+ desc "apache SUBCOMMAND ...ARGS", "Snippets & Tools for apache"
9
+ subcommand "apache", Apache
10
+ end
11
+ end
@@ -0,0 +1,3 @@
1
+ module Snippy
2
+ VERSION = "0.1.0"
3
+ end
data/lib/snippy.rb ADDED
@@ -0,0 +1,3 @@
1
+ require "snippy/cli"
2
+ require "snippy/version"
3
+
data/snippy.gemspec ADDED
@@ -0,0 +1,25 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'snippy/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "snippy"
8
+ spec.version = Snippy::VERSION
9
+ spec.authors = ["franklin"]
10
+ spec.email = ["franklin@weareinteractive.com"]
11
+ spec.description = %q{Gem with some useful command line tools.}
12
+ spec.summary = %q{Command line snippets.}
13
+ spec.homepage = "http://rubygems.org/gems/snippy"
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_runtime_dependency "thor"
22
+
23
+ spec.add_development_dependency "bundler", "~> 1.3"
24
+ spec.add_development_dependency "rake"
25
+ end
metadata ADDED
@@ -0,0 +1,98 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: snippy
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - franklin
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-12-17 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: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: '1.3'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: '1.3'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ! '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ description: Gem with some useful command line tools.
56
+ email:
57
+ - franklin@weareinteractive.com
58
+ executables:
59
+ - snippy
60
+ extensions: []
61
+ extra_rdoc_files: []
62
+ files:
63
+ - .gitignore
64
+ - Gemfile
65
+ - LICENSE-MIT
66
+ - README.md
67
+ - Rakefile
68
+ - bin/snippy
69
+ - lib/snippy.rb
70
+ - lib/snippy/apache.rb
71
+ - lib/snippy/cli.rb
72
+ - lib/snippy/version.rb
73
+ - snippy.gemspec
74
+ homepage: http://rubygems.org/gems/snippy
75
+ licenses:
76
+ - MIT
77
+ metadata: {}
78
+ post_install_message:
79
+ rdoc_options: []
80
+ require_paths:
81
+ - lib
82
+ required_ruby_version: !ruby/object:Gem::Requirement
83
+ requirements:
84
+ - - ! '>='
85
+ - !ruby/object:Gem::Version
86
+ version: '0'
87
+ required_rubygems_version: !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - ! '>='
90
+ - !ruby/object:Gem::Version
91
+ version: '0'
92
+ requirements: []
93
+ rubyforge_project:
94
+ rubygems_version: 2.1.11
95
+ signing_key:
96
+ specification_version: 4
97
+ summary: Command line snippets.
98
+ test_files: []