nutrella 1.4.0 → 1.5.0
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.
- checksums.yaml +4 -4
- data/.rubocop.yml +21 -1
- data/.ruby-version +1 -1
- data/CHANGELOG.md +15 -3
- data/README.md +37 -17
- data/lib/nutrella/cache.rb +1 -1
- data/lib/nutrella/command.rb +18 -6
- data/lib/nutrella/configuration.rb +7 -3
- data/lib/nutrella/version.rb +1 -1
- data/nutrella.gemspec +1 -2
- metadata +5 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3ada2f552730cbf6221835584e054c6e11e97772d0a31ea615b82216555d4b09
|
4
|
+
data.tar.gz: 199bdf1116434ed92d25c718fa8aee98e96c998427176508a55b81acf59bee01
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d4bf1688c192e4a6b0f669d610931ec99c1ff95c9147b09e8a88e66933e8f53957cca69040cbd9462f867d6084bea00beb787e27f22fec8da227a18186ee8db
|
7
|
+
data.tar.gz: f57b83dfb937e477a8f56d71bda8a6b3414252bab313d6c1f1c501b3d504ce691a99f5f4b0db3f2c4b7708bf96a87127ab6d53a6462c386f13cfea763f889731
|
data/.rubocop.yml
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
require:
|
2
|
-
- rubocop-performance
|
3
2
|
- rubocop-rspec
|
4
3
|
|
5
4
|
AllCops:
|
@@ -12,9 +11,21 @@ AllCops:
|
|
12
11
|
Layout/MultilineMethodCallBraceLayout:
|
13
12
|
Enabled: false
|
14
13
|
|
14
|
+
Layout/SpaceAroundMethodCallOperator:
|
15
|
+
Enabled: true
|
16
|
+
|
17
|
+
Lint/RaiseException:
|
18
|
+
Enabled: true
|
19
|
+
|
20
|
+
Lint/StructNewOverride:
|
21
|
+
Enabled: true
|
22
|
+
|
15
23
|
Metrics/BlockLength:
|
16
24
|
Enabled: false
|
17
25
|
|
26
|
+
Naming/MemoizedInstanceVariableName:
|
27
|
+
EnforcedStyleForLeadingUnderscores: required
|
28
|
+
|
18
29
|
RSpec/AnyInstance:
|
19
30
|
Enabled: false
|
20
31
|
|
@@ -45,6 +56,15 @@ RSpec/MultipleExpectations:
|
|
45
56
|
RSpec/SubjectStub:
|
46
57
|
Enabled: false
|
47
58
|
|
59
|
+
Style/BlockDelimiters:
|
60
|
+
Enabled: true
|
61
|
+
EnforcedStyle: line_count_based
|
62
|
+
BracesRequiredMethods:
|
63
|
+
- 'let'
|
64
|
+
|
65
|
+
Style/ExponentialNotation:
|
66
|
+
Enabled: true
|
67
|
+
|
48
68
|
# We can ignore this small performance improvement.
|
49
69
|
Style/FrozenStringLiteralComment:
|
50
70
|
Enabled: false
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.6.6
|
data/CHANGELOG.md
CHANGED
@@ -6,16 +6,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
6
6
|
|
7
7
|
## [Unreleased]
|
8
8
|
|
9
|
+
## [1.5.0] - 2020-04-26
|
10
|
+
|
11
|
+
#### New Features
|
12
|
+
|
13
|
+
- Added a configuration option to support opening boards in the desktop Trello app
|
14
|
+
|
9
15
|
## [1.4.0] - 2020-03-30
|
16
|
+
|
17
|
+
#### Breaking Changes
|
18
|
+
|
10
19
|
- Drop support for Ruby 2.4
|
11
20
|
|
12
21
|
## [1.3.1] - 2019-05-20
|
13
|
-
|
22
|
+
|
23
|
+
#### New Features
|
24
|
+
|
14
25
|
- Added a configuration option to adjust the command that launches your Trello boards
|
15
26
|
|
16
27
|
## [1.3.0] - 2019-05-20
|
17
|
-
|
28
|
+
|
29
|
+
#### Yanked
|
18
30
|
|
19
31
|
## [1.2.2] - 2019-04-27
|
20
|
-
|
32
|
+
|
21
33
|
- Added a changelog
|
data/README.md
CHANGED
@@ -47,6 +47,7 @@ If your haven't already done so, insert your `key`, `secret`, and `token` into y
|
|
47
47
|
|
48
48
|
The configuration file should look like the following (don't use the keys below, they won't work):
|
49
49
|
|
50
|
+
```yaml
|
50
51
|
# Trello Developer API Keys
|
51
52
|
key: c2fc703429da08b6e7dcb0a878e35564
|
52
53
|
secret: 7fd865f372891afa93aabdb6b836254bcda10c8a320def2b3207e2ffb425bc0a
|
@@ -55,50 +56,69 @@ The configuration file should look like the following (don't use the keys below,
|
|
55
56
|
# Optional Configuration
|
56
57
|
organization: 542d76ac2fad4697c3e80448
|
57
58
|
launch_command: open $url$
|
59
|
+
enable_trello_app: false
|
60
|
+
```
|
61
|
+
|
62
|
+
Finally, you can tweak your configuration:
|
58
63
|
|
59
|
-
|
60
|
-
Trello board in Firefox change
|
64
|
+
1. Adjust the launch_command configuration to fit your needs. For example, on macOS to open
|
65
|
+
your Trello board in Firefox change your configuration to:
|
61
66
|
|
67
|
+
```yaml
|
62
68
|
launch_command: open -a firefox $url$
|
69
|
+
```
|
70
|
+
|
71
|
+
1. Adjust the enable_trello_app configuration to open boards in the Trello app. For example,
|
72
|
+
if you have installed the Trello app on macOS to open your Trello board in the Trello app
|
73
|
+
change your configuration to:
|
63
74
|
|
75
|
+
```yaml
|
76
|
+
enable_trello_app: true
|
77
|
+
```
|
64
78
|
|
65
79
|
## Usage
|
66
80
|
|
67
81
|
Create or open a Trello board based on the name of the current git branch:
|
68
82
|
|
83
|
+
```sh
|
69
84
|
$ nutrella
|
85
|
+
```
|
70
86
|
|
71
87
|
Create or open a named Trello board:
|
72
88
|
|
89
|
+
```sh
|
73
90
|
$ nutrella <git-branch-name>
|
91
|
+
```
|
74
92
|
|
75
93
|
Note: you can invoke `nutrella` from your project directory or from any subdirectory.
|
76
94
|
|
95
|
+
|
77
96
|
## Troubleshooting
|
78
97
|
|
79
|
-
|
98
|
+
1. For `method_missing: undefined method 'this'`
|
80
99
|
|
81
|
-
Try updating `RubyGems`
|
100
|
+
Try updating `RubyGems`
|
82
101
|
|
83
|
-
```sh
|
84
|
-
gem update --system
|
85
|
-
```
|
102
|
+
```sh
|
103
|
+
gem update --system
|
104
|
+
```
|
86
105
|
|
87
|
-
|
106
|
+
1. For `uninitialized constant Gem::Source (NameError)`
|
88
107
|
|
89
|
-
Try updating `bundler`
|
108
|
+
Try updating `bundler`
|
90
109
|
|
91
|
-
```sh
|
92
|
-
gem install bundler
|
93
|
-
```
|
110
|
+
```sh
|
111
|
+
gem install bundler
|
112
|
+
```
|
94
113
|
|
95
|
-
|
114
|
+
1. For `cannot load such file -- nutrella`
|
96
115
|
|
97
|
-
This error may appear after running `irb -rubygems` and you are unable to `require 'nutrella'`.
|
116
|
+
This error may appear after running `irb -rubygems` and you are unable to `require 'nutrella'`.
|
117
|
+
Try running `irb -rubygems` from your home directory:
|
98
118
|
|
99
|
-
```sh
|
100
|
-
cd ~
|
101
|
-
```
|
119
|
+
```sh
|
120
|
+
cd ~
|
121
|
+
```
|
102
122
|
|
103
123
|
|
104
124
|
## Origin of Name
|
data/lib/nutrella/cache.rb
CHANGED
data/lib/nutrella/command.rb
CHANGED
@@ -14,23 +14,35 @@ module Nutrella
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def run
|
17
|
-
|
17
|
+
launch(board_url)
|
18
18
|
end
|
19
19
|
|
20
20
|
private
|
21
21
|
|
22
|
+
def launch(url)
|
23
|
+
launch_command = configuration_values.fetch(:launch_command).gsub("$url$", url)
|
24
|
+
|
25
|
+
system(launch_command)
|
26
|
+
end
|
27
|
+
|
22
28
|
def board_url
|
23
|
-
|
29
|
+
enable_trello_app? ? trello_url(cached_url) : cached_url
|
30
|
+
end
|
31
|
+
|
32
|
+
def cached_url
|
33
|
+
@_cached_url ||= url_cache.fetch(@board_name) { task_board.lookup_or_create(@board_name).url }
|
24
34
|
end
|
25
35
|
|
26
36
|
def configuration_values
|
27
|
-
@
|
37
|
+
@_configuration_values ||= Nutrella::Configuration.values(configuration_filename)
|
28
38
|
end
|
29
39
|
|
30
|
-
def
|
31
|
-
|
40
|
+
def enable_trello_app?
|
41
|
+
configuration_values.fetch(:enable_trello_app)
|
42
|
+
end
|
32
43
|
|
33
|
-
|
44
|
+
def trello_url(http_url)
|
45
|
+
http_url.gsub(/^http.?:/, "trello:")
|
34
46
|
end
|
35
47
|
|
36
48
|
def task_board
|
@@ -18,6 +18,7 @@ module Nutrella
|
|
18
18
|
# Optional Configuration
|
19
19
|
organization: #{NULOGY_ORGANIZATION_ID}
|
20
20
|
launch_command: open $url$
|
21
|
+
enable_trello_app: False
|
21
22
|
YAML
|
22
23
|
|
23
24
|
attr_reader :path, :values
|
@@ -35,19 +36,22 @@ module Nutrella
|
|
35
36
|
private
|
36
37
|
|
37
38
|
def load_configuration
|
38
|
-
configuration = YAML.load_file(path)
|
39
|
-
|
40
39
|
@values = {
|
41
40
|
key: configuration.fetch("key"),
|
42
41
|
secret: configuration.fetch("secret"),
|
43
42
|
token: configuration.fetch("token"),
|
44
43
|
organization: configuration.fetch("organization", NULOGY_ORGANIZATION_ID),
|
45
|
-
launch_command: configuration.fetch("launch_command", "open $url$")
|
44
|
+
launch_command: configuration.fetch("launch_command", "open $url$"),
|
45
|
+
enable_trello_app: configuration.fetch("enable_trello_app", "False")
|
46
46
|
}
|
47
47
|
rescue => e
|
48
48
|
abort "#{path} #{e}"
|
49
49
|
end
|
50
50
|
|
51
|
+
def configuration
|
52
|
+
@_configuration ||= YAML.load_file(path)
|
53
|
+
end
|
54
|
+
|
51
55
|
def configuration_missing?
|
52
56
|
return false if File.exist?(path)
|
53
57
|
|
data/lib/nutrella/version.rb
CHANGED
data/nutrella.gemspec
CHANGED
@@ -30,8 +30,7 @@ Gem::Specification.new do |spec|
|
|
30
30
|
|
31
31
|
spec.add_development_dependency "rake", ">= 12.1", "< 13.1"
|
32
32
|
spec.add_development_dependency "rspec", ">= 3.9", "< 4.0"
|
33
|
-
spec.add_development_dependency "rubocop", "~> 0.
|
34
|
-
spec.add_development_dependency "rubocop-performance", "~> 1.5"
|
33
|
+
spec.add_development_dependency "rubocop", "~> 0.82"
|
35
34
|
spec.add_development_dependency "rubocop-rspec", "~> 1.38"
|
36
35
|
spec.add_development_dependency "simplecov", "~> 0.17"
|
37
36
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nutrella
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alistair McKinnell
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-04-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruby-trello
|
@@ -70,28 +70,14 @@ dependencies:
|
|
70
70
|
requirements:
|
71
71
|
- - "~>"
|
72
72
|
- !ruby/object:Gem::Version
|
73
|
-
version: '0.
|
73
|
+
version: '0.82'
|
74
74
|
type: :development
|
75
75
|
prerelease: false
|
76
76
|
version_requirements: !ruby/object:Gem::Requirement
|
77
77
|
requirements:
|
78
78
|
- - "~>"
|
79
79
|
- !ruby/object:Gem::Version
|
80
|
-
version: '0.
|
81
|
-
- !ruby/object:Gem::Dependency
|
82
|
-
name: rubocop-performance
|
83
|
-
requirement: !ruby/object:Gem::Requirement
|
84
|
-
requirements:
|
85
|
-
- - "~>"
|
86
|
-
- !ruby/object:Gem::Version
|
87
|
-
version: '1.5'
|
88
|
-
type: :development
|
89
|
-
prerelease: false
|
90
|
-
version_requirements: !ruby/object:Gem::Requirement
|
91
|
-
requirements:
|
92
|
-
- - "~>"
|
93
|
-
- !ruby/object:Gem::Version
|
94
|
-
version: '1.5'
|
80
|
+
version: '0.82'
|
95
81
|
- !ruby/object:Gem::Dependency
|
96
82
|
name: rubocop-rspec
|
97
83
|
requirement: !ruby/object:Gem::Requirement
|
@@ -182,7 +168,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
182
168
|
- !ruby/object:Gem::Version
|
183
169
|
version: '0'
|
184
170
|
requirements: []
|
185
|
-
rubygems_version: 3.
|
171
|
+
rubygems_version: 3.0.3
|
186
172
|
signing_key:
|
187
173
|
specification_version: 4
|
188
174
|
summary: A command line tool for creating a Trello Board based on the current git
|