happy-cli 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +17 -0
- data/Gemfile +4 -0
- data/LICENSE +22 -0
- data/README.md +29 -0
- data/Rakefile +2 -0
- data/bin/happy +5 -0
- data/happy-cli.gemspec +19 -0
- data/lib/happy-cli.rb +33 -0
- data/lib/happy-cli/templates/minimal/Gemfile +3 -0
- data/lib/happy-cli/templates/minimal/config.ru +11 -0
- data/lib/happy-cli/version.rb +3 -0
- metadata +69 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2012 Hendrik Mans
|
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,29 @@
|
|
1
|
+
# Happy::Cli
|
2
|
+
|
3
|
+
TODO: Write a gem description
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem 'happy-cli'
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install happy-cli
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
TODO: Write usage instructions here
|
22
|
+
|
23
|
+
## Contributing
|
24
|
+
|
25
|
+
1. Fork it
|
26
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
27
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
28
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
29
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
data/bin/happy
ADDED
data/happy-cli.gemspec
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
require File.expand_path('../lib/happy-cli/version', __FILE__)
|
3
|
+
|
4
|
+
Gem::Specification.new do |gem|
|
5
|
+
gem.authors = ["Hendrik Mans"]
|
6
|
+
gem.email = ["hendrik@mans.de"]
|
7
|
+
gem.description = %q{Command line tool for the Happy web application toolkit.}
|
8
|
+
gem.summary = %q{Command line tool for the Happy web application toolkit.}
|
9
|
+
gem.homepage = "https://github.com/hmans/happy-cli"
|
10
|
+
|
11
|
+
gem.files = `git ls-files`.split($\)
|
12
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
13
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
14
|
+
gem.name = "happy-cli"
|
15
|
+
gem.require_paths = ["lib"]
|
16
|
+
gem.version = HappyCLI::VERSION
|
17
|
+
|
18
|
+
gem.add_dependency 'thor', '~> 0.15'
|
19
|
+
end
|
data/lib/happy-cli.rb
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
require "happy-cli/version"
|
2
|
+
require 'thor'
|
3
|
+
|
4
|
+
module HappyCLI
|
5
|
+
class Command < Thor
|
6
|
+
include Thor::Actions
|
7
|
+
|
8
|
+
source_root(File.expand_path('../happy-cli/templates', __FILE__))
|
9
|
+
|
10
|
+
desc "new NAME", "Creates a new Happy application."
|
11
|
+
|
12
|
+
method_option :template, :aliases => "-t", :default => "standard", :type => :string,
|
13
|
+
:desc => "Application template to use. [standard, minimal]"
|
14
|
+
|
15
|
+
method_option :git, :aliases => "-g", :default => false, :type => :boolean,
|
16
|
+
:desc => "Initialize a git repository in your blog's directory."
|
17
|
+
|
18
|
+
def new(name)
|
19
|
+
@name = name
|
20
|
+
self.destination_root = name
|
21
|
+
directory options[:template], '.'
|
22
|
+
|
23
|
+
in_root do
|
24
|
+
if options[:git]
|
25
|
+
run "git init"
|
26
|
+
run "git add ."
|
27
|
+
run "git commit -m 'Created new Happy application using the '#{options[:template]}' template'"
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
33
|
+
end
|
metadata
ADDED
@@ -0,0 +1,69 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: happy-cli
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.2
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Hendrik Mans
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-05-31 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: thor
|
16
|
+
requirement: &70171314987820 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0.15'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *70171314987820
|
25
|
+
description: Command line tool for the Happy web application toolkit.
|
26
|
+
email:
|
27
|
+
- hendrik@mans.de
|
28
|
+
executables:
|
29
|
+
- happy
|
30
|
+
extensions: []
|
31
|
+
extra_rdoc_files: []
|
32
|
+
files:
|
33
|
+
- .gitignore
|
34
|
+
- Gemfile
|
35
|
+
- LICENSE
|
36
|
+
- README.md
|
37
|
+
- Rakefile
|
38
|
+
- bin/happy
|
39
|
+
- happy-cli.gemspec
|
40
|
+
- lib/happy-cli.rb
|
41
|
+
- lib/happy-cli/templates/minimal/Gemfile
|
42
|
+
- lib/happy-cli/templates/minimal/config.ru
|
43
|
+
- lib/happy-cli/version.rb
|
44
|
+
homepage: https://github.com/hmans/happy-cli
|
45
|
+
licenses: []
|
46
|
+
post_install_message:
|
47
|
+
rdoc_options: []
|
48
|
+
require_paths:
|
49
|
+
- lib
|
50
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
51
|
+
none: false
|
52
|
+
requirements:
|
53
|
+
- - ! '>='
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '0'
|
56
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
requirements: []
|
63
|
+
rubyforge_project:
|
64
|
+
rubygems_version: 1.8.11
|
65
|
+
signing_key:
|
66
|
+
specification_version: 3
|
67
|
+
summary: Command line tool for the Happy web application toolkit.
|
68
|
+
test_files: []
|
69
|
+
has_rdoc:
|