basics_edit 0.0.3 → 0.0.4

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_edit +7 -2
  3. metadata +20 -40
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 4c8547d25ff8b6a8e541972100b1d51521a31736
4
+ data.tar.gz: a195523b63d82678bb48f73faef27456e7bd0093
5
+ SHA512:
6
+ metadata.gz: 77d06328662f707a71429a101e984e6b0f6351d83e9e75bdbd1e4d811afe72c5ad2bf737e2567bb62e956e1d6c04e3a1b99cb25b50759181b7608644f23073c0
7
+ data.tar.gz: 1af4400e56b03b58a347e46963b4a2d857c64d0d1451009a0352291d5ac230b3c8f9b470fed3af703940757afa35d62592217585be800090713f0c19296ad10e
data/bin/basics_edit CHANGED
@@ -39,11 +39,11 @@ class Be
39
39
  end
40
40
 
41
41
  def log(x)
42
- puts x.color(:blue)
42
+ puts Rainbow(x).color(:blue)
43
43
  end
44
44
 
45
45
  def err(x)
46
- puts x.color(:red)
46
+ puts Rainbow(x).color(:red)
47
47
  end
48
48
 
49
49
  def check_cat(cat, x="")
@@ -95,6 +95,10 @@ class Be
95
95
  exit
96
96
  end
97
97
 
98
+ def to_ascii str
99
+ str.force_encoding("UTF-8")
100
+ end
101
+
98
102
  def live_edit(category, title, text)
99
103
  tmp = Tempfile.new("newb")
100
104
 
@@ -121,6 +125,7 @@ EOF
121
125
 
122
126
  stage = nil
123
127
  edited.each do |line|
128
+ line = to_ascii(line)
124
129
  stage = "category" if line =~ /^>CATEGORY/
125
130
  stage = "title" if line =~ /^>TITLE/
126
131
  stage = "text" if line =~ /^>TEXT/
metadata CHANGED
@@ -1,65 +1,45 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: basics_edit
3
- version: !ruby/object:Gem::Version
4
- hash: 25
5
- prerelease:
6
- segments:
7
- - 0
8
- - 0
9
- - 3
10
- version: 0.0.3
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.4
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: 2013-04-28 00:00:00 Z
11
+ date: 2013-04-28 00:00:00.000000000 Z
19
12
  dependencies: []
20
-
21
13
  description: Edit basics
22
14
  email: bluemangroupie@gmail.com
23
- executables:
15
+ executables:
24
16
  - basics_edit
25
17
  extensions: []
26
-
27
18
  extra_rdoc_files: []
28
-
29
- files:
19
+ files:
30
20
  - bin/basics_edit
31
21
  homepage:
32
22
  licenses: []
33
-
23
+ metadata: {}
34
24
  post_install_message:
35
25
  rdoc_options: []
36
-
37
- require_paths:
26
+ require_paths:
38
27
  - lib
39
- required_ruby_version: !ruby/object:Gem::Requirement
40
- none: false
41
- requirements:
28
+ required_ruby_version: !ruby/object:Gem::Requirement
29
+ requirements:
42
30
  - - ">="
43
- - !ruby/object:Gem::Version
44
- hash: 3
45
- segments:
46
- - 0
47
- version: "0"
48
- required_rubygems_version: !ruby/object:Gem::Requirement
49
- none: false
50
- requirements:
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ required_rubygems_version: !ruby/object:Gem::Requirement
34
+ requirements:
51
35
  - - ">="
52
- - !ruby/object:Gem::Version
53
- hash: 3
54
- segments:
55
- - 0
56
- version: "0"
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
57
38
  requirements: []
58
-
59
39
  rubyforge_project:
60
- rubygems_version: 1.8.25
40
+ rubygems_version: 2.2.2
61
41
  signing_key:
62
- specification_version: 3
42
+ specification_version: 4
63
43
  summary: Edit basics
64
44
  test_files: []
65
-
45
+ has_rdoc: