MrMurano 1.12.1 → 1.12.2

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: d8d8d36a38e4e9224fe18419fa46c209b617fb1e
4
- data.tar.gz: 1821d92046439a529a13dc4e24bf63ddddc6ad15
3
+ metadata.gz: fdd3bdb5220940ecb37b96cfa4cd8c86bf043c07
4
+ data.tar.gz: f0b313c7dedaac8fed947689ef10d41daec4e952
5
5
  SHA512:
6
- metadata.gz: 885dd022085c78c25fde01506207f278e7cd38b27dce925c5fe83b636f123783cd6ca9600ea6ba32f413ed2546354048eed13d01bec48548e67fc1a08095791d
7
- data.tar.gz: ce90dbb3756e0b8151621db399cdbc38528f0bee94aa15304494cbc9b7686b9b84a3fa7addb72aff72ea3a027cf4fb711842f702b604205720d6d88951d177d6
6
+ metadata.gz: 658910e61e71a22e79529eb137a5e2520e2a85e8bcaab37864b62d3dbebf013756cff5d0505f1c86f0ec0c2f0dd282a82a71c2a83d4934572f2f658297c3ef48
7
+ data.tar.gz: b78214ed79cec9564a609d042a4cff50b97f5f0822c5bd02a6ae5894d0215a6f317c66fa0ebbbaa0bfefa59e125de5f3bf348101da20ef30010c20f8af608f5b
data/Rakefile CHANGED
@@ -1,4 +1,5 @@
1
1
  require "bundler/gem_tasks"
2
+ require 'shellwords'
2
3
 
3
4
  task :default => [:test]
4
5
 
@@ -78,6 +79,14 @@ namespace :push do
78
79
  # upload gem
