happy-cli 0.0.2

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.
data/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in happy-cli.gemspec
4
+ gemspec
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
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env rake
2
+ require "bundler/gem_tasks"
data/bin/happy ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+ require "rubygems"
3
+ require "happy-cli"
4
+
5
+ HappyCLI::Command.start
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
@@ -0,0 +1,3 @@
1
+ source :rubygems
2
+
3
+ gem 'happy'
@@ -0,0 +1,11 @@
1
+ require 'rubygems'
2
+ require 'bundler/setup'
3
+ Bundler.require
4
+
5
+ app = Happy::Controller.build do
6
+ route do
7
+ 'Hello world!'
8
+ end
9
+ end
10
+
11
+ run app
@@ -0,0 +1,3 @@
1
+ module HappyCLI
2
+ VERSION = "0.0.2"
3
+ 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: