func_e 0.0.3 → 0.0.5

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: 94b7493d7e162c78e41b8325055831e56c85de17fbd83fde8eb6a09fdefa3a03
4
- data.tar.gz: 1ea3538f4f86b34411e27f136596770f416d377da4e3fbf2cc401cc5181e5eb1
3
+ metadata.gz: 03d79cc58581d2b50d1c2f5e3b461b0f7d8f95bf173d8f8a87174963d9b3bb8e
4
+ data.tar.gz: cac711c8e9976711cdd9f1a8ffb6475af977d8f5a48c60f4000f82cbdd99b4b8
5
5
  SHA512:
6
- metadata.gz: 03de902a67807ee8682064230cfd4acf51e9516538c0c77eb4b860f1dc5fa1b51595dd35ba51b2d02db96bfd9dd06d54dd0ee8aee8886c80399dd6f494ffb889
7
- data.tar.gz: 845c3d6a77fe7687ed758c36f29d8b50720db2a8ead4226d5cf999a2fce4637f9a67f4d27b279c67c32965b87fa86f5747db3a7300f304c2360769b89dc6f273
6
+ metadata.gz: 36a14915583fdb6bf948a58ab14b343ac1bf0bf4bff69537dac3bc19e7d3796ba08afc037eee99fe96b2c596f4e381e3bdaa5bc5c645cff14758cbfdaea55f7e
7
+ data.tar.gz: c1ba5cbbcc7026350feeedd706aa8586a647eca69d4a1da48406c56b6ee33c21c853c24ed86eb4ee48c282da903b9159d2dd160d5297de0735f14e7604ca5c37
data/lib/func_e/config.rb CHANGED
@@ -8,12 +8,12 @@ module FuncE
8
8
  class Config
9
9
  include Singleton
10
10
 
11
+ DEFAULT_INSTALL_DIR = 'funcs'
12
+
11
13
  attr_accessor :fn_dir_path
12
14
 
13
15
  def self.configure
14
16
  yield instance
15
-
16
- @fn_dir_path = 'funcs' if @fn_dir_path.nil?
17
17
  end
18
18
 
19
19
  def self.config
@@ -26,11 +26,11 @@ module FuncE
26
26
 
27
27
  def self.install_path
28
28
  if defined?(Rails)
29
- Rails.root.join(@fn_dir_path)
29
+ Rails.root.join(@fn_dir_path || DEFAULT_INSTALL_DIR)
30
30
  elsif defined?(Bundler)
31
- Bundler.root.join(@fn_dir_path)
31
+ Bundler.root.join(@fn_dir_path || DEFAULT_INSTALL_DIR)
32
32
  else
33
- Dir.pwd
33
+ Pathname.new(Dir.pwd).join(@fn_dir_path || DEFAULT_INSTALL_DIR)
34
34
  end
35
35
  end
36
36
  end
data/lib/func_e.rb CHANGED
@@ -1,6 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'json'
3
4
  require 'terrapin'
5
+
4
6
  require 'func_e/func'
5
7
  require 'func_e/config'
6
8
 
@@ -17,6 +19,6 @@ module FuncE
17
19
  end
18
20
 
19
21
  def self.line
20
- Terrapin::CommandLine.new("node #{RUNNER_PATH}", '--path=:path --payload=:payload', logger: Logger.new($stdout))
22
+ Terrapin::CommandLine.new("node #{RUNNER_PATH}", '--path=:path --payload=:payload')
21
23
  end
22
24
  end
@@ -4,7 +4,6 @@ namespace :func_e do
4
4
  desc 'Install func_e by generating the functions directory to the root of your project'
5
5
 
6
6
  task :install do
7
- Dir.mkdir(FuncE::Config.install_path)
8
7
  template = Pathname.new(__dir__).join('template')
9
8
  FileUtils.cp_r "#{template}/.", FuncE::Config.install_path
10
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: func_e
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastian Scholl
@@ -10,32 +10,18 @@ bindir: exe
10
10
  cert_chain: []
11
11
  date: 2024-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: json
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '2.0'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '2.0'
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: terrapin
29
15
  requirement: !ruby/object:Gem::Requirement
30
16
  requirements:
31
- - - "~>"
17
+ - - ">="
32
18
  - !ruby/object:Gem::Version
33
19
  version: '0.6'
34
20
  type: :runtime
35
21
  prerelease: false
36
22
  version_requirements: !ruby/object:Gem::Requirement
37
23
  requirements:
38
- - - "~>"
24
+ - - ">="
39
25
  - !ruby/object:Gem::Version
40
26
  version: '0.6'
41
27
  description: FuncE is a lightweight Ruby gem that allows developers to call JavaScript
@@ -78,7 +64,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
78
64
  - !ruby/object:Gem::Version
79
65
  version: '0'
80
66
  requirements: []
81
- rubygems_version: 3.5.5
67
+ rubygems_version: 3.5.18
82
68
  signing_key:
83
69
  specification_version: 4
84
70
  summary: FuncE provides an interface between Node.js functions and Ruby applications,