79
80
  sh %{github-release upload --tag #{tagName} --name #{gemName} --file #{builtGem}}
80
81
  end
82
+
83
+ desc "Copy tag commit message into Release Notes"
84
+ task :copyReleaseNotes do
85
+ tagMsg = `git tag -l -n999 #{tagName}`.lines
86
+ tagMsg.shift
87
+ msg = tagMsg.join().shellescape
88
+ sh %{github-release edit --tag #{tagName} --description #{msg}}
89
+ end
81
90
  end
82
91
  end
83
92
 
@@ -114,7 +114,7 @@ module MrMurano
114
114
  remove(item[:rid])
115
115
  end
116
116
  r = create(item[:alias], item[:format])
117
- raise "Create Failed: #{r}" unless r.empty?
117
+ raise "Create Failed: #{r}" unless r.nil?
118
118
  end
119
119
 
120
120
  ## Use alias for doing sync compares
@@ -105,11 +105,11 @@ module MrMurano
105
105
  end
106
106
 
107
107
  def searchFor
108
- $cfg['endpoints.searchFor'].split
108
+ ($cfg['endpoints.searchFor'] or '').split
109
109
  end
110
110
 
111
111
  def ignoring
112
- $cfg['endpoints.ignoring'].split
112
+ ($cfg['endpoints.ignoring'] or '').split
113
113
  end
114
114
 
115
115
  def tolocalname(item, key)
@@ -145,10 +145,10 @@ module MrMurano
145
145
  end
146
146
 
147
147
  def searchFor
148
- $cfg['files.searchFor'].split
148
+ ($cfg['files.searchFor'] or '').split
149
149
  end
150
150
  def ignoring
151
- $cfg['files.ignoring'].split
151
+ ($cfg['files.ignoring'] or '').split
152
152
  end
153
153
 
154
154
  # def localitems(from)
@@ -180,11 +180,11 @@ module MrMurano
180
180
  end
181
181
 
182
182
  def searchFor
183
- $cfg['modules.searchFor'].split
183
+ ($cfg['modules.searchFor'] or '').split
184
184
  end
185
185
 
186
186
  def ignoring
187
- $cfg['modules.ignoring'].split
187
+ ($cfg['modules.ignoring'] or '').split
188
188
  end
189
189
 
190
190
  def toRemoteItem(from, path)
@@ -225,11 +225,11 @@ module MrMurano
225
225
  end
226
226
 
227
227
  def searchFor
228
- $cfg['eventhandler.searchFor'].split
228
+ ($cfg['eventhandler.searchFor'] or '').split
229
229
  end
230
230
 
231
231
  def ignoring
232
- $cfg['eventhandler.ignoring'].split
232
+ ($cfg['eventhandler.ignoring'] or '').split
233
233
  end
234
234
 
235
235
  def list
@@ -0,0 +1,80 @@
1
+
2
+ command 'show' do |c|
3
+ c.syntax = %(mr show)
4
+ c.summary = %(Show readable information about the current configuration)
5
+ c.description = %(Show readable information about the current configuration)
6
+
7
+ c.action do |args, options|
8
+
9
+ if args.include?('help') then
10
+ ::Commander::UI.enable_paging
11
+ say MrMurano::SubCmdGroupHelp.new(c).get_help
12
+ else
13
+ acc = MrMurano::Account.new
14
+
15
+ selectedBusinessId = $cfg['business.id']
16
+ selectedBusiness = nil
17
+ acc.businesses.each do |row|
18
+ selectedBusiness = row if row[:bizid] == selectedBusinessId
19
+ end
20
+
21
+ selectedProductId = $cfg['product.id']
22
+ selectedProduct = nil
23
+ acc.products.each do |row|
24
+ selectedProduct = row if row[:modelId] == selectedProductId
25
+ end
26
+
27
+ selectedSolutionId = $cfg['solution.id']
28
+ selectedSolution = nil
29
+ acc.solutions.each do |row|
30
+ selectedSolution = row if row[:apiId] == selectedSolutionId
31
+ end
32
+
33
+ if $cfg['user.name'] then
34
+ puts %(user: #{$cfg['user.name']})
35
+ else
36
+ puts 'no user selected'
37
+ end
38
+
39
+ if selectedBusiness then
40
+ puts %(business: #{selectedBusiness[:name]})
41
+ else
42
+ puts 'no business selected'
43
+ end
44
+
45
+ if selectedProduct then
46
+ puts %(product: #{selectedProduct[:label]})
47
+ else
48
+ if selectedProductId then
49
+ puts 'selected product not in business'
50
+ else
51
+ puts 'no product selected'
52
+ end
53
+ end
54
+
55
+ if selectedSolution then
56
+ puts %(solution: https://#{selectedSolution[:domain]})
57
+ else
58
+ if selectedSolutionId then
59
+ puts 'selected solution not in business'
60
+ else
61
+ puts 'no solution selected'
62
+ end
63
+ end
64
+
65
+ end
66
+ end
67
+ end
68
+
69
+ command 'show location' do |c|
70
+ c.syntax = %(mr show location)
71
+ c.summary = %(Show readable location information)
72
+ c.description = %(Show readable information about the current configuration)
73
+
74
+ c.action do |args, options|
75
+ puts %(base: #{$cfg['location.base']})
76
+ $cfg['location'].each { |key, value| puts %(#{key}: #{$cfg['location.base']}/#{value}) }
77
+ end
78
+ end
79
+
80
+ # vim: set ai et sw=2 ts=2 :
@@ -1,4 +1,4 @@
1
1
  module MrMurano
2
- VERSION = '1.12.1'.freeze
2
+ VERSION = '1.12.2'.freeze
3
3
  end
4
4
 
@@ -99,10 +99,10 @@ RSpec.describe MrMurano::ProductResources do
99
99
  :calls=>[{:id=>1,
100
100
  :procedure=>"drop",
101
101
  :arguments=>["abcdefg"]} ]}).
102
- to_return(body: [{:id=>1, :status=>"ok", :result=>{}}])
102
+ to_return(body: [{:id=>1, :status=>"ok"}])
103
103
 
104
104
  ret = @prd.remove("abcdefg")
105
- expect(ret).to eq({})
105
+ expect(ret).to be_nil
106
106
  end
107
107
 
108
108
  it "Creates" do
@@ -126,10 +126,10 @@ RSpec.describe MrMurano::ProductResources do
126
126
  :calls=>[{:id=>1,
127
127
  :procedure=>"map",
128
128
  :arguments=>["alias", frid, "bob"]} ]}).
129
- to_return(body: [{:id=>1, :status=>"ok", :result=>{}}])
129
+ to_return(body: [{:id=>1, :status=>"ok"}])
130
130
 
131
131
  ret = @prd.create("bob")
132
- expect(ret).to eq({})
132
+ expect(ret).to be_nil
133
133
  end
134
134
  end
135
135
 
@@ -141,7 +141,7 @@ RSpec.describe MrMurano::ProductResources do
141
141
  :calls=>[{:id=>1,
142
142
  :procedure=>"drop",
143
143
  :arguments=>[frid]} ]}).
144
- to_return(body: [{:id=>1, :status=>"ok", :result=>{}}])
144
+ to_return(body: [{:id=>1, :status=>"ok"}])
145
145
 
146
146
  stub_request(:post, "https://bizapi.hosted.exosite.io/api:1/product/XYZ/proxy/onep:v1/rpc/process").
147
147
  with(body: {:auth=>{:client_id=>"LLLLLLLLLL"},
@@ -162,7 +162,7 @@ RSpec.describe MrMurano::ProductResources do
162
162
  :calls=>[{:id=>1,
163
163
  :procedure=>"map",
164
164
  :arguments=>["alias", frid, "bob"]} ]}).
165
- to_return(body: [{:id=>1, :status=>"ok", :result=>{}}])
165
+ to_return(body: [{:id=>1, :status=>"ok"}])
166
166
 
167
167
  @prd.upload(nil, {:alias=>"bob", :format=>"string", :rid=>frid}, true)
168
168
  end
@@ -188,7 +188,7 @@ RSpec.describe MrMurano::ProductResources do
188
188
  :calls=>[{:id=>1,
189
189
  :procedure=>"map",
190
190
  :arguments=>["alias", frid, "bob"]} ]}).
191
- to_return(body: [{:id=>1, :status=>"ok", :result=>{}}])
191
+ to_return(body: [{:id=>1, :status=>"ok"}])
192
192
 
193
193
  @prd.upload(nil, {:alias=>"bob", :format=>"string"}, false)
194
194
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: MrMurano
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.12.1
4
+ version: 1.12.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Conrad Tadpol Tilstra
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-10 00:00:00.000000000 Z
11
+ date: 2017-01-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: commander
@@ -240,6 +240,7 @@ files:
240
240
  - lib/MrMurano/commands/productList.rb
241
241
  - lib/MrMurano/commands/productSpec.rb
242
242
  - lib/MrMurano/commands/productWrite.rb
243
+ - lib/MrMurano/commands/show.rb
243
244
  - lib/MrMurano/commands/solution.rb
244
245
  - lib/MrMurano/commands/solutionCreate.rb
245
246
  - lib/MrMurano/commands/solutionDelete.rb