rspec-openhab-scripting 1.0.1 → 1.0.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
  SHA256:
3
- metadata.gz: '081cb83fa410165a1c537444929816faae13f6a7b6b55b003fef54035eedb57c'
4
- data.tar.gz: 93befbd99da2d87f0e251f919f541e7982cb438a559f305ce0113ea8afb6e9ea
3
+ metadata.gz: dc03fc7377be69a2c03c83d60bbc9faab0e6fc343dde9876b9acbb3b6320826d
4
+ data.tar.gz: b509c499d267a18e4adbeffb1f744a57b2b81ca027f97300b712f3f71f4119ff
5
5
  SHA512:
6
- metadata.gz: 0e254f2f46b7fef68311e8c695d60a36e1986813edac3cdc61e232b7acdc69d25fc437fde7ef344e13d7a38306683d1a965442c73a360a73ac491b20b59ba35e
7
- data.tar.gz: 2ef07f698950dfc5b877566f4656c4cf7f3be4f05626b59c9740e362e132bb34d2ad6df613ce91fe366a8f834f78fea92a2e3f0cd808b161def17970f11a6d4d
6
+ metadata.gz: 6f623a8485f6d2e0f85e265855167f1b3818a1060bb2528dd8f7045327f375f54bd89e392beec84807b47ac825c861f46282605e0d8e0b30e97d159be2df75a5
7
+ data.tar.gz: 2b8d9371d764fea96ebb401f1f389abce1bae4e04c33ba31c2927d00b1b2f12df99d0dc6020972d3a5c27d2935ff47c700a5554c0985877ae73234696d0c169d
@@ -217,8 +217,15 @@ module RSpec
217
217
  next unless metadata.uid.namespace == "autoupdate"
218
218
 
219
219
  to_add << metadata
220
+
221
+ # 3.2.0 can't remove single namespaces from the GenericMetadataProvider, so
222
+ # we have to remove everything from the item
223
+ unless gmp.respond_to?(:remove_metadata_by_namespace)
224
+ to_add.concat(gmp.all.select { |m2| m2.uid.item_name == metadata.uid.item_name })
225
+ gmp.remove_metadata(metadata.uid.item_name)
226
+ end
220
227
  end
221
- gmp.remove_metadata_by_namespace("autoupdate")
228
+ gmp.remove_metadata_by_namespace("autoupdate") if gmp.respond_to?(:remove_metadata_by_namespace)
222
229
 
223
230
  to_add.each do |m|
224
231
  if mmp.get(m.uid)
@@ -326,7 +326,6 @@ module RSpec
326
326
  org.openhab.core.thing.internal.console.FirmwareUpdateConsoleCommandExtension
327
327
  ],
328
328
  # the following bundles are blocked completely from starting
329
- "org.apache.felix.fileinstall" => nil,
330
329
  "org.apache.karaf.http.core" => nil,
331
330
  "org.apache.karaf.features.command" => nil,
332
331
  "org.apache.karaf.shell.commands" => nil,
@@ -545,15 +544,16 @@ module RSpec
545
544
  # import global variables and constants that openhab-scripting gem expects,
546
545
  # since we're going to be running it in this same VM
547
546
  def set_jruby_script_presets
548
- wait_for_service("org.openhab.core.automation.module.script.internal.ScriptExtensionManager") do |sem|
547
+ wait_for_service("org.openhab.core.automation.module.script.ScriptEngineFactory",
548
+ filter: "(service.config.description.uri=automation:jruby)") do |jrubyscripting|
549
+ # "org.openhab.core.automation.module.script.internal.ScriptExtensionManager") do |sem|
550
+ sem = ::OpenHAB::Core::OSGI.service(
551
+ "org.openhab.core.automation.module.script.internal.ScriptExtensionManager"
552
+ )
549
553
  # since we're not created by the ScriptEngineManager, this never gets set; manually set it
550
554
  $se = $scriptExtension = ScriptExtensionManagerWrapper.new(sem)
551
555
  scope_values = sem.find_default_presets("rspec")
552
556
  scope_values = scope_values.entry_set
553
- jrubyscripting = ::OpenHAB::Core::OSGI.services(
554
- "org.openhab.core.automation.module.script.ScriptEngineFactory",
555
- filter: "(service.pid=org.openhab.automation.jrubyscripting)"
556
- ).first
557
557
 
558
558
  %w[mapInstancePresets mapGlobalPresets].each do |method_name|
