apipie-rails 0.0.10 → 0.0.11

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.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- apipie-rails (0.0.10)
4
+ apipie-rails (0.0.11)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
@@ -101,7 +101,7 @@ module Apipie
101
101
 
102
102
  def client_args(method)
103
103
  client_args = params_in_path(method).dup
104
- client_args << "params = {}" if method[:params].any?
104
+ client_args << "params = {}"
105
105
  client_args << 'headers = {}'
106
106
  client_args
107
107
  end
@@ -34,11 +34,13 @@ module <%= class_base %>Cli
34
34
  class << self
35
35
  private
36
36
  def dispatch(task, given_args, given_options, config)
37
- parser = Thor::Options.new({:username => Thor::Option.parse(%w[username -u], :string),
38
- :password => Thor::Option.parse(%w[password -p], :string)})
37
+ parser = Thor::Options.new :auth => Thor::Option.parse(%w[auth -a], :string)
39
38
  opts = parser.parse(given_args)
40
- <%= class_base %><%= class_suffix %>.client_config[:username] = opts["username"]
41
- <%= class_base %><%= class_suffix %>.client_config[:password] = opts["password"]
39
+ if opts['auth']
40
+ username, password = opts['auth'].split(':')
41
+ <%= class_base %><%= class_suffix %>.client_config[:username] = username
42
+ <%= class_base %><%= class_suffix %>.client_config[:password] = password
43
+ end
42
44
  #remaining = parser.instance_variable_get("@unknown") # TODO: this is an ugly hack :(
43
45
  remaining = parser.remaining
44
46
  super(task, remaining, given_options, config)
@@ -1,3 +1,3 @@
1
1
  module Apipie
2
- VERSION = '0.0.10'
2
+ VERSION = '0.0.11'
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apipie-rails
3
3
  version: !ruby/object:Gem::Version
4
- hash: 11
4
+ hash: 9
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 10
10
- version: 0.0.10
9
+ - 11
10
+ version: 0.0.11
11
11
  platform: ruby
12
12
  authors:
13
13
  - Pavel Pokorny