working_man 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.travis.yml +2 -2
- data/Gemfile.lock +43 -31
- data/README.md +3 -2
- data/Rakefile +4 -4
- data/features/support/env.rb +0 -15
- data/features/support/step_definitions.rb +2 -1
- data/features/working_man.feature +68 -64
- data/lib/working_man/version.rb +1 -1
- data/working_man.gemspec +4 -4
- metadata +11 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 10fbff4f9036ee7bbf2cecc406e1cb7622be9af7
|
4
|
+
data.tar.gz: 5d8b39dafffe4a4df438a4d527d02893cf119453
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 68da5075f1c3b727df8e1aca468a923cba91790b2648706b9683d071bfa2d401a880c7d92edf0f165d02a3342595e1b5f9c7f50ff8284466b0d31c332c6b0036
|
7
|
+
data.tar.gz: 4fff83c282d53648be5938589fe873745974c3df16b34e72e4b503233f3a235be04533237c941da6c2e20d6aecb6a91f5c9d0794b3df7f6abd8e651563d84163
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,51 +1,63 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
working_man (1.
|
5
|
-
thor (~> 0.
|
4
|
+
working_man (1.1.0)
|
5
|
+
thor (~> 0.19)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
aruba (0.
|
11
|
-
childprocess (
|
12
|
-
|
13
|
-
|
10
|
+
aruba (0.10.2)
|
11
|
+
childprocess (~> 0.5.6)
|
12
|
+
contracts (~> 0.9)
|
13
|
+
cucumber (>= 1.3.19)
|
14
|
+
ffi (~> 1.9.10)
|
15
|
+
rspec-expectations (>= 2.99)
|
16
|
+
thor (~> 0.19)
|
14
17
|
builder (3.2.2)
|
15
|
-
childprocess (0.5.
|
18
|
+
childprocess (0.5.8)
|
16
19
|
ffi (~> 1.0, >= 1.0.11)
|
17
|
-
|
20
|
+
contracts (0.12.0)
|
21
|
+
cucumber (2.1.0)
|
18
22
|
builder (>= 2.1.2)
|
23
|
+
cucumber-core (~> 1.3.0)
|
19
24
|
diff-lcs (>= 1.1.3)
|
20
|
-
|
25
|
+
gherkin3 (~> 3.1.0)
|
21
26
|
multi_json (>= 1.7.5, < 2.0)
|
22
|
-
multi_test (>= 0.1.
|
27
|
+
multi_test (>= 0.1.2)
|
28
|
+
cucumber-core (1.3.0)
|
29
|
+
gherkin3 (~> 3.1.0)
|
23
30
|
diff-lcs (1.2.5)
|
24
|
-
ffi (1.9.
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
rspec-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
31
|
+
ffi (1.9.10)
|
32
|
+
gherkin3 (3.1.2)
|
33
|
+
multi_json (1.11.2)
|
34
|
+
multi_test (0.1.2)
|
35
|
+
rake (10.4.2)
|
36
|
+
rdoc (4.2.0)
|
37
|
+
rspec (3.4.0)
|
38
|
+
rspec-core (~> 3.4.0)
|
39
|
+
rspec-expectations (~> 3.4.0)
|
40
|
+
rspec-mocks (~> 3.4.0)
|
41
|
+
rspec-core (3.4.1)
|
42
|
+
rspec-support (~> 3.4.0)
|
43
|
+
rspec-expectations (3.4.0)
|
44
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
45
|
+
rspec-support (~> 3.4.0)
|
46
|
+
rspec-mocks (3.4.0)
|
47
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
48
|
+
rspec-support (~> 3.4.0)
|
49
|
+
rspec-support (3.4.0)
|
50
|
+
thor (0.19.1)
|
42
51
|
|
43
52
|
PLATFORMS
|
44
53
|
ruby
|
45
54
|
|
46
55
|
DEPENDENCIES
|
47
|
-
aruba (~> 0.
|
48
|
-
rake (~> 10.
|
56
|
+
aruba (~> 0.10)
|
57
|
+
rake (~> 10.4)
|
49
58
|
rdoc
|
50
|
-
rspec (~>
|
59
|
+
rspec (~> 3.4)
|
51
60
|
working_man!
|
61
|
+
|
62
|
+
BUNDLED WITH
|
63
|
+
1.10.6
|
data/README.md
CHANGED
@@ -5,7 +5,8 @@ applications you need as well as any URLs.
|
|
5
5
|
|
6
6
|
## Documentation
|
7
7
|
|
8
|
-
[
|
8
|
+
* [Rubydoc](http://rubydoc.info/gems/working_man/)
|
9
|
+
* [Relish](https://relishapp.com/emachnic/working-man/docs)
|
9
10
|
|
10
11
|
## CI Status
|
11
12
|
|
@@ -51,7 +52,7 @@ After you're finished with work, run:
|
|
51
52
|
|
52
53
|
You can also specify a different location for your YAML config:
|
53
54
|
|
54
|
-
& working_man -f path/to/config.yml
|
55
|
+
& working_man start -f path/to/config.yml
|
55
56
|
|
56
57
|
## Contributing
|
57
58
|
|
data/Rakefile
CHANGED
@@ -22,10 +22,10 @@ Cucumber::Rake::Task.new(:features) do |t|
|
|
22
22
|
end
|
23
23
|
|
24
24
|
Rake::RDocTask.new do |rd|
|
25
|
-
|
26
|
-
rd.main = "README.
|
27
|
-
|
28
|
-
rd.rdoc_files.include("README.
|
25
|
+
|
26
|
+
rd.main = "README.md"
|
27
|
+
|
28
|
+
rd.rdoc_files.include("README.md","lib/**/*.rb","bin/**/*")
|
29
29
|
end
|
30
30
|
|
31
31
|
task :default => [:features]
|
data/features/support/env.rb
CHANGED
@@ -6,20 +6,5 @@ LIB_DIR = File.join(File.expand_path(File.dirname(__FILE__)),'..','..','lib')
|
|
6
6
|
Before do
|
7
7
|
# Increase timeout for Aruba
|
8
8
|
@aruba_timeout_seconds = 30
|
9
|
-
|
10
|
-
# Using "announce" causes massive warnings on 1.9.2
|
11
|
-
@puts = true
|
12
|
-
@original_rubylib = ENV['RUBYLIB']
|
13
|
-
ENV['RUBYLIB'] = LIB_DIR + File::PATH_SEPARATOR + ENV['RUBYLIB'].to_s
|
14
|
-
|
15
|
-
# Setup fake home directory in /tmp/fakehome before tests
|
16
|
-
@real_home = ENV['HOME']
|
17
|
-
ENV['HOME'] = '/tmp/fakehome'
|
18
|
-
FileUtils.rm_rf '/tmp/fakehome'
|
19
|
-
FileUtils.mkdir '/tmp/fakehome'
|
20
9
|
end
|
21
10
|
|
22
|
-
After do
|
23
|
-
ENV['RUBYLIB'] = @original_rubylib
|
24
|
-
ENV['HOME'] = @real_home
|
25
|
-
end
|
@@ -4,5 +4,6 @@ When /^I get help for "([^"]*)"$/ do |app_name|
|
|
4
4
|
end
|
5
5
|
|
6
6
|
Then /^the output should print the version$/ do
|
7
|
-
assert_partial_output(WorkingMan::VERSION, all_output)
|
7
|
+
# assert_partial_output(WorkingMan::VERSION, all_output)
|
8
|
+
expect(last_command_started).to have_output WorkingMan::VERSION
|
8
9
|
end
|
@@ -3,75 +3,79 @@ In order to make it easy to start and stop work each day
|
|
3
3
|
I want to have WorkingMan automatically open and close my apps
|
4
4
|
So that I can be lazy
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
Then the exit status should be 0
|
9
|
-
And the output should contain "Commands:"
|
6
|
+
Background:
|
7
|
+
Given a mocked home directory
|
10
8
|
|
11
|
-
Scenario:
|
12
|
-
|
13
|
-
|
14
|
-
|
9
|
+
Scenario: App just runs
|
10
|
+
When I get help for "working_man"
|
11
|
+
Then the exit status should be 0
|
12
|
+
And the output should contain "Commands:"
|
15
13
|
|
16
|
-
Scenario: Prints the version number
|
17
|
-
|
18
|
-
|
19
|
-
|
14
|
+
Scenario: Prints the version number
|
15
|
+
When I run `working_man version`
|
16
|
+
Then the output should print the version
|
17
|
+
And the exit status should be 0
|
20
18
|
|
21
|
-
Scenario: Prints the version number when using "
|
22
|
-
|
23
|
-
|
24
|
-
|
19
|
+
Scenario: Prints the version number when using "-v"
|
20
|
+
When I run `working_man -v`
|
21
|
+
Then the output should print the version
|
22
|
+
And the exit status should be 0
|
25
23
|
|
26
|
-
Scenario:
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
- 'Twitter'
|
31
|
-
urls:
|
32
|
-
- 'http://www.google.com'
|
33
|
-
"""
|
34
|
-
And I run `working_man start`
|
35
|
-
Then the output should contain "Work hard today"
|
36
|
-
And the exit status should be 0
|
24
|
+
Scenario: Prints the version number when using "--version"
|
25
|
+
When I run `working_man --version`
|
26
|
+
Then the output should print the version
|
27
|
+
And the exit status should be 0
|
37
28
|
|
38
|
-
Scenario: Start work successfully
|
39
|
-
|
40
|
-
""
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
29
|
+
Scenario: Start work successfully with app and url
|
30
|
+
Given a mocked home directory
|
31
|
+
And a file named "~/.working_man.yml" with:
|
32
|
+
"""
|
33
|
+
apps:
|
34
|
+
- 'Twitter'
|
35
|
+
urls:
|
36
|
+
- 'http://www.google.com'
|
37
|
+
"""
|
38
|
+
And I run `working_man start`
|
39
|
+
Then the output should contain "Work hard today"
|
40
|
+
And the exit status should be 0
|
49
41
|
|
50
|
-
Scenario: Start work
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
42
|
+
Scenario: Start work successfully specifying a config file
|
43
|
+
Given a file named "~/dotfiles/working_man_config.yml" with:
|
44
|
+
"""
|
45
|
+
apps:
|
46
|
+
- 'Twitter'
|
47
|
+
urls:
|
48
|
+
- 'http://www.google.com'
|
49
|
+
"""
|
50
|
+
When I run `working_man start -f ~/dotfiles/working_man_config.yml`
|
51
|
+
Then the output should contain "Work hard today"
|
52
|
+
And the exit status should be 0
|
60
53
|
|
61
|
-
Scenario: Start work unsuccessfully without
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
54
|
+
Scenario: Start work unsuccessfully without any apps
|
55
|
+
Given a file named "~/.working_man.yml" with:
|
56
|
+
"""
|
57
|
+
apps:
|
58
|
+
urls:
|
59
|
+
- 'http://www.google.com'
|
60
|
+
"""
|
61
|
+
And I run `working_man start`
|
62
|
+
Then the output should contain "No applications in configuration"
|
63
|
+
And the exit status should be 2
|
66
64
|
|
67
|
-
Scenario:
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
""
|
75
|
-
|
76
|
-
|
77
|
-
|
65
|
+
Scenario: Start work unsuccessfully without a configuration
|
66
|
+
Given a file named "~/.working_man.yml" should not exist
|
67
|
+
When I run `working_man start`
|
68
|
+
Then the output should contain "No configuration found."
|
69
|
+
And the exit status should be 1
|
70
|
+
|
71
|
+
Scenario: Stop work successfully
|
72
|
+
Given a file named "~/.working_man.yml" with:
|
73
|
+
"""
|
74
|
+
apps:
|
75
|
+
- 'Twitter'
|
76
|
+
urls:
|
77
|
+
- 'http://www.google.com'
|
78
|
+
"""
|
79
|
+
When I run `working_man stop`
|
80
|
+
Then the output should contain "Have a great day!"
|
81
|
+
And the exit status should be 0
|
data/lib/working_man/version.rb
CHANGED
data/working_man.gemspec
CHANGED
@@ -15,8 +15,8 @@ Gem::Specification.new do |gem|
|
|
15
15
|
gem.require_paths = ["lib"]
|
16
16
|
gem.version = WorkingMan::VERSION
|
17
17
|
gem.add_development_dependency 'rdoc'
|
18
|
-
gem.add_development_dependency 'rake', '~> 10.
|
19
|
-
gem.add_development_dependency 'aruba', '~> 0.
|
20
|
-
gem.add_development_dependency 'rspec', '~>
|
21
|
-
gem.add_runtime_dependency 'thor', '~> 0.
|
18
|
+
gem.add_development_dependency 'rake', '~> 10.4'
|
19
|
+
gem.add_development_dependency 'aruba', '~> 0.10'
|
20
|
+
gem.add_development_dependency 'rspec', '~> 3.4'
|
21
|
+
gem.add_runtime_dependency 'thor', '~> 0.19'
|
22
22
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: working_man
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Evan Machnic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-11-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rdoc
|
@@ -30,56 +30,56 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 10.
|
33
|
+
version: '10.4'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 10.
|
40
|
+
version: '10.4'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: aruba
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.
|
47
|
+
version: '0.10'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.
|
54
|
+
version: '0.10'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: '3.4'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: '3.4'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: thor
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.
|
75
|
+
version: '0.19'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0.
|
82
|
+
version: '0.19'
|
83
83
|
description: Start/stop your work apps for the day
|
84
84
|
email:
|
85
85
|
- emachnic@broadmac.net
|
@@ -126,7 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
126
126
|
version: '0'
|
127
127
|
requirements: []
|
128
128
|
rubyforge_project:
|
129
|
-
rubygems_version: 2.
|
129
|
+
rubygems_version: 2.4.6
|
130
130
|
signing_key:
|
131
131
|
specification_version: 4
|
132
132
|
summary: Start/stop your work apps for the day
|