sheet 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
data/lib/sheet.rb CHANGED
@@ -76,7 +76,7 @@ class Sheet
76
76
  def process
77
77
  if ['new', 'edit'].include?(@args[0])
78
78
  write(@args[1])
79
- elsif ['ls', 'list'].include?(@args[0])
79
+ elsif ['ls', 'list'].include?(@args[0]) || @args.empty?
80
80
  list
81
81
  else
82
82
  open(@args[0])
data/sheet.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "sheet"
8
- s.version = "0.1.1"
8
+ s.version = "0.1.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Oscar Del Ben"]
12
- s.date = "2012-04-09"
12
+ s.date = "2012-04-11"
13
13
  s.description = "sheets allows you to store and browse snippets of text from your command line."
14
14
  s.email = "info@oscardelben.com"
15
15
  s.executables = ["sheet"]
@@ -5,7 +5,7 @@ describe Sheet::List do
5
5
 
6
6
  it 'calls system ls' do
7
7
  cmd = "ls #{Sheet.sheets_dir}"
8
- Sheet.should_receive(:exec).with(cmd)
8
+ Shret.should_receive(:exec).with(cmd, true)
9
9
 
10
10
  Sheet::List.new.list
11
11
  end
@@ -40,5 +40,13 @@ describe Sheet do
40
40
  Sheet::List.stub(:new) { list }
41
41
  Sheet.new('ls').process
42
42
  end
43
+
44
+ it 'should instantiate Sheet::List with empty arguments' do
45
+ list = double('Sheet::List')
46
+ list.should_receive(:list)
47
+
48
+ Sheet::List.stub(:new) { list }
49
+ Sheet.new.process
50
+ end
43
51
  end
44
52
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sheet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-09 00:00:00.000000000 Z
12
+ date: 2012-04-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
@@ -119,7 +119,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
119
119
  version: '0'
120
120
  segments:
121
121
  - 0
122
- hash: 837268949914954858
122
+ hash: -850166153184772653
123
123
  required_rubygems_version: !ruby/object:Gem::Requirement
124
124
  none: false
125
125
  requirements: