valet 0.0.7 → 0.0.8
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/.travis.yml +4 -4
- data/CHANGELOG.md +17 -0
- data/README.md +2 -2
- data/bin/valet +14 -0
- data/features/help.feature +2 -2
- data/features/version.feature +5 -103
- data/lib/valet.rb +5 -4
- data/lib/valet/application.rb +9 -17
- data/lib/valet/command.rb +60 -0
- data/lib/valet/commands.rb +7 -0
- data/lib/valet/helpers/type_cast.rb +46 -0
- data/lib/valet/option/common.rb +58 -0
- data/lib/valet/option/flag.rb +44 -0
- data/lib/valet/option/switch.rb +32 -0
- data/lib/valet/options.rb +31 -0
- data/lib/valet/version.rb +1 -1
- data/spec/spec_helper.rb +5 -9
- data/spec/support/shared_examples.rb +54 -0
- data/spec/support/terminal_helper.rb +20 -0
- data/spec/valet/application_spec.rb +57 -27
- data/spec/valet/command_spec.rb +116 -0
- data/spec/valet/commands_spec.rb +5 -0
- data/spec/valet/helpers/type_cast_spec.rb +33 -0
- data/spec/valet/option/flag_spec.rb +73 -0
- data/spec/valet/option/switch_spec.rb +59 -0
- data/spec/valet/options_spec.rb +56 -0
- data/spec/valet/version_spec.rb +4 -4
- data/valet.gemspec +9 -11
- metadata +30 -36
- data/features/step_definitions/command_line_steps.rb +0 -3
- data/features/step_definitions/file_steps.rb +0 -3
- data/features/support/helpers/cli_helper.rb +0 -23
- data/features/support/world_extensions.rb +0 -1
- data/lib/valet/templates/version.mustache +0 -5
- data/lib/valet/view.rb +0 -29
- data/lib/valet/views/version.rb +0 -31
- data/spec/valet/view_spec.rb +0 -20
data/lib/valet/views/version.rb
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
module Valet
|
2
|
-
module Views
|
3
|
-
class Version < View
|
4
|
-
def initialize(application)
|
5
|
-
@app = application
|
6
|
-
end
|
7
|
-
|
8
|
-
def name
|
9
|
-
@app.name
|
10
|
-
end
|
11
|
-
|
12
|
-
def version
|
13
|
-
@app.version
|
14
|
-
end
|
15
|
-
|
16
|
-
def copyright
|
17
|
-
@app.copyright
|
18
|
-
end
|
19
|
-
|
20
|
-
def license
|
21
|
-
@app.license
|
22
|
-
end
|
23
|
-
|
24
|
-
def authors
|
25
|
-
if @app.authors.respond_to?(:join) && @app.authors.count > 0
|
26
|
-
"Written by #{@app.authors.join(', ')}"
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
data/spec/valet/view_spec.rb
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe Valet::View do
|
4
|
-
let(:view) { View.new }
|
5
|
-
let(:mustache) { double("Mustache") }
|
6
|
-
|
7
|
-
describe "#render" do
|
8
|
-
it "creates a new Mustache object and renders it" do
|
9
|
-
Mustache.stub(new: mustache)
|
10
|
-
mustache.stub(render: 'Render output!')
|
11
|
-
view.render.should == 'Render output!'
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
|
-
describe "#escapeHTML" do
|
16
|
-
it "overwrites Mustache's #escapeHTML to not escape at all" do
|
17
|
-
view.escapeHTML('<html>').should == '<html>'
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|