valet 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1,10 @@
1
+ *.gem
2
+ .bundle
3
+ .yardoc
4
+ _site
5
+ coverage
6
+ doc
7
+ pkg
8
+ tmp
9
+ Gemfile.lock
10
+ rerun.txt
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --format progress
data/.travis.yml ADDED
@@ -0,0 +1,10 @@
1
+ script: "bundle exec rspec spec && bundle exec cucumber features"
2
+ rvm:
3
+ - 1.9.2
4
+ - 1.9.3
5
+ - rbx
6
+ - jruby
7
+ notifications:
8
+ email:
9
+ on_success: always
10
+ on_failure: always
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ # Valet - CHANGELOG
2
+
3
+ ## 0.0.1 / 02.07.2012
4
+
5
+ * Initial commit
data/Gemfile ADDED
@@ -0,0 +1,10 @@
1
+ source :rubygems
2
+
3
+ gemspec
4
+
5
+ group :guard do
6
+ gem "guard"
7
+ gem "guard-cucumber"
8
+ gem "guard-rspec"
9
+ gem "growl"
10
+ end
data/Guardfile ADDED
@@ -0,0 +1,13 @@
1
+ guard 'cucumber', all_on_start: false, all_after_pass: false do
2
+ watch(%r{features/.+\.feature$})
3
+ watch(%r{^features/support/.+$}) { 'features' }
4
+ watch(%r{^features/step_definitions/(.+)_steps\.rb$}) do |m|
5
+ Dir[File.join("**/#{m[1]}.feature")][0] || 'features'
6
+ end
7
+ end
8
+
9
+ guard 'rspec', all_on_start: false, all_after_pass: false do
10
+ watch(%r{^spec/.+_spec\.rb$})
11
+ watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
12
+ watch('spec/spec_helper.rb') { 'spec' }
13
+ end
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2012 Alexander Baumann
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,54 @@
1
+ # Valet - README
2
+
3
+ [![Build Status](https://secure.travis-ci.org/gitkeeper/valet.png?branch=master)](http://travis-ci.org/gitkeeper/valet) [![Dependency Status](https://gemnasium.com/gitkeeper/valet.png)](https://gemnasium.com/gitkeeper/valet)
4
+
5
+ __Website__: <http://gitkeeper.github.com/valet>
6
+ __Git Repository__: <https://github.com/gitkeeper/valet>
7
+ __Author__: Alexander Baumann
8
+ __Copyright__: 2012
9
+ __License__: MIT License
10
+ __Latest Version__: 0.0.1
11
+ __Release Date__: 02.07.2012
12
+
13
+ ## Introduction
14
+
15
+ Valet helps you write the sophisticated command-line interfaces you're so used
16
+ to from GNU/Linux. It provides a beautiful API, template support, man page
17
+ generator, and many other useful features. No matter how large or complex your
18
+ application is, Valet tops it off with the command-line interface it deserves.
19
+
20
+ For a detailed description and explanation of Valet's capabilities, please visit
21
+ [Valet's documentation](http://gitkeeper.github.com/valet).
22
+
23
+ ## Installation and Usage
24
+
25
+ Please refer to [Valet's documentation](http://gitkeeper.github.com/valet) for
26
+ up-to-date installation and usage instructions.
27
+
28
+ ## Development
29
+
30
+ To see what has changed in recent versions of Valet, take a look at the
31
+ [CHANGELOG](https://github.com/gitkeeper/valet/blob/master/CHANGELOG.md).
32
+
33
+ The `master` branch contains all stable releases while the `development` branch
34
+ represents the project's current progress.
35
+
36
+ ## Documentation
37
+
38
+ Valet's documentation takes place on a seperate branch called `gh-pages`. If
39
+ you want to contribute you can do so in
40
+ [Valet's documentation branch](https://github.com/gitkeeper/valet/tree/gh-pages).
41
+
42
+ ## Contributing
43
+
44
+ 1. Fork it
45
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
46
+ 3. Commit your changes (`git commit -am 'Added some feature'`)
47
+ 4. Push to the branch (`git push origin my-new-feature`)
48
+ 5. Create new Pull Request
49
+
50
+ ## Copyright
51
+
52
+ Valet &copy; 2012 by Alexander Baumann. Valet is licensed under the MIT license.
53
+ Please see the [LICENSE](https://github.com/gitkeeper/valet/blob/master/LICENSE)
54
+ document for more information.
data/Rakefile ADDED
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env rake
2
+
3
+ # Import Bundler's tasks for managing gems
4
+ require 'bundler/gem_tasks'
5
+
6
+ # Import all project related tasks
7
+ Dir.glob('tasks/**/*.rake').each { |task| import task }
8
+
9
+ # Set Rake's default task
10
+ task default: :spec
data/bin/valet ADDED
@@ -0,0 +1 @@
1
+ #!/usr/bin/env ruby
@@ -0,0 +1,12 @@
1
+ $LOAD_PATH.unshift File.expand_path('../../../lib', __FILE__)
2
+
3
+ # Start code coverage
4
+ require 'simplecov'
5
+ SimpleCov.start do
6
+ add_group 'Library', 'lib/'
7
+ add_group 'Features', 'features/'
8
+ add_group 'Specs', 'spec/'
9
+ end
10
+
11
+ # Import Aruba's step definitions
12
+ require 'aruba/cucumber'
@@ -0,0 +1,10 @@
1
+ module Valet
2
+ module VERSION
3
+ MAJOR = 0
4
+ MINOR = 0
5
+ BUILD = 1
6
+ PRE = nil
7
+
8
+ STRING = [MAJOR, MINOR, BUILD, PRE].compact.join('.')
9
+ end
10
+ end
data/lib/valet.rb ADDED
@@ -0,0 +1,24 @@
1
+ # Copyright (c) 2012 Alexander Baumann
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.
23
+
24
+ require 'valet/version'
@@ -0,0 +1,18 @@
1
+ $LOAD_PATH.unshift File.expand_path('../../../lib', __FILE__)
2
+
3
+ # Start code coverage
4
+ require 'simplecov'
5
+ SimpleCov.start do
6
+ add_group 'Library', 'lib/'
7
+ add_group 'Features', 'features/'
8
+ add_group 'Specs', 'spec/'
9
+ end
10
+
11
+ # Load the application
12
+ require 'valet'
13
+ include Valet
14
+
15
+ # Configure RSpec
16
+ RSpec.configure do |config|
17
+ config.treat_symbols_as_metadata_keys_with_true_values = true
18
+ end
@@ -0,0 +1,7 @@
1
+ require 'spec_helper'
2
+
3
+ describe Valet::VERSION do
4
+ it "has a RubyGems compliant version string" do
5
+ Valet::VERSION::STRING.should match(/^\d+\.\d+\.\d+(\.rc\d+)?$/)
6
+ end
7
+ end
data/tasks/clean.rake ADDED
@@ -0,0 +1,32 @@
1
+ scratch_files = FileList['**/*~', '**/*.bak']
2
+ clobber_files = FileList['*.gem', '.bundle/', '.yardoc/', '_site/', 'coverage/',
3
+ 'doc/', 'pkg/', 'rerun.txt', 'tmp/']
4
+
5
+ namespace :clean do
6
+ desc "Remove any scratch and backup files"
7
+ task :scratch do
8
+ remove_files(scratch_files)
9
+ end
10
+
11
+ desc "Remove any generated and temporary files"
12
+ task :clobber do
13
+ remove_files(clobber_files)
14
+ end
15
+
16
+ desc "Clean all scratch and clobber files"
17
+ task all: [:scratch, :clobber]
18
+ end
19
+
20
+ desc "Alias for clean:all"
21
+ task clean: 'clean:all'
22
+
23
+ private
24
+
25
+ def remove_files(files)
26
+ files.each do |file|
27
+ if File.exists?(file)
28
+ rm_rf(file, verbose: false)
29
+ puts "Removed #{file}"
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,28 @@
1
+ require 'cucumber/rake/task'
2
+
3
+ default_opts = ['--format progress', '--color']
4
+
5
+ namespace :cucumber do
6
+ Cucumber::Rake::Task.new(:all, "Run all features") do |t|
7
+ t.cucumber_opts = [*default_opts]
8
+ end
9
+
10
+ Cucumber::Rake::Task.new(:ok, "Run all features that should pass") do |t|
11
+ t.cucumber_opts = [*default_opts, '--strict', '--tags ~@wip']
12
+ end
13
+
14
+ Cucumber::Rake::Task.new(:wip, "Run features that are being worked on") do |t|
15
+ t.cucumber_opts = ['--format pretty', '--color', '--wip', '--tags @wip']
16
+ end
17
+
18
+ Cucumber::Rake::Task.new(:rerun, "Record and rerun failing features") do |t|
19
+ t.cucumber_opts = [*default_opts, '--strict', '--tags ~@wip',
20
+ '--format rerun', '--out rerun.txt']
21
+
22
+ failing_features = File.exists?('rerun.txt') ? File.read('rerun.txt') : ''
23
+ t.cucumber_opts << failing_features unless failing_features.empty?
24
+ end
25
+ end
26
+
27
+ desc "Alias for cucumber:ok"
28
+ task cucumber: 'cucumber:ok'
data/tasks/spec.rake ADDED
@@ -0,0 +1,28 @@
1
+ require 'rspec/core/rake_task'
2
+
3
+ default_opts = ['--format progress', '--color']
4
+
5
+ namespace :spec do
6
+ desc "Run all specs"
7
+ RSpec::Core::RakeTask.new(:all) do |t|
8
+ t.rspec_opts = [*default_opts]
9
+ end
10
+
11
+ desc "Run all specs that should pass"
12
+ RSpec::Core::RakeTask.new(:ok) do |t|
13
+ t.rspec_opts = [*default_opts, '--tag ~wip']
14
+ end
15
+
16
+ desc "Run specs that are being worked on"
17
+ RSpec::Core::RakeTask.new(:wip) do |t|
18
+ t.rspec_opts = [*default_opts, '--tag wip']
19
+ end
20
+
21
+ desc "Run all specs and show the ten slowest examples"
22
+ RSpec::Core::RakeTask.new(:profile) do |t|
23
+ t.rspec_opts = [*default_opts, '--profile', '--tag ~wip']
24
+ end
25
+ end
26
+
27
+ desc "Alias for spec:ok"
28
+ task spec: 'spec:ok'
data/tasks/yard.rake ADDED
@@ -0,0 +1,36 @@
1
+ require 'yard'
2
+
3
+ namespace :yard do
4
+ YARD::Rake::YardocTask.new(:update) do |t|
5
+ t.files = ['lib/**/*.rb', 'features/**/*.rb', 'features/**/*.feature']
6
+ t.options = [
7
+ '--markup', 'markdown',
8
+ '--charset', 'utf-8',
9
+ '--title', "Valet #{Valet::VERSION::STRING}",
10
+ '--files', 'LICENSE,CHANGELOG.md'
11
+ ]
12
+ end
13
+
14
+ desc "Remove all YARD Documentation"
15
+ task :clean do
16
+ doc_files = FileList['.yardoc/', 'doc/']
17
+ remove_files(doc_files)
18
+ end
19
+
20
+ desc "Create new YARD Documentation"
21
+ task create: [:clean, :update]
22
+ end
23
+
24
+ desc "Alias for yard:update"
25
+ task yard: 'yard:update'
26
+
27
+ private
28
+
29
+ def remove_files(files)
30
+ files.each do |file|
31
+ if File.exists?(file)
32
+ rm_rf(file, verbose: false)
33
+ puts "Removed #{file}"
34
+ end
35
+ end
36
+ end
data/valet.gemspec ADDED
@@ -0,0 +1,31 @@
1
+ require File.expand_path('../lib/valet/version', __FILE__)
2
+
3
+ Gem::Specification.new do |gem|
4
+ gem.name = 'valet'
5
+ gem.version = Valet::VERSION::STRING
6
+ gem.authors = ['Alexander Baumann']
7
+ gem.email = ['alexander.baumann@arclight.ch']
8
+ gem.homepage = 'http://gitkeeper.github.com/valet'
9
+ gem.description = 'A framework for creating GNU compliant command-line interfaces.'
10
+ gem.summary = <<-EOF.gsub(/^\s{4}/, '').gsub(/\n/, ' ').strip
11
+ Valet helps you write the sophisticated command-line interfaces you're so
12
+ used to from GNU/Linux. It provides a beautiful API, template support,
13
+ man page generator, and many other useful features. No matter how large or
14
+ complex your application is, Valet tops it off with the command-line
15
+ interface it deserves.
16
+ EOF
17
+
18
+ gem.files = `git ls-files`.split($\)
19
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
20
+ gem.test_files = gem.files.grep(%r{^(spec|features)/})
21
+ gem.require_paths = ['lib']
22
+
23
+ gem.add_development_dependency 'rake', '~> 0.9'
24
+ gem.add_development_dependency 'rspec', '~> 2.10'
25
+ gem.add_development_dependency 'cucumber', '~> 1.2'
26
+ gem.add_development_dependency 'aruba', '~> 0.4'
27
+ gem.add_development_dependency 'simplecov', '~> 0.6'
28
+ gem.add_development_dependency 'yard', '~> 0.8'
29
+ gem.add_development_dependency 'yard-cucumber', '~> 2.2'
30
+ gem.add_development_dependency 'redcarpet', '~> 2.1'
31
+ end
metadata ADDED
@@ -0,0 +1,207 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: valet
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Alexander Baumann
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-07-02 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rake
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: '0.9'
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: '0.9'
30
+ - !ruby/object:Gem::Dependency
31
+ name: rspec
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ~>
36
+ - !ruby/object:Gem::Version
37
+ version: '2.10'
38
+ type: :development
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: '2.10'
46
+ - !ruby/object:Gem::Dependency
47
+ name: cucumber
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ~>
52
+ - !ruby/object:Gem::Version
53
+ version: '1.2'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: '1.2'
62
+ - !ruby/object:Gem::Dependency
63
+ name: aruba
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ~>
68
+ - !ruby/object:Gem::Version
69
+ version: '0.4'
70
+ type: :development
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ~>
76
+ - !ruby/object:Gem::Version
77
+ version: '0.4'
78
+ - !ruby/object:Gem::Dependency
79
+ name: simplecov
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ~>
84
+ - !ruby/object:Gem::Version
85
+ version: '0.6'
86
+ type: :development
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ~>
92
+ - !ruby/object:Gem::Version
93
+ version: '0.6'
94
+ - !ruby/object:Gem::Dependency
95
+ name: yard
96
+ requirement: !ruby/object:Gem::Requirement
97
+ none: false
98
+ requirements:
99
+ - - ~>
100
+ - !ruby/object:Gem::Version
101
+ version: '0.8'
102
+ type: :development
103
+ prerelease: false
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ~>
108
+ - !ruby/object:Gem::Version
109
+ version: '0.8'
110
+ - !ruby/object:Gem::Dependency
111
+ name: yard-cucumber
112
+ requirement: !ruby/object:Gem::Requirement
113
+ none: false
114
+ requirements:
115
+ - - ~>
116
+ - !ruby/object:Gem::Version
117
+ version: '2.2'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ~>
124
+ - !ruby/object:Gem::Version
125
+ version: '2.2'
126
+ - !ruby/object:Gem::Dependency
127
+ name: redcarpet
128
+ requirement: !ruby/object:Gem::Requirement
129
+ none: false
130
+ requirements:
131
+ - - ~>
132
+ - !ruby/object:Gem::Version
133
+ version: '2.1'
134
+ type: :development
135
+ prerelease: false
136
+ version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
138
+ requirements:
139
+ - - ~>
140
+ - !ruby/object:Gem::Version
141
+ version: '2.1'
142
+ description: A framework for creating GNU compliant command-line interfaces.
143
+ email:
144
+ - alexander.baumann@arclight.ch
145
+ executables:
146
+ - valet
147
+ extensions: []
148
+ extra_rdoc_files: []
149
+ files:
150
+ - .gitignore
151
+ - .rspec
152
+ - .travis.yml
153
+ - CHANGELOG.md
154
+ - Gemfile
155
+ - Guardfile
156
+ - LICENSE
157
+ - README.md
158
+ - Rakefile
159
+ - bin/valet
160
+ - features/support/env.rb
161
+ - lib/valet.rb
162
+ - lib/valet/version.rb
163
+ - spec/spec_helper.rb
164
+ - spec/valet/version_spec.rb
165
+ - tasks/clean.rake
166
+ - tasks/cucumber.rake
167
+ - tasks/spec.rake
168
+ - tasks/yard.rake
169
+ - valet.gemspec
170
+ homepage: http://gitkeeper.github.com/valet
171
+ licenses: []
172
+ post_install_message:
173
+ rdoc_options: []
174
+ require_paths:
175
+ - lib
176
+ required_ruby_version: !ruby/object:Gem::Requirement
177
+ none: false
178
+ requirements:
179
+ - - ! '>='
180
+ - !ruby/object:Gem::Version
181
+ version: '0'
182
+ segments:
183
+ - 0
184
+ hash: -3188104074144440063
185
+ required_rubygems_version: !ruby/object:Gem::Requirement
186
+ none: false
187
+ requirements:
188
+ - - ! '>='
189
+ - !ruby/object:Gem::Version
190
+ version: '0'
191
+ segments:
192
+ - 0
193
+ hash: -3188104074144440063
194
+ requirements: []
195
+ rubyforge_project:
196
+ rubygems_version: 1.8.24
197
+ signing_key:
198
+ specification_version: 3
199
+ summary: Valet helps you write the sophisticated command-line interfaces you're so
200
+ used to from GNU/Linux. It provides a beautiful API, template support, man page
201
+ generator, and many other useful features. No matter how large or complex your application
202
+ is, Valet tops it off with the command-line interface it deserves.
203
+ test_files:
204
+ - features/support/env.rb
205
+ - spec/spec_helper.rb
206
+ - spec/valet/version_spec.rb
207
+ has_rdoc: