nutrella 0.5.0 → 0.6.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2d5b491abeb75e9ec19f722379513b01d49f4a5e
4
- data.tar.gz: cbd764cf2ba2261bd91a33245ec78e2d35ccbcb8
3
+ metadata.gz: b19e14242060fe83ae91fc7422a89d257134a6c8
4
+ data.tar.gz: 2b58250e03191ec7bfdc81666b7dccf24236d34e
5
5
  SHA512:
6
- metadata.gz: c490f761d7cb8b3ef53c0ed66d82ae3c9fd3f399ab8947fc2bd31f0ec7040e66ec276166ea0253575a8ef34f0b6dc8dcb7434467b2a9f193778b6decab0089ea
7
- data.tar.gz: f1f4e999e28ab714d1533ea0772e2fd3dd6fe0d9df59556deb771ca52b2e9dfaa5bce15fddd84dace24e83404b97dc032066dc0d708aeb8d7250a4cb04bdb24e
6
+ metadata.gz: a2a43263349bede6b8d17ce6a340f3522749de18b231f50bf11e5a541147a1e14638a7f94bfef62b343887be76b3e989e37f33a025b2ebdd75e7a7ca42a8ec88
7
+ data.tar.gz: 528cff08bcaefc8c0ec603623866b31819c643a8127782af7cc2b87c4567ad1fd56f7bcc35b99452f643a6fae65628b184e9141c6756ce1e33edc2a32b471a1f
@@ -0,0 +1,16 @@
1
+ root = true
2
+
3
+ [*]
4
+
5
+ # Change these settings to your own preference
6
+ indent_style = space
7
+ indent_size = 2
8
+
9
+ # We recommend you to keep these unchanged
10
+ end_of_line = lf
11
+ charset = utf-8
12
+ trim_trailing_whitespace = true
13
+ insert_final_newline = true
14
+
15
+ [*.md]
16
+ trim_trailing_whitespace = false
@@ -1,5 +1,5 @@
1
1
  AllCops:
2
- TargetRubyVersion: 2.1
2
+ TargetRubyVersion: 2.2
3
3
 
4
4
  Exclude:
5
5
  - 'bin/**/*'
data/README.md CHANGED
@@ -9,8 +9,8 @@ A command line tool for associating a Trello board with the current git branch.
9
9
  ## Table of Contents
10
10
 
11
11
  * [Installation](#installation)
12
- * [Troubleshooting](#troubleshooting)
13
12
  * [Usage](#usage)
13
+ * [Troubleshooting](#troubleshooting)
14
14
  * [Origin of Name](#origin-of-name)
15
15
  * [Contributing](#contributing)
16
16
  * [License](#license)
@@ -26,8 +26,9 @@ A command line tool for associating a Trello board with the current git branch.
26
26
 
27
27
  $ nutrella
28
28
 
29
- **Step 3**: Get key and secret
29
+ **Step 3**: Get key and secret (best to do this from your home directory)
30
30
 
31
+ $ cd ~
31
32
  $ irb -rubygems
32
33
  irb> require 'nutrella'
33
34
  irb> Nutrella.open_public_key_url
@@ -54,6 +55,15 @@ The configuration file should look like the following (don't use the keys below,
54
55
  # Optional Configuration
55
56
  organization: 542d76ac2fad4697c3e80448
56
57
 
58
+
59
+ ## Usage
60
+
61
+ Create or open a Trello board based on the name of the current git branch:
62
+
63
+ $ nutrella
64
+
65
+ Note: you can invoke the `nutrella` from your project directory or from any subdirectory.
66
+
57
67
  ## Troubleshooting
58
68
 
59
69
  ### `method_missing: undefined method 'this'`
@@ -66,19 +76,19 @@ gem update --system
66
76
 
67
77
  ### `uninitialized constant Gem::Source (NameError)`
68
78
 
69
- Try updating `bundler`
79
+ Try updating `bundler`
70
80
 
71
81
  ```sh
72
82
  gem install bundler
73
83
  ```
74
84
 
75
- For more information see the `bundler` [CHANGELOG]( https://github.com/bundler/bundler/blob/master/CHANGELOG.md#1131-2016-09-13)
76
-
77
- ## Usage
85
+ ### `cannot load such file -- nutrella`
78
86
 
79
- Create or open a Trello board based on the name of the current git branch:
87
+ This error may appear after running `irb -rubygems` and you are unable to `require 'nutrella'`. You won't be able to `require 'nutrella'` from a directory that uses Bundler. Try running `irb` instead from your home directory:
80
88
 
81
- $ nutrella
89
+ ```sh
90
+ cd ~
91
+ ```
82
92
 
83
93
 
84
94
  ## Origin of Name
@@ -1,14 +1,16 @@
1
- require "git"
1
+ require "open3"
2
2
 
3
3
  module Nutrella
4
4
  #
5
5
  # Knows the name of the task board associated with the current git branch.
6
6
  #
7
7
  module TaskBoardName
8
- def self.from_git_branch(working_dir = ".")
9
- Git.open(working_dir).current_branch.titleize
10
- rescue
11
- abort "Sorry. Can't find an associated git branch here."
8
+ def self.from_git_branch
9
+ git_branch_name, status = Open3.capture2("git rev-parse --abbrev-ref HEAD")
10
+
11
+ abort "Sorry. Can't find an associated git branch here." unless status.success?
12
+
13
+ git_branch_name.chomp.titleize
12
14
  end
13
15
  end
14
16
  end
@@ -1,3 +1,3 @@
1
1
  module Nutrella
2
- VERSION = "0.5.0"
2
+ VERSION = "0.6.0"
3
3
  end
@@ -20,7 +20,6 @@ Gem::Specification.new do |spec|
20
20
  spec.required_ruby_version = ">= 2.1"
21
21
 
22
22
  spec.add_runtime_dependency "activesupport", "~> 4.2.5"
23
- spec.add_runtime_dependency "git", "~> 1.3"
24
23
  spec.add_runtime_dependency "ruby-trello", "~> 1.4"
25
24
 
26
25
  spec.add_development_dependency "bundler", "~> 1.11"
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: 0.5.0
4
+ version: 0.6.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: 2016-09-20 00:00:00.000000000 Z
11
+ date: 2016-11-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -24,20 +24,6 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: 4.2.5
27
- - !ruby/object:Gem::Dependency
28
- name: git
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '1.3'
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '1.3'
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: ruby-trello
43
29
  requirement: !ruby/object:Gem::Requirement
@@ -159,6 +145,7 @@ extensions: []
159
145
  extra_rdoc_files: []
160
146
  files:
161
147
  - ".codeclimate.yml"
148
+ - ".editorconfig"
162
149
  - ".envrc"
163
150
  - ".gitignore"
164
151
  - ".rspec"
@@ -205,7 +192,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
205
192
  version: '0'
206
193
  requirements: []
207
194
  rubyforge_project:
208
- rubygems_version: 2.6.4
195
+ rubygems_version: 2.6.8
209
196
  signing_key:
210
197
  specification_version: 4
211
198
  summary: A command line tool for creating a Trello Board based on the current git