MuranoCLI 3.0.1 → 3.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.agignore +1 -0
- data/.rubocop.yml +67 -5
- data/Gemfile +6 -3
- data/MuranoCLI.gemspec +14 -10
- data/README.markdown +299 -126
- data/Rakefile +6 -1
- data/bin/murano +2 -2
- data/docs/completions/murano_completion-bash +93 -0
- data/lib/MrMurano.rb +19 -2
- data/lib/MrMurano/Business.rb +22 -19
- data/lib/MrMurano/Config.rb +19 -9
- data/lib/MrMurano/Content.rb +4 -4
- data/lib/MrMurano/Exchange-Element.rb +99 -0
- data/lib/MrMurano/Exchange.rb +137 -0
- data/lib/MrMurano/Gateway.rb +9 -9
- data/lib/MrMurano/Keystore.rb +4 -2
- data/lib/MrMurano/ReCommander.rb +3 -5
- data/lib/MrMurano/Solution-ServiceConfig.rb +12 -12
- data/lib/MrMurano/Solution-Services.rb +15 -14
- data/lib/MrMurano/Solution-Users.rb +2 -2
- data/lib/MrMurano/Solution.rb +43 -49
- data/lib/MrMurano/SolutionId.rb +28 -28
- data/lib/MrMurano/SyncUpDown.rb +32 -22
- data/lib/MrMurano/Webservice-Endpoint.rb +2 -1
- data/lib/MrMurano/Webservice.rb +5 -5
- data/lib/MrMurano/commands.rb +2 -1
- data/lib/MrMurano/commands/business.rb +21 -19
- data/lib/MrMurano/commands/domain.rb +16 -2
- data/lib/MrMurano/commands/exchange.rb +272 -0
- data/lib/MrMurano/commands/globals.rb +17 -1
- data/lib/MrMurano/commands/init.rb +3 -3
- data/lib/MrMurano/commands/link.rb +16 -16
- data/lib/MrMurano/commands/postgresql.rb +2 -2
- data/lib/MrMurano/commands/show.rb +13 -7
- data/lib/MrMurano/commands/solution.rb +23 -17
- data/lib/MrMurano/commands/solution_picker.rb +49 -44
- data/lib/MrMurano/commands/sync.rb +2 -1
- data/lib/MrMurano/commands/timeseries.rb +2 -2
- data/lib/MrMurano/commands/tsdb.rb +2 -2
- data/lib/MrMurano/hash.rb +19 -7
- data/lib/MrMurano/http.rb +12 -2
- data/lib/MrMurano/orderedhash.rb +200 -0
- data/lib/MrMurano/spec_commander.rb +98 -0
- data/lib/MrMurano/verbosing.rb +2 -2
- data/lib/MrMurano/version.rb +2 -2
- data/spec/Business_spec.rb +8 -6
- data/spec/Solution-ServiceConfig_spec.rb +1 -1
- data/spec/SyncUpDown_spec.rb +6 -6
- data/spec/_workspace.rb +9 -4
- data/spec/cmd_business_spec.rb +8 -2
- data/spec/cmd_common.rb +266 -25
- data/spec/cmd_exchange_spec.rb +118 -0
- data/spec/cmd_help_spec.rb +54 -13
- data/spec/cmd_init_spec.rb +1 -12
- data/spec/cmd_link_spec.rb +94 -72
- data/spec/spec_helper.rb +11 -16
- metadata +23 -17
@@ -0,0 +1,118 @@
|
|
1
|
+
# Last Modified: 2017.08.31 /coding: utf-8
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
# Copyright © 2016-2017 Exosite LLC.
|
5
|
+
# License: MIT. See LICENSE.txt.
|
6
|
+
# vim:tw=0:ts=2:sw=2:et:ai
|
7
|
+
|
8
|
+
require 'fileutils'
|
9
|
+
require 'open3'
|
10
|
+
require 'pathname'
|
11
|
+
|
12
|
+
require 'cmd_common'
|
13
|
+
require 'MrMurano/Config'
|
14
|
+
|
15
|
+
RSpec.describe 'murano exchange', :cmd, :needs_password do
|
16
|
+
include_context 'CI_CMD'
|
17
|
+
|
18
|
+
context 'without project' do
|
19
|
+
it 'help' do
|
20
|
+
cmd_verify_help('exchange')
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
context 'with project' do
|
25
|
+
#before(:example) { project_up }
|
26
|
+
#after(:example) { project_down }
|
27
|
+
|
28
|
+
def expect_exchange_element_table(stdout, stderr, num_cols: nil)
|
29
|
+
expect(stderr).to eq('')
|
30
|
+
lines = stdout.lines
|
31
|
+
# FIXME/2017-08-29: Is this too much detail??
|
32
|
+
# What about running test once, dumping output to file,
|
33
|
+
# and expecting same output next time?
|
34
|
+
expect(lines[0]).to match(/^Found [\d]+ elements.$/)
|
35
|
+
# Outline of table. n columns. '+-----+-----+---...----+\n'
|
36
|
+
expect(lines[1]).to match(/^(\+-+){#{num_cols}}\+$/)
|
37
|
+
# Header.
|
38
|
+
expect(lines[2]).to match(/^\| elementId/)
|
39
|
+
# Separator.
|
40
|
+
expect(lines[3]).to match(/^(\+-+){#{num_cols}}\+$/)
|
41
|
+
# Content. Starts with elementId.
|
42
|
+
(4..(lines.length - 2)).to_a.each do |line|
|
43
|
+
expect(lines[line]).to match(/^\| [0-9a-f]+ \| /)
|
44
|
+
end
|
45
|
+
expect(lines[-1]).to match(/^(\+-+){#{num_cols}}\+$/)
|
46
|
+
end
|
47
|
+
|
48
|
+
context 'list' do
|
49
|
+
it 'as table' do
|
50
|
+
stdout, stderr = murano_command_run('exchange list')
|
51
|
+
# 4 columns: elementId, name, status, description.
|
52
|
+
expect_exchange_element_table(stdout, stderr, num_cols: 4)
|
53
|
+
end
|
54
|
+
|
55
|
+
it 'only ids' do
|
56
|
+
stdout, stderr = murano_command_run('exchange list', '--idonly')
|
57
|
+
expect(stderr).to eq('')
|
58
|
+
stdout.lines.each do |line|
|
59
|
+
expect(line).to match(/^[0-9a-f]+$/)
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
it 'fewer fields' do
|
64
|
+
stdout, stderr = murano_command_run('exchange list', '--brief')
|
65
|
+
# 3 columns: elementId, name, status.
|
66
|
+
expect_exchange_element_table(stdout, stderr, num_cols: 3)
|
67
|
+
end
|
68
|
+
|
69
|
+
it 'as json' do
|
70
|
+
stdout, stderr = murano_command_run('exchange list', '-c', 'outformat=json')
|
71
|
+
expect(stderr).to eq('')
|
72
|
+
expect { JSON.parse(stdout) }.to_not raise_error
|
73
|
+
#expect(status.exitstatus).to eq(0)
|
74
|
+
end
|
75
|
+
|
76
|
+
it 'output to file' do
|
77
|
+
stdout, stderr = murano_command_run('exchange list', '--idonly', '-o', 'bob')
|
78
|
+
expect(stderr).to eq('')
|
79
|
+
expect(stdout).to eq('')
|
80
|
+
#expect(status.exitstatus).to eq(0)
|
81
|
+
expect(File.exist?('bob')).to be true
|
82
|
+
data = IO.read('bob')
|
83
|
+
expect(data).to match(/^(\S+\s)*\S+$/)
|
84
|
+
end
|
85
|
+
|
86
|
+
context 'purchase' do
|
87
|
+
# MAYBE/TESTME/2017-08-30: Cannot functional test 'exchange purchase'
|
88
|
+
# of 'available' element because you cannot un-add elements (you'd
|
89
|
+
# have to create a new business). We could add a unit test of
|
90
|
+
# MrMurano::Exchange.purchase, though. But it's just 4 statements,
|
91
|
+
# and the functional test here for adding an already added element
|
92
|
+
# also tests that same function. So probably no need to add test.
|
93
|
+
|
94
|
+
it 'is ambiguous name' do
|
95
|
+
# MEH/2017-08-31: This test is dependent on the platform having
|
96
|
+
# more than one element with the term 'IoT' in its name!
|
97
|
+
stdout, stderr = murano_command_exits('exchange purchase', 'IoT')
|
98
|
+
expect(stdout).to eq('')
|
99
|
+
expect(stderr).to a_string_starting_with(
|
100
|
+
'Please be more specific: More than one matching element was found: '
|
101
|
+
)
|
102
|
+
end
|
103
|
+
|
104
|
+
it 'is already added ID' do
|
105
|
+
element_name = 'Timer Service'
|
106
|
+
stdout, _stderr = murano_command_run('exchange list', element_name, '--idonly')
|
107
|
+
element_id = stdout.strip
|
108
|
+
stdout, stderr = murano_command_exits('exchange purchase', element_id)
|
109
|
+
expect(stdout).to eq('')
|
110
|
+
expect(stderr).to eq(
|
111
|
+
"The specified element has already been purchased: ‘#{element_name}’ (#{element_id})\n"
|
112
|
+
)
|
113
|
+
end
|
114
|
+
end
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
data/spec/cmd_help_spec.rb
CHANGED
@@ -1,25 +1,66 @@
|
|
1
|
+
# Last Modified: 2017.08.31 /coding: utf-8
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
# Copyright © 2016-2017 Exosite LLC.
|
5
|
+
# License: MIT. See LICENSE.txt.
|
6
|
+
# vim:tw=0:ts=2:sw=2:et:ai
|
7
|
+
|
1
8
|
require 'fileutils'
|
2
9
|
require 'open3'
|
3
10
|
require 'pathname'
|
11
|
+
|
12
|
+
require 'highline/import'
|
13
|
+
|
4
14
|
require 'cmd_common'
|
5
15
|
|
6
16
|
RSpec.describe 'murano help', :cmd do
|
7
|
-
include_context
|
17
|
+
include_context 'CI_CMD'
|
8
18
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
19
|
+
context 'using subshell' do
|
20
|
+
it 'no args' do
|
21
|
+
out, err, status = Open3.capture3(capcmd('murano'))
|
22
|
+
expect(err).to eq('')
|
23
|
+
expect(out).to_not eq('')
|
24
|
+
expect(status.exitstatus).to eq(0)
|
25
|
+
end
|
15
26
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
27
|
+
it 'as --help' do
|
28
|
+
out, err, status = Open3.capture3(capcmd('murano', '--help'))
|
29
|
+
expect(err).to eq('')
|
30
|
+
expect(out).to_not eq('')
|
31
|
+
expect(status.exitstatus).to eq(0)
|
32
|
+
end
|
21
33
|
end
|
22
34
|
|
35
|
+
context 'using commander' do
|
36
|
+
it 'no args' do
|
37
|
+
#cmd_verify_help('help')
|
38
|
+
stdout, stderr = murano_command_run('help')
|
39
|
+
# The :help command gets processed by optparse, since we did
|
40
|
+
# not call run!, and optparse looks at $0, which is 'rspec'.
|
41
|
+
expect(strip_color(stdout)).to start_with(
|
42
|
+
" NAME:\n\n #{File.basename $PROGRAM_NAME}\n\n DESCRIPTION:\n\n "
|
43
|
+
)
|
44
|
+
expect(stderr).to eq('')
|
45
|
+
end
|
46
|
+
|
47
|
+
it 'as --help' do
|
48
|
+
stdout, stderr = murano_command_wont_parse('help', '--help')
|
49
|
+
# See comment above; optparse uses $0, or 'rspec'.
|
50
|
+
expect(strip_color(stdout)).to start_with(
|
51
|
+
"Usage: #{File.basename $PROGRAM_NAME} [options]\n"
|
52
|
+
)
|
53
|
+
expect(stderr).to eq('')
|
54
|
+
end
|
55
|
+
|
56
|
+
# The version flag is processed in ::Commander::Runner.instance.run!,
|
57
|
+
# which we're not calling, and if we try to test it here, optparse
|
58
|
+
# ends up trying to handle it and barfs when it cannot find parser.ver
|
59
|
+
#it 'cannot test version' do
|
60
|
+
# #stdout, stderr = murano_command_run('-v')
|
61
|
+
# #stdout, stderr = murano_command_run('help', '-v')
|
62
|
+
# #stdout, stderr = murano_command_run('help', '--version')
|
63
|
+
#end
|
64
|
+
end
|
23
65
|
end
|
24
66
|
|
25
|
-
# vim: set ai et sw=2 ts=2 :
|
data/spec/cmd_init_spec.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Last Modified: 2017.08.
|
1
|
+
# Last Modified: 2017.08.29 /coding: utf-8
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
4
|
# Copyright © 2016-2017 Exosite LLC.
|
@@ -136,17 +136,6 @@ RSpec.describe 'murano init', :cmd do
|
|
136
136
|
expecting
|
137
137
|
end
|
138
138
|
|
139
|
-
def murano_solutions_expunge_yes
|
140
|
-
out, err, status = Open3.capture3(capcmd('murano', 'solutions', 'expunge', '-y'))
|
141
|
-
expect(out).to eq('').
|
142
|
-
or eq("No solutions found\n").
|
143
|
-
or eq("Deleted 1 solution\n").
|
144
|
-
or eq("Deleted 2 solutions\n")
|
145
|
-
expect(err).to eq('').
|
146
|
-
or eq("\e[31mNo solutions found\e[0m\n")
|
147
|
-
expect(status.exitstatus).to eq(0).or eq(1)
|
148
|
-
end
|
149
|
-
|
150
139
|
it "Won't init in HOME (gracefully)" do
|
151
140
|
# this is in the project dir. Want to be in HOME
|
152
141
|
Dir.chdir(ENV['HOME']) do
|
data/spec/cmd_link_spec.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Last Modified: 2017.08.
|
1
|
+
# Last Modified: 2017.08.30 /coding: utf-8
|
2
2
|
# frozen_string_literal: probably not yet
|
3
3
|
|
4
4
|
# Copyright © 2016-2017 Exosite LLC.
|
@@ -8,91 +8,113 @@
|
|
8
8
|
require 'fileutils'
|
9
9
|
require 'open3'
|
10
10
|
require 'pathname'
|
11
|
+
|
11
12
|
require 'cmd_common'
|
13
|
+
require 'MrMurano/Config'
|
12
14
|
|
13
15
|
RSpec.describe 'murano link', :cmd, :needs_password do
|
14
16
|
include_context "CI_CMD"
|
15
17
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
expect(out.chomp).to match(/^[a-zA-Z0-9]+$/)
|
21
|
-
expect(status.exitstatus).to eq(0)
|
18
|
+
context "without project" do
|
19
|
+
it "help" do
|
20
|
+
cmd_verify_help('link')
|
21
|
+
end
|
22
22
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
23
|
+
# 2017-08-30: The next two tests show the difference between using a
|
24
|
+
# subshell to run murano commands versus running them directly. The
|
25
|
+
# latter method lets us get coverage of the command modules.
|
26
|
+
context "subshell vs inline" do
|
27
|
+
context "using subshell" do
|
28
|
+
it "will not list" do
|
29
|
+
out, err, status = Open3.capture3(capcmd('murano', 'link', 'list'))
|
30
|
+
expect(strip_color(out)).to eq(MrMurano::Config::INVALID_PROJECT_HINT + "\n")
|
31
|
+
expecting = %(The "link list" command only works in a Murano project.\n)
|
32
|
+
expect(strip_color(err)).to eq(expecting)
|
33
|
+
expect(status.exitstatus).to eq(1)
|
34
|
+
end
|
35
|
+
end
|
33
36
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
37
|
+
context "using commander" do
|
38
|
+
it "will not list" do
|
39
|
+
stdout, stderr = murano_command_run('link list')
|
40
|
+
expect(stdout).to eq(MrMurano::Config::INVALID_PROJECT_HINT + "\n")
|
41
|
+
expect(stderr).to eq(
|
42
|
+
%(The "link list" command only works in a Murano project.\n)
|
43
|
+
)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
38
47
|
end
|
39
48
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
olines = out.lines
|
49
|
+
context "with project" do
|
50
|
+
before(:example) { project_up(skip_link: true) }
|
51
|
+
after(:example) { project_down }
|
44
52
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
# got: "Linked \xE2\x80\x98syncdowntestprd1e8b4034\xE2\x80\x99
|
50
|
-
# to \xE2\x80\x98syncdowntestapp23d5135b\xE2\x80\x99\n"
|
51
|
-
#
|
52
|
-
# or, to put it another way,
|
53
|
-
#
|
54
|
-
# -Linked ?syncdowntestprd1e8b4034? to ?syncdowntestapp23d5135b?
|
55
|
-
# +Linked ΓÇÿsyncdowntestprd1e8b4034ΓÇÖ to ΓÇÿsyncdowntestapp23d5135bΓÇÖ
|
56
|
-
#
|
57
|
-
# which we can solve with an encode call. (Or but using norm quotes.)
|
58
|
-
#
|
59
|
-
#expect(olines[0]).to eq("Linked ‘#{@solz_name}’ to ‘#{@solz_name}’\n")
|
60
|
-
expect(olines[0].encode!('UTF-8', 'UTF-8')).to eq("Linked ‘#{@solz_name}’ to ‘#{@solz_name}’\n")
|
53
|
+
it "links and lists" do
|
54
|
+
out, err, status = Open3.capture3(capcmd('murano', 'assign', 'set'))
|
55
|
+
#expect(out).to a_string_starting_with("Linked product #{@solz_name}")
|
56
|
+
olines = out.lines
|
61
57
|
|
62
|
-
|
63
|
-
|
64
|
-
|
58
|
+
# Windows has a complaint about the fancy quotes if you don't encode!, which is
|
59
|
+
#
|
60
|
+
# expected: "Linked \u2018syncdowntestprd1e8b4034\u2019
|
61
|
+
# to \u2018syncdowntestapp23d5135b\u2019\n"
|
62
|
+
# got: "Linked \xE2\x80\x98syncdowntestprd1e8b4034\xE2\x80\x99
|
63
|
+
# to \xE2\x80\x98syncdowntestapp23d5135b\xE2\x80\x99\n"
|
64
|
+
#
|
65
|
+
# or, to put it another way,
|
66
|
+
#
|
67
|
+
# -Linked ?syncdowntestprd1e8b4034? to ?syncdowntestapp23d5135b?
|
68
|
+
# +Linked ΓÇÿsyncdowntestprd1e8b4034ΓÇÖ to ΓÇÿsyncdowntestapp23d5135bΓÇÖ
|
69
|
+
#
|
70
|
+
# which we can solve with an encode call. (Or but using norm quotes.)
|
71
|
+
#
|
72
|
+
#expect(olines[0]).to eq("Linked ‘#{@solz_name}’ to ‘#{@solz_name}’\n")
|
73
|
+
expect(olines[0].encode!('UTF-8', 'UTF-8')).to eq(
|
74
|
+
"Linked ‘#{@proj_name_prod}’ to ‘#{@proj_name_appy}’\n"
|
75
|
+
)
|
65
76
|
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
77
|
+
expect(olines[1]).to eq("Created default event handler\n")
|
78
|
+
expect(err).to eq('')
|
79
|
+
expect(status.exitstatus).to eq(0)
|
80
|
+
|
81
|
+
out, err, status = Open3.capture3(capcmd('murano', 'assign', 'list'))
|
82
|
+
expect(err).to eq('')
|
83
|
+
olines = out.lines
|
84
|
+
expect(olines[0]).to match(/^(\+-+){3}\+$/)
|
85
|
+
expect(olines[1]).to match(/^\| name\s+\| script_key\s+\| service\s+\|$/)
|
86
|
+
expect(olines[2]).to match(/^(\+-+){3}\+$/)
|
87
|
+
expect(olines[-1]).to match(/^(\+-+){3}\+$/)
|
88
|
+
expect(status.exitstatus).to eq(0)
|
89
|
+
end
|
75
90
|
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
91
|
+
it "unlinks" do
|
92
|
+
out, err, status = Open3.capture3(capcmd('murano', 'assign', 'set'))
|
93
|
+
#expect(out).to a_string_starting_with("Linked product #{@solz_name}")
|
94
|
+
olines = out.lines
|
95
|
+
expect(olines[0].encode!('UTF-8', 'UTF-8')).to eq(
|
96
|
+
"Linked ‘#{@proj_name_prod}’ to ‘#{@proj_name_appy}’\n"
|
97
|
+
)
|
98
|
+
expect(olines[1]).to eq("Created default event handler\n")
|
99
|
+
expect(err).to eq('')
|
100
|
+
expect(status.exitstatus).to eq(0)
|
84
101
|
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
102
|
+
out, err, status = Open3.capture3(capcmd('murano', 'link', 'unset'))
|
103
|
+
#expect(out).to a_string_starting_with("Unlinked #{@solz_name}")
|
104
|
+
# E.g.,
|
105
|
+
# Unlinked ‘linktest3e7def1b86a1d680’ from ‘linktest3e7def1b86a1d680’\n
|
106
|
+
# Removed ‘h2thqll2z9sqoooc0_w4w3vxla11ngg4cok_event’ from ‘linktest3e7def1b86a1d680\n
|
107
|
+
olines = out.lines
|
108
|
+
expect(olines[0].encode!('UTF-8', 'UTF-8')).to eq(
|
109
|
+
"Unlinked ‘#{@proj_name_prod}’ from ‘#{@proj_name_appy}’\n"
|
110
|
+
)
|
111
|
+
expect(olines[1].encode!('UTF-8', 'UTF-8')).to a_string_starting_with("Removed ‘")
|
112
|
+
expect(olines[1].encode!('UTF-8', 'UTF-8')).to match(
|
113
|
+
/^Removed ‘[_a-z0-9]*’ from ‘#{@proj_name_appy}’\n$/
|
114
|
+
)
|
115
|
+
expect(err).to eq('')
|
116
|
+
expect(status.exitstatus).to eq(0)
|
117
|
+
end
|
96
118
|
end
|
97
119
|
end
|
98
120
|
|
data/spec/spec_helper.rb
CHANGED
@@ -17,29 +17,24 @@
|
|
17
17
|
#
|
18
18
|
require 'simplecov'
|
19
19
|
SimpleCov.start do
|
20
|
-
if ENV['CI_MR_EXE'].nil?
|
21
|
-
coverage_dir "coverage/cov-#{RUBY_VERSION.
|
20
|
+
if ENV['CI_MR_EXE'].nil?
|
21
|
+
coverage_dir "coverage/cov-#{RUBY_VERSION.tr('.', '_')}"
|
22
22
|
else
|
23
|
-
coverage_dir "coverage/cov-#{RUBY_VERSION.
|
23
|
+
coverage_dir "coverage/cov-#{RUBY_VERSION.tr('.', '_')}-exe"
|
24
24
|
end
|
25
|
-
add_group
|
26
|
-
add_group
|
27
|
-
add_group
|
25
|
+
add_group 'Specs', 'spec/.*'
|
26
|
+
add_group 'Solution', 'lib/MrMurano/Solution.*'
|
27
|
+
add_group 'Product', 'lib/MrMurano/Product.*'
|
28
28
|
|
29
|
-
track_files
|
29
|
+
track_files 'lib/MrMurano/*.rb'
|
30
30
|
end
|
31
31
|
|
32
32
|
require 'webmock/rspec'
|
33
33
|
|
34
34
|
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
35
35
|
RSpec.configure do |config|
|
36
|
-
|
37
|
-
if
|
38
|
-
config.filter_run_excluding :needs_password
|
39
|
-
end
|
40
|
-
if Gem.win_platform? then
|
41
|
-
config.filter_run_excluding :broken_on_windows
|
42
|
-
end
|
36
|
+
config.filter_run_excluding :needs_password if ENV['MURANO_PASSWORD'].nil?
|
37
|
+
config.filter_run_excluding :broken_on_windows if Gem.win_platform?
|
43
38
|
|
44
39
|
# rspec-expectations config goes here. You can use an alternate
|
45
40
|
# assertion/expectation library such as wrong or the stdlib/minitest
|
@@ -84,7 +79,7 @@ RSpec.configure do |config|
|
|
84
79
|
# Allows RSpec to persist some state between runs in order to support
|
85
80
|
# the `--only-failures` and `--next-failure` CLI options. We recommend
|
86
81
|
# you configure your source control system to ignore this file.
|
87
|
-
config.example_status_persistence_file_path =
|
82
|
+
config.example_status_persistence_file_path = '.rspec_examples.txt'
|
88
83
|
|
89
84
|
# Limits the available syntax to the non-monkey patched syntax that is
|
90
85
|
# recommended. For more details, see:
|
@@ -123,5 +118,5 @@ RSpec.configure do |config|
|
|
123
118
|
# test failures related to randomization by passing the same `--seed` value
|
124
119
|
# as the one that triggered the failure.
|
125
120
|
Kernel.srand config.seed
|
126
|
-
|
127
121
|
end
|
122
|
+
|