y_petri 2.4.8 → 2.4.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,14 +1,12 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  # The following are the YSupport components used by YPetri:
4
- require 'y_support/local_object' # object aware of its creation scope
5
- require 'y_support/respond_to' # Symbol#~@ + RespondTo#===
6
4
  require 'y_support/name_magic' # naming by assignment & more
7
5
  require 'y_support/unicode' # ç means self.class
8
6
  require 'y_support/typing' # run-time assertions
9
7
  require 'y_support/core_ext' # core extensions
10
8
  require 'y_support/stdlib_ext/matrix' # matrix extensions
11
- require 'y_support/kde' # popup file with kioclient
9
+ require 'y_support/misc'
12
10
 
13
11
  # ActiveSupport components:
14
12
  require 'active_support/core_ext/module/delegation'
@@ -71,18 +71,23 @@ module YPetri::Net::Visualization
71
71
  end
72
72
  }
73
73
  # Generate output image.
74
- puts File.expand_path "~/y_petri_graph.png"
75
- γ.output png: File.expand_path( "~/y_petri_graph.png" )
76
- # require 'y_support/kde'
77
- YSupport::KDE.show_file_with_kioclient File.expand_path( "~/y_petri_graph.png" )
74
+
75
+ # Note: The following code is good on Linux systems only
76
+ # puts File.expand_path "~/y_petri_graph.png"
77
+ # γ.output png: File.expand_path( "~/y_petri_graph.png" )
78
+
79
+ γ.output png: 'y_petri_graph.png'
80
+
81
+ # The last line only works on KDE systems.
82
+ show_file_with_kioclient File.expand_path( "~/y_petri_graph.png" )
78
83
  end
79
84
 
80
85
  private
81
86
 
82
87
  # Display a file with kioclient (KDE).
83
88
  #
84
- def show_file_with_kioclient( file_name )
89
+ def show_file_with_kioclient( file_name_with_path )
85
90
  system "sleep 0.2; kioclient exec 'file:%s'" %
86
- File.expand_path( '.', file_name )
91
+ File.expand_path( '.', file_name_with_path )
87
92
  end
88
93
  end # module YPetri::Net::Visualization
@@ -1,4 +1,4 @@
1
1
  module YPetri
2
- VERSION = "2.4.8"
2
+ VERSION = "2.4.9"
3
3
  DEBUG = false
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: y_petri
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.8
4
+ version: 2.4.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - boris
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-28 00:00:00.000000000 Z
11
+ date: 2016-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -130,8 +130,13 @@ files:
130
130
  - ".gitignore"
131
131
  - ACKNOWLEDGMENT.txt
132
132
  - Gemfile
133
+ - Introduction_to_Ruby_for_YPetri_and_YNelson_Users.lyx
133
134
  - Introduction_to_Ruby_for_YPetri_and_YNelson_Users.pdf
135
+ - Introduction_to_YPetri_and_YNelson.lyx
136
+ - Introduction_to_YPetri_and_YNelson.pdf
134
137
  - LICENSE.txt
138
+ - Object_model_of_YPetri_and_YNelson.lyx
139
+ - Object_model_of_YPetri_and_YNelson.pdf
135
140
  - README.md
136
141
  - Rakefile
137
142
  - lib/y_petri.rb