rmthemegen 0.0.12 → 0.0.13

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
1
- #! /usr/bin/env ruby
1
+ #! /usr/bin/ruby
2
2
  #**********************************************************************
3
3
  #* *
4
4
  #* RmThemeGen - a ruby script to create random, usable themes for *
@@ -12,7 +12,7 @@
12
12
  #originally it was written and tested for ruby 1.9.2
13
13
 
14
14
 
15
- require File.dirname(__FILE__)+'/../lib/rmthemegen/rmthemegen_187'
15
+ require File.dirname(__FILE__)+'./lib/rmthemegen/rmthemegen_187'
16
16
 
17
17
  puts
18
18
  puts " rmthemegen - creates theme files for use with rubymine (3.0.0 and up) "
@@ -41,4 +41,6 @@ puts l.to_css
41
41
  @iterations.times do
42
42
  puts l.make_theme_file
43
43
  end
44
+
45
+
44
46
  puts
@@ -112,7 +112,6 @@ module RMThemeGen
112
112
 
113
113
 
114
114
  def randcolor(opts={})
115
-
116
115
  df= { :r=>nil, :g=>nil, :b=>nil, #these are the usual 0..255
117
116
  :bg_rgb => nil,
118
117
  :min_cont => @min_cont, #if a backrgb (background color) is supplied this will be used to create a minimum contrast with it.
@@ -277,7 +276,8 @@ module RMThemeGen
277
276
  f.close
278
277
  end
279
278
 
280
- def make_theme_file(outputdir = File.dirname(__FILE__)+"/../../generated_themes" )
279
+ # def make_theme_file(outputdir = File.dirname(__FILE__)+"/../../generated_themes" )
280
+ def make_theme_file(outputdir = ENV["PWD"] )
281
281
  @backgroundcolor= randcolor(:shade_of_grey=>@background_grey, :max_bright=>@background_max_brightness)# "0"
282
282
  @schemename = randthemename
283
283
  @xmlout = {:scheme=>
@@ -18,10 +18,14 @@ require File.dirname(__FILE__)+'/rgb_contrast_methods'
18
18
 
19
19
  module RMThemeGen
20
20
  class ThemeGenerator < RMThemeParent
21
+
21
22
  def to_css
22
- s = '<script type="text/css">'
23
- s += '</script>'
24
- return ''
23
+ s = '<style type="text/css">'
24
+ s += "#"+ @schemename.to_s + " { background-color: #{@backgroundcolor.to_s}; } "
25
+ s += "#"+ @schemename.to_s + " <token name> color:"
26
+
27
+ s += '</style>'
28
+ return s
25
29
  end
26
30
  end #class ThemeGenerator < RMThemeParent
27
31
  end #module RMThemeGen
@@ -1,3 +1,3 @@
1
1
  module Rmthemegen
2
- VERSION = "0.0.12"
2
+ VERSION = "0.0.13"
3
3
  end
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.12"
7
+ s.version = "0.0.13"
8
8
  s.platform = Gem::Platform::RUBY
9
9
  s.authors = ["David Heitzman"]
10
10
  s.email = ["evolvemeans@gmail.com"]
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: 7
4
+ hash: 5
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 12
10
- version: 0.0.12
9
+ - 13
10
+ version: 0.0.13
11
11
  platform: ruby
12
12
  authors:
13
13
  - David Heitzman