pinpress 1.4.1 → 1.4.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 967966057972d861227970f7e880f192f32b2073
4
- data.tar.gz: c4eb878fab8f404aedee8d3690536e4f96f7ef0c
3
+ metadata.gz: 0e914899e1c35ca22202b9ec594bfaa096d10835
4
+ data.tar.gz: 8547f9bb8e6a29818f6fe24aaaf64c1aec487fa7
5
5
  SHA512:
6
- metadata.gz: fa530a3468b14d2027ebb9ff364f2b44b13042aa38e09ce4f10c2f8ee4f718037f3f9b230a34addb7012f68edca32093eee3bcec3b26dc090dc9c48b19a32c80
7
- data.tar.gz: ad316385a8979de586cfe8c8a06fb2c7b6df621ed25aaa460593e33051edd895355c638ec3b15d102e5df3aae93e6142b82d639f67831961abd1527a37e76cbc
6
+ metadata.gz: 7cbf914686ec155cdf2bf989a912fbf307fcb43152f161f27100639884e5162dfb5bf7009c316ae50badb326c7df96ada8d21f0c9df988ca1b32a76340e40ca1
7
+ data.tar.gz: 8b8033020e7f7394c042441496b30381b96efeea00446f6197f8ad23ad5594d2c929153596d14251f80bdca90a914f270cbb0d2a65f03591d42b169f9c5bee90
data/HISTORY.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 1.4.2 (2014-05-16)
2
+
3
+ * Some small refactorings
4
+
1
5
  # 1.4.1 (2014-05-13)
2
6
 
3
7
  * Fixed a bug with displaying templates
data/README.md CHANGED
@@ -42,7 +42,7 @@ SYNOPSIS
42
42
  pinpress [global options] command [command options] [arguments...]
43
43
 
44
44
  VERSION
45
- 1.4.1
45
+ 1.4.2
46
46
 
47
47
  GLOBAL OPTIONS
48
48
  --help - Show this message
data/lib/pinpress.rb CHANGED
@@ -138,34 +138,20 @@ module PinPress
138
138
  # Present a list of installed templates to the user
139
139
  # @return [void]
140
140
  def list_templates
141
- pin_templates = configuration.pin_templates
142
- tag_templates = configuration.tag_templates
143
-
144
- messenger.section('AVAILABLE PIN TEMPLATES:')
145
- if pin_templates
146
- # pin_templates.each_with_index do |template, index|
147
- pin_templates.each_with_index do |template, index|
148
- template_name, template = template.first
149
- puts "#{ index + 1 }.\tName: ".blue + "#{ template_name }"
150
- puts "Opener:".blue.rjust(22) + "\t#{ template[:opener] }".truncate(80)
151
- puts "Item:".blue.rjust(22) + "\t#{ template[:item] }".truncate(80)
152
- puts "Closer:".blue.rjust(22) + "\t#{ template[:closer] }".truncate(80)
153
- end
154
- else
155
- messenger.warn('No templates defined...')
156
- end
157
-
158
- messenger.section('AVAILABLE TAG TEMPLATES:')
159
- if tag_templates
160
- tag_templates.each_with_index do |template, index|
161
- template_name, template = template.first
162
- puts "#{ index + 1 }.\tName: ".blue + "#{ template_name }"
163
- puts "Opener:".blue.rjust(22) + "\t#{ template[:opener] }".truncate(80)
164
- puts "Item:".blue.rjust(22) + "\t#{ template[:item] }".truncate(80)
165
- puts "Closer:".blue.rjust(22) + "\t#{ template[:closer] }".truncate(80)
141
+ %w(pin tag).each do |type|
142
+ templates = configuration.send("#{ type }_templates")
143
+ messenger.section("AVAILABLE #{ type.upcase } TEMPLATES:")
144
+ if templates
145
+ templates.each_with_index do |template, index|
146
+ template_name, template = template.first
147
+ puts "#{ index + 1 }.\tName: ".blue + "#{ template_name }"
148
+ puts "Opener:".blue.rjust(22) + "\t#{ template[:opener] }".truncate(80)
149
+ puts "Item:".blue.rjust(22) + "\t#{ template[:item] }".truncate(80)
150
+ puts "Closer:".blue.rjust(22) + "\t#{ template[:closer] }".truncate(80)
151
+ end
152
+ else
153
+ messenger.warn('No templates defined...')
166
154
  end
167
- else
168
- messenger.warn('No templates defined...')
169
155
  end
170
156
  end
171
157
 
@@ -28,5 +28,5 @@ module PinPress
28
28
  SUMMARY = 'A simple CLI to create HTML templates of Pinboard data.'
29
29
 
30
30
  # The Gem's version
31
- VERSION = '1.4.1'
31
+ VERSION = '1.4.2'
32
32
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pinpress
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.1
4
+ version: 1.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Bach
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-14 00:00:00.000000000 Z
11
+ date: 2014-05-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aruba