maid 0.6.0.alpha.1 → 0.6.0.alpha.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- 2.1.2
1
+ 2.1.5
@@ -1,11 +1,13 @@
1
1
  language: ruby
2
2
  cache: bundler
3
- os:
4
- - linux
5
- - osx
6
3
  rvm:
7
4
  - 1.9.3
8
5
  - 2.0.0
9
6
  - 2.1.0
10
7
  - 2.1.1
11
8
  - 2.1.2
9
+ - 2.1.3
10
+ - 2.1.4
11
+ - 2.1.5
12
+ - 2.2.0-preview2
13
+ - ruby-head
data/ChangeLog CHANGED
@@ -1,7 +1,10 @@
1
1
  maid (0.6.0) unstable; urgency=low
2
2
 
3
+ * Started official support for Ruby 2.1.1, 2.1.2, 2.1.3. Tentative support
4
+ for Ruby 2.2.0.
3
5
  * Jayson Rhynas: Add Safari download detection to "downloading?" (Closes: #121)
4
6
  * Pedro Lambert: Add support for Rake tasks defined by Maid (Closes: #68, #123)
7
+ * Jurriaan Pruis: Add daemon mode and repeat support (Closes: #126)
5
8
 
6
9
  -- Benjamin Oakes <hello@benjaminoakes.com> TODO
7
10
 
data/Guardfile CHANGED
@@ -1,5 +1,4 @@
1
- # More info at https://github.com/guard/guard#readme
2
- guard 'rspec' do
1
+ guard :rspec, cmd: 'bundle exec rspec' do
3
2
  watch(%r{^spec/.+_spec\.rb$})
4
3
  watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{ m[1] }_spec.rb" }
5
4
  watch('spec/spec_helper.rb') { 'spec' }
data/README.md CHANGED
@@ -85,7 +85,7 @@ Modern Ruby versions and Unix-like operating systems should work, but only OS X
85
85
  Offically supported:
86
86
 
87
87
  * **OS:** Mac OS X, Ubuntu
88
- * **Ruby:** 1.9.3+ (2.0.0, 2.1.0, or 2.1.1 are preferred)
88
+ * **Ruby:** 1.9.3+ (2.0.x or 2.1.x are preferred)
89
89
 
90
90
  Some features require OS X. See the [documentation][] for more details.
91
91
 
@@ -209,6 +209,26 @@ Example for every day at 1am:
209
209
 
210
210
  # minute hour day_of_month month day_of_week command_to_execute
211
211
  0 1 * * * /bin/bash -li -c "maid clean --force --silent"
212
+
213
+ ### Running as a daemon
214
+ To run Maid as a daemon you first have to specify watch/repeat rules.
215
+
216
+ They are defined like this:
217
+ ```ruby
218
+ repeat '1s' do
219
+ rule 'This rule will run every second' do
220
+ # some task
221
+ end
222
+ end
223
+
224
+ watch '/home/user/Downloads' do
225
+ rule 'This rule will run on every change to the downloads directory' do
226
+ # another task
227
+ end
228
+ end
229
+ ```
230
+
231
+ To run the daemon run `maid daemon`
212
232
 
213
233
  ### Rake Tasks
214
234
 
data/Rakefile CHANGED
@@ -1,5 +1,4 @@
1
1
  require 'bundler'
2
- require 'maid'
3
2
  require 'rake'
4
3
  require 'rspec/core/rake_task'
5
4
  require 'yard'
@@ -8,17 +7,20 @@ task :default => :spec
8
7
 
9
8
  Bundler::GemHelper.install_tasks
10
9
  RSpec::Core::RakeTask.new(:spec)
11
- YARD::Rake::YardocTask.new
10
+ YARD::Rake::YardocTask.new(:doc)
12
11
 
13
12
  task :console do
14
13
  sh('irb -I lib -r maid')
15
14
  end
16
15
 
17
- Maid::Rake::Task.new :clean do
16
+ require 'maid'
17
+
18
+ Maid::Rake::Task.new(:clean) do
18
19
  # Clean up Rubinius-compilied Ruby
19
20
  trash(dir('**/*.rbc'))
20
21
 
21
- # Get rid of old rubygems packages
22
+ # Get rid of generated files
23
+ trash('doc')
22
24
  trash('pkg')
23
- mkdir('pkg')
25
+ trash('tmp')
24
26
  end
@@ -5,6 +5,7 @@ Deprecated.set_action(:warn)
5
5
  # Must be in this order:
6
6
  require 'maid/version'
7
7
  require 'maid/tools'
8
+ require 'maid/rule_container'
8
9
  require 'maid/maid'
9
10
 
10
11
  # Alphabetical:
@@ -16,6 +17,8 @@ require 'maid/rake/task'
16
17
  require 'maid/rule'
17
18
  require 'maid/trash_migration'
18
19
  require 'maid/user_agent'
20
+ require 'maid/watch'
21
+ require 'maid/repeat'
19
22
 
20
23
  module Maid
21
24
  class << self
@@ -29,7 +32,7 @@ module Maid
29
32
 
30
33
  # Define rules for the Maid instance.
31
34
  def rules(&block)
32
- @instance.instance_eval(&block)
35
+ @instance.instance_exec(&block)
33
36
  end
34
37
  end
35
38
  end
@@ -57,6 +57,25 @@ class Maid::App < Thor
57
57
 
58
58
  say "Sample rules created at #{ path.inspect }", :green
59
59
  end
60
+
61
+ desc 'daemon', 'Runs the watch/repeat rules in a daemon'
62
+ method_option :rules, :type => :string, :aliases => %w(-r)
63
+ method_option :silent, :type => :boolean, :aliases => %w(-s)
64
+ def daemon
65
+ maid = Maid::Maid.new(maid_options(options))
66
+
67
+ if Maid::TrashMigration.needed?
68
+ migrate_trash
69
+ return
70
+ end
71
+
72
+ unless options.silent?
73
+ say "Logging actions to #{ maid.log_device.inspect }"
74
+ end
75
+
76
+ maid.load_rules
77
+ maid.daemonize
78
+ end
60
79
 
61
80
  no_tasks do
62
81
  def maid_options(options)
@@ -1,6 +1,5 @@
1
1
  require 'fileutils'
2
2
  require 'logger'
3
-
4
3
  require 'xdg'
5
4
 
6
5
  # Maid cleans up according to the given rules, logging what it does.
@@ -8,6 +7,7 @@ require 'xdg'
8
7
  # TODO: Rename to something less ambiguous, e.g. "cleaning agent", "cleaner", "vacuum", etc. Having this class within
9
8
  # the `Maid` module makes things confusing.
10
9
  class Maid::Maid
10
+ include Maid::RuleContainer
11
11
  DEFAULTS = {
12
12
  :progname => 'Maid',
13
13
 
@@ -20,7 +20,7 @@ class Maid::Maid
20
20
  :file_options => { :noop => false }, # for `FileUtils`
21
21
  }.freeze
22
22
 
23
- attr_reader :file_options, :logger, :log_device, :rules, :rules_path, :trash_path
23
+ attr_reader :file_options, :logger, :log_device, :rules_path, :trash_path, :watches, :repeats
24
24
  include ::Maid::Tools
25
25
 
26
26
  # Make a new Maid, setting up paths for the log and trash.
@@ -52,6 +52,8 @@ class Maid::Maid
52
52
  FileUtils.mkdir_p(File.expand_path('~/.maid'))
53
53
  FileUtils.mkdir_p(@trash_path)
54
54
 
55
+ @watches = []
56
+ @repeats = []
55
57
  @rules = []
56
58
  end
57
59
 
@@ -82,20 +84,31 @@ class Maid::Maid
82
84
  rescue LoadError => e
83
85
  STDERR.puts e.message
84
86
  end
85
-
86
- # Register a rule with a description and instructions (lambda function).
87
- def rule(description, &instructions)
88
- @rules << ::Maid::Rule.new(description, instructions)
87
+
88
+ def watch(path, &rules)
89
+ @watches << ::Maid::Watch.new(self, path, &rules)
89
90
  end
90
-
91
- # Follow all registered rules.
92
- def follow_rules
93
- @rules.each do |rule|
94
- @logger.info("Rule: #{ rule.description }")
95
- rule.follow
91
+
92
+ def repeat(timestring, &rules)
93
+ @repeats << ::Maid::Repeat.new(self, timestring, &rules)
94
+ end
95
+
96
+ # Daemonizes the process by starting all watches and repeats and joining
97
+ # the threads of the schedulers/watchers
98
+ def daemonize
99
+ if @watches.empty? && @repeats.empty?
100
+ STDERR.puts 'Cannot run daemon. Nothing to watch or repeat.'
101
+ else
102
+ all = @watches + @repeats
103
+ all.each(&:run)
104
+ trap("SIGINT") do
105
+ all.each(&:stop)
106
+ exit!
107
+ end
108
+ sleep
96
109
  end
97
110
  end
98
-
111
+
99
112
  # Run a shell command.
100
113
  #--
101
114
  # Delegates to `Kernel.\``. Made primarily for testing other commands and some error handling.
@@ -0,0 +1,24 @@
1
+ require 'rufus-scheduler'
2
+ class Maid::Repeat
3
+ include Maid::RuleContainer
4
+
5
+ attr_reader :timestring, :scheduler, :logger
6
+
7
+ def initialize(maid, timestring, &rules)
8
+ @maid = maid
9
+ @logger = maid.logger # TODO: Maybe it's better to create seperate loggers?
10
+ @scheduler = Rufus::Scheduler.singleton
11
+ @timestring = timestring
12
+ initialize_rules(&rules)
13
+ end
14
+
15
+ def run
16
+ unless rules.empty?
17
+ @scheduler.repeat(timestring) { follow_rules }
18
+ end
19
+ end
20
+
21
+ def stop
22
+ @scheduler.shutdown(:join) # Join the work threads
23
+ end
24
+ end
@@ -1,6 +1,6 @@
1
1
  class Maid::Rule < Struct.new(:description, :instructions)
2
2
  # Follow the instructions of the rule.
3
- def follow
4
- instructions.call
3
+ def follow(*args)
4
+ instructions.call(*args)
5
5
  end
6
6
  end
@@ -0,0 +1,22 @@
1
+ module Maid::RuleContainer
2
+ attr_reader :rules
3
+
4
+ # initialize_rules
5
+ def initialize_rules(&rules)
6
+ @rules ||= []
7
+ instance_exec(&rules)
8
+ end
9
+
10
+ # Register a rule with a description and instructions (lambda function).
11
+ def rule(description, &instructions)
12
+ @rules << ::Maid::Rule.new(description, instructions)
13
+ end
14
+
15
+ # Follow all registered rules.
16
+ def follow_rules(*args)
17
+ @rules.each do |rule|
18
+ @logger.info("Rule: #{ rule.description }") unless @logger.nil?
19
+ rule.follow(*args)
20
+ end
21
+ end
22
+ end
@@ -685,19 +685,4 @@ module Maid::Tools
685
685
  clean = raw[1, raw.length - 2]
686
686
  clean.split(/,\s+/).map { |s| t = s.strip; t[1, t.length - 2] }
687
687
  end
688
-
689
- # ---
690
- # Something @benjaminoakes wrote:
691
-
692
- # Maid.rules do
693
- # dir('*-2012.pdf').each do |p|
694
- # move(p, normalize_date(p))
695
- # end
696
- # end
697
-
698
- def normalize_date(path)
699
- basename = File.basename(path, '.pdf')
700
- latent_date = Date.strptime(basename, '%m-%d-%Y')
701
- latent_date.strftime('%Y.%m.%d.pdf')
702
- end
703
688
  end
@@ -1,3 +1,3 @@
1
1
  module Maid
2
- VERSION = '0.6.0.alpha.1'
2
+ VERSION = '0.6.0.alpha.2'
3
3
  end
@@ -0,0 +1,30 @@
1
+ require 'listen'
2
+ class Maid::Watch
3
+ include Maid::RuleContainer
4
+
5
+ attr_reader :path, :listener, :logger
6
+
7
+ def initialize(maid, path, &rules)
8
+ @maid = maid
9
+ @logger = maid.logger # TODO: Maybe it's better to create seperate loggers?
10
+ @path = File.expand_path(path)
11
+ initialize_rules(&rules)
12
+ end
13
+
14
+ def run
15
+ unless rules.empty?
16
+ @listener = Listen.to(path) do |modified, added, removed|
17
+ follow_rules(modified, added, removed)
18
+ end
19
+ @listener.start
20
+ end
21
+ end
22
+
23
+ def stop
24
+ @listener.stop
25
+ end
26
+
27
+ def join
28
+ @listener.thread.join unless @listener.nil? || @listener.paused?
29
+ end
30
+ end
@@ -15,7 +15,7 @@ Gem::Specification.new do |s|
15
15
 
16
16
  s.rubyforge_project = 'maid'
17
17
 
18
- s.required_ruby_version = Gem::Requirement.new('>= 1.9.3')
18
+ s.required_ruby_version = '>= 1.9.3'
19
19
 
20
20
  # Strategy: if possible, use ranges (so there are fewer chances of version conflicts)
21
21
  s.add_dependency('escape', '>= 0.0.1', '< 0.1.0') # Used for better Ruby 1.8.7 support, could be replaced with `Shellwords`
@@ -24,6 +24,9 @@ Gem::Specification.new do |s|
24
24
  s.add_dependency('mime-types', '~> 2.0')
25
25
  s.add_dependency('rubyzip', '~> 1.1.0')
26
26
  s.add_dependency('xdg', '~> 2.2.3') # previous versions had bugs
27
+ s.add_dependency('listen', '~> 2.7.9')
28
+ s.add_dependency('rufus-scheduler', '~> 3.0.6')
29
+
27
30
  # TODO: use one of these two gems instead of `mdfind`. **But** They have to work on Linux as well.
28
31
  #
29
32
  # s.add_dependency('mac-spotlight', '~> 0.0.4')
@@ -31,10 +34,10 @@ Gem::Specification.new do |s|
31
34
 
32
35
  # Strategy: specific versions (since they're just for development)
33
36
  s.add_development_dependency('fakefs', '~> 0.4.2')
34
- s.add_development_dependency('guard', '~> 2.2.2')
35
- s.add_development_dependency('guard-rspec', '~> 4.2.1')
36
- s.add_development_dependency('rake', '~> 10.1.0')
37
- s.add_development_dependency('redcarpet', '~> 3.0.0') # Soft dependency of `yard`
37
+ s.add_development_dependency('guard', '~> 2.6.1')
38
+ s.add_development_dependency('guard-rspec', '~> 4.3.1')
39
+ s.add_development_dependency('rake', '~> 10.3.2')
40
+ s.add_development_dependency('redcarpet', '~> 3.1.2') # Soft dependency of `yard`
38
41
  s.add_development_dependency('rspec', '>= 2.14', '< 3.0')
39
42
  s.add_development_dependency('timecop', '~> 0.7.0')
40
43
  s.add_development_dependency('yard', '~> 0.8.4')
@@ -22,14 +22,11 @@ function install-pkg-if-ruby {
22
22
  fi
23
23
  }
24
24
 
25
- sudo apt-get update
26
- sudo apt-get install -y python-software-properties
27
- sudo add-apt-repository -y ppa:brightbox/ruby-ng
28
25
  sudo apt-get update
29
26
 
30
- ## Dependencies
31
- install-pkg-if-ruby '2.1.0' 'ruby2.1'
32
- install-pkg-if-ruby '1.9.3' 'ruby1.9.1' # Installs `ruby 1.9.3p0`
27
+ # ## Dependencies
28
+ # Installs `ruby 1.9.3p0`
29
+ install-pkg-if-ruby '1.9.3' 'ruby1.9.1'
33
30
  install-pkg-if-ruby 'jruby' 'jruby'
34
31
 
35
32
  # ## Development dependencies
@@ -41,14 +38,6 @@ install-pkg 'make'
41
38
  install-pkg 'libffi-dev'
42
39
  install-pkg-if-ruby '1.9.3' 'ruby1.9.1-dev'
43
40
 
44
- # # wget http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.1.tar.gz
45
- # wget 'http://192.168.0.1:3000/serv/Software/Source/ruby-2.1.1.tar.gz'
46
- # tar xvfz ruby-2.1.1.tar.gz
47
- # cd ruby-2.1.1
48
- # ./configure
49
- # make
50
- # sudo make install
51
-
52
41
  sudo gem install bundler
53
42
  cd /vagrant
54
43
  bundle install
@@ -176,6 +176,40 @@ module Maid
176
176
  expect(@maid.rules.first.description).to eq('description')
177
177
  end
178
178
  end
179
+
180
+ describe '#watch' do
181
+ before do
182
+ @maid = Maid.new
183
+ end
184
+
185
+ it 'adds a watch to the list of watches' do
186
+ expect(@maid.watches.length).to eq(0)
187
+
188
+ @maid.watch('watch_dir') do
189
+ 'instructions'
190
+ end
191
+
192
+ expect(@maid.watches.length).to eq(1)
193
+ expect(@maid.watches.first.path).to eq(File.expand_path('watch_dir'))
194
+ end
195
+ end
196
+
197
+ describe '#repeat' do
198
+ before do
199
+ @maid = Maid.new
200
+ end
201
+
202
+ it 'adds a repeat to the list of repeats' do
203
+ expect(@maid.repeats.length).to eq(0)
204
+
205
+ @maid.repeat('1s') do
206
+ 'instructions'
207
+ end
208
+
209
+ expect(@maid.repeats.length).to eq(1)
210
+ expect(@maid.repeats.first.timestring).to eq('1s')
211
+ end
212
+ end
179
213
 
180
214
  describe '#follow_rules' do
181
215
  it 'follows each rule' do
@@ -2,7 +2,7 @@
2
2
  require 'spec_helper'
3
3
 
4
4
  # Workaround for Ruby 2.1.0, remove after https://github.com/defunkt/fakefs/pull/209 is released
5
- if RUBY_VERSION == '2.1.0' || RUBY_VERSION == '2.1.1'
5
+ if RUBY_VERSION =~ /2\.[12]\.\d/
6
6
  module FakeFS
7
7
  class Dir
8
8
  def self.entries(dirname, opts = {})
@@ -359,7 +359,7 @@ module Maid
359
359
  end
360
360
 
361
361
  it "returns an array of all the files' names when no block is given" do
362
- expect(@maid.find(@dir)).to eq([@dir_expand_path, @file_expand_path])
362
+ expect(@maid.find(@dir)).to match_array([@dir_expand_path, @file_expand_path])
363
363
  end
364
364
  end
365
365
 
@@ -590,7 +590,7 @@ module Maid
590
590
  dupes = @maid.newest_dupes_in(file_fixtures_glob)
591
591
 
592
592
  basenames = dupes.flatten.map { |p| File.basename(p) }
593
- expect(basenames).to eq(%w(bar.zip 1.zip))
593
+ expect(basenames).to match_array(%w(bar.zip 1.zip))
594
594
  end
595
595
  end
596
596
 
metadata CHANGED
@@ -1,30 +1,19 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maid
3
3
  version: !ruby/object:Gem::Version
4
+ version: 0.6.0.alpha.2
4
5
  prerelease: 6
5
- version: 0.6.0.alpha.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Benjamin Oakes
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-09-27 00:00:00.000000000 Z
12
+ date: 2014-12-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- type: :runtime
16
- prerelease: false
17
15
  name: escape
18
- requirement: !ruby/object:Gem::Requirement
19
- none: false
20
- requirements:
21
- - - ! '>='
22
- - !ruby/object:Gem::Version
23
- version: 0.0.1
24
- - - <
25
- - !ruby/object:Gem::Version
26
- version: 0.1.0
27
- version_requirements: !ruby/object:Gem::Requirement
16
+ requirement: &19806060 !ruby/object:Gem::Requirement
28
17
  none: false
29
18
  requirements:
30
19
  - - ! '>='
@@ -33,11 +22,12 @@ dependencies:
33
22
  - - <
34
23
  - !ruby/object:Gem::Version
35
24
  version: 0.1.0
36
- - !ruby/object:Gem::Dependency
37
25
  type: :runtime
38
26
  prerelease: false
27
+ version_requirements: *19806060
28
+ - !ruby/object:Gem::Dependency
39
29
  name: thor
40
- requirement: !ruby/object:Gem::Requirement
30
+ requirement: &19804940 !ruby/object:Gem::Requirement
41
31
  none: false
42
32
  requirements:
43
33
  - - ! '>='
@@ -46,173 +36,133 @@ dependencies:
46
36
  - - <
47
37
  - !ruby/object:Gem::Version
48
38
  version: 1.0.0
49
- version_requirements: !ruby/object:Gem::Requirement
50
- none: false
51
- requirements:
52
- - - ! '>='
53
- - !ruby/object:Gem::Version
54
- version: 0.14.0
55
- - - <
56
- - !ruby/object:Gem::Version
57
- version: 1.0.0
58
- - !ruby/object:Gem::Dependency
59
39
  type: :runtime
60
40
  prerelease: false
41
+ version_requirements: *19804940
42
+ - !ruby/object:Gem::Dependency
61
43
  name: deprecated
62
- requirement: !ruby/object:Gem::Requirement
44
+ requirement: &19803580 !ruby/object:Gem::Requirement
63
45
  none: false
64
46
  requirements:
65
47
  - - ~>
66
48
  - !ruby/object:Gem::Version
67
49
  version: 3.0.0
68
- version_requirements: !ruby/object:Gem::Requirement
69
- none: false
70
- requirements:
71
- - - ~>
72
- - !ruby/object:Gem::Version
73
- version: 3.0.0
74
- - !ruby/object:Gem::Dependency
75
50
  type: :runtime
76
51
  prerelease: false
52
+ version_requirements: *19803580
53
+ - !ruby/object:Gem::Dependency
77
54
  name: mime-types
78
- requirement: !ruby/object:Gem::Requirement
79
- none: false
80
- requirements:
81
- - - ~>
82
- - !ruby/object:Gem::Version
83
- version: '2.0'
84
- version_requirements: !ruby/object:Gem::Requirement
55
+ requirement: &19803040 !ruby/object:Gem::Requirement
85
56
  none: false
86
57
  requirements:
87
58
  - - ~>
88
59
  - !ruby/object:Gem::Version
89
60
  version: '2.0'
90
- - !ruby/object:Gem::Dependency
91
61
  type: :runtime
92
62
  prerelease: false
63
+ version_requirements: *19803040
64
+ - !ruby/object:Gem::Dependency
93
65
  name: rubyzip
94
- requirement: !ruby/object:Gem::Requirement
95
- none: false
96
- requirements:
97
- - - ~>
98
- - !ruby/object:Gem::Version
99
- version: 1.1.0
100
- version_requirements: !ruby/object:Gem::Requirement
66
+ requirement: &19802100 !ruby/object:Gem::Requirement
101
67
  none: false
102
68
  requirements:
103
69
  - - ~>
104
70
  - !ruby/object:Gem::Version
105
71
  version: 1.1.0
106
- - !ruby/object:Gem::Dependency
107
72
  type: :runtime
108
73
  prerelease: false
74
+ version_requirements: *19802100
75
+ - !ruby/object:Gem::Dependency
109
76
  name: xdg
110
- requirement: !ruby/object:Gem::Requirement
77
+ requirement: &19801280 !ruby/object:Gem::Requirement
111
78
  none: false
112
79
  requirements:
113
80
  - - ~>
114
81
  - !ruby/object:Gem::Version
115
82
  version: 2.2.3
116
- version_requirements: !ruby/object:Gem::Requirement
83
+ type: :runtime
84
+ prerelease: false
85
+ version_requirements: *19801280
86
+ - !ruby/object:Gem::Dependency
87
+ name: listen
88
+ requirement: &19800320 !ruby/object:Gem::Requirement
117
89
  none: false
118
90
  requirements:
119
91
  - - ~>
120
92
  - !ruby/object:Gem::Version
121
- version: 2.2.3
122
- - !ruby/object:Gem::Dependency
123
- type: :development
93
+ version: 2.7.9
94
+ type: :runtime
124
95
  prerelease: false
125
- name: fakefs
126
- requirement: !ruby/object:Gem::Requirement
96
+ version_requirements: *19800320
97
+ - !ruby/object:Gem::Dependency
98
+ name: rufus-scheduler
99
+ requirement: &19786680 !ruby/object:Gem::Requirement
127
100
  none: false
128
101
  requirements:
129
102
  - - ~>
130
103
  - !ruby/object:Gem::Version
131
- version: 0.4.2
132
- version_requirements: !ruby/object:Gem::Requirement
104
+ version: 3.0.6
105
+ type: :runtime
106
+ prerelease: false
107
+ version_requirements: *19786680
108
+ - !ruby/object:Gem::Dependency
109
+ name: fakefs
110
+ requirement: &19785940 !ruby/object:Gem::Requirement
133
111
  none: false
134
112
  requirements:
135
113
  - - ~>
136
114
  - !ruby/object:Gem::Version
137
115
  version: 0.4.2
138
- - !ruby/object:Gem::Dependency
139
116
  type: :development
140
117
  prerelease: false
118
+ version_requirements: *19785940
119
+ - !ruby/object:Gem::Dependency
141
120
  name: guard
142
- requirement: !ruby/object:Gem::Requirement
121
+ requirement: &19785300 !ruby/object:Gem::Requirement
143
122
  none: false
144
123
  requirements:
145
124
  - - ~>
146
125
  - !ruby/object:Gem::Version
147
- version: 2.2.2
148
- version_requirements: !ruby/object:Gem::Requirement
149
- none: false
150
- requirements:
151
- - - ~>
152
- - !ruby/object:Gem::Version
153
- version: 2.2.2
154
- - !ruby/object:Gem::Dependency
126
+ version: 2.6.1
155
127
  type: :development
156
128
  prerelease: false
129
+ version_requirements: *19785300
130
+ - !ruby/object:Gem::Dependency
157
131
  name: guard-rspec
158
- requirement: !ruby/object:Gem::Requirement
159
- none: false
160
- requirements:
161
- - - ~>
162
- - !ruby/object:Gem::Version
163
- version: 4.2.1
164
- version_requirements: !ruby/object:Gem::Requirement
132
+ requirement: &19784740 !ruby/object:Gem::Requirement
165
133
  none: false
166
134
  requirements:
167
135
  - - ~>
168
136
  - !ruby/object:Gem::Version
169
- version: 4.2.1
170
- - !ruby/object:Gem::Dependency
137
+ version: 4.3.1
171
138
  type: :development
172
139
  prerelease: false
140
+ version_requirements: *19784740
141
+ - !ruby/object:Gem::Dependency
173
142
  name: rake
174
- requirement: !ruby/object:Gem::Requirement
175
- none: false
176
- requirements:
177
- - - ~>
178
- - !ruby/object:Gem::Version
179
- version: 10.1.0
180
- version_requirements: !ruby/object:Gem::Requirement
143
+ requirement: &19784140 !ruby/object:Gem::Requirement
181
144
  none: false
182
145
  requirements:
183
146
  - - ~>
184
147
  - !ruby/object:Gem::Version
185
- version: 10.1.0
186
- - !ruby/object:Gem::Dependency
148
+ version: 10.3.2
187
149
  type: :development
188
150
  prerelease: false
151
+ version_requirements: *19784140
152
+ - !ruby/object:Gem::Dependency
189
153
  name: redcarpet
190
- requirement: !ruby/object:Gem::Requirement
154
+ requirement: &19783380 !ruby/object:Gem::Requirement
191
155
  none: false
192
156
  requirements:
193
157
  - - ~>
194
158
  - !ruby/object:Gem::Version
195
- version: 3.0.0
196
- version_requirements: !ruby/object:Gem::Requirement
197
- none: false
198
- requirements:
199
- - - ~>
200
- - !ruby/object:Gem::Version
201
- version: 3.0.0
202
- - !ruby/object:Gem::Dependency
159
+ version: 3.1.2
203
160
  type: :development
204
161
  prerelease: false
162
+ version_requirements: *19783380
163
+ - !ruby/object:Gem::Dependency
205
164
  name: rspec
206
- requirement: !ruby/object:Gem::Requirement
207
- none: false
208
- requirements:
209
- - - ! '>='
210
- - !ruby/object:Gem::Version
211
- version: '2.14'
212
- - - <
213
- - !ruby/object:Gem::Version
214
- version: '3.0'
215
- version_requirements: !ruby/object:Gem::Requirement
165
+ requirement: &19782360 !ruby/object:Gem::Requirement
216
166
  none: false
217
167
  requirements:
218
168
  - - ! '>='
@@ -221,70 +171,53 @@ dependencies:
221
171
  - - <
222
172
  - !ruby/object:Gem::Version
223
173
  version: '3.0'
224
- - !ruby/object:Gem::Dependency
225
174
  type: :development
226
175
  prerelease: false
176
+ version_requirements: *19782360
177
+ - !ruby/object:Gem::Dependency
227
178
  name: timecop
228
- requirement: !ruby/object:Gem::Requirement
229
- none: false
230
- requirements:
231
- - - ~>
232
- - !ruby/object:Gem::Version
233
- version: 0.7.0
234
- version_requirements: !ruby/object:Gem::Requirement
179
+ requirement: &19781640 !ruby/object:Gem::Requirement
235
180
  none: false
236
181
  requirements:
237
182
  - - ~>
238
183
  - !ruby/object:Gem::Version
239
184
  version: 0.7.0
240
- - !ruby/object:Gem::Dependency
241
185
  type: :development
242
186
  prerelease: false
187
+ version_requirements: *19781640
188
+ - !ruby/object:Gem::Dependency
243
189
  name: yard
244
- requirement: !ruby/object:Gem::Requirement
190
+ requirement: &19780960 !ruby/object:Gem::Requirement
245
191
  none: false
246
192
  requirements:
247
193
  - - ~>
248
194
  - !ruby/object:Gem::Version
249
195
  version: 0.8.4
250
- version_requirements: !ruby/object:Gem::Requirement
251
- none: false
252
- requirements:
253
- - - ~>
254
- - !ruby/object:Gem::Version
255
- version: 0.8.4
256
- - !ruby/object:Gem::Dependency
257
196
  type: :development
258
197
  prerelease: false
198
+ version_requirements: *19780960
199
+ - !ruby/object:Gem::Dependency
259
200
  name: rb-inotify
260
- requirement: !ruby/object:Gem::Requirement
261
- none: false
262
- requirements:
263
- - - ~>
264
- - !ruby/object:Gem::Version
265
- version: 0.9.0
266
- version_requirements: !ruby/object:Gem::Requirement
201
+ requirement: &19780280 !ruby/object:Gem::Requirement
267
202
  none: false
268
203
  requirements:
269
204
  - - ~>
270
205
  - !ruby/object:Gem::Version
271
206
  version: 0.9.0
272
- - !ruby/object:Gem::Dependency
273
207
  type: :development
274
208
  prerelease: false
209
+ version_requirements: *19780280
210
+ - !ruby/object:Gem::Dependency
275
211
  name: rb-fsevent
276
- requirement: !ruby/object:Gem::Requirement
277
- none: false
278
- requirements:
279
- - - ~>
280
- - !ruby/object:Gem::Version
281
- version: 0.9.2
282
- version_requirements: !ruby/object:Gem::Requirement
212
+ requirement: &19779560 !ruby/object:Gem::Requirement
283
213
  none: false
284
214
  requirements:
285
215
  - - ~>
286
216
  - !ruby/object:Gem::Version
287
217
  version: 0.9.2
218
+ type: :development
219
+ prerelease: false
220
+ version_requirements: *19779560
288
221
  description: ! 'Be lazy: let Maid clean up after you. Think of it as "Hazel for hackers".'
289
222
  email:
290
223
  - hello@benjaminoakes.com
@@ -316,12 +249,15 @@ files:
316
249
  - lib/maid/platform.rb
317
250
  - lib/maid/rake/single_rule.rb
318
251
  - lib/maid/rake/task.rb
252
+ - lib/maid/repeat.rb
319
253
  - lib/maid/rule.rb
254
+ - lib/maid/rule_container.rb
320
255
  - lib/maid/rules.sample.rb
321
256
  - lib/maid/tools.rb
322
257
  - lib/maid/trash_migration.rb
323
258
  - lib/maid/user_agent.rb
324
259
  - lib/maid/version.rb
260
+ - lib/maid/watch.rb
325
261
  - maid.gemspec
326
262
  - resources/OneThingWell.png
327
263
  - resources/download-for-ubuntu.png
@@ -371,7 +307,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
371
307
  version: 1.3.1
372
308
  requirements: []
373
309
  rubyforge_project: maid
374
- rubygems_version: 1.8.23.2
310
+ rubygems_version: 1.8.11
375
311
  signing_key:
376
312
  specification_version: 3
377
313
  summary: ! 'Be lazy: let Maid clean up after you. Think of it as "Hazel for hackers".'