559
559
  method = jrubyscripting.class.java_class.get_declared_method(method_name, java.util.Map::Entry.java_class)
@@ -696,7 +696,7 @@ module RSpec
696
696
  startlevels = File.read(config_file)
697
697
  startlevels.sub!(",rules:refresh,rules:dslprovider", "")
698
698
 
699
- target_file = "#{oh_userdata}/etc/services.cfg"
699
+ target_file = "#{oh_userdata}/services.cfg"
700
700
  target_file_contents = File.read(target_file) if File.exist?(target_file)
701
701
  File.write(target_file, startlevels) unless target_file_contents == startlevels
702
702
  java.lang.System.set_property("openhab.servicecfg", target_file)
@@ -732,6 +732,13 @@ module RSpec
732
732
  File.write("#{oh_userdata}/etc/org.apache.karaf.features.xml", <<~XML)
733
733
  <?xml version="1.0" encoding="UTF-8"?>
734
734
  <featuresProcessing xmlns="http://karaf.apache.org/xmlns/features-processing/v1.0.0" xmlns:f="http://karaf.apache.org/xmlns/features/v1.6.0">
735
+ <!-- From OpenHAB 3.2.0 -->
736
+ <bundleReplacements>
737
+ <bundle originalUri="mvn:org.ops4j.pax.logging/pax-logging-api/[0,2.0.13)" replacement="mvn:org.ops4j.pax.logging/pax-logging-api/2.0.13" mode="maven" />
738
+ <bundle originalUri="mvn:org.ops4j.pax.logging/pax-logging-log4j2/[0,2.0.13)" replacement="mvn:org.ops4j.pax.logging/pax-logging-log4j2/2.0.13" mode="maven" />
739
+ <bundle originalUri="mvn:org.ops4j.pax.logging/pax-logging-logback/[0,2.0.13)" replacement="mvn:org.ops4j.pax.logging/pax-logging-logback/2.0.13" mode="maven" />
740
+ </bundleReplacements>
741
+
735
742
  <blacklistedFeatures>
736
743
  <feature>openhab-runtime-ui</feature>
737
744
  <feature>openhab-core-ui*</feature>
@@ -757,6 +764,7 @@ module RSpec
757
764
  <f:feature>openhab-core-storage-json</f:feature>
758
765
  <f:feature>openhab-automation-jrubyscripting</f:feature>
759
766
  <f:feature>openhab-transport-http</f:feature>
767
+ <f:feature prerequisite="true">wrapper</f:feature>
760
768
  <f:bundle>mvn:org.openhab.core.bundles/org.openhab.core.karaf/#{version}</f:bundle>
761
769
  </feature>
762
770
  </replacement>
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RSpec
4
4
  module OpenHAB
5
- VERSION = "1.0.1"
5
+ VERSION = "1.0.2"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,184 +1,184 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-openhab-scripting
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cody Cutrer
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
  date: 2022-09-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: faraday
15
14
  requirement: !ruby/object:Gem::Requirement
16
15
  requirements:
17
16
  - - "~>"
18
17
  - !ruby/object:Gem::Version
19
18
  version: '2.3'
20
- type: :runtime
19
+ name: faraday
21
20
  prerelease: false
21
+ type: :runtime
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '2.3'
27
27
  - !ruby/object:Gem::Dependency
28
- name: net-http-persistent
29
28
  requirement: !ruby/object:Gem::Requirement
30
29
  requirements:
31
30
  - - "~>"
32
31
  - !ruby/object:Gem::Version
33
32
  version: '4.0'
34
- type: :runtime
33
+ name: net-http-persistent
35
34
  prerelease: false
35
+ type: :runtime
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '4.0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: openhab-scripting
43
42
  requirement: !ruby/object:Gem::Requirement
44
43
  requirements:
45
44
  - - "~>"
46
45
  - !ruby/object:Gem::Version
47
46
  version: '4.42'
48
- type: :runtime
47
+ name: openhab-scripting
49
48
  prerelease: false
49
+ type: :runtime
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '4.42'
55
55
  - !ruby/object:Gem::Dependency
56
- name: rspec-core
57
56
  requirement: !ruby/object:Gem::Requirement
58
57
  requirements:
59
58
  - - "~>"
60
59
  - !ruby/object:Gem::Version
61
60
  version: '3.11'
62
- type: :runtime
61
+ name: rspec-core
63
62
  prerelease: false
