eletro 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +23 -2
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/bin/eletro +15 -2
- data/eletro.gemspec +3 -5
- data/lib/eletro/resistor.rb +12 -12
- metadata +3 -5
- data/LICENSE +0 -20
data/README.rdoc
CHANGED
@@ -1,9 +1,30 @@
|
|
1
1
|
= eletro
|
2
2
|
|
3
|
-
|
3
|
+
Eletric Stuff, Ohm Law, Resistor Colors, Karnaugh Maps...
|
4
|
+
|
5
|
+
|
6
|
+
== Resistor Codes
|
7
|
+
|
8
|
+
|
9
|
+
eletro 220
|
10
|
+
|
11
|
+
-> 220Ω --RRB--
|
12
|
+
|
13
|
+
|
14
|
+
eletro BKR
|
15
|
+
|
16
|
+
-> 1kΩ --BKR--
|
17
|
+
|
18
|
+
|
19
|
+
With *SH colors!
|
20
|
+
|
21
|
+
== Ohm`s Law
|
22
|
+
|
23
|
+
TBF
|
24
|
+
|
4
25
|
|
5
26
|
== Note on Patches/Pull Requests
|
6
|
-
|
27
|
+
|
7
28
|
* Fork the project.
|
8
29
|
* Make your feature addition or bug fix.
|
9
30
|
* Add tests for it. This is important so I don't break it in a
|
data/Rakefile
CHANGED
@@ -6,7 +6,7 @@ begin
|
|
6
6
|
Jeweler::Tasks.new do |gem|
|
7
7
|
gem.name = "eletro"
|
8
8
|
gem.summary = %Q{Eletric Helpers on Ruby}
|
9
|
-
gem.description = %Q{Eletric Stuff, Ohm Law, Karnaugh Maps and other gems on Ruby}
|
9
|
+
gem.description = %Q{Eletric Stuff, Ohm Law, Resistor Colors, Karnaugh Maps and other gems on Ruby}
|
10
10
|
gem.email = "x@nofxx.com"
|
11
11
|
gem.homepage = "http://github.com/nofxx/eletro"
|
12
12
|
gem.authors = ["Marcos Piccinini"]
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.2
|
data/bin/eletro
CHANGED
@@ -18,8 +18,7 @@ end
|
|
18
18
|
if ARGV.empty?
|
19
19
|
puts <<EOF
|
20
20
|
|
21
|
-
|
22
|
-
---------- Eletro!
|
21
|
+
+[ Eletro ]-
|
23
22
|
|
24
23
|
Use:
|
25
24
|
|
@@ -27,7 +26,21 @@ Use:
|
|
27
26
|
eletro 220
|
28
27
|
|
29
28
|
|
29
|
+
Color codes:
|
30
|
+
|
31
|
+
k => black
|
32
|
+
b => brown
|
33
|
+
r => red
|
34
|
+
o => orange
|
35
|
+
y => yellow
|
36
|
+
g => green
|
37
|
+
u => blue
|
38
|
+
v => violet
|
39
|
+
a => gray
|
40
|
+
w => white
|
30
41
|
|
42
|
+
l => gold
|
43
|
+
s => silver
|
31
44
|
EOF
|
32
45
|
else
|
33
46
|
Eletro.do_your_thing(ARGV)
|
data/eletro.gemspec
CHANGED
@@ -5,23 +5,21 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{eletro}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Marcos Piccinini"]
|
12
12
|
s.date = %q{2010-11-10}
|
13
13
|
s.default_executable = %q{eletro}
|
14
|
-
s.description = %q{Eletric Stuff, Ohm Law, Karnaugh Maps and other gems on Ruby}
|
14
|
+
s.description = %q{Eletric Stuff, Ohm Law, Resistor Colors, Karnaugh Maps and other gems on Ruby}
|
15
15
|
s.email = %q{x@nofxx.com}
|
16
16
|
s.executables = ["eletro"]
|
17
17
|
s.extra_rdoc_files = [
|
18
|
-
"
|
19
|
-
"README.rdoc"
|
18
|
+
"README.rdoc"
|
20
19
|
]
|
21
20
|
s.files = [
|
22
21
|
".document",
|
23
22
|
".gitignore",
|
24
|
-
"LICENSE",
|
25
23
|
"README.rdoc",
|
26
24
|
"Rakefile",
|
27
25
|
"VERSION",
|
data/lib/eletro/resistor.rb
CHANGED
@@ -105,20 +105,20 @@ module Eletro
|
|
105
105
|
|
106
106
|
|
107
107
|
def rgblize color
|
108
|
-
case color.downcase.to_sym
|
109
|
-
when :k then "\e[40m
|
110
|
-
when :b then "\e[0;33m
|
111
|
-
when :r then "\e[41m
|
112
|
-
when :g then "\e[42m
|
113
|
-
when :y then "\e[1;33m
|
114
|
-
when :o then "\e[43m
|
115
|
-
when :u then "\e[44m
|
116
|
-
when :v then "\e[45m
|
117
|
-
when :w then "\e[47m
|
118
|
-
when :a then "\e[31m
|
108
|
+
s = case color.downcase.to_sym
|
109
|
+
when :k then "\e[40m"
|
110
|
+
when :b then "\e[0;33m"
|
111
|
+
when :r then "\e[41m"
|
112
|
+
when :g then "\e[42m"
|
113
|
+
when :y then "\e[1;33m"
|
114
|
+
when :o then "\e[43m"
|
115
|
+
when :u then "\e[44m"
|
116
|
+
when :v then "\e[45m"
|
117
|
+
when :w then "\e[47m"
|
118
|
+
when :a then "\e[31m"
|
119
119
|
else ".."
|
120
120
|
end
|
121
|
-
|
121
|
+
s += "#{color}\e[0m"
|
122
122
|
end
|
123
123
|
|
124
124
|
def bold(txt); "\e[2m#{txt}\e[0m"; end
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 2
|
9
|
+
version: 0.0.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Marcos Piccinini
|
@@ -47,19 +47,17 @@ dependencies:
|
|
47
47
|
version: 2.0.1
|
48
48
|
type: :development
|
49
49
|
version_requirements: *id002
|
50
|
-
description: Eletric Stuff, Ohm Law, Karnaugh Maps and other gems on Ruby
|
50
|
+
description: Eletric Stuff, Ohm Law, Resistor Colors, Karnaugh Maps and other gems on Ruby
|
51
51
|
email: x@nofxx.com
|
52
52
|
executables:
|
53
53
|
- eletro
|
54
54
|
extensions: []
|
55
55
|
|
56
56
|
extra_rdoc_files:
|
57
|
-
- LICENSE
|
58
57
|
- README.rdoc
|
59
58
|
files:
|
60
59
|
- .document
|
61
60
|
- .gitignore
|
62
|
-
- LICENSE
|
63
61
|
- README.rdoc
|
64
62
|
- Rakefile
|
65
63
|
- VERSION
|
data/LICENSE
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
Copyright (c) 2009 Marcos Piccinini
|
2
|
-
|
3
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
-
a copy of this software and associated documentation files (the
|
5
|
-
"Software"), to deal in the Software without restriction, including
|
6
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
-
permit persons to whom the Software is furnished to do so, subject to
|
9
|
-
the following conditions:
|
10
|
-
|
11
|
-
The above copyright notice and this permission notice shall be
|
12
|
-
included in all copies or substantial portions of the Software.
|
13
|
-
|
14
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|