shelr 0.12.6 → 0.12.7
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/shelr/recorder.rb +6 -2
- data/lib/shelr/version.rb +1 -1
- data/spec/shelr/recorder_spec.rb +8 -2
- metadata +4 -4
data/lib/shelr/recorder.rb
CHANGED
@@ -32,11 +32,15 @@ module Shelr
|
|
32
32
|
end
|
33
33
|
|
34
34
|
def request_metadata
|
35
|
-
STDOUT.print "Provide
|
35
|
+
STDOUT.print "Provide some title for your record: "
|
36
36
|
@meta["title"] = STDIN.gets.strip
|
37
|
-
@meta["
|
37
|
+
@meta["recorded_at"] = record_id
|
38
38
|
@meta["columns"] = @user_columns
|
39
39
|
@meta["rows"] = @user_rows
|
40
|
+
@meta["uname"] = `uname -a`
|
41
|
+
@meta["shell"] = ENV['SHELL']
|
42
|
+
@meta["term"] = ENV['TERM']
|
43
|
+
@meta["xdg_current_desktop"] = ENV['XDG_CURRENT_DESKTOP']
|
40
44
|
STDOUT.puts record_file('meta')
|
41
45
|
File.open(record_file('meta'), 'w+') do |meta|
|
42
46
|
meta.puts @meta.to_json
|
data/lib/shelr/version.rb
CHANGED
data/spec/shelr/recorder_spec.rb
CHANGED
@@ -42,10 +42,16 @@ describe Shelr::Recorder do
|
|
42
42
|
subject.meta["columns"].should == 20
|
43
43
|
end
|
44
44
|
|
45
|
-
it "adds record_id to @meta as
|
45
|
+
it "adds record_id to @meta as recorded_at" do
|
46
46
|
subject.stub(:record_id => 'ololo')
|
47
47
|
subject.request_metadata
|
48
|
-
subject.meta["
|
48
|
+
subject.meta["recorded_at"].should == 'ololo'
|
49
|
+
end
|
50
|
+
|
51
|
+
it "adds XDG_CURRENT_DESKTOP to @meta as xdg_current_desktop" do
|
52
|
+
subject.stub(:record_id => 'ololo')
|
53
|
+
subject.request_metadata
|
54
|
+
subject.meta["recorded_at"].should == 'ololo'
|
49
55
|
end
|
50
56
|
|
51
57
|
it "reads title from stdin" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shelr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.12.
|
4
|
+
version: 0.12.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2012-04-
|
14
|
+
date: 2012-04-09 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: json
|
@@ -86,7 +86,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
86
86
|
version: '0'
|
87
87
|
segments:
|
88
88
|
- 0
|
89
|
-
hash:
|
89
|
+
hash: -3876896625172083167
|
90
90
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
91
91
|
none: false
|
92
92
|
requirements:
|
@@ -95,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
95
95
|
version: '0'
|
96
96
|
segments:
|
97
97
|
- 0
|
98
|
-
hash:
|
98
|
+
hash: -3876896625172083167
|
99
99
|
requirements: []
|
100
100
|
rubyforge_project:
|
101
101
|
rubygems_version: 1.8.21
|