63
+ type: :runtime
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '3.11'
69
69
  - !ruby/object:Gem::Dependency
70
- name: timecop
71
70
  requirement: !ruby/object:Gem::Requirement
72
71
  requirements:
73
72
  - - "~>"
74
73
  - !ruby/object:Gem::Version
75
74
  version: '0.9'
76
- type: :runtime
75
+ name: timecop
77
76
  prerelease: false
77
+ type: :runtime
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0.9'
83
83
  - !ruby/object:Gem::Dependency
84
- name: irb
85
84
  requirement: !ruby/object:Gem::Requirement
86
85
  requirements:
87
86
  - - "~>"
88
87
  - !ruby/object:Gem::Version
89
88
  version: '1.4'
90
- type: :development
89
+ name: irb
91
90
  prerelease: false
91
+ type: :development
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: '1.4'
97
97
  - !ruby/object:Gem::Dependency
98
- name: rake
99
98
  requirement: !ruby/object:Gem::Requirement
100
99
  requirements:
101
100
  - - "~>"
102
101
  - !ruby/object:Gem::Version
103
102
  version: '13.0'
104
- type: :development
103
+ name: rake
105
104
  prerelease: false
105
+ type: :development
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
110
  version: '13.0'
111
111
  - !ruby/object:Gem::Dependency
112
- name: rspec
113
112
  requirement: !ruby/object:Gem::Requirement
114
113
  requirements:
115
114
  - - "~>"
116
115
  - !ruby/object:Gem::Version
117
116
  version: '3.11'
118
- type: :development
117
+ name: rspec
119
118
  prerelease: false
119
+ type: :development
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
124
  version: '3.11'
125
125
  - !ruby/object:Gem::Dependency
126
- name: rubocop
127
126
  requirement: !ruby/object:Gem::Requirement
128
127
  requirements:
129
128
  - - "~>"
130
129
  - !ruby/object:Gem::Version
131
130
  version: '1.23'
132
- type: :development
131
+ name: rubocop
133
132
  prerelease: false
133
+ type: :development
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
138
  version: '1.23'
139
139
  - !ruby/object:Gem::Dependency
140
- name: rubocop-performance
141
140
  requirement: !ruby/object:Gem::Requirement
142
141
  requirements:
143
142
  - - "~>"
144
143
  - !ruby/object:Gem::Version
145
144
  version: '1.12'
146
- type: :development
145
+ name: rubocop-performance
147
146
  prerelease: false
147
+ type: :development
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - "~>"
151
151
  - !ruby/object:Gem::Version
152
152
  version: '1.12'
153
153
  - !ruby/object:Gem::Dependency
154
- name: rubocop-rake
155
154
  requirement: !ruby/object:Gem::Requirement
156
155
  requirements:
157
156
  - - "~>"
158
157
  - !ruby/object:Gem::Version
159
158
  version: '0.6'
160
- type: :development
159
+ name: rubocop-rake
161
160
  prerelease: false
161
+ type: :development
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - "~>"
165
165
  - !ruby/object:Gem::Version
166
166
  version: '0.6'
167
167
  - !ruby/object:Gem::Dependency
168
- name: rubocop-rspec
169
168
  requirement: !ruby/object:Gem::Requirement
170
169
  requirements:
171
170
  - - "~>"
172
171
  - !ruby/object:Gem::Version
173
172
  version: '2.11'
174
- type: :development
173
+ name: rubocop-rspec
175
174
  prerelease: false
175
+ type: :development
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
178
  - - "~>"
179
179
  - !ruby/object:Gem::Version
180
180
  version: '2.11'
181
- description:
181
+ description:
182
182
  email: cody@cutrer.us'
183
183
  executables: []
184
184
  extensions: []
@@ -210,7 +210,7 @@ licenses:
210
210
  - MIT
211
211
  metadata:
212
212
  rubygems_mfa_required: 'true'
213
- post_install_message:
213
+ post_install_message:
214
214
  rdoc_options: []
215
215
  require_paths:
216
216
  - lib
@@ -225,8 +225,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
225
225
  - !ruby/object:Gem::Version
226
226
  version: '0'
227
227
  requirements: []
228
- rubygems_version: 3.3.7
229
- signing_key:
228
+ rubygems_version: 3.2.29
229
+ signing_key:
230
230
  specification_version: 4
231
231
  summary: Library testing OpenHAB ruby rules with rspec.
232
232
  test_files: []