Class: SiSU_Info_Version::InfoVersion
Overview
Constant Summary
collapse
- @@lib_path =
nil
Instance Attribute Summary
#base_markup_dir_stub, #env, #etc, #filename, #flv, #fnb, #fnn, #fnt, #home, #hostname, #processing, #processing_git, #rc, #stub_pwd, #stub_src, #sys, #user, #webserv_host_cgi, #webserv_path, #webserv_port_cgi, #www, #yamlrc_dir
#ad, #fnb, #fnn, #fnt, #fnv, #fnz, #rc
Instance Method Summary
collapse
#ao, #arch, #asciidoc_ocn?, #bin, #build, #cgi, #cgi_sample_search_form_name, #cjk, #cjk_ja, #cjk_ko, #cjk_zh, #composite_file, #concord_max, #console_web_browser, #console_www_browser, #current_document, #defaults, #digest, #digest_conf?, #dir_url, #docbook_viewer, #encoding, #epub, #epub_bld, #epub_cp_images, #epub_viewer, #feed, #feed_home, #fictionbook_viewer, #file_encoding, #font, #git, #host, #html, #html_minitoc?, #html_navigation?, #html_navigation_bar?, #html_quick_ref?, #html_right_pane?, #html_scroll_1, #html_scroll_2, #html_search_form?, #html_seg_1, #html_seg_2, #html_seg_title_banner?, #html_top_band?, #i18n, #image_external, #image_source, #image_source_include, #image_source_include_local, #image_source_include_remote, #image_source_sisu_includes, #images, #images_epub, #images_external, #images_local, #initialize, #landscape, #lang_filename, #language, #language_default_set, #length, #links_to_manifest?, #listed?, #local, #locale, #localhost, #lout, #main, #make, #man, #manifest?, #manifest_minitoc?, #manpage, #manpage_generator, #manpage_viewer, #markdown_ocn?, #markup_emphasis, #metadata?, #minitoc?, #mono, #ocn?, #odf, #odf_pth, #odf_viewer, #odt, #odt_bld, #odt_ocn?, #omit_list, #orgmode_ocn?, #output, #output_tell, #papersize, #path, #path_rel_links, #paths, #pattern, #pdf, #pdf_viewer, #pdflatex, #php, #plaintext_ocn?, #plaintext_wrap, #po, #port, #portrait, #postgresql, #pot, #processing_base_tmp, #processing_path, #processing_sisupod, #program, #promo?, #pwd, #rbver, #read_source_file, #read_source_file_array, #read_source_file_string, #remote, #rexml, #rmagick, #root, #root_dir, #rst_ocn?, #sample_data, #sample_search_form_title, #sans, #scripts, #search?, #search_action, #search_fixed?, #search_form, #search_form?, #search_form_static, #segsubtoc?, #serif, #share, #sisupod_gen, #sisupod_gen_v2, #sisupod_gen_v3, #sisupod_v2, #sisupod_v3, #sisupod_v4, #sisurc_path, #sitearch, #size, #source_file_path, #source_file_processing_array, #source_file_with_path, #sql, #sqlite, #src_pod, #src_txt, #stub_dir, #stub_dir_orig, #stub_epub, #stub_md_harvest, #stub_pod, #style, #tex, #texi, #texinfo, #texpdf, #texpdf_hyperlinks, #text_editor, #textile_ocn?, #tidy, #tmp_root_dir, #toc?, #tune, #txt, #type, #url, #usr_dir?, #wc, #web_browser, #webrick, #webrick_port, #webserv, #webserv_base, #webserv_base_cgi, #webserv_cgi, #webserv_dir, #webserv_files_from_db, #webserv_host_base, #webserv_image, #webserv_map_pwd, #webserv_stub_ensure, #widget, #widget_static, #www_browser, #xml_docbook_ocn?, #xml_editor, #xml_fictionbook_ocn?, #xml_scaffold_ocn?, #xml_viewer, #yamlrc
#by?, #by_filename?, #by_filetype?, #by_language_code?, #default_language?, #document_language_versions_found, #dump?, #filename, #initialize, #lang, #mono_multi_lingual?, #multilingual?, #output_dir_structure, #published_manifests?, #redirect?
Instance Method Details
#date ⇒ Object
100
101
102
|
# File 'lib/sisu/se_version.rb', line 100
def date
version_details_hash[:date]
end
|
#date_stamp ⇒ Object
103
104
105
|
# File 'lib/sisu/se_version.rb', line 103
def date_stamp
version_details_hash[:date_stamp]
end
|
#get_version ⇒ Object
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
# File 'lib/sisu/se_version.rb', line 75
def get_version
version={}
@pwd=ENV['PWD']
lib_path=
@@lib_path \
? @@lib_path
: `echo $RUBYLIB`.split(':')
@@lib_path ||=lib_path
if File.exist?(SiSU_is.version_info_path?)
version=YAML::load(File::open(SiSU_is.version_info_path?))
end
version[:install_method]=if SiSU_is.runtime_type? ==:gem_install
spec = Gem::Specification.find_by_name("sisu")
gem_root = spec.gem_dir
(File.dirname(__FILE__.gsub(/\/lib\/sisu}/,'')) == gem_root) \
? ' (ruby gem install)' : ''
else ''
end
@version=version
def version_details_hash
@version
end
def project
version_details_hash[:project]
end
def date
version_details_hash[:date]
end
def date_stamp
version_details_hash[:date_stamp]
end
def version
version_details_hash[:version]
end
def version_major
@version_major=version_details_hash[:version].gsub(/([0-9]+)\.[0-9]+\.[0-9]+/,'\1')
end
def install_method
version_details_hash[:install_method]
end
self
end
|
#install_method ⇒ Object
112
113
114
|
# File 'lib/sisu/se_version.rb', line 112
def install_method
version_details_hash[:install_method]
end
|
#project ⇒ Object
97
98
99
|
# File 'lib/sisu/se_version.rb', line 97
def project
version_details_hash[:project]
end
|
#rbversion ⇒ Object
117
118
119
|
# File 'lib/sisu/se_version.rb', line 117
def rbversion
%x{ruby -v}.strip
end
|
#version ⇒ Object
106
107
108
|
# File 'lib/sisu/se_version.rb', line 106
def version
version_details_hash[:version]
end
|
#version_details_hash ⇒ Object
94
95
96
|
# File 'lib/sisu/se_version.rb', line 94
def version_details_hash
@version
end
|
#version_major ⇒ Object
109
110
111
|
# File 'lib/sisu/se_version.rb', line 109
def version_major
@version_major=version_details_hash[:version].gsub(/([0-9]+)\.[0-9]+\.[0-9]+/,'\1')
end
|