basics 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/bin/basics +8 -8
  3. metadata +64 -84
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: c15da1ab7c9b87d6c76315f4000a583ab09edf8a
4
+ data.tar.gz: 5f75115713c7f830246e8f8906752c800e35f45c
5
+ SHA512:
6
+ metadata.gz: c2cfd5f2671c99d34028ea0f4736340f1087723f01ff5eed7ec1cb98432ab16ac3aeea6ed299103c4a9039442a9c9232bd0309dcb4651a884f5a4e5012b93cfa
7
+ data.tar.gz: 299b1599fdc8497d16a6ef5ab9581a33a2b095c6483ab24b5ffeca4660c0bad814c9cdbd8972747185ce444d92b1755e76c862dc3011527a817a3a113334676e
data/bin/basics CHANGED
@@ -14,8 +14,8 @@ def get(url)
14
14
  begin
15
15
  JSON.parse(open(url).read)
16
16
  rescue OpenURI::HTTPError => e
17
- puts (e.to_s + " with url: #{url}").color(:red)
18
- puts "file a bug report at https://github.com/egonschiele/basics".color(:yellow)
17
+ puts Rainbow(e.to_s + " with url: #{url}").red
18
+ puts Rainbow("file a bug report at https://github.com/egonschiele/basics").yellow
19
19
  exit
20
20
  end
21
21
  end
@@ -41,11 +41,11 @@ when 2
41
41
  end
42
42
 
43
43
  if tips.size == 0
44
- puts "NO CONTENT".color(:yellow)
44
+ puts Rainbow("NO CONTENT").yellow
45
45
  exit
46
46
  end
47
47
 
48
- puts "CONTENTS:".color(:yellow)
48
+ puts Rainbow("CONTENTS:").yellow()
49
49
 
50
50
  prev_category = nil
51
51
 
@@ -56,11 +56,11 @@ tips.each do |tip|
56
56
  puts tip["category"].upcase.background(:red).foreground("#000000")
57
57
  end
58
58
  =end
59
- puts tip["title"].background(:white).foreground("#000000")
59
+ puts Rainbow(tip["title"]).background(:white).foreground("#000000")
60
60
  end
61
61
 
62
62
  prev_category = nil
63
- puts "\nDETAILS:".color(:yellow)
63
+ puts Rainbow("\nDETAILS:").yellow
64
64
  tips.each do |tip|
65
65
  =begin DISABLING CATEGORIES FOR NOW
66
66
  if tip["category"] != prev_category
@@ -68,8 +68,8 @@ tips.each do |tip|
68
68
  puts tip["category"].upcase.background(:red).foreground("#000000")
69
69
  end
70
70
  =end
71
- puts "##{tip["id"].to_s} ".background(:red) + tip["title"].background(:white).foreground("#000000")
72
- puts tip["title"].background(:white).foreground("#000000")
71
+ puts Rainbow("##{tip["id"].to_s} ").background(:red) + Rainbow(tip["title"]).background(:white).foreground("#000000")
72
+ puts Rainbow(tip["title"]).background(:white).foreground("#000000")
73
73
  puts markdown.render(tip["text"])
74
74
  puts "\n\n\n"
75
75
  end
metadata CHANGED
@@ -1,120 +1,100 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: basics
3
- version: !ruby/object:Gem::Version
4
- hash: 21
5
- prerelease:
6
- segments:
7
- - 0
8
- - 0
9
- - 5
10
- version: 0.0.5
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.6
11
5
  platform: ruby
12
- authors:
6
+ authors:
13
7
  - Aditya Bhargava
14
8
  autorequire:
15
9
  bindir: bin
16
10
  cert_chain: []
17
-
18
- date: 2012-02-01 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
11
+ date: 2014-08-08 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
21
14
  name: json
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
24
- none: false
25
- requirements:
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
26
17
  - - ">="
27
- - !ruby/object:Gem::Version
28
- hash: 3
29
- segments:
30
- - 0
31
- version: "0"
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
32
20
  type: :runtime
33
- version_requirements: *id001
34
- - !ruby/object:Gem::Dependency
35
- name: rainbow
36
21
  prerelease: false
37
- requirement: &id002 !ruby/object:Gem::Requirement
38
- none: false
39
- requirements:
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rainbow
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
40
31
  - - ">="
41
- - !ruby/object:Gem::Version
42
- hash: 3
43
- segments:
44
- - 0
45
- version: "0"
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
46
34
  type: :runtime
47
- version_requirements: *id002
48
- - !ruby/object:Gem::Dependency
49
- name: redcarpet
50
35
  prerelease: false
51
- requirement: &id003 !ruby/object:Gem::Requirement
52
- none: false
53
- requirements:
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: redcarpet
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
54
45
  - - ">="
55
- - !ruby/object:Gem::Version
56
- hash: 3
57
- segments:
58
- - 0
59
- version: "0"
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
60
48
  type: :runtime
61
- version_requirements: *id003
62
- - !ruby/object:Gem::Dependency
63
- name: console_renderer
64
49
  prerelease: false
65
- requirement: &id004 !ruby/object:Gem::Requirement
66
- none: false
67
- requirements:
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: console_renderer
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
68
59
  - - ">="
69
- - !ruby/object:Gem::Version
70
- hash: 3
71
- segments:
72
- - 0
73
- version: "0"
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
74
62
  type: :runtime
75
- version_requirements: *id004
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
76
69
  description: Cheat sheets for basic programming knowledge.
77
70
  email: batman@scribd.com
78
- executables:
71
+ executables:
79
72
  - basics
80
73
  extensions: []
81
-
82
74
  extra_rdoc_files: []
83
-
84
- files:
75
+ files:
85
76
  - bin/basics
86
77
  homepage: https://github.com/egonSchiele/basics
87
78
  licenses: []
88
-
79
+ metadata: {}
89
80
  post_install_message:
90
81
  rdoc_options: []
91
-
92
- require_paths:
82
+ require_paths:
93
83
  - lib
94
- required_ruby_version: !ruby/object:Gem::Requirement
95
- none: false
96
- requirements:
84
+ required_ruby_version: !ruby/object:Gem::Requirement
85
+ requirements:
97
86
  - - ">="
98
- - !ruby/object:Gem::Version
99
- hash: 3
100
- segments:
101
- - 0
102
- version: "0"
103
- required_rubygems_version: !ruby/object:Gem::Requirement
104
- none: false
105
- requirements:
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
89
+ required_rubygems_version: !ruby/object:Gem::Requirement
90
+ requirements:
106
91
  - - ">="
107
- - !ruby/object:Gem::Version
108
- hash: 3
109
- segments:
110
- - 0
111
- version: "0"
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
112
94
  requirements: []
113
-
114
95
  rubyforge_project:
115
- rubygems_version: 1.8.25
96
+ rubygems_version: 2.2.2
116
97
  signing_key:
117
- specification_version: 3
98
+ specification_version: 4
118
99
  summary: Cheat sheets for basic programming knowledge.
119
100
  test_files: []
120
-