get_to_work 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 2171fbf400cb9e56bbfb43830503c678088c497f
4
+ data.tar.gz: 08ac477394a7859ad4603384a126535e8acdc1a1
5
+ SHA512:
6
+ metadata.gz: 7062a8c5ba2f2df16f452e89b41094b8d7b9e9b006f250933a91e08eabeffda86a62f451b53379507fcecbb4843e4c7bbaffe6916573906393f1d608d08d8375
7
+ data.tar.gz: 5c7eb3898f321dd48402cd8c9f8db7ce05499789caa2da83f657b53b7c685b0a14529080fae4d6c01154ce05f8fe4d1c505ab8cd953b5da052089b102c5ee461
data/.gitignore ADDED
@@ -0,0 +1,10 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ .get-to-work
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
data/.rubocop.yml ADDED
@@ -0,0 +1,246 @@
1
+ AllCops:
2
+ TargetRubyVersion: 2.3
3
+ Exclude:
4
+ - "vendor/**/*"
5
+ - "db/schema.rb"
6
+ UseCache: false
7
+ Style/CollectionMethods:
8
+ Description: Preferred collection methods.
9
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#map-find-select-reduce-size
10
+ Enabled: true
11
+ PreferredMethods:
12
+ collect: map
13
+ collect!: map!
14
+ find: detect
15
+ find_all: select
16
+ reduce: inject
17
+ Style/DotPosition:
18
+ Description: Checks the position of the dot in multi-line method calls.
19
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains
20
+ Enabled: true
21
+ EnforcedStyle: trailing
22
+ SupportedStyles:
23
+ - leading
24
+ - trailing
25
+ Style/FileName:
26
+ Description: Use snake_case for source file names.
27
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-files
28
+ Enabled: false
29
+ Exclude: []
30
+ Style/GuardClause:
31
+ Description: Check for conditionals that can be replaced with guard clauses
32
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
33
+ Enabled: false
34
+ MinBodyLength: 1
35
+ Style/IfUnlessModifier:
36
+ Description: Favor modifier if/unless usage when you have a single-line body.
37
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier
38
+ Enabled: false
39
+ MaxLineLength: 100
40
+ Style/OptionHash:
41
+ Description: Don't use option hashes when you can use keyword arguments.
42
+ Enabled: false
43
+ Style/PercentLiteralDelimiters:
44
+ Description: Use `%`-literal delimiters consistently
45
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-literal-braces
46
+ Enabled: false
47
+ PreferredDelimiters:
48
+ "%": "()"
49
+ "%i": "()"
50
+ "%q": "()"
51
+ "%Q": "()"
52
+ "%r": "{}"
53
+ "%s": "()"
54
+ "%w": "()"
55
+ "%W": "()"
56
+ "%x": "()"
57
+ Style/PredicateName:
58
+ Description: Check the names of predicate methods.
59
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark
60
+ Enabled: true
61
+ NamePrefix:
62
+ - is_
63
+ - has_
64
+ - have_
65
+ NamePrefixBlacklist:
66
+ - is_
67
+ Exclude:
68
+ - spec/**/*
69
+ Style/RaiseArgs:
70
+ Description: Checks the arguments passed to raise/fail.
71
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#exception-class-messages
72
+ Enabled: false
73
+ EnforcedStyle: exploded
74
+ SupportedStyles:
75
+ - compact
76
+ - exploded
77
+ Style/SignalException:
78
+ Description: Checks for proper usage of fail and raise.
79
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#fail-method
80
+ Enabled: false
81
+ EnforcedStyle: semantic
82
+ SupportedStyles:
83
+ - only_raise
84
+ - only_fail
85
+ - semantic
86
+ Style/SingleLineBlockParams:
87
+ Description: Enforces the names of some block params.
88
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#reduce-blocks
89
+ Enabled: false
90
+ Methods:
91
+ - reduce:
92
+ - a
93
+ - e
94
+ - inject:
95
+ - a
96
+ - e
97
+ Style/SingleLineMethods:
98
+ Description: Avoid single-line methods.
99
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-single-line-methods
100
+ Enabled: false
101
+ AllowIfMethodIsEmpty: true
102
+ Style/StringLiterals:
103
+ Description: Checks if uses of quotes match the configured preference.
104
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-string-literals
105
+ Enabled: true
106
+ EnforcedStyle: double_quotes
107
+ SupportedStyles:
108
+ - single_quotes
109
+ - double_quotes
110
+ Style/StringLiteralsInInterpolation:
111
+ Description: Checks if uses of quotes inside expressions in interpolated strings
112
+ match the configured preference.
113
+ Enabled: true
114
+ EnforcedStyle: single_quotes
115
+ SupportedStyles:
116
+ - single_quotes
117
+ - double_quotes
118
+ Style/TrailingCommaInArguments:
119
+ Description: 'Checks for trailing comma in argument lists.'
120
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
121
+ Enabled: false
122
+ EnforcedStyleForMultiline: no_comma
123
+ SupportedStyles:
124
+ - comma
125
+ - consistent_comma
126
+ - no_comma
127
+ Style/TrailingCommaInLiteral:
128
+ Description: 'Checks for trailing comma in array and hash literals.'
129
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
130
+ Enabled: false
131
+ EnforcedStyleForMultiline: no_comma
132
+ SupportedStyles:
133
+ - comma
134
+ - consistent_comma
135
+ - no_comma
136
+ Metrics/AbcSize:
137
+ Description: A calculated magnitude based on number of assignments, branches, and
138
+ conditions.
139
+ Enabled: false
140
+ Max: 15
141
+ Metrics/ClassLength:
142
+ Description: Avoid classes longer than 100 lines of code.
143
+ Enabled: false
144
+ CountComments: false
145
+ Max: 100
146
+ Metrics/ModuleLength:
147
+ CountComments: false
148
+ Max: 100
149
+ Description: Avoid modules longer than 100 lines of code.
150
+ Enabled: false
151
+ Metrics/CyclomaticComplexity:
152
+ Description: A complexity metric that is strongly correlated to the number of test
153
+ cases needed to validate a method.
154
+ Enabled: false
155
+ Max: 6
156
+ Metrics/MethodLength:
157
+ Description: Avoid methods longer than 10 lines of code.
158
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#short-methods
159
+ Enabled: false
160
+ CountComments: false
161
+ Max: 10
162
+ Metrics/ParameterLists:
163
+ Description: Avoid parameter lists longer than three or four parameters.
164
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#too-many-params
165
+ Enabled: false
166
+ Max: 5
167
+ CountKeywordArgs: true
168
+ Metrics/PerceivedComplexity:
169
+ Description: A complexity metric geared towards measuring complexity for a human
170
+ reader.
171
+ Enabled: false
172
+ Max: 7
173
+ Lint/AssignmentInCondition:
174
+ Description: Don't use assignment in conditions.
175
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition
176
+ Enabled: false
177
+ AllowSafeAssignment: true
178
+ Style/InlineComment:
179
+ Description: Avoid inline comments.
180
+ Enabled: false
181
+ Style/AccessorMethodName:
182
+ Description: Check the naming of accessor methods for get_/set_.
183
+ Enabled: false
184
+ Style/Alias:
185
+ Description: Use alias_method instead of alias.
186
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#alias-method
187
+ Enabled: false
188
+ Style/Documentation:
189
+ Description: Document classes and non-namespace modules.
190
+ Enabled: false
191
+ Style/DoubleNegation:
192
+ Description: Checks for uses of double negation (!!).
193
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-bang-bang
194
+ Enabled: false
195
+ Style/EachWithObject:
196
+ Description: Prefer `each_with_object` over `inject` or `reduce`.
197
+ Enabled: false
198
+ Style/EmptyLiteral:
199
+ Description: Prefer literals to Array.new/Hash.new/String.new.
200
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#literal-array-hash
201
+ Enabled: false
202
+ Style/FrozenStringLiteralComment:
203
+ Enabled: false
204
+ Style/ModuleFunction:
205
+ Description: Checks for usage of `extend self` in modules.
206
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#module-function
207
+ Enabled: false
208
+ Style/OneLineConditional:
209
+ Description: Favor the ternary operator(?:) over if/then/else/end constructs.
210
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#ternary-operator
211
+ Enabled: false
212
+ Style/PerlBackrefs:
213
+ Description: Avoid Perl-style regex back references.
214
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers
215
+ Enabled: false
216
+ Style/Send:
217
+ Description: Prefer `Object#__send__` or `Object#public_send` to `send`, as `send`
218
+ may overlap with existing methods.
219
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#prefer-public-send
220
+ Enabled: false
221
+ Style/SpecialGlobalVars:
222
+ Description: Avoid Perl-style global variables.
223
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms
224
+ Enabled: false
225
+ Style/VariableInterpolation:
226
+ Description: Don't interpolate global, instance and class variables directly in
227
+ strings.
228
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#curlies-interpolate
229
+ Enabled: false
230
+ Style/WhenThen:
231
+ Description: Use when x then ... for one-line cases.
232
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#one-line-cases
233
+ Enabled: false
234
+ Lint/EachWithObjectArgument:
235
+ Description: Check for immutable argument given to each_with_object.
236
+ Enabled: true
237
+ Lint/HandleExceptions:
238
+ Description: Don't suppress exception.
239
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions
240
+ Enabled: false
241
+ Lint/LiteralInCondition:
242
+ Description: Checks of literals used in conditions.
243
+ Enabled: false
244
+ Lint/LiteralInInterpolation:
245
+ Description: Checks for literals used in interpolation.
246
+ Enabled: false
data/.travis.yml ADDED
@@ -0,0 +1,4 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.2.3
4
+ before_install: gem install bundler -v 1.10.6
@@ -0,0 +1,13 @@
1
+ # Contributor Code of Conduct
2
+
3
+ As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
4
+
5
+ We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.
6
+
7
+ Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
8
+
9
+ Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
10
+
11
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
12
+
13
+ This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "https://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in get_to_work.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 Chris Rittersdorf
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,42 @@
1
+ # get\_to\_work
2
+ get\_to\_work tags your Harvest time entries with information from Pivotal Tracker, *from your command line.*
3
+
4
+ No more tab twiddling to do this task in the browser.
5
+
6
+ ## Installation
7
+ ```shell
8
+ gem install get_to_work
9
+ ```
10
+
11
+ ## Workflow
12
+
13
+ ### Bootstrap your project's directory
14
+ get\_to\_work needs to know how to talk to your services (Harvest and Pivotal Tracker). So each of your project's working directories need to be bootstrapped:
15
+
16
+ ```shell
17
+ get-to-work bootstrap
18
+ ```
19
+
20
+ This command will:
21
+
22
+ * Save your credentials to the OSX keychain
23
+ * Bookmark your Pivotal Tracker and Harvest projects in a `.get-to-work` file
24
+
25
+
26
+ ### Start working on a story
27
+ ```shell
28
+ get-to-work start [pivotal_tracker_story_url]
29
+ ```
30
+
31
+ This command pulls information from Pivotal Tracker and saves it in your new timer's notes including:
32
+
33
+ * Pivotal Tracker ID hashtag
34
+ * Pivotal Tracker story name
35
+ * Pivotal Tracker URL
36
+
37
+ ### Stop working on a story
38
+ ```shell
39
+ get-to-work stop
40
+ ```
41
+
42
+ Stops the current timer started by get\_to\_work.
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "get_to_work"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start
data/bin/setup ADDED
@@ -0,0 +1,7 @@
1
+ #!/bin/bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+
5
+ bundle install
6
+
7
+ # Do any other automated setup that you need to do here
data/exe/get-to-work ADDED
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "rubygems"
4
+ require "get_to_work"
5
+
6
+ GetToWork::CLI.start(ARGV)
@@ -0,0 +1,40 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path("../lib", __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require "get_to_work/version"
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "get_to_work"
8
+ spec.version = GetToWork::VERSION
9
+ spec.authors = ["Chris Rittersdorf"]
10
+ spec.email = ["chris.rittersdorf@collectiveidea.com"]
11
+ spec.required_ruby_version = ">= 2.2.0"
12
+
13
+ spec.summary = "Tag Harvest time entries with Pivotal Tracker information"
14
+ spec.description = "Tag Harvest time entries with Pivotal Tracker information"
15
+ spec.homepage = "https://github.com/collectiveidea/get_to_work"
16
+ spec.license = "MIT"
17
+
18
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
19
+ spec.bindir = "exe"
20
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
21
+ spec.require_paths = ["lib"]
22
+
23
+ spec.add_dependency "thor"
24
+ spec.add_dependency "crack", "~> 0.4"
25
+ spec.add_dependency "httparty", "~> 0.13"
26
+ spec.add_dependency "addressable", "~> 2.3"
27
+ spec.add_dependency "multipart-post", "~> 2.0"
28
+ spec.add_dependency "rest-client", '~> 1.8'
29
+ spec.add_dependency "ruby-keychain"
30
+ spec.add_dependency "pivotal-tracker"
31
+ spec.add_dependency "harvested"
32
+ spec.add_dependency "tracker_api", "~> 0.2"
33
+ spec.add_dependency "faraday", "~> 0.9"
34
+
35
+ spec.add_development_dependency "bundler", "~> 1.10"
36
+ spec.add_development_dependency "rake", "~> 10.0"
37
+ spec.add_development_dependency "rspec"
38
+ spec.add_development_dependency "pry"
39
+ spec.add_development_dependency "rubocop"
40
+ end