maid 0.1.3.beta.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/.travis.yml CHANGED
@@ -1,4 +1,3 @@
1
1
  rvm:
2
2
  - 1.8.7
3
- - 1.9.2
4
- - 1.9.3
3
+ - 1.9.3
data/CHANGELOG ADDED
@@ -0,0 +1,86 @@
1
+ maid (0.1.3) stable; urgency=medium
2
+
3
+ * First stable release with official support for Ubuntu.
4
+ * Added new features, fixed bugs as listed for betas 1 and 2.
5
+ * Minor development-only changes:
6
+ * Added CHANGELOG (this file)
7
+ * Updated development dependencies to most recent versions
8
+ * Scripted testing of supported Ruby and Ubuntu releases
9
+
10
+ -- Benjamin Oakes <hello@benjaminoakes.com> -- TODO --
11
+
12
+ maid (0.1.3.beta.2) unstable; urgency=low
13
+
14
+ * Fixed "Trash does not expand paths". (Closes: #56)
15
+ * Fixed "XDG gives a warning about RbConfig vs Config" on Ubuntu by using
16
+ custom-built maid-xdg gem. (Closes: #53)
17
+
18
+ -- Benjamin Oakes <hello@benjaminoakes.com> Wed, 21 Nov 2012 00:00:00 +0000
19
+
20
+ maid (0.1.3.beta.1) unstable; urgency=low
21
+
22
+ * Started official support for Ubuntu.
23
+ * Fixed default trash path on Ubuntu (and possibly other Linux
24
+ distributions). (Closes: #6)
25
+ * Added ability to handle an array of filenames passed to "move", "trash". (Closes:
26
+ #16)
27
+ * Added "remove" tool for deleting files, and secure deletion. (Closes: #30)
28
+ * Added "remove_over" option for "trash" which can delete files if they're
29
+ over a size threshold. (Closes: #32)
30
+ * Added "sync" tool for using rsync. (Closes: #17)
31
+ * Added "mkdir" tool for making directories ("folders"). (Closes: #20)
32
+ * Added "created_at" tool for looking up creation time. (Closes: #21)
33
+ * Added "modified_at" tool for looking up modification time. (Closes: #13)
34
+ * Renamed "last_accessed" to "accessed_at", deprecated "last_accessed".
35
+ (Closes: #22)
36
+ * Deprecated "git_piston" in favor of SparkleShare. (Closes: #18)
37
+ * Updated README and samples. (Closes: #38)
38
+ * Updated dependencies. (Closes: #5)
39
+
40
+ -- Benjamin Oakes <hello@benjaminoakes.com> Mon, 15 Oct 2012 00:00:00 +0000
41
+
42
+ maid (0.1.2) stable; urgency=high
43
+
44
+ * Started official support for Ruby 1.9.3.
45
+ * Ended official support for Ruby 1.9.2.
46
+ * Updated README to clarify installation, updating, etc.
47
+ * Introduced new default behavior: "help" rather than "clean".
48
+ * Ensured the trash path exists as a directory before moving files. This
49
+ helped prevent potential problems (unsupported) Linux users could have
50
+ experienced.
51
+
52
+ -- Benjamin Oakes <hello@benjaminoakes.com> Mon, 3 Sep 2012 00:00:00 +0000
53
+
54
+ maid (0.1.1) stable; urgency=low
55
+
56
+ * Improved published documentation.
57
+
58
+ -- Benjamin Oakes <hello@benjaminoakes.com> Mon, 31 Aug 2012 00:00:00 +0000
59
+
60
+ maid (0.1.0) stable; urgency=low
61
+
62
+ * Initial release (culmination of 4 prior beta releases).
63
+ * Started official support for Ruby 1.8.7, 1.9.2.
64
+ * Started official support for Mac OS X.
65
+ * Started Maid rules DSL format.
66
+ * Added "maid clean" command with "noop", "rules", and "silent" options.
67
+ * Added "maid help" commands.
68
+ * Added "maid sample" command.
69
+ * Added "maid version" command.
70
+ * Added "dir" tool.
71
+ * Added "find" tool.
72
+ * Added "move" tool.
73
+ * Added "trash" tool.
74
+ * Added "cmd" tool.
75
+ * Added "downloaded_from" tool.
76
+ * Added "duration_s" tool.
77
+ * Added "locate" tool.
78
+ * Added "zipfile_contents" tool.
79
+ * Added "disk_usage" tool.
80
+ * Added "git_piston" tool.
81
+ * Added "last_accessed" tool.
82
+ * Added logging.
83
+ * First iteration of tutorial and documentation.
84
+ * Possibly other misc changes/features in the first version. :)
85
+
86
+ -- Benjamin Oakes <hello@benjaminoakes.com> Fri, 24 Jun 2011 00:00:00 +0000
data/CONTRIBUTING ADDED
@@ -0,0 +1,3 @@
1
+ This project is hosted on GitHub. To obtain a copy of the source, visit https://github.com/benjaminoakes/maid.
2
+
3
+ For contributing guidelines, please see https://github.com/benjaminoakes/maid/wiki/Contributing
data/Vagrantfile CHANGED
@@ -2,10 +2,39 @@
2
2
  # vi: set ft=ruby :
3
3
 
4
4
  Vagrant::Config.run do |config|
5
- # The base precise64 box can be found at http://files.vagrantup.com/precise64.box
5
+ # ## Base Boxes
6
+ #
7
+ # To add a [box](http://vagrantup.com/v1/docs/boxes.html):
8
+ #
9
+ # vagrant box add $box_name $box_url
10
+ #
11
+ # Base boxes for supported releases are listed below. The idea is to come close to the [official Canonical support timeline](http://en.wikipedia.org/wiki/Ubuntu_releases#Table_of_versions), when possible.
12
+ #
13
+ # ### Releases preferred with Ruby 1.8.7
14
+ #
15
+ # These older releases of Ubuntu don't provide a prebuilt package for Ruby 1.9.3.
16
+ #
17
+ # Supported until 2015-04:
18
+ #
19
+ # * `lucid32`: http://files.vagrantup.com/lucid32.box
20
+ # * `lucid64`: http://files.vagrantup.com/lucid64.box
21
+ #
22
+ # ### Releases preferred with Ruby 1.9.3
23
+ #
24
+ # Supported until 2017-04:
25
+ #
26
+ # * `precise32`: http://files.vagrantup.com/precise32.box
27
+ # * `precise64`: http://files.vagrantup.com/precise64.box
28
+ #
29
+ # Supported until 2014-04:
30
+ #
31
+ # * `quantal64`: https://github.com/downloads/roderik/VagrantQuantal64Box/quantal64.box
32
+ #
33
+ # ## See Also
6
34
  #
7
- # For more info, please see https://github.com/benjaminoakes/maid/wiki/Contributing
35
+ # * [Vagrant Boxes List](http://www.vagrantbox.es/)
36
+ # * [Contributing Guide](https://github.com/benjaminoakes/maid/wiki/Contributing)
8
37
  config.vm.box = 'precise64'
9
38
 
10
- config.vm.provision(:shell, :path => 'script/provision')
39
+ config.vm.provision(:shell, :path => 'script/vagrant-provision')
11
40
  end
data/lib/maid/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Maid
2
- VERSION = "0.1.3.beta.2"
2
+ VERSION = '0.1.3'
3
3
  end
data/maid.gemspec CHANGED
@@ -1,19 +1,19 @@
1
1
  # -*- encoding: utf-8 -*-
2
- $:.push File.expand_path("../lib", __FILE__)
3
- require "maid/version"
4
- require "maid/platform"
2
+ $:.push File.expand_path('../lib', __FILE__)
3
+ require 'maid/version'
4
+ require 'maid/platform'
5
5
 
6
6
  Gem::Specification.new do |s|
7
- s.name = "maid"
7
+ s.name = 'maid'
8
8
  s.version = Maid::VERSION
9
9
  s.platform = Gem::Platform::RUBY
10
- s.authors = ["Benjamin Oakes"]
11
- s.email = ["hello@benjaminoakes.com"]
12
- s.homepage = "http://github.com/benjaminoakes/maid"
10
+ s.authors = ['Benjamin Oakes']
11
+ s.email = %w(hello@benjaminoakes.com)
12
+ s.homepage = 'http://github.com/benjaminoakes/maid'
13
13
  s.summary = %q{Be lazy. Let Maid clean up after you, based on rules you define.}
14
14
  s.description = s.summary
15
15
 
16
- s.rubyforge_project = "maid"
16
+ s.rubyforge_project = 'maid'
17
17
 
18
18
  s.add_dependency('thor', '~> 0.16.0')
19
19
  s.add_dependency('deprecated', '~> 3.0.1')
@@ -21,12 +21,12 @@ Gem::Specification.new do |s|
21
21
  # # After a new version with the Ruby 1.9 bugfix is released, change over to `xdg`
22
22
  # s.add_dependency('xdg', '~> 2.2.2')
23
23
  s.add_dependency('maid-xdg', '= 2.2.1.2')
24
- s.add_development_dependency('guard', '~> 1.4.0')
25
- s.add_development_dependency('guard-rspec', '~> 2.1.0')
26
- s.add_development_dependency('rake', '~> 0.9.2.2')
27
- s.add_development_dependency('rspec', '~> 2.11.0')
28
- s.add_development_dependency('timecop', '~> 0.5.2')
29
- s.add_development_dependency('fakefs', '~> 0.4.0')
24
+ s.add_development_dependency('guard', '~> 1.5.4')
25
+ s.add_development_dependency('guard-rspec', '~> 2.1.2')
26
+ s.add_development_dependency('rake', '~> 10.0.2')
27
+ s.add_development_dependency('rspec', '~> 2.12.0')
28
+ s.add_development_dependency('timecop', '~> 0.5.3')
29
+ s.add_development_dependency('fakefs', '~> 0.4.1')
30
30
 
31
31
  if Maid::Platform.linux?
32
32
  s.add_development_dependency('rb-inotify', '~> 0.8.8')
@@ -37,5 +37,5 @@ Gem::Specification.new do |s|
37
37
  s.files = `git ls-files`.split("\n")
38
38
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
39
39
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
40
- s.require_paths = ["lib"]
40
+ s.require_paths = %w(lib)
41
41
  end
@@ -0,0 +1,55 @@
1
+ #!/usr/bin/env bash
2
+ # A simple shell-based provisioner for Vagrant.
3
+ #
4
+ # Documentation: [Shell Provisioner](http://vagrantup.com/v1/docs/provisioners/shell.html)
5
+ set -o errexit
6
+
7
+ # Set to '1.8.7' or '1.9.3'
8
+ target_ruby_version='1.9.3'
9
+
10
+ # Install the given package, no questions asked.
11
+ function install-pkg {
12
+ sudo apt-get install -y "$1"
13
+ }
14
+
15
+ # Only install the given package if targeting the given Ruby version.
16
+ function install-pkg-if-ruby {
17
+ local ruby_version="$1"
18
+ local package="$2"
19
+
20
+ if [ "$target_ruby_version" == "$ruby_version" ]; then
21
+ install-pkg "$package"
22
+ fi
23
+ }
24
+
25
+ sudo apt-get update
26
+
27
+ # ## Dependencies
28
+ install-pkg-if-ruby '1.8.7' 'ruby1.8'
29
+ # Installs `ruby 1.9.3p0`
30
+ install-pkg-if-ruby '1.9.3' 'ruby1.9.1'
31
+
32
+ # ## Development dependencies
33
+ #
34
+ # For building `maid-x.y.z.gem`
35
+ install-pkg 'git-core'
36
+ # For building `ffi` for `guard`'s soft dependency on `rb-inotify`
37
+ install-pkg 'make'
38
+ install-pkg 'libffi-dev'
39
+ install-pkg-if-ruby '1.8.7' 'ruby1.8-dev'
40
+ install-pkg-if-ruby '1.9.3' 'ruby1.9.1-dev'
41
+
42
+ # ## RubyGems
43
+
44
+ # RubyGems is included in Ruby 1.9, but we need it installed in Ruby 1.8.
45
+ install-pkg-if-ruby '1.8.7' 'rubygems'
46
+
47
+ # That RubyGems package is 1.3.5 (at least on Ubuntu 10.04), and we need to update it to at least 1.3.6 for Bundler.
48
+ if [ "$target_ruby_version" == '1.8.7' ]; then
49
+ sudo gem install rubygems-update
50
+ sudo /var/lib/gems/1.8/bin/update_rubygems
51
+ fi
52
+
53
+ sudo gem install bundler
54
+ cd /vagrant
55
+ bundle install
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env bash
2
+ # Run tests on a newly created Vagrant box.
3
+ set -o errexit
4
+
5
+ vagrant destroy --force
6
+ vagrant up
7
+ vagrant ssh --command 'cd /vagrant && rake'
metadata CHANGED
@@ -1,19 +1,19 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3.beta.2
5
- prerelease: 6
4
+ version: 0.1.3
5
+ prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Benjamin Oakes
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-21 00:00:00.000000000 Z
12
+ date: 2012-11-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thor
16
- requirement: &15531880 !ruby/object:Gem::Requirement
16
+ requirement: &12916580 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 0.16.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *15531880
24
+ version_requirements: *12916580
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: deprecated
27
- requirement: &15530880 !ruby/object:Gem::Requirement
27
+ requirement: &12915960 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 3.0.1
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *15530880
35
+ version_requirements: *12915960
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: maid-xdg
38
- requirement: &15479780 !ruby/object:Gem::Requirement
38
+ requirement: &12915460 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - =
@@ -43,76 +43,76 @@ dependencies:
43
43
  version: 2.2.1.2
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *15479780
46
+ version_requirements: *12915460
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: guard
49
- requirement: &15478900 !ruby/object:Gem::Requirement
49
+ requirement: &12914840 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
53
53
  - !ruby/object:Gem::Version
54
- version: 1.4.0
54
+ version: 1.5.4
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *15478900
57
+ version_requirements: *12914840
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: guard-rspec
60
- requirement: &15478280 !ruby/object:Gem::Requirement
60
+ requirement: &12914120 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
64
64
  - !ruby/object:Gem::Version
65
- version: 2.1.0
65
+ version: 2.1.2
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *15478280
68
+ version_requirements: *12914120
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rake
71
- requirement: &15477580 !ruby/object:Gem::Requirement
71
+ requirement: &12913540 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ~>
75
75
  - !ruby/object:Gem::Version
76
- version: 0.9.2.2
76
+ version: 10.0.2
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *15477580
79
+ version_requirements: *12913540
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: rspec
82
- requirement: &15476860 !ruby/object:Gem::Requirement
82
+ requirement: &12912980 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ~>
86
86
  - !ruby/object:Gem::Version
87
- version: 2.11.0
87
+ version: 2.12.0
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *15476860
90
+ version_requirements: *12912980
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: timecop
93
- requirement: &15476100 !ruby/object:Gem::Requirement
93
+ requirement: &12912340 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ~>
97
97
  - !ruby/object:Gem::Version
98
- version: 0.5.2
98
+ version: 0.5.3
99
99
  type: :development
100
100
  prerelease: false
101
- version_requirements: *15476100
101
+ version_requirements: *12912340
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: fakefs
104
- requirement: &15473500 !ruby/object:Gem::Requirement
104
+ requirement: &12911740 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
107
  - - ~>
108
108
  - !ruby/object:Gem::Version
109
- version: 0.4.0
109
+ version: 0.4.1
110
110
  type: :development
111
111
  prerelease: false
112
- version_requirements: *15473500
112
+ version_requirements: *12911740
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: rb-inotify
115
- requirement: &15472800 !ruby/object:Gem::Requirement
115
+ requirement: &13334480 !ruby/object:Gem::Requirement
116
116
  none: false
117
117
  requirements:
118
118
  - - ~>
@@ -120,7 +120,7 @@ dependencies:
120
120
  version: 0.8.8
121
121
  type: :development
122
122
  prerelease: false
123
- version_requirements: *15472800
123
+ version_requirements: *13334480
124
124
  description: Be lazy. Let Maid clean up after you, based on rules you define.
125
125
  email:
126
126
  - hello@benjaminoakes.com
@@ -133,13 +133,13 @@ files:
133
133
  - .rspec
134
134
  - .rvmrc
135
135
  - .travis.yml
136
+ - CHANGELOG
137
+ - CONTRIBUTING
136
138
  - Gemfile
137
139
  - Guardfile
138
140
  - LICENSE
139
- - Maidfile
140
141
  - README.md
141
142
  - Rakefile
142
- - TODO.rdoc
143
143
  - Vagrantfile
144
144
  - bin/maid
145
145
  - lib/maid.rb
@@ -156,7 +156,8 @@ files:
156
156
  - resources/OneThingWell.png
157
157
  - resources/download-for-ubuntu.png
158
158
  - resources/ruby5.gif
159
- - script/provision
159
+ - script/vagrant-provision
160
+ - script/vagrant-test
160
161
  - spec/lib/maid/app_spec.rb
161
162
  - spec/lib/maid/maid_spec.rb
162
163
  - spec/lib/maid/numeric_extensions_spec.rb
@@ -181,9 +182,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
181
182
  required_rubygems_version: !ruby/object:Gem::Requirement
182
183
  none: false
183
184
  requirements:
184
- - - ! '>'
185
+ - - ! '>='
185
186
  - !ruby/object:Gem::Version
186
- version: 1.3.1
187
+ version: '0'
187
188
  requirements: []
188
189
  rubyforge_project: maid
189
190
  rubygems_version: 1.8.11
data/Maidfile DELETED
@@ -1,4 +0,0 @@
1
- Maid.rules do
2
- rule('documentation') { trash('doc') }
3
- rule('built gems') { trash('pkg') }
4
- end
data/TODO.rdoc DELETED
@@ -1,55 +0,0 @@
1
- = TODO
2
-
3
- == Future Releases
4
-
5
- Some of these might not happen, but they're being thought about. Feel free to add your own.
6
-
7
- * "Push to S3" method (for backing up, etc)
8
- * Classifiers and file-content based rules. Example:
9
- * Take bills and bank statements, classify them as the type of document they are, and then rename them based on their content:
10
- * ["eStatement.pdf", "eStatement (1).pdf", "eStatement (2).pdf", "statement-1c3f34d.pdf", "statement-2c53ad1.pdf", "document-34d1c3f.pdf", "document-3ad12c5.pdf"] => ['ING', 'ING', 'ING', 'Citi', 'Citi', 'UI', 'UI']
11
- * For example, ING statements have a date found with the pattern /Your Savings Summary as of\s+(.*?)$/i, Citi statements have the pattern /Statement Closing Date.*?(\d\d\/\d\d\/\d\d\d\d)/im, etc. Map using the patterns and rules.
12
-
13
- # (Define classification rules in some format here, naming one 'bank_statements' with the extraction rule 'date')
14
-
15
- dir('~/Downloads/*.pdf').classify(as: 'bank_statements', extract: 'date').each do |original_path, classification, date|
16
- move(original_path, "~/Bills/#{classification}/#{date.strftime(...)}.pdf")
17
- end
18
-
19
- * Daemon mode
20
- * Menubar/system tray icon
21
- * Import of rules from other programs
22
-
23
- * Better user documentation of the DSL (in Maid::Tools)
24
- * Man pages, e.g. maid(1) and maid(5)
25
- * I've read http://ozmm.org/posts/man_what.html and http://rcrowley.org/articles/man-pages-vs-rubygems.html and I'm not too happy with the available tools for this
26
- * Use a Cocoa interface to get Spotlight results
27
- * "Watch" rules that use Folder Actions on OS X (and icron on Linux?). Something like:
28
-
29
- Maid.rules do
30
- watch '~/Downloads' do
31
- rule 'watch rule 1' do
32
- # ...
33
- end
34
-
35
- rule 'watch rule 2' do
36
- # ...
37
- end
38
- end
39
-
40
- rule 'normal rule 3' do
41
- # ...
42
- end
43
- end
44
-
45
- * Guard has some similar "watch" functionality. Here's what they use:
46
- * FSEvent support on Mac OS X 10.5+ (without RubyCocoa!, rb-fsevent gem, >= 0.3.5 required).
47
- * Inotify support on Linux (rb-inotify gem, >= 0.5.1 required).
48
- * Directory Change Notification support on Windows (rb-fchange, >= 0.0.2 required).
49
- * Polling on the other operating systems (help us to support more OS).
50
- * Automatic & Super fast (when polling is not used) files modifications detection (even new files are detected).
51
- * Possibly: notifications
52
- * Growl notifications (growlnotify & growl gem required).
53
- * Libnotify notifications (libnotify gem required).
54
-
55
- * GUI for configuring easy rules
data/script/provision DELETED
@@ -1,22 +0,0 @@
1
- #!/usr/bin/env bash
2
- # A simple shell-based provisioner for Vagrant.
3
- #
4
- # Documentation: [Shell Provisioner](http://vagrantup.com/v1/docs/provisioners/shell.html)
5
- set -o errexit
6
-
7
- sudo apt-get update
8
-
9
- # ## Dependencies
10
- sudo apt-get install -y ruby1.9.1
11
-
12
- # ## Development dependencies
13
- #
14
- # For building `maid-x.y.z.gem`
15
- sudo apt-get install -y git-core
16
- # For building `ffi` for `guard`'s soft dependency on `rb-inotify`
17
- sudo apt-get install -y make ruby1.9.1-dev libffi-dev
18
-
19
- # ## RubyGems
20
- cd /vagrant
21
- sudo gem install bundler
22
- bundle install