fuelcli 0.1.7 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.idea/.gitignore +8 -0
- data/.idea/fuel.iml +54 -0
- data/.idea/misc.xml +4 -0
- data/.idea/modules.xml +8 -0
- data/.idea/vcs.xml +6 -0
- data/Gemfile.lock +6 -2
- data/exe/fuel +17 -14
- data/fuelcli.gemspec +3 -1
- data/gauge.png +0 -0
- data/lib/fuel.rb +2 -2
- data/lib/fuel/version.rb +1 -1
- metadata +36 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0af234ec55592c3bf0aa8f12b8903d5d51c5204a3bf8af65044cb3b066b734b9
|
4
|
+
data.tar.gz: 117f336f56634be05b836975dc3f45e5f89f48579066494e9892240179e69d72
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3678e1f13a5a382c3ee5e08d3cee53b16c67e299a262b574ecea0db76067626c467b35f1698e772c72755ed065f7c42db5c4dde5ddc0c662656aafc834b00537
|
7
|
+
data.tar.gz: 9eda743d9be1520e0a490c9b3fdfc2b62a477e31c96297f68d5a15f8f65255a7f7de703b7f81c61f4fdad0031b8c1ef7dd480066fff57ba2fa38c485fece5ad5
|
data/.idea/.gitignore
ADDED
data/.idea/fuel.iml
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<module type="RUBY_MODULE" version="4">
|
3
|
+
<component name="ModuleRunConfigurationManager">
|
4
|
+
<shared />
|
5
|
+
</component>
|
6
|
+
<component name="NewModuleRootManager">
|
7
|
+
<content url="file://$MODULE_DIR$">
|
8
|
+
<sourceFolder url="file://$MODULE_DIR$/features" isTestSource="true" />
|
9
|
+
<sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" />
|
10
|
+
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
|
11
|
+
</content>
|
12
|
+
<orderEntry type="jdk" jdkName="chruby: ruby-2.7.2" jdkType="RUBY_SDK" />
|
13
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
14
|
+
<orderEntry type="library" scope="PROVIDED" name="bundler (v2.1.4, chruby: ruby-2.7.2) [gem]" level="application" />
|
15
|
+
<orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.4.4, chruby: ruby-2.7.2) [gem]" level="application" />
|
16
|
+
<orderEntry type="library" scope="PROVIDED" name="notifier (v0.5.2, chruby: ruby-2.7.2) [gem]" level="application" />
|
17
|
+
<orderEntry type="library" scope="PROVIDED" name="rake (v12.3.3, chruby: ruby-2.7.2) [gem]" level="application" />
|
18
|
+
<orderEntry type="library" scope="PROVIDED" name="rspec (v3.10.0, chruby: ruby-2.7.2) [gem]" level="application" />
|
19
|
+
<orderEntry type="library" scope="PROVIDED" name="rspec-core (v3.10.0, chruby: ruby-2.7.2) [gem]" level="application" />
|
20
|
+
<orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v3.10.0, chruby: ruby-2.7.2) [gem]" level="application" />
|
21
|
+
<orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v3.10.0, chruby: ruby-2.7.2) [gem]" level="application" />
|
22
|
+
<orderEntry type="library" scope="PROVIDED" name="rspec-support (v3.10.0, chruby: ruby-2.7.2) [gem]" level="application" />
|
23
|
+
<orderEntry type="library" scope="PROVIDED" name="ruby-progressbar (v1.11.0, chruby: ruby-2.7.2) [gem]" level="application" />
|
24
|
+
<orderEntry type="library" scope="PROVIDED" name="terminal-notifier (v2.0.0, chruby: ruby-2.7.2) [gem]" level="application" />
|
25
|
+
<orderEntry type="library" scope="PROVIDED" name="thor (v1.1.0, chruby: ruby-2.7.2) [gem]" level="application" />
|
26
|
+
</component>
|
27
|
+
<component name="RakeTasksCache">
|
28
|
+
<option name="myRootTask">
|
29
|
+
<RakeTaskImpl id="rake">
|
30
|
+
<subtasks>
|
31
|
+
<RakeTaskImpl description="Build fuelcli-0.1.8.gem into the pkg directory" fullCommand="build" id="build" />
|
32
|
+
<RakeTaskImpl description="Remove any temporary products" fullCommand="clean" id="clean" />
|
33
|
+
<RakeTaskImpl description="Remove any generated files" fullCommand="clobber" id="clobber" />
|
34
|
+
<RakeTaskImpl description="Build and install fuelcli-0.1.8.gem into system gems" fullCommand="install" id="install" />
|
35
|
+
<RakeTaskImpl id="install">
|
36
|
+
<subtasks>
|
37
|
+
<RakeTaskImpl description="Build and install fuelcli-0.1.8.gem into system gems without network access" fullCommand="install:local" id="local" />
|
38
|
+
</subtasks>
|
39
|
+
</RakeTaskImpl>
|
40
|
+
<RakeTaskImpl description="Create tag v0.1.8 and build and push fuelcli-0.1.8.gem to rubygems.org" fullCommand="release[remote]" id="release[remote]" />
|
41
|
+
<RakeTaskImpl description="" fullCommand="default" id="default" />
|
42
|
+
<RakeTaskImpl description="" fullCommand="release" id="release" />
|
43
|
+
<RakeTaskImpl id="release">
|
44
|
+
<subtasks>
|
45
|
+
<RakeTaskImpl description="" fullCommand="release:guard_clean" id="guard_clean" />
|
46
|
+
<RakeTaskImpl description="" fullCommand="release:rubygem_push" id="rubygem_push" />
|
47
|
+
<RakeTaskImpl description="" fullCommand="release:source_control_push" id="source_control_push" />
|
48
|
+
</subtasks>
|
49
|
+
</RakeTaskImpl>
|
50
|
+
</subtasks>
|
51
|
+
</RakeTaskImpl>
|
52
|
+
</option>
|
53
|
+
</component>
|
54
|
+
</module>
|
data/.idea/misc.xml
ADDED
data/.idea/modules.xml
ADDED
data/.idea/vcs.xml
ADDED
data/Gemfile.lock
CHANGED
@@ -1,14 +1,17 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
fuelcli (0.
|
4
|
+
fuelcli (0.2.0)
|
5
|
+
notifier (~> 0.5.2)
|
5
6
|
ruby-progressbar (~> 1.11)
|
7
|
+
terminal-notifier (~> 2.0)
|
6
8
|
thor (~> 1.0)
|
7
9
|
|
8
10
|
GEM
|
9
11
|
remote: https://rubygems.org/
|
10
12
|
specs:
|
11
13
|
diff-lcs (1.4.4)
|
14
|
+
notifier (0.5.2)
|
12
15
|
rake (12.3.3)
|
13
16
|
rspec (3.10.0)
|
14
17
|
rspec-core (~> 3.10.0)
|
@@ -24,7 +27,8 @@ GEM
|
|
24
27
|
rspec-support (~> 3.10.0)
|
25
28
|
rspec-support (3.10.0)
|
26
29
|
ruby-progressbar (1.11.0)
|
27
|
-
|
30
|
+
terminal-notifier (2.0.0)
|
31
|
+
thor (1.1.0)
|
28
32
|
|
29
33
|
PLATFORMS
|
30
34
|
ruby
|
data/exe/fuel
CHANGED
@@ -4,6 +4,7 @@ require 'uri'
|
|
4
4
|
require 'fuel'
|
5
5
|
require 'thor'
|
6
6
|
require 'json'
|
7
|
+
require 'notifier'
|
7
8
|
require 'net/http'
|
8
9
|
|
9
10
|
|
@@ -16,39 +17,35 @@ module Fuel
|
|
16
17
|
|
17
18
|
def burn(leg)
|
18
19
|
begin
|
19
|
-
say ""
|
20
20
|
say "#{get_name(leg)}"
|
21
|
-
say ""
|
22
21
|
say "#{get_note_url(leg)}"
|
23
|
-
say ""
|
24
22
|
burn_fuel
|
23
|
+
send_notification "fuel burned"
|
25
24
|
if( yes? "leg #{get_name(leg)} flown?")
|
26
25
|
update_flight_plan(leg,true)
|
27
26
|
else
|
28
27
|
update_flight_plan(leg,false)
|
29
|
-
refuel
|
28
|
+
refuel
|
29
|
+
send_notification "refueled"
|
30
30
|
burn leg if yes? "burn more fuel on #{get_name(leg)}?"
|
31
31
|
end
|
32
32
|
rescue JSON::ParserError => e
|
33
33
|
say "#{leg} is not a valid uid"
|
34
|
-
say " "
|
35
34
|
rescue Interrupt => e
|
36
35
|
begin
|
37
|
-
say ""
|
38
36
|
if @progressbar.title == "Fuel - burning"
|
39
37
|
if yes?("Flown leg?")
|
40
38
|
update_flight_plan(leg,true)
|
39
|
+
send_notification "fuel burned"
|
41
40
|
end
|
42
41
|
end
|
43
42
|
if @progressbar.title == "Fuel - refueling"
|
44
43
|
burn leg if yes? "burn more fuel on #{get_name(leg)}?"
|
45
44
|
end
|
46
|
-
|
47
|
-
rescue Interrupt => exception
|
45
|
+
rescue Interrupt
|
48
46
|
|
49
47
|
end
|
50
48
|
|
51
|
-
|
52
49
|
end
|
53
50
|
|
54
51
|
end
|
@@ -84,7 +81,15 @@ module Fuel
|
|
84
81
|
def burn_fuel
|
85
82
|
invoke_progress title: "Fuel - burning", total: Fuel.configuration.burn_time
|
86
83
|
end
|
87
|
-
|
84
|
+
|
85
|
+
def send_notification msg
|
86
|
+
Notifier.notify(
|
87
|
+
image: "../gauge.png",
|
88
|
+
title: "Fuel Gauge",
|
89
|
+
message: msg
|
90
|
+
)
|
91
|
+
end
|
92
|
+
|
88
93
|
def refuel
|
89
94
|
invoke_progress title: "Fuel - refueling", total: Fuel.configuration.refuel_time
|
90
95
|
end
|
@@ -97,9 +102,7 @@ module Fuel
|
|
97
102
|
sleep 1
|
98
103
|
end
|
99
104
|
end
|
100
|
-
|
101
|
-
|
102
|
-
end
|
105
|
+
end
|
103
106
|
end
|
104
107
|
|
105
|
-
Fuel::Cli.start(ARGV)
|
108
|
+
Fuel::Cli.start(ARGV)
|
data/fuelcli.gemspec
CHANGED
data/gauge.png
ADDED
Binary file
|
data/lib/fuel.rb
CHANGED
data/lib/fuel/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fuelcli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- dsofadog
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-02-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -38,6 +38,34 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '1.11'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: notifier
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 0.5.2
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.5.2
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: terminal-notifier
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '2.0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '2.0'
|
41
69
|
description:
|
42
70
|
email:
|
43
71
|
- delaney@so.fa.dog
|
@@ -47,6 +75,11 @@ extensions: []
|
|
47
75
|
extra_rdoc_files: []
|
48
76
|
files:
|
49
77
|
- ".gitignore"
|
78
|
+
- ".idea/.gitignore"
|
79
|
+
- ".idea/fuel.iml"
|
80
|
+
- ".idea/misc.xml"
|
81
|
+
- ".idea/modules.xml"
|
82
|
+
- ".idea/vcs.xml"
|
50
83
|
- Gemfile
|
51
84
|
- Gemfile.lock
|
52
85
|
- README.md
|
@@ -55,6 +88,7 @@ files:
|
|
55
88
|
- bin/setup
|
56
89
|
- exe/fuel
|
57
90
|
- fuelcli.gemspec
|
91
|
+
- gauge.png
|
58
92
|
- lib/fuel.rb
|
59
93
|
- lib/fuel/version.rb
|
60
94
|
homepage:
|