lucie-lib 0.0.18 → 0.0.19
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 +4 -4
- data/lib/lucie/app.rb +1 -4
- data/lib/lucie/controller/base.rb +3 -1
- data/lib/lucie/version.rb +1 -1
- data/test/fixtures/command_parser_fixtures.rb +6 -0
- data/test/functional/app_test.rb +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d360d1b1df80af97909d1adaf500676d1b1e3458
|
4
|
+
data.tar.gz: d7dd3d37e576f03d004a4bbda818389f171ea0a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
data/test/functional/app_test.rb
CHANGED
@@ -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.
|
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-
|
11
|
+
date: 2013-12-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|