trellist 0.6.0 → 0.7.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: 8dbe49ca76242bde1de10cc5ba377e303e31e483
4
- data.tar.gz: e8601078d7249476f591b3c67f5250549c880abf
3
+ metadata.gz: 39536b73ebdb67a8b09552570938cb57ebf33c61
4
+ data.tar.gz: 7cee9fc4856488fbc2fb4654deadabf1c6d35c8f
5
5
  SHA512:
6
- metadata.gz: 5dfd38f5f69b80376b1bb8d37db81d5f36ca3aad77eeab233105fb915b2c0d112541e20b0ec11823618342c9f90de589a03073ff2d67d6af0913ab8b830fe1b4
7
- data.tar.gz: e0b370506b2e6b516b5f3d9bb91089e0c50125dae558e6087444aab439f649487101a6b5f3dea74646df0e4ca91d040bd5e8c4f28746a31defa22442b5d40d3f
6
+ metadata.gz: 27c2a666b0a134c282c3bc41e57f85b75f5b8c344c34c527980ee1c5f2f8300b6f5098de2e0629b0c27fae0698667855c17a4bb66868b1bfd6cdcde7c301c4e3
7
+ data.tar.gz: bf145e6a788ae2a3da79aba1c39054c8afc0440ca86c132358ef4763038bbe4d02be2a770d48a365fa956bd26f8cc35246bd54508b3c59e4fc961cd20225192e
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- trellist (0.6.0)
4
+ trellist (0.7.0)
5
5
  gli (= 2.15.0)
6
6
  highline (= 1.7.8)
7
7
  paint (= 2.0.0)
@@ -10,9 +10,9 @@ PATH
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- activemodel (5.0.1)
14
- activesupport (= 5.0.1)
15
- activesupport (5.0.1)
13
+ activemodel (5.0.2)
14
+ activesupport (= 5.0.2)
15
+ activesupport (5.0.2)
16
16
  concurrent-ruby (~> 1.0, >= 1.0.2)
17
17
  i18n (~> 0.7)
18
18
  minitest (~> 5.1)
data/README.md CHANGED
@@ -30,6 +30,7 @@ Otherwise you'll need to supply your key and token as flags such as:
30
30
  - `trellist cards --format=markdown` **same as above**
31
31
  - `trellist cards --format=plain` **just links**
32
32
  - `trellist cards --format=html` **html**
33
+ - `trellist cards --format=none` **titles only**
33
34
 
34
35
  #### Link prefix and suffix
35
36
 
data/bin/trellist CHANGED
@@ -65,7 +65,7 @@ end
65
65
  desc 'Get cards from a list on your board'
66
66
  command :cards do |c|
67
67
  c.desc 'Gets cards from a selection of lists from the provided Trello board'
68
- c.flag [:f, :format], must_match: ["markdown", "plain", "html", "markdown-with-logo"], default_value: 'markdown'
68
+ c.flag [:f, :format], must_match: ["markdown", "plain", "html", "markdown-with-logo", "titles-only"], default_value: 'markdown'
69
69
  c.flag [:p, :prefix]
70
70
  c.flag [:s, :suffix]
71
71
  c.flag [:l, :label]
@@ -16,6 +16,10 @@ module TrelloCardRefinements
16
16
  def as_html(prefix: '', suffix: '')
17
17
  "#{prefix}<a href=\"#{short_url}\">#{name}</a>#{suffix}"
18
18
  end
19
+
20
+ def as_plain_title(prefix: '', suffix: '')
21
+ "#{prefix}#{name}#{suffix}"
22
+ end
19
23
  end
20
24
  end
21
25
 
@@ -55,6 +59,8 @@ class Client
55
59
  @cards.map(&:short_url)
56
60
  when 'html'
57
61
  @cards.map { |card| card.as_html(prefix: prefix, suffix: suffix) }
62
+ when 'titles-only'
63
+ @cards.map { |card| card.as_plain_title(prefix: prefix, suffix: suffix) }
58
64
  else
59
65
  @cards.map(&:inspect)
60
66
  end
@@ -1,3 +1,3 @@
1
1
  module Trellist
2
- VERSION = '0.6.0'.freeze
2
+ VERSION = '0.7.0'.freeze
3
3
  end
@@ -91,6 +91,13 @@ RSpec.describe 'Client' do
91
91
  end
92
92
  end
93
93
 
94
+ context 'format: titles-only' do
95
+ it 'does not print links just titles' do
96
+ expect(@client.generate_links(format: 'titles-only').first).
97
+ to eq("mock card title")
98
+ end
99
+ end
100
+
94
101
  context 'format: html' do
95
102
  it 'prints link like markdown' do
96
103
  expect(@client.generate_links(format: 'html').first).
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trellist
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chase Southard
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-18 00:00:00.000000000 Z
11
+ date: 2017-05-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake