cucumber-openerpscenario 0.1.4 → 0.1.5
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.
- data/:ruby_18 +0 -0
- data/:ruby_19 +0 -0
- data/cucumber-openerp.gemspec +1 -1
- data/cucumber-openerpscenario-0.1.4.gem +0 -0
- data/lib/cucumber/openerp/dsl.rb +3 -2
- metadata +6 -5
data/:ruby_18
ADDED
File without changes
|
data/:ruby_19
ADDED
File without changes
|
data/cucumber-openerp.gemspec
CHANGED
Binary file
|
data/lib/cucumber/openerp/dsl.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
def prepare_args(args)
|
2
|
-
mixed = args.strip.split('and')
|
2
|
+
mixed = args.strip.split(' and ')
|
3
3
|
attrs = []
|
4
4
|
arguments = []
|
5
5
|
mixed.each do |set|
|
@@ -26,6 +26,7 @@ def get_items(action, qty, model, args)
|
|
26
26
|
end
|
27
27
|
command_map = {'create' => 'new', 'need' => 'find_or_initialize_by_', 'shoud_have' => "find_#{qty}by_", 'find' => "find_#{qty}by_", 'find or create' => 'find_or_initialize_by_'}
|
28
28
|
comm_ext, arguments = prepare_args(args)
|
29
|
+
arguments.push({:fields=>['id']})
|
29
30
|
if command_map[action] == 'create'
|
30
31
|
if oclass.send(('find_by_'+comm_ext).to_sym, *arguments)
|
31
32
|
raise "Error object allerady exist if this is not the wished behavior please use need keyword"
|
@@ -44,7 +45,7 @@ def _manage_col_search(field_def, value)
|
|
44
45
|
oid = nil
|
45
46
|
if value.start_with? 'by '
|
46
47
|
comm_ext, arguments = prepare_args(value.gsub('by ', ''))
|
47
|
-
arguments.push({
|
48
|
+
arguments.push({:fields=>['id']})
|
48
49
|
oid = oclass.send(('find_by_'+comm_ext).to_sym, *arguments)
|
49
50
|
else
|
50
51
|
eval "oid = oclass.#{value}"
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: cucumber-openerpscenario
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.1.
|
5
|
+
version: 0.1.5
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Nicolas Bessi - Camptocamp
|
@@ -10,8 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2013-03-06 00:00:00
|
14
|
-
default_executable:
|
13
|
+
date: 2013-03-06 00:00:00 Z
|
15
14
|
dependencies:
|
16
15
|
- !ruby/object:Gem::Dependency
|
17
16
|
name: ooor
|
@@ -78,6 +77,8 @@ extra_rdoc_files: []
|
|
78
77
|
|
79
78
|
files:
|
80
79
|
- .DS_Store
|
80
|
+
- ":ruby_18"
|
81
|
+
- ":ruby_19"
|
81
82
|
- README.txt
|
82
83
|
- bin/cucumber-openerp
|
83
84
|
- cucumber-openerp.gemspec
|
@@ -85,6 +86,7 @@ files:
|
|
85
86
|
- cucumber-openerpscenario-0.1.1.gem
|
86
87
|
- cucumber-openerpscenario-0.1.2.gem
|
87
88
|
- cucumber-openerpscenario-0.1.3.gem
|
89
|
+
- cucumber-openerpscenario-0.1.4.gem
|
88
90
|
- lib/.DS_Store
|
89
91
|
- lib/cucumber/.DS_Store
|
90
92
|
- lib/cucumber/lib/.DS_Store
|
@@ -96,7 +98,6 @@ files:
|
|
96
98
|
- lib/cucumber/openerp/dsl.rb
|
97
99
|
- lib/cucumber/openerp/world.rb
|
98
100
|
- lib/cucumber/openerp.rb
|
99
|
-
has_rdoc: true
|
100
101
|
homepage:
|
101
102
|
licenses: []
|
102
103
|
|
@@ -120,7 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
120
121
|
requirements: []
|
121
122
|
|
122
123
|
rubyforge_project:
|
123
|
-
rubygems_version: 1.
|
124
|
+
rubygems_version: 1.8.24
|
124
125
|
signing_key:
|
125
126
|
specification_version: 3
|
126
127
|
summary: cucumber on OpenERP
|