rmthemegen 0.0.33 → 0.0.37
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/geanyfy.rb +11 -11
- data/lib/rmthemegen/version.rb +1 -1
- data/rmthemegen.gemspec +3 -3
- metadata +4 -5
- data/lib/geanyfy.rb +0 -45
data/bin/geanyfy.rb
CHANGED
@@ -2,22 +2,24 @@
|
|
2
2
|
|
3
3
|
#this is to open all of the editable text files in the current and all subdirectories into geany
|
4
4
|
if !File.exist?("/usr/bin/geany")
|
5
|
-
exit "
|
5
|
+
exit "Put geany or a link to it in /usr/bin and this will work. "
|
6
6
|
end
|
7
7
|
|
8
8
|
class Geanyfy
|
9
9
|
attr_accessor :filelist, :openables, :subs
|
10
10
|
|
11
11
|
def initialize
|
12
|
-
@openables = ["php","rb","sql","py","h","c","java"]
|
12
|
+
@openables = ["*.php","*.rb","*.sql","*.py","*.h","*.c","*.java","*.js","*.html","*.htm","*.css", "*.xml"]
|
13
13
|
@filelist = []
|
14
14
|
@subs = []
|
15
|
+
get_file_list(ENV["PWD"])
|
16
|
+
open_all_files
|
15
17
|
end
|
16
18
|
|
17
19
|
def get_file_list(curdir)
|
18
20
|
match_openables(curdir)
|
19
|
-
|
20
|
-
|
21
|
+
alldirs = Dir.glob(curdir+"/**")
|
22
|
+
alldirs.each do |f|
|
21
23
|
get_file_list(f) if File.directory?(f) && ![".",".."].include?( f)
|
22
24
|
end
|
23
25
|
end
|
@@ -26,20 +28,18 @@ class Geanyfy
|
|
26
28
|
#returns an array of filenames that are of the type specified by @openables
|
27
29
|
@openables.each do |o|
|
28
30
|
dir_string += File::SEPARATOR if dir_string[-1,1] != File::SEPARATOR
|
29
|
-
@filelist.concat Dir[dir_string+
|
31
|
+
@filelist.concat Dir[dir_string+o]
|
30
32
|
end
|
31
|
-
end
|
33
|
+
end
|
32
34
|
|
33
35
|
def open_all_files
|
34
|
-
@open_string = "geany "
|
36
|
+
@open_string = "/usr/bin/geany "
|
35
37
|
@filelist.each do |f|
|
36
38
|
@open_string += " " + f
|
37
39
|
end
|
38
|
-
|
40
|
+
@open_string += " & "
|
41
|
+
`#{@open_string} `
|
39
42
|
end
|
40
43
|
end
|
41
44
|
|
42
45
|
g=Geanyfy.new
|
43
|
-
g.get_file_list(File.dirname(__FILE__))
|
44
|
-
|
45
|
-
g.open_all_files
|
data/lib/rmthemegen/version.rb
CHANGED
data/rmthemegen.gemspec
CHANGED
@@ -4,7 +4,7 @@ require "rmthemegen/version"
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |s|
|
6
6
|
s.name = "rmthemegen"
|
7
|
-
s.version = "0.0.
|
7
|
+
s.version = "0.0.37"
|
8
8
|
s.platform = Gem::Platform::RUBY
|
9
9
|
s.authors = ["David Heitzman"]
|
10
10
|
s.email = ["evolvemeans@gmail.com"]
|
@@ -20,11 +20,11 @@ Gem::Specification.new do |s|
|
|
20
20
|
|
21
21
|
s.add_dependency('rake')
|
22
22
|
s.bindir = "bin"
|
23
|
-
s.executables = ['bin/generate_themes.rb']
|
23
|
+
s.executables = ['bin/generate_themes.rb','bin/geanyfy.rb','bin/geanyfix.rb']
|
24
24
|
|
25
25
|
s.files = `git ls-files`.split("\n")
|
26
26
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
27
27
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
28
|
-
s.require_paths = ["lib",
|
28
|
+
s.require_paths = ["lib","bin","test"]
|
29
29
|
|
30
30
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rmthemegen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 85
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 37
|
10
|
+
version: 0.0.37
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- David Heitzman
|
@@ -82,7 +82,6 @@ files:
|
|
82
82
|
- bin/geany_fix.rb
|
83
83
|
- bin/geanyfy.rb
|
84
84
|
- bin/generate_themes.rb
|
85
|
-
- lib/geanyfy.rb
|
86
85
|
- lib/rmthemegen.rb
|
87
86
|
- lib/rmthemegen/color/color.rb
|
88
87
|
- lib/rmthemegen/color/color/cmyk.rb
|
@@ -205,8 +204,8 @@ rdoc_options: []
|
|
205
204
|
|
206
205
|
require_paths:
|
207
206
|
- lib
|
208
|
-
- generated_themes
|
209
207
|
- bin
|
208
|
+
- test
|
210
209
|
required_ruby_version: !ruby/object:Gem::Requirement
|
211
210
|
none: false
|
212
211
|
requirements:
|
data/lib/geanyfy.rb
DELETED
@@ -1,45 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
#this is to open all of the editable text files in the current and all subdirectories into geany
|
4
|
-
if !File.exist?("/usr/bin/geany")
|
5
|
-
exit "Doesn't look like you have geany installed, sorry."
|
6
|
-
end
|
7
|
-
|
8
|
-
class Geanyfy
|
9
|
-
attr_accessor :filelist, :openables, :subs
|
10
|
-
|
11
|
-
def initialize
|
12
|
-
@openables = ["php","rb","sql","py","h","c","java"]
|
13
|
-
@filelist = []
|
14
|
-
@subs = []
|
15
|
-
end
|
16
|
-
|
17
|
-
def get_file_list(curdir)
|
18
|
-
match_openables(curdir)
|
19
|
-
allfiles = Dir.entries(curdir)
|
20
|
-
allfiles.each do |f|
|
21
|
-
get_file_list(f) if File.directory?(f) && ![".",".."].include?( f)
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
def match_openables(dir_string)
|
26
|
-
#returns an array of filenames that are of the type specified by @openables
|
27
|
-
@openables.each do |o|
|
28
|
-
dir_string += File::SEPARATOR if dir_string[-1,1] != File::SEPARATOR
|
29
|
-
@filelist.concat Dir[dir_string+"*."+o]
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
def open_all_files
|
34
|
-
@open_string = "geany "
|
35
|
-
@filelist.each do |f|
|
36
|
-
@open_string += " " + f
|
37
|
-
end
|
38
|
-
`#{@open_string} &`
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
g=Geanyfy.new
|
43
|
-
g.get_file_list(File.dirname(__FILE__))
|
44
|
-
|
45
|
-
g.open_all_files
|