activecypher 0.2.0 → 0.3.0

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: b78e44e773d760db977af2feadbb8da2feae14d361e530a9ce0c300b3488316e
4
- data.tar.gz: 867b1beeed8d8f2a42d49b61c33be85fbc97e431b1a5d212ffdd676b9fc5cde3
3
+ metadata.gz: 56e09b9d8193d2c4c745c1973bb420ba83854cbe0b578d5d37d4e215c96c7687
4
+ data.tar.gz: a53e722376ff97ae59c6fc0735c16eb15b9e2fe89fe45cda6d42c5d45237a97f
5
5
  SHA512:
6
- metadata.gz: 6ab032c06695810f847c679dcadddec8af51c4c4a6c53425f04561cf92f2d558876b775cd40d535e40c66c654e33474752d7438eeb91fa5d2f3450b1fe46fd53
7
- data.tar.gz: 14120d94c9f0fb83765631ab06efe2da72cf2939ea6d24a2fade76911384b4df0cc992f828aa55e10326730e3388b2703746647dcfc577d49c9245be70dfeedd
6
+ metadata.gz: bd26475b4774f41f37b047c558707c7fe5282718c8970f1a24148c3f6ad57186ad7b0823051e06d420d80373605f8d28721b7f934dd64e0110b05050af6af7f9
7
+ data.tar.gz: 20b688e0788fe8dd84a51471ee2125d8ce8082304d4e9db724d4970b0e27da638fd4e541030982b582716d5ad1c1f86d1e88c3fbb3605437bab05c96a5e2b832
@@ -15,6 +15,17 @@ module ActiveCypher
15
15
  env ||= defined?(Rails) ? Rails.env : ENV.fetch('CY_ENV', 'development')
16
16
  file = Pathname.new(path || default_path)
17
17
 
18
+ # Handle missing config file gracefully
19
+ unless file.exist?
20
+ # If requesting all configs, return empty hash
21
+ return {}.with_indifferent_access if name.to_s == '*'
22
+ # If silent missing is set, return nil for specific connection
23
+ return nil if ENV['ACTIVE_CYPHER_SILENT_MISSING'] == 'true'
24
+
25
+ # Otherwise, raise a descriptive error
26
+ raise "Could not load ActiveCypher configuration. No such file - #{file}. Please run 'rails generate active_cypher:install' to create the configuration file."
27
+ end
28
+
18
29
  ## ------------------------------------------------------------
19
30
  ## 1. Parse YAML using the same algorithm Rails::Application#config_for
20
31
  ## uses (shared‑section merge, ERB, symbolize_keys, etc.)
@@ -1,28 +1,16 @@
1
- shared:
2
- ssl: false # Because encryption is for people who deploy to the public internet on purpose
3
-
4
1
  development:
5
- primary: &local_memgraph
6
- adapter: neo4j # Because you like your graphs with a touch of existential dread
7
- uri: neo4j://localhost:7687 # Port 7687: also known as Neo4j’s VIP lounge
8
- username: neo4j # Default username because who has time for originality
9
- password: neo4j # Seriously. Change this. Right now. I can see you not doing it.
10
- multi_db: false # One DB to rule them all, because multiple would involve effort
2
+ primary:
3
+ adapter: neo4j # Because you like your graphs with a touch of existential dread
4
+ url: neo4j://neo4j:neo4j@localhost:7687 # VIP port, VIP credentials (change them, seriously)
5
+ multi_db: false # One DB to rule them all
11
6
 
12
7
  test:
13
8
  primary:
14
- <<: *local_memgraph # Reusing the dev config like a true copy-paste warrior
15
- uri: bolt://localhost:9876 # Different port, same chaos
9
+ url: neo4j://neo4j:neo4j@localhost:9876 # Different port, same chaos
10
+ multi_db: false
16
11
 
17
12
  production:
18
13
  primary:
19
- adapter: memgraph # Yes, it’s still memgraph... for now...
20
- uri: bolt+s://<%= ENV["MG_HOST"] %>:7687 # Now with SSL, because prod gets the good stuff
21
- username: <%= ENV["MG_USER"] %> # You should probably not hardcode "admin"
22
- password: <%= ENV["MG_PASS"] %> # Hopefully not "password123"
23
- ssl: true # SSL: Because “oops, we got hacked” is a bad press release
24
- multi_db: <%= ENV.fetch("MG_MULTI_DB", "false") %> # Default is "false" because complexity is scary and licensing is expensive
25
-
26
- # Bonus content:
27
- # Neo4j used to run prod but got demoted when Memgraph bought us lunch
28
- # RIP Neo4j: gone but not forgotten... mostly because we still pay for the license
14
+ adapter: memgraph # Yes, still memgraph... for now...
15
+ url: memgraph+ssc://<%= ENV["MG_USER"] %>:<%= ENV["MG_PASS"] %>@<%= ENV["MG_HOST"] %>:7687
16
+ multi_db: <%= ENV.fetch("MG_MULTI_DB", "false") %> # Because complexity is a luxury
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActiveCypher
4
- VERSION = '0.2.0'
4
+ VERSION = '0.3.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activecypher
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Abdelkader Boudih
@@ -193,7 +193,6 @@ files:
193
193
  - lib/cyrel/return_only.rb
194
194
  - lib/cyrel/types/hash_type.rb
195
195
  - lib/cyrel/types/symbol_type.rb
196
- - lib/tasks/active_cypher_tasks.rake
197
196
  - sig/activecypher.rbs
198
197
  homepage: https://github.com/seuros/activecypher
199
198
  licenses:
@@ -1,6 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # desc "Explaining what the task does"
4
- # task :active_vector do
5
- # # Task goes here
6
- # end