lucie-lib 0.0.18 → 0.0.19

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: d1798b736a42532a924261b175199b5dc1bb002d
4
- data.tar.gz: 70dc3159de86a5132f7b07f8dc05cd42fd4bb367
3
+ metadata.gz: d360d1b1df80af97909d1adaf500676d1b1e3458
4
+ data.tar.gz: d7dd3d37e576f03d004a4bbda818389f171ea0a7
5
5
  SHA512:
6
- metadata.gz: 43813e04deb6099fc752a84e97294ce2173a40abebe98960239d82205aa9695c11a614e10feb8c1590a73269da0dfa122b858ae30e93a0f5c7dccb88ff61fe7d
7
- data.tar.gz: 9f596f3c15736622cd299b0d3e6ecc6896a2c062ab89cfbf8c7e73f33c8b7dd21beb22b2b7d395ff51f421d815d5083f336ed568030739b3a8164a79f64a7113
6
+ metadata.gz: ae4610d8dbd353d7e39ed7a5ed5f491af07c13b4b3ecf4ab3bee58d8535014725bb80dc826c99eca21ed9025f0b4f597b88e4dcc310d3a7f6ff9d6c44385f615
7
+ data.tar.gz: dbc5258cbf7d2d7a1575b7f85efd6ee74f411e8ef4b0b2e5dec27c8ed63ced6afa272952d60fcfa1377d482e27cd6c48f1f9b5d81be6fab4c4e815b275e29733
data/lib/lucie/app.rb CHANGED
@@ -124,10 +124,7 @@ private
124
124
 
125
125
  def call_action_on_controller
126
126
  begin
127
- self.exit_value = controller.send(:apply_action, action)
128
-
129
- # pop the args[0] element because this is the method
130
- command.shift
127
+ self.exit_value = controller.send(:apply_action, action, command)
131
128
  rescue ActionNotFound
132
129
  self.exit_value = controller.send(:apply_action, :no_method)
133
130
  end
@@ -70,8 +70,10 @@ module Lucie
70
70
  raise ExitRequest, value
71
71
  end
72
72
 
73
- def apply_action(action)
73
+ def apply_action(action, command = nil)
74
74
  if has_action? action
75
+ # pop the action name from the params[:args] list
76
+ command.shift unless command.nil?
75
77
  self.apply_before_filters
76
78
  return self.send(action)
77
79
  else
data/lib/lucie/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Lucie
2
- VERSION = "0.0.18"
2
+ VERSION = "0.0.19"
3
3
  end
@@ -66,4 +66,10 @@ class DerivedController < CallIndexController
66
66
  def new_method
67
67
  print "new_method"
68
68
  end
69
+ end
70
+
71
+ class MethodShouldBeRemovedController < Controller::Base
72
+ def call_this_method
73
+ print params[:args][0]
74
+ end
69
75
  end
@@ -100,6 +100,12 @@ describe App do
100
100
  end
101
101
  end
102
102
 
103
+ should "remove the task from the params[:args] when method is found" do
104
+ assert_output "arg1", "" do
105
+ TestApp.run("method_should_be_removed call_this_method arg1 arg2")
106
+ end
107
+ end
108
+
103
109
  should "have a root directory which is the directory contains the bin and app folders" do
104
110
  assert_equal File.expand_path("../..", __FILE__), TestApp.init("", nil).root
105
111
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lucie-lib
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.18
4
+ version: 0.0.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nucc
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-08 00:00:00.000000000 Z
11
+ date: 2013-12-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake