odania 0.0.6 → 0.0.7

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
  SHA1:
3
- metadata.gz: 0b7f0eb0f8e98355d2f2c62738b3f0ec6456573a
4
- data.tar.gz: 43a389d5cb2168f23420a570bb8158cb54181f45
3
+ metadata.gz: 4dd53efcdc3595571e4bacf2bd488d4fcf136881
4
+ data.tar.gz: 662aecdd663c3ec58953ebfdb8098209b5c566da
5
5
  SHA512:
6
- metadata.gz: d9bc97ed1789ec53522357caff4c091afa3e8b0e9a27b64034c137a9e02693e0f095026564efe015e524cf64537d705cbcd691b28926190468cab7d3cc6a2a3a
7
- data.tar.gz: fdabd4178a199acfffded9ee9818077981e27e79aff40d7845077eac5f0e2353aa4d5eec8149c552ae40791e9b7393d173f7b8cbef9b05331a74d81ec17b2b3d
6
+ metadata.gz: f4891c0fe75fa6d49ba7d1f299c68bde3fee609a12d054deec36820fb8467c73c7dbb2413700e712519d5bd7e8f70dac49fde2c597242cafaaa46b45d8cb2f5a
7
+ data.tar.gz: 5fcc053e93287ae8601328c956d8a1c37a8cddb34f0222d52cedfbec579c9701d9adfd0edfcfdea2cbaa8f26b97a26f379b01e5544c64517ebcecaa4a6344026
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- odania (0.0.6)
4
+ odania (0.0.7)
5
5
  diplomat
6
6
 
7
7
  GEM
data/lib/odania/plugin.rb CHANGED
@@ -39,12 +39,20 @@ module Odania
39
39
 
40
40
  # Generate a unique number for this instance of the plugin
41
41
  def get_plugin_instance_name(plugin_name)
42
- available_plugins = retrieve_value(get_plugin_path(plugin_name))
42
+ puts 'Detecting plugin instance name'
43
+ plugin_instance_name_file = '/tmp/plugin_instance_name'
44
+
45
+ plugin_instance_name = nil
46
+ plugin_instance_name = File.read plugin_instance_name_file if File.exists? plugin_instance_name_file
47
+ return plugin_instance_name unless plugin_instance_name.nil?
43
48
 
49
+ available_plugins = retrieve_value(get_plugin_path(plugin_name))
44
50
  puts 'Current plugins'
45
51
  puts available_plugins.inspect
46
52
 
47
- "#{plugin_name}_#{available_plugins.length + 1}"
53
+ plugin_instance_name = "#{plugin_name}_#{available_plugins.length + 1}"
54
+ File.write plugin_instance_name_file, plugin_instance_name
55
+ plugin_instance_name
48
56
  end
49
57
  end
50
58
  end
@@ -1,3 +1,3 @@
1
1
  module Odania
2
- VERSION = '0.0.6'
2
+ VERSION = '0.0.7'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: odania
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Petersen