cmdline-fu 0.1.3 → 0.1.4

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.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/bin/cmdline-fu +4 -3
  3. data/cmdline-fu.gemspec +1 -1
  4. metadata +3 -3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.3
1
+ 0.1.4
@@ -118,7 +118,8 @@ class CommandLineFu
118
118
  end
119
119
 
120
120
  def api_url
121
- command_part = command_set_for(opt.command)
121
+ ret = command_set_for(opt.command)
122
+ command_part = ret.respond_to?(:call) ? ret.call : ret
122
123
  url = "#{API_URL}/#{command_part}/#{opt.sort_order}"
123
124
  url << "/#{opt.format}" if opt.format
124
125
  url
@@ -134,13 +135,13 @@ class CommandLineFu
134
135
  b64text = [opt.search].pack("m").chomp
135
136
  search = opt.search.tr(' ','-')
136
137
  "matching/#{search}/#{b64text}"
137
- }.call,
138
+ },
138
139
  "tagged" => lambda {
139
140
  unless tag_id = tags[opt.search]
140
141
  raise "Tag not found"
141
142
  end
142
143
  "tagged/#{tag_id}/#{opt.search}"
143
- }.call
144
+ },
144
145
  }[command]
145
146
  end
146
147
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{cmdline-fu}
5
- s.version = "0.1.3"
5
+ s.version = "0.1.4"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["t9md"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cmdline-fu
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 3
10
- version: 0.1.3
9
+ - 4
10
+ version: 0.1.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - t9md