time_log_robot 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +16 -17
- data/README.md +27 -0
- data/bin/time_log_robot +8 -1
- data/lib/time_log_robot/version.rb +1 -1
- data/time_log_robot.gemspec +1 -1
- metadata +5 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 52cd7b6a841d97f0192f93853dacb1ade788dcc8
|
4
|
+
data.tar.gz: 340b5c943e86df6b343f1c8b5615697032c80bd3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2250a3e8a1a997d4cb973cf7486cdc312e90250917947dd670b7339432eea8b93185a33a107a1236f85ad3a9cd2710316a32395693d9ab3bec6f1d1d72daeef5
|
7
|
+
data.tar.gz: cc8a7c5b10d7947b462a794fed49a38b98f9be98c582507b200f7554ba45aeedbe1e8ca2c1faefecd53f78c48d814970983ab343fbb009dee9b2a8a599352bd5
|
data/Gemfile.lock
CHANGED
@@ -1,52 +1,51 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
time_log_robot (0.2.
|
5
|
-
activesupport (
|
6
|
-
commander (
|
7
|
-
httparty (
|
8
|
-
json (
|
4
|
+
time_log_robot (0.2.2)
|
5
|
+
activesupport (>= 4.2.6)
|
6
|
+
commander (>= 4.1.6)
|
7
|
+
httparty (>= 0.13.0)
|
8
|
+
json (= 1.8.1)
|
9
9
|
|
10
10
|
GEM
|
11
11
|
remote: https://rubygems.org/
|
12
12
|
specs:
|
13
|
-
activesupport (
|
13
|
+
activesupport (5.0.0.1)
|
14
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
14
15
|
i18n (~> 0.7)
|
15
|
-
json (~> 1.7, >= 1.7.7)
|
16
16
|
minitest (~> 5.1)
|
17
|
-
thread_safe (~> 0.3, >= 0.3.4)
|
18
17
|
tzinfo (~> 1.1)
|
19
18
|
ansi (1.5.0)
|
20
19
|
builder (3.2.2)
|
21
|
-
codeclimate-test-reporter (0.
|
20
|
+
codeclimate-test-reporter (0.6.0)
|
22
21
|
simplecov (>= 0.7.1, < 1.0.0)
|
23
22
|
coderay (1.1.1)
|
24
23
|
commander (4.4.0)
|
25
24
|
highline (~> 1.7.2)
|
25
|
+
concurrent-ruby (1.0.2)
|
26
26
|
docile (1.1.5)
|
27
27
|
highline (1.7.8)
|
28
|
-
httparty (0.
|
29
|
-
json (~> 1.8)
|
28
|
+
httparty (0.14.0)
|
30
29
|
multi_xml (>= 0.5.2)
|
31
30
|
i18n (0.7.0)
|
32
|
-
json (1.8.
|
31
|
+
json (1.8.1)
|
33
32
|
method_source (0.8.2)
|
34
|
-
minitest (5.
|
35
|
-
minitest-reporters (1.1.
|
33
|
+
minitest (5.9.0)
|
34
|
+
minitest-reporters (1.1.11)
|
36
35
|
ansi
|
37
36
|
builder
|
38
37
|
minitest (>= 5.0)
|
39
38
|
ruby-progressbar
|
40
39
|
multi_xml (0.5.5)
|
41
|
-
pry (0.10.
|
40
|
+
pry (0.10.4)
|
42
41
|
coderay (~> 1.1.0)
|
43
42
|
method_source (~> 0.8.1)
|
44
43
|
slop (~> 3.4)
|
45
44
|
rake (10.5.0)
|
46
45
|
ruby-progressbar (1.8.1)
|
47
|
-
simplecov (0.
|
46
|
+
simplecov (0.12.0)
|
48
47
|
docile (~> 1.1.0)
|
49
|
-
json (
|
48
|
+
json (>= 1.8, < 3)
|
50
49
|
simplecov-html (~> 0.10.0)
|
51
50
|
simplecov-html (0.10.0)
|
52
51
|
slop (3.6.0)
|
data/README.md
CHANGED
@@ -132,6 +132,33 @@ If you don't care about keeping your mapping file hidden or out of the way, or i
|
|
132
132
|
# or `time_log_robot -m`
|
133
133
|
Enter your MAPPING_FILE_PATH: /full/path/to/your_mapping_file.yml
|
134
134
|
|
135
|
+
### Automate Your Robot
|
136
|
+
|
137
|
+
Mac and Linux can use `crontab` to set your robot to run on a schedule. You will need to get it running successfully first so all of your credentials are saved.
|
138
|
+
|
139
|
+
Next, make a copy of your current `crontab`:
|
140
|
+
|
141
|
+
crontab -l > my-crontab
|
142
|
+
|
143
|
+
Then open the `my-crontab` in your favorite editor (e.g. `atom my-crontab`) and add a timing sequence in which to run the robot command. For example, to have the robot run every Saturday at 8AM:
|
144
|
+
|
145
|
+
* 8 * * 6 time_log_robot
|
146
|
+
|
147
|
+
(For help in figuring out your timing sequence:)
|
148
|
+
|
149
|
+
* * * * * command to be executed
|
150
|
+
- - - - -
|
151
|
+
| | | | |
|
152
|
+
| | | | +----- day of week (0 - 6) (Sunday=0)
|
153
|
+
| | | +------- month (1 - 12)
|
154
|
+
| | +--------- day of month (1 - 31)
|
155
|
+
| +----------- hour (0 - 23)
|
156
|
+
+------------- min (0 - 59)
|
157
|
+
|
158
|
+
After editing, save and then “install” your crontab file by giving it to crontab:
|
159
|
+
|
160
|
+
crontab my-crontab
|
161
|
+
|
135
162
|
### Help
|
136
163
|
|
137
164
|
For more details use the help flag:
|
data/bin/time_log_robot
CHANGED
@@ -79,9 +79,11 @@ def get_missing_envars
|
|
79
79
|
end
|
80
80
|
|
81
81
|
def get_envar(key)
|
82
|
-
|
82
|
+
env_value = ask "Enter your #{key}: " do |char|
|
83
83
|
char.echo = '*' if key =~ /password|token/i
|
84
84
|
end
|
85
|
+
env_value.strip! unless should_not_strip?(key)
|
86
|
+
ENV[key] = env_value
|
85
87
|
if ENV[key].length == 0
|
86
88
|
puts 'Invalid input. This is a required field.'
|
87
89
|
exit
|
@@ -89,9 +91,14 @@ def get_envar(key)
|
|
89
91
|
ENV[key]
|
90
92
|
end
|
91
93
|
|
94
|
+
def should_not_strip?(key)
|
95
|
+
%w(JIRA_PASSWORD).include? key
|
96
|
+
end
|
97
|
+
|
92
98
|
def fetch_envars_from_config
|
93
99
|
return unless envars = YAML.load_file(settings_file_path)
|
94
100
|
envars.each_pair do |key, value|
|
101
|
+
value.strip! unless should_not_strip?(key)
|
95
102
|
ENV[key.upcase] = value
|
96
103
|
end
|
97
104
|
end
|
data/time_log_robot.gemspec
CHANGED
@@ -29,5 +29,5 @@ Gem::Specification.new do |spec|
|
|
29
29
|
spec.add_runtime_dependency 'activesupport', '~> 4.2', '>= 4.2.6'
|
30
30
|
spec.add_runtime_dependency 'commander', '~> 4.1', '>= 4.1.6'
|
31
31
|
spec.add_runtime_dependency 'httparty', '~> 0.13', '>= 0.13.0'
|
32
|
-
spec.add_runtime_dependency 'json', '
|
32
|
+
spec.add_runtime_dependency 'json', '1.8.1'
|
33
33
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: time_log_robot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark J. Lehman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-09-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|
@@ -158,20 +158,14 @@ dependencies:
|
|
158
158
|
name: json
|
159
159
|
requirement: !ruby/object:Gem::Requirement
|
160
160
|
requirements:
|
161
|
-
- -
|
162
|
-
- !ruby/object:Gem::Version
|
163
|
-
version: '1.8'
|
164
|
-
- - ">="
|
161
|
+
- - '='
|
165
162
|
- !ruby/object:Gem::Version
|
166
163
|
version: 1.8.1
|
167
164
|
type: :runtime
|
168
165
|
prerelease: false
|
169
166
|
version_requirements: !ruby/object:Gem::Requirement
|
170
167
|
requirements:
|
171
|
-
- -
|
172
|
-
- !ruby/object:Gem::Version
|
173
|
-
version: '1.8'
|
174
|
-
- - ">="
|
168
|
+
- - '='
|
175
169
|
- !ruby/object:Gem::Version
|
176
170
|
version: 1.8.1
|
177
171
|
description: Automate time logging from tools like Toggl to project management software
|
@@ -233,3 +227,4 @@ summary: Automate work time logging
|
|
233
227
|
test_files:
|
234
228
|
- test/test_helper.rb
|
235
229
|
- test/time_log_robot/jira/issue_key_parser_test.rb
|
230
|
+
has_rdoc:
|