needle_in_a_haystack 1.0.7 → 1.0.8

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 718b7304ea4ef3e86857b3952c4b006e322277d789dcc76a65c8dc17e27b0bd9
4
- data.tar.gz: 224dd77d2955d35c4c385bd628e705d131e11700e60de3f4ee785ddb1ca74dd6
3
+ metadata.gz: 2459b38c1c9073454786482d6e95688ac2d1cc22142962b5629f8ebc62b6c1c9
4
+ data.tar.gz: 18c7c8a8c85e23084cc2c6f651879b89d00553d70db47cd51c40c426e259e916
5
5
  SHA512:
6
- metadata.gz: d3aa136ace9cebc46612328471e932816ef65e4831ea264ef32e62c9423aaa3c8230c01adbf0ac7cc44c258bd80e3907eb48763c938d0afe3a7a899359188b7f
7
- data.tar.gz: 4dcfb4bd59a773d466f050fe00b0d308b309268a59238a2e4b8b9b6a60ae81f0c14934d9d7c54a39ba08ed09d01c13d000e073b952cc6e6951b51caf6981d955
6
+ metadata.gz: 9c4c0b9eb3d402e7f017399b3b781d30ff4bfe8733d23fb5aca52bb6375f8053d1ad23f27f8ee62663a5c4214c93636f5f5542ae5855919dec1f161fbec69133
7
+ data.tar.gz: db728fd4f7606029d8a06e696a61c6800b20d382848c66cdce018ae10abf18dbe83a8a9054c2cdf2e1c17fba1e990e9aae53e84984d11d1109aaf382d563067e
@@ -11,7 +11,7 @@ class HaystackTag < BaseTag
11
11
  validate :prevent_circular_reference
12
12
  validate :ensure_identity
13
13
 
14
- CATEGORIES = YAML.load_file("/Users/frans/Documents/fouriq/fouriq_haystack/lib/haystack_ontology.yml")
14
+ CATEGORIES = YAML.load_file(PATH_ONTOLOGY)
15
15
 
16
16
  def ancestors
17
17
  ancestors = []
@@ -1 +1 @@
1
- VERSION = "1.0.7".freeze
1
+ VERSION = "1.0.8".freeze
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: needle_in_a_haystack
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7
4
+ version: 1.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Frans Verberne
@@ -112,9 +112,7 @@ files:
112
112
  - lib/needle_in_a_haystack/strategies/query_strategy.rb
113
113
  - lib/needle_in_a_haystack/strategies/tag_strategy.rb
114
114
  - lib/needle_in_a_haystack/version.rb
115
- - lib/tasks/location_create.rake
116
115
  - spec/models/haystack_tag_spec.rb
117
- - spec/strategies/find_by_tags_strategy_spec.rb
118
116
  homepage: https://www.fouriq.nl
119
117
  licenses:
120
118
  - Nonstandard
@@ -1,7 +0,0 @@
1
- namespace :locations do
2
- desc "Interactive location creator"
3
- task create: :environment do
4
- load "app/services/location_creator.rb"
5
- LocationCreator.start
6
- end
7
- end
@@ -1,38 +0,0 @@
1
- require "rails_helper"
2
-
3
- RSpec.describe FindByTagsStrategy, type: :strategy do
4
- let(:bedroom) { HaystackTag.create(name: "bedRoom", description: "A Bedroom") }
5
- let(:lora) { HaystackTag.create(name: "loraMeter", description: "A Lora Meter") }
6
- let(:indoor_temp) { HaystackTag.create(name: "tempIndoor", description: "A Indoor temperature sensor") }
7
- let(:device) { Device.create(name: "Device1") }
8
- let(:point) { Point.create }
9
-
10
- before do
11
- device.haystack_tags << [bedroom, lora]
12
- folder = device.folders.create(name: "Folder1")
13
- folder.points << point
14
- point.haystack_tags << [indoor_temp, bedroom]
15
- end
16
-
17
- describe "#execute" do
18
- context "when finding devices by tags" do
19
- it "returns devices with the specified tags" do
20
- strategy = described_class.new(Device, [bedroom, lora])
21
- context = QueryContext.new(strategy)
22
- result = context.execute
23
-
24
- expect(result).to include(device)
25
- end
26
- end
27
-
28
- context "when finding points by tags" do
29
- it "returns points with the specified tags" do
30
- strategy = described_class.new(Point, [indoor_temp])
31
- context = QueryContext.new(strategy)
32
- result = context.execute
33
-
34
- expect(result).to include(point)
35
- end
36
- end
37
- end
38
- end