maid 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- maid (0.1.1)
4
+ maid (0.1.2)
5
5
  thor (~> 0.14.6)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -17,7 +17,14 @@ Your rules are defined in Ruby, so easy rules are easy and difficult rules are p
17
17
 
18
18
  ## Buzz
19
19
 
20
- * [OneThingWell: Maid](http://onethingwell.org/post/30455088809/maid) (August 29th, 2012)
20
+ * [OneThingWell: Maid](http://onethingwell.org/post/30455088809/maid) - August 29th, 2012
21
+ * [Maid – Paresseux mais ordonné!](http://korben.info/maid-ruby-script.html) (FR) - August 30th, 2012
22
+
23
+ <blockquote class="twitter-tweet"><p>gem install maid するとメイドさんが手に入るので Ruby 便利.<a href="https://t.co/gH6XgWJH" title="https://github.com/benjaminoakes/maid">github.com/benjaminoakes/…</a></p>&mdash; りんだん(実際犬) (@Linda_pp) <a href="https://twitter.com/Linda_pp/status/241588990166310912" data-datetime="2012-08-31T17:31:18+00:00">August 31, 2012</a></blockquote>
24
+ <script src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
25
+
26
+ <blockquote class="twitter-tweet"><p><a href="https://t.co/YnOzpwRV" title="https://github.com/benjaminoakes/maid">github.com/benjaminoakes/…</a> 這個拿來整理檔案似乎不錯.... <a href="http://t.co/rUt2f258" title="http://fb.me/1CxgLtmyq">fb.me/1CxgLtmyq</a></p>&mdash; xdite (@xdite) <a href="https://twitter.com/xdite/status/242335478626521088" data-datetime="2012-09-02T18:57:35+00:00">September 2, 2012</a></blockquote>
27
+ <script src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
21
28
 
22
29
  ## Is it any good?
23
30
 
@@ -39,12 +46,15 @@ If you want to install the executable for all users, you may need to give root a
39
46
 
40
47
  ### Ubuntu
41
48
 
42
- **Want easier installation?** Please make your voice heard in [issue #3](https://github.com/benjaminoakes/maid/issues/3).
49
+ #### Ubuntu Software Center
50
+
51
+ [![Download for Ubuntu](https://github.com/benjaminoakes/maid/raw/master/resources/download-for-ubuntu.png)](https://github.com/benjaminoakes/maid/issues/3)
52
+
53
+ #### Manually
43
54
 
44
55
  You'll need Ruby and RubyGems installed. Open a terminal and run:
45
56
 
46
- sudo apt-get install ruby
47
- sudo apt-get install rubygems
57
+ sudo apt-get install ruby rubygems
48
58
 
49
59
  You might also need to add the RubyGems `bin` directory to your `$PATH`. For example, you might need to add something like this to your `~/.bashrc`:
50
60
 
data/lib/maid/app.rb CHANGED
@@ -5,7 +5,7 @@ require 'thor'
5
5
 
6
6
  class Maid::App < Thor
7
7
  check_unknown_options!
8
- default_task 'clean'
8
+ default_task 'help'
9
9
 
10
10
  def self.sample_rules_path
11
11
  File.join(File.dirname(Maid::Maid::DEFAULTS[:rules_path]), 'rules.sample.rb')
data/lib/maid/maid.rb CHANGED
@@ -25,6 +25,7 @@ class Maid::Maid
25
25
 
26
26
  @log_device = options[:log_device]
27
27
  FileUtils.mkdir_p(File.dirname(@log_device)) unless @log_device.kind_of?(IO)
28
+
28
29
  @logger = Logger.new(@log_device)
29
30
  @logger.progname = options[:progname]
30
31
  @logger.formatter = options[:log_formatter] if options[:log_formatter]
@@ -33,6 +34,9 @@ class Maid::Maid
33
34
  @trash_path = options[:trash_path]
34
35
  @file_options = options[:file_options]
35
36
 
37
+ # Just in case it isn't there...
38
+ FileUtils.mkdir_p(@trash_path)
39
+
36
40
  @rules = []
37
41
  end
38
42
 
data/lib/maid/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Maid
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
Binary file
@@ -6,6 +6,7 @@ module Maid
6
6
  @logger = mock('Logger')
7
7
  @logger.stub!(:progname=)
8
8
  Logger.stub!(:new).and_return(@logger)
9
+ FileUtils.stub(:mkdir_p)
9
10
  end
10
11
 
11
12
  describe '.new' do
@@ -26,13 +27,16 @@ module Maid
26
27
  end
27
28
 
28
29
  it 'should set the trash to the default path' do
30
+ trash_path = Maid::DEFAULTS[:trash_path]
31
+ FileUtils.should_receive(:mkdir_p).with(trash_path).once
29
32
  maid = Maid.new
30
33
  maid.trash_path.should_not be_nil
31
- maid.trash_path.should == Maid::DEFAULTS[:trash_path]
34
+ maid.trash_path.should == trash_path
32
35
  end
33
36
 
34
37
  it 'should set the trash to the given path, if provided' do
35
38
  trash_path = '/home/username/.local/share/Trash/files/'
39
+ FileUtils.should_receive(:mkdir_p).with(trash_path).once
36
40
  maid = Maid.new(:trash_path => trash_path)
37
41
  maid.trash_path.should_not be_nil
38
42
  maid.trash_path.should == trash_path
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maid
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 31
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 1
10
- version: 0.1.1
9
+ - 2
10
+ version: 0.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Benjamin Oakes
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-08-31 00:00:00 Z
18
+ date: 2012-09-03 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  prerelease: false
@@ -130,6 +130,7 @@ files:
130
130
  - lib/maid/tools.rb
131
131
  - lib/maid/version.rb
132
132
  - maid.gemspec
133
+ - resources/download-for-ubuntu.png
133
134
  - script/micro-maid.sh
134
135
  - spec/lib/maid/app_spec.rb
135
136
  - spec/lib/maid/maid_spec.rb