pik 0.2.0 → 0.2.1
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/History.txt +5 -0
- data/Manifest.txt +1 -0
- data/README.rdoc +4 -1
- data/features/pik_install.feature +24 -0
- data/features/step_definitions/pik_commands.rb +18 -0
- data/lib/pik.rb +1 -1
- data/tools/pik.bat +1 -1
- metadata +2 -1
data/History.txt
CHANGED
data/Manifest.txt
CHANGED
@@ -13,6 +13,7 @@ features/help_command.feature
|
|
13
13
|
features/implode_command.feature
|
14
14
|
features/install_command.feature
|
15
15
|
features/list_command.feature
|
16
|
+
features/pik_install.feature
|
16
17
|
features/remove_command.feature
|
17
18
|
features/run_command.feature
|
18
19
|
features/step_definitions/pik_commands.rb
|
data/README.rdoc
CHANGED
@@ -66,7 +66,10 @@ Windows, more than one version of Ruby (otherwise, what's the point?) and Rubyge
|
|
66
66
|
|
67
67
|
3. You need to install pik to a location that's in your path, but someplace other than your ruby\bin dir
|
68
68
|
|
69
|
-
|
69
|
+
>path
|
70
|
+
PATH=C:\tools\;C:\ruby\186-p368-mingw32\bin;C:\WINDOWS\system32;C:\WINDOWS
|
71
|
+
|
72
|
+
>pik_install C:\tools
|
70
73
|
|
71
74
|
4. Add all the versions of ruby that you want to use with pik
|
72
75
|
|
@@ -0,0 +1,24 @@
|
|
1
|
+
Feature: pik_install binary script
|
2
|
+
In order to use pik
|
3
|
+
A developer
|
4
|
+
Wants a command line interface
|
5
|
+
So that she can install the pik tool
|
6
|
+
|
7
|
+
Scenario: pik_install
|
8
|
+
Given I have not installed pik to C:\temp\bin
|
9
|
+
And "C:\temp\bin" is in the system path
|
10
|
+
When I run "pik_install C:\temp\bin"
|
11
|
+
And then I run "C:\temp\bin\pik help"
|
12
|
+
Then I should see "Installing to C:\temp\bin"
|
13
|
+
And I should see "pik is installed"
|
14
|
+
And I should see "To get help with a command"
|
15
|
+
|
16
|
+
|
17
|
+
Scenario: pik_install to path with spaces
|
18
|
+
Given I have not installed pik to C:\temp\path with spaces\bin
|
19
|
+
And "C:\temp\path with spaces\bin" is in the system path
|
20
|
+
When I run "pik_install "C:\temp\path with spaces\bin""
|
21
|
+
And then I run "pik help"
|
22
|
+
Then I should see "Installing to C:\temp\path with spaces\bin"
|
23
|
+
And I should see "pik is installed"
|
24
|
+
And I should see "To get help with a command"
|
@@ -46,6 +46,20 @@ Given /^I have an empty config\.yml/ do
|
|
46
46
|
File.open(PIK_HOME + 'config.yml','w'){|f| }
|
47
47
|
end
|
48
48
|
|
49
|
+
Given /^I have not installed pik to (.+)$/ do |path|
|
50
|
+
FileUtils.rm_rf path if File.exist? path
|
51
|
+
FileUtils.mkdir_p path
|
52
|
+
Dir[path + "\\pik.bat"].should be_empty
|
53
|
+
end
|
54
|
+
|
55
|
+
Given /^"(.*)" is in the system path$/ do |arg1|
|
56
|
+
ENV['PATH'] = [arg1, ENV['PATH']].join(';')
|
57
|
+
end
|
58
|
+
|
59
|
+
When /^I run "pik_install (.+)"$/ do |args|
|
60
|
+
%x[ruby bin/pik_install #{args} > #{PIK_LOG} 2>&1 ]
|
61
|
+
end
|
62
|
+
|
49
63
|
When /^I run "pik (.+?)" and "pik (.+)",$/ do |args1, args2|
|
50
64
|
%x[tools\\pik.bat #{args1} > #{PIK_LOG} 2>&1 && tools\\pik.bat #{args2} > #{PIK_LOG} 2>&1]
|
51
65
|
end
|
@@ -58,6 +72,10 @@ When /^I run "pik (.*)" and check the path$/ do |args|
|
|
58
72
|
%x[tools\\pik.bat #{args} > #{PIK_LOG} 2>&1 & PATH >> #{PIK_LOG} ]
|
59
73
|
end
|
60
74
|
|
75
|
+
And /^then I run "(.*)"$/ do |args|
|
76
|
+
%x[#{args} >> #{PIK_LOG} 2>&1 ]
|
77
|
+
end
|
78
|
+
|
61
79
|
Then /^I should see "(.*)"$/ do |data|
|
62
80
|
stdout = File.read(PIK_LOG)
|
63
81
|
stdout.should match(Regexp.new(Regexp.escape(data)))
|
data/lib/pik.rb
CHANGED
data/tools/pik.bat
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
@ECHO OFF
|
2
|
-
"%~dpn0\%~n0.exe" %~dpf0 %*
|
2
|
+
"%~dpn0\%~n0.exe" "%~dpf0" %*
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pik
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gordon Thiesfeld
|
@@ -72,6 +72,7 @@ files:
|
|
72
72
|
- features/implode_command.feature
|
73
73
|
- features/install_command.feature
|
74
74
|
- features/list_command.feature
|
75
|
+
- features/pik_install.feature
|
75
76
|
- features/remove_command.feature
|
76
77
|
- features/run_command.feature
|
77
78
|
- features/step_definitions/pik_commands.rb
|