rubybuntu-gedit 11.08.19 → 11.08.20
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.
- data/bin/rubybuntu-gedit +92 -41
- data/data/styles/rubybuntu1.xml +2 -3
- data/rubybuntu-gedit.gemspec +1 -1
- metadata +64 -34
data/bin/rubybuntu-gedit
CHANGED
@@ -2,8 +2,13 @@
|
|
2
2
|
# The installer was done as fast as possible, so
|
3
3
|
# TODO use dry and maintainable ruby code :D
|
4
4
|
|
5
|
+
# # #
|
5
6
|
# enable colors if possible
|
6
|
-
|
7
|
+
begin
|
8
|
+
require 'paint'
|
9
|
+
rescue LoadError
|
10
|
+
end
|
11
|
+
|
7
12
|
unless defined? Paint
|
8
13
|
module Paint
|
9
14
|
def self.[](*args)
|
@@ -12,11 +17,31 @@ unless defined? Paint
|
|
12
17
|
end
|
13
18
|
end
|
14
19
|
|
20
|
+
# # #
|
21
|
+
# parse command line stuff
|
15
22
|
if ARGV.shift != 'install'
|
16
23
|
warn 'Currently, only "rubybuntu-gedit install" is supported. Quitting...'
|
17
24
|
exit
|
18
25
|
end
|
19
26
|
|
27
|
+
if ARGV.empty?
|
28
|
+
@todo = [:specs, :mime, :styles, :snippets]
|
29
|
+
else
|
30
|
+
@todo = []
|
31
|
+
case ARGV.shift
|
32
|
+
when /specs/
|
33
|
+
@todo << :specs
|
34
|
+
when /mime/
|
35
|
+
@todo << :mime
|
36
|
+
when /styles/
|
37
|
+
@todo << :styles
|
38
|
+
when /snippets/
|
39
|
+
@todo << :snippets
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
# # #
|
44
|
+
# helper methods
|
20
45
|
def action(what)
|
21
46
|
if what && !what.empty?
|
22
47
|
puts Paint["x] #{what}", :yellow]
|
@@ -26,63 +51,89 @@ end
|
|
26
51
|
|
27
52
|
def check_existence(what, sudo = true)
|
28
53
|
if File.exists?(what)
|
29
|
-
print "
|
30
|
-
"
|
31
|
-
action gets.chop =~ /^y?$/i
|
32
|
-
"sudo rm -f #{what}"
|
33
|
-
: nil
|
54
|
+
print "Q] The installer found an outdated file at \"#{what}\"\n" \
|
55
|
+
" It's recommended to remove it. Do you want to remove it? [Yn] "
|
56
|
+
action("sudo rm -f #{what}") if gets.chop =~ /^y?$/i
|
34
57
|
end
|
35
58
|
end
|
36
59
|
|
37
|
-
@data = File.dirname(__FILE__) + "/../data"
|
38
|
-
|
39
|
-
puts 'Welcome to the rubybuntu-gedit installer :D'
|
40
|
-
puts 'Before each action I\'ll tell you what I am going to do'
|
41
|
-
puts Paint['Please note: ', :bold] + 'I am pretty untested and might destroy your computer'
|
42
|
-
|
43
60
|
# # #
|
44
61
|
# language specs
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
"
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
62
|
+
def specs
|
63
|
+
puts Paint["\nLet's start with copying the language specs\n", :underline]
|
64
|
+
print "Q] Do you want to install the languages specs as sudo [/usr/share/gtksourceview-2.0/language-specs]\n" \
|
65
|
+
" or in your home directory [~/.local/share/gtksourceview-2.0/language-specs]? [Sh] "
|
66
|
+
if gets.chop =~ /^s?$/i
|
67
|
+
action "sudo cp #@data/language-specs/*.lang /usr/share/gtksourceview-2.0/language-specs"
|
68
|
+
else
|
69
|
+
action "mkdir -p ~/.local/share/gtksourceview-2.0/language-specs\n" \
|
70
|
+
" cp #@data/language-specs/*.lang ~/.local/share/gtksourceview-2.0/language-specs"
|
71
|
+
end
|
72
|
+
|
73
|
+
check_existence '/usr/share/gtksourceview-2.0/language-specs/rhtml.lang', true
|
74
|
+
check_existence '/usr/share/gtksourceview-2.0/language-specs/ruby_on_rails.lang', true
|
75
|
+
check_existence '~/.local/share/gtksourceview-2.0/language-specs/rhtml.lang', false
|
76
|
+
check_existence '~/.local/share/gtksourceview-2.0/language-specs/ruby_on_rails.lang', false
|
77
|
+
end
|
56
78
|
|
57
79
|
# # #
|
58
80
|
# mime
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
81
|
+
def mime
|
82
|
+
puts Paint["\nNow the mime types should be updated\n", :underline]
|
83
|
+
print "Q] Do you want to install the mime types as sudo [/usr/share/mime/packages]\n" \
|
84
|
+
" or in your home directory [~/.local/share/gtksourceview-2.0/language-specs]? [Sh] "
|
85
|
+
if gets.chop =~ /^s?$/i
|
86
|
+
action "sudo cp #@data/mime/*.xml /usr/share/mime/packages\n" \
|
87
|
+
" sudo update-mime-database /usr/share/mime"
|
88
|
+
else
|
89
|
+
action "mkdir -p ~/.local/share/mime/packages\n" \
|
90
|
+
" cp #@data/mime/*.xml ~/.local/share/mime/packages" \
|
91
|
+
" update-mime-database ~/.local/share/mime"
|
92
|
+
end
|
93
|
+
|
94
|
+
check_existence '/usr/share/mime/rails.xml', true
|
95
|
+
check_existence '~/.local/share/mime/rails.xml', false
|
96
|
+
end
|
70
97
|
|
71
98
|
# # #
|
72
99
|
# styles
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
"
|
100
|
+
def styles
|
101
|
+
puts Paint["\nNow, some styles get copied that use the new language specs :)\n", :underline]
|
102
|
+
print "Q] Do you want to install the styles as sudo [/usr/share/gtksourceview-2.0/styles]\n" \
|
103
|
+
" or in your home directory [~/.local/share/gtksourceview-2.0/styles]? [Sh] "
|
104
|
+
if gets.chop =~ /^s?$/i
|
105
|
+
action "sudo cp #@data/styles/*.xml /usr/share/gtksourceview-2.0/styles"
|
106
|
+
else
|
107
|
+
action "mkdir -p ~/.local/share/gtksourceview-2.0/styles\n" \
|
108
|
+
" cp #@data/language-specs/*.lang ~/.local/share/gtksourceview-2.0/styles"
|
109
|
+
end
|
110
|
+
end
|
79
111
|
|
80
112
|
# # #
|
81
113
|
# snippets
|
82
|
-
|
114
|
+
def snippets
|
115
|
+
puts Paint["\nSorry, currently, the snippets cannot installed via this installer\n", :underline]
|
116
|
+
puts "...\n"
|
117
|
+
end
|
118
|
+
|
83
119
|
|
120
|
+
# # #
|
121
|
+
# run
|
122
|
+
@data = File.dirname(__FILE__) + "/../data"
|
123
|
+
|
124
|
+
puts
|
125
|
+
puts Paint["Welcome to the rubybuntu-gedit installer :D", :green]
|
126
|
+
puts 'Before each action I\'ll tell you what I am going to do'
|
127
|
+
puts Paint['Please note: ', :bold] + 'I am pretty untested and might destroy your computer'
|
128
|
+
|
129
|
+
@todo.each{|todo| send todo }
|
130
|
+
|
131
|
+
puts
|
84
132
|
puts Paint["Congratulations! You've updated your gedit stuff! (if everything worked correctly)", :green]
|
133
|
+
puts
|
85
134
|
puts "If not, please install manually and open an issue on github"
|
86
135
|
puts 'Don\'t forget to change your gedit style to "RubyBuntu One" ;)'
|
87
136
|
puts
|
88
137
|
puts " J-_-L"
|
138
|
+
puts
|
139
|
+
|
data/data/styles/rubybuntu1.xml
CHANGED
@@ -69,7 +69,7 @@
|
|
69
69
|
<style name="def:string" foreground="#a0a0a0"/>
|
70
70
|
<style name="ruby:string-delimiter" foreground="#9f7979"/>
|
71
71
|
<style name="def:special-char" foreground="#dcdcdc"/>
|
72
|
-
<style name="def:character"
|
72
|
+
<style name="def:character" use-style="def:string"/><!-- question mark notation -->
|
73
73
|
|
74
74
|
<style name="ruby:system" foreground="#b5bb9d"/>
|
75
75
|
<style name="ruby:system-delimiter" foreground="#929b6d"/>
|
@@ -82,7 +82,7 @@
|
|
82
82
|
|
83
83
|
<style name="def:number" foreground="#6d9cbe"/>
|
84
84
|
<style name="def:decimal" foreground="#6d9cbe" bold="true"/><!-- integer -->
|
85
|
-
<style name="def:base-n-integer" foreground="#6d9cbe" italic="true"/>
|
85
|
+
<style name="def:base-n-integer" foreground="#6d9cbe" bold="true" italic="true"/>
|
86
86
|
|
87
87
|
<style name="def:error" strikethrough="true"/>
|
88
88
|
|
@@ -99,7 +99,6 @@
|
|
99
99
|
<style name="def:reserved" italic="true"/>
|
100
100
|
<style name="def:statement" foreground="#aa7b55"/>
|
101
101
|
|
102
|
-
|
103
102
|
<!-- other ruby stuff-->
|
104
103
|
<style name="erb:tag" foreground="#ff592c"/>
|
105
104
|
<style name="erb:output" foreground="#ff342c"/>
|
data/rubybuntu-gedit.gemspec
CHANGED
@@ -3,7 +3,7 @@ require 'rubygems' unless defined? Gem
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "rubybuntu-gedit"
|
6
|
-
s.version =
|
6
|
+
s.version = '11.08.20'#Time.now.strftime("%y.%m.%d")
|
7
7
|
s.authors = ["Jan Lelis", "Snippets by Christoph Olszowka", "Please see individual files for author and license"]
|
8
8
|
s.email = "mail@janlelis.de"
|
9
9
|
s.homepage = "https://github.com/janlelis/rubybuntu-gedit"
|
metadata
CHANGED
@@ -1,37 +1,47 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubybuntu-gedit
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 79
|
5
5
|
prerelease:
|
6
|
+
segments:
|
7
|
+
- 11
|
8
|
+
- 8
|
9
|
+
- 20
|
10
|
+
version: 11.08.20
|
6
11
|
platform: ruby
|
7
|
-
authors:
|
12
|
+
authors:
|
8
13
|
- Jan Lelis
|
9
14
|
- Snippets by Christoph Olszowka
|
10
15
|
- Please see individual files for author and license
|
11
16
|
autorequire:
|
12
17
|
bindir: bin
|
13
18
|
cert_chain: []
|
14
|
-
|
15
|
-
|
16
|
-
|
19
|
+
|
20
|
+
date: 2011-08-19 00:00:00 Z
|
21
|
+
dependencies:
|
22
|
+
- !ruby/object:Gem::Dependency
|
17
23
|
name: paint
|
18
|
-
|
24
|
+
prerelease: false
|
25
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
19
26
|
none: false
|
20
|
-
requirements:
|
21
|
-
- -
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
|
27
|
+
requirements:
|
28
|
+
- - ">="
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
hash: 3
|
31
|
+
segments:
|
32
|
+
- 0
|
33
|
+
version: "0"
|
24
34
|
type: :runtime
|
25
|
-
|
26
|
-
|
27
|
-
description: Ruby/Rails/Web related gedit language definitions, mime types, styles
|
28
|
-
and snippets.
|
35
|
+
version_requirements: *id001
|
36
|
+
description: Ruby/Rails/Web related gedit language definitions, mime types, styles and snippets.
|
29
37
|
email: mail@janlelis.de
|
30
|
-
executables:
|
38
|
+
executables:
|
31
39
|
- rubybuntu-gedit
|
32
40
|
extensions: []
|
41
|
+
|
33
42
|
extra_rdoc_files: []
|
34
|
-
|
43
|
+
|
44
|
+
files:
|
35
45
|
- bin/rubybuntu-gedit
|
36
46
|
- README.rdoc
|
37
47
|
- data/language-specs/ruby-erb.lang
|
@@ -97,30 +107,50 @@ files:
|
|
97
107
|
- Rakefile
|
98
108
|
- rubybuntu-gedit.gemspec
|
99
109
|
homepage: https://github.com/janlelis/rubybuntu-gedit
|
100
|
-
licenses:
|
110
|
+
licenses:
|
101
111
|
- GPL
|
102
|
-
post_install_message: !
|
103
|
-
|
104
|
-
|
112
|
+
post_install_message: !binary |
|
113
|
+
ICAgICAgIOKUjOKUgOKUgCBpbmZvIOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKU
|
114
|
+
gOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKU
|
115
|
+
gOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKU
|
116
|
+
kAogSi1fLUwg4pSCIGh0dHBzOi8vZ2l0aHViLmNvbS9qYW5sZWxpcy9ydWJ5
|
117
|
+
YnVudHUtZ2VkaXQg4pSCCiAgICAgICDilJzilIDilIAgdXNhZ2Ug4pSA4pSA
|
118
|
+
4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pSA
|
119
|
+
4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pSA
|
120
|
+
4pSA4pSA4pSA4pSA4pSkCiAgICAgICDilIIgcnVieWJ1bnR1LWdlZGl0IGlu
|
121
|
+
c3RhbGwgICAgICAgICAgICAgICAgICAgICDilIIKICAgICAgIOKUlOKUgOKU
|
122
|
+
gOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKU
|
123
|
+
gOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKU
|
124
|
+
gOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUmA==
|
125
|
+
|
105
126
|
rdoc_options: []
|
106
|
-
|
127
|
+
|
128
|
+
require_paths:
|
107
129
|
- lib
|
108
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
130
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
109
131
|
none: false
|
110
|
-
requirements:
|
111
|
-
- -
|
112
|
-
- !ruby/object:Gem::Version
|
113
|
-
|
114
|
-
|
132
|
+
requirements:
|
133
|
+
- - ">="
|
134
|
+
- !ruby/object:Gem::Version
|
135
|
+
hash: 3
|
136
|
+
segments:
|
137
|
+
- 0
|
138
|
+
version: "0"
|
139
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
115
140
|
none: false
|
116
|
-
requirements:
|
117
|
-
- -
|
118
|
-
- !ruby/object:Gem::Version
|
119
|
-
|
141
|
+
requirements:
|
142
|
+
- - ">="
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
hash: 3
|
145
|
+
segments:
|
146
|
+
- 0
|
147
|
+
version: "0"
|
120
148
|
requirements: []
|
149
|
+
|
121
150
|
rubyforge_project:
|
122
|
-
rubygems_version: 1.8.
|
151
|
+
rubygems_version: 1.8.6
|
123
152
|
signing_key:
|
124
153
|
specification_version: 3
|
125
154
|
summary: Ruby/Web devoloper's gedit
|
126
155
|
test_files: []
|
156
|
+
|