maid 0.6.0.alpha.6 → 0.6.0.beta.1

Sign up to get free protection for your applications and to get access to all the features.
data/.travis.yml CHANGED
@@ -1,4 +1,5 @@
1
1
  language: ruby
2
+ sudo: false
2
3
  cache: bundler
3
4
  rvm:
4
5
  - 1.9.3
@@ -10,4 +11,3 @@ rvm:
10
11
  - 2.1.4
11
12
  - 2.1.5
12
13
  - 2.2.0
13
- - ruby-head
data/ChangeLog CHANGED
@@ -1,11 +1,16 @@
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, 2.2.0.
3
+ * Stats! { 'collaborators' => 17, 'downloads' => 16684, 'forks' => 48,
4
+ 'open_issues' => 35, 'closed_issues' => 98, 'stars' => 1045,
5
+ 'users_sharing_rules' => 40 }
6
+ * Started official support for Ruby 2.1.1, 2.1.2, 2.1.3, 2.1.4, 2.1.5, and 2.2.0.
7
+ * Updated dependencies: "thor", "listen", "rufus-scheduler"
4
8
  * Jayson Rhynas: Add Safari download detection to "downloading?" (Closes: #121)
5
9
  * Pedro Lambert: Add support for Rake tasks defined by Maid (Closes: #68, #123)
6
10
  * Jurriaan Pruis: Add daemon mode and repeat support (Closes: #126, #131)
7
11
  * Jurriaan Pruis: Add "ignore" option support for "watch" (Closes: #132)
8
12
  * Nico Ritschel: Add "copy" tool (Closes: #72, #133)
13
+ * Add maid introduction and links (Closes: #128)
9
14
 
10
15
  -- Benjamin Oakes <hello@benjaminoakes.com> TODO
11
16
 
data/README.md CHANGED
@@ -272,4 +272,4 @@ ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
272
272
 
273
273
  GPLv2. See LICENSE for a copy.
274
274
 
275
- [documentation]: http://rubydoc.info/github/benjaminoakes/maid/master/frames
275
+ [documentation]: http://www.rubydoc.info/github/benjaminoakes/maid/master/Maid/Tools
data/lib/maid/app.rb CHANGED
@@ -4,7 +4,23 @@ require 'thor'
4
4
 
5
5
  class Maid::App < Thor
6
6
  check_unknown_options!
7
- default_task 'help'
7
+ default_task 'introduction'
8
+
9
+ desc 'introduction', 'Become aquainted with maid'
10
+ def introduction
11
+ say <<EOF
12
+ #{Maid::UserAgent.short}
13
+ #{'=' * Maid::UserAgent.short.length}
14
+
15
+ #{Maid::SUMMARY}
16
+
17
+ * Tutorial: https://github.com/benjaminoakes/maid#tutorial
18
+ * Community & examples: https://github.com/benjaminoakes/maid/wiki
19
+ * Documentation: http://www.rubydoc.info/github/benjaminoakes/maid/master/Maid/Tools
20
+
21
+ For more information, run "maid help".
22
+ EOF
23
+ end
8
24
 
9
25
  def self.sample_rules_path
10
26
  File.join(File.dirname(Maid::Maid::DEFAULTS[:rules_path]), 'rules.sample.rb')
@@ -4,11 +4,13 @@
4
4
  # which can't depend on other gems. FIXME: That's no longer accurate, so this could be `Platform.user_agent` instead.
5
5
  module Maid::UserAgent
6
6
  class << self
7
+ def short
8
+ "Maid/#{ ::Maid.const_get(:VERSION) }"
9
+ end
10
+
7
11
  # This used to be called `#to_s`, but that made things difficult when testing.
8
12
  def value
9
- maid = "Maid/#{ ::Maid.const_get(:VERSION) }"
10
-
11
- "#{ maid } (#{ RUBY_DESCRIPTION })"
13
+ "#{ short } (#{ RUBY_DESCRIPTION })"
12
14
  end
13
15
  end
14
16
  end
data/lib/maid/version.rb CHANGED
@@ -1,3 +1,4 @@
1
1
  module Maid
2
- VERSION = '0.6.0.alpha.6'
2
+ VERSION = '0.6.0.beta.1'
3
+ SUMMARY = 'Be lazy. Let Maid clean up after you, based on rules you define. Think of it as "Hazel for hackers".'
3
4
  end
data/maid.gemspec CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
10
10
  s.email = %w(hello@benjaminoakes.com)
11
11
  s.license = 'GPLv2'
12
12
  s.homepage = 'http://github.com/benjaminoakes/maid'
13
- s.summary = 'Be lazy: let Maid clean up after you. Think of it as "Hazel for hackers".'
13
+ s.summary = Maid::SUMMARY
14
14
  s.description = s.summary
15
15
 
16
16
  s.rubyforge_project = 'maid'
@@ -554,32 +554,31 @@ module Maid
554
554
  FileUtils.mkdir_p(@dst_dir = '~/Destination/')
555
555
  end
556
556
 
557
- it 'should move expanded paths, passing file_options' do
557
+ it 'copies expanded paths, passing file_options' do
558
558
  @maid.copy(@src_file, @dst_dir)
559
- File.exists?(@dst_dir + @file_name).should be_true
559
+ expect(File.exists?(@dst_dir + @file_name)).to be_truthy
560
560
  end
561
561
 
562
- it 'should log the move' do
563
- @logger.should_receive(:info)
562
+ it 'logs the copy' do
563
+ expect(@logger).to receive(:info)
564
564
  @maid.copy(@src_file, @dst_dir)
565
565
  end
566
566
 
567
- it 'should not move if the target already exists' do
567
+ it 'does not copy if the target already exists' do
568
568
  FileUtils.touch(@dst_dir + @file_name)
569
- @logger.should_receive(:warn)
569
+ expect(@logger).to receive(:warn)
570
570
 
571
571
  @maid.copy(@src_file, @dst_dir)
572
572
  end
573
573
 
574
- it 'should handle multiple from paths' do
574
+ it 'handle multiple from paths' do
575
575
  second_src_file = @src_dir + (second_file_name = 'bar.zip')
576
576
  FileUtils.touch(second_src_file)
577
577
  src_files = [@src_file, second_src_file]
578
578
 
579
579
  @maid.copy(src_files, @dst_dir)
580
- p "Source files: #{src_files}, dst_dir: #{@dst_dir}"
581
- File.exist?(@dst_dir + @file_name).should be_true
582
- File.exist?(@dst_dir + second_file_name).should be_true
580
+ expect(File.exist?(@dst_dir + @file_name)).to be_truthy
581
+ expect(File.exist?(@dst_dir + second_file_name)).to be_truthy
583
582
  end
584
583
  end
585
584
  end
@@ -10,5 +10,12 @@ module Maid
10
10
  expect(UserAgent.value).to eq('Maid/0.0.1 (ruby 1.8.8p0 (1970-01-01 revision 1) [pdp7-unix])')
11
11
  end
12
12
  end
13
+
14
+ describe 'the short user agent string' do
15
+ it 'is formatted with the Maid version' do
16
+ ::Maid.stub(:const_get).with(:VERSION) { '0.0.1' }
17
+ expect(UserAgent.short).to eq('Maid/0.0.1')
18
+ end
19
+ end
13
20
  end
14
21
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0.alpha.6
4
+ version: 0.6.0.beta.1
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-12-30 00:00:00.000000000 Z
12
+ date: 2014-12-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: escape
16
- requirement: &7178700 !ruby/object:Gem::Requirement
16
+ requirement: &12455220 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -24,10 +24,10 @@ dependencies:
24
24
  version: 0.1.0
25
25
  type: :runtime
26
26
  prerelease: false
27
- version_requirements: *7178700
27
+ version_requirements: *12455220
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: thor
30
- requirement: &7174560 !ruby/object:Gem::Requirement
30
+ requirement: &12487080 !ruby/object:Gem::Requirement
31
31
  none: false
32
32
  requirements:
33
33
  - - ! '>='
@@ -38,10 +38,10 @@ dependencies:
38
38
  version: 1.0.0
39
39
  type: :runtime
40
40
  prerelease: false
41
- version_requirements: *7174560
41
+ version_requirements: *12487080
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: deprecated
44
- requirement: &7150080 !ruby/object:Gem::Requirement
44
+ requirement: &12496420 !ruby/object:Gem::Requirement
45
45
  none: false
46
46
  requirements:
47
47
  - - ~>
@@ -49,10 +49,10 @@ dependencies:
49
49
  version: 3.0.0
50
50
  type: :runtime
51
51
  prerelease: false
52
- version_requirements: *7150080
52
+ version_requirements: *12496420
53
53
  - !ruby/object:Gem::Dependency
54
54
  name: mime-types
55
- requirement: &7149140 !ruby/object:Gem::Requirement
55
+ requirement: &12489500 !ruby/object:Gem::Requirement
56
56
  none: false
57
57
  requirements:
58
58
  - - ~>
@@ -60,10 +60,10 @@ dependencies:
60
60
  version: '2.0'
61
61
  type: :runtime
62
62
  prerelease: false
63
- version_requirements: *7149140
63
+ version_requirements: *12489500
64
64
  - !ruby/object:Gem::Dependency
65
65
  name: rubyzip
66
- requirement: &7148160 !ruby/object:Gem::Requirement
66
+ requirement: &12548980 !ruby/object:Gem::Requirement
67
67
  none: false
68
68
  requirements:
69
69
  - - ~>
@@ -71,10 +71,10 @@ dependencies:
71
71
  version: 1.1.0
72
72
  type: :runtime
73
73
  prerelease: false
74
- version_requirements: *7148160
74
+ version_requirements: *12548980
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: xdg
77
- requirement: &7147500 !ruby/object:Gem::Requirement
77
+ requirement: &12546220 !ruby/object:Gem::Requirement
78
78
  none: false
79
79
  requirements:
80
80
  - - ~>
@@ -82,10 +82,10 @@ dependencies:
82
82
  version: 2.2.3
83
83
  type: :runtime
84
84
  prerelease: false
85
- version_requirements: *7147500
85
+ version_requirements: *12546220
86
86
  - !ruby/object:Gem::Dependency
87
87
  name: listen
88
- requirement: &7146880 !ruby/object:Gem::Requirement
88
+ requirement: &12550460 !ruby/object:Gem::Requirement
89
89
  none: false
90
90
  requirements:
91
91
  - - ~>
@@ -93,10 +93,10 @@ dependencies:
93
93
  version: 2.8.0
94
94
  type: :runtime
95
95
  prerelease: false
96
- version_requirements: *7146880
96
+ version_requirements: *12550460
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rufus-scheduler
99
- requirement: &7146200 !ruby/object:Gem::Requirement
99
+ requirement: &12593220 !ruby/object:Gem::Requirement
100
100
  none: false
101
101
  requirements:
102
102
  - - ~>
@@ -104,10 +104,10 @@ dependencies:
104
104
  version: 3.0.6
105
105
  type: :runtime
106
106
  prerelease: false
107
- version_requirements: *7146200
107
+ version_requirements: *12593220
108
108
  - !ruby/object:Gem::Dependency
109
109
  name: fakefs
110
- requirement: &7145620 !ruby/object:Gem::Requirement
110
+ requirement: &12596320 !ruby/object:Gem::Requirement
111
111
  none: false
112
112
  requirements:
113
113
  - - ~>
@@ -115,10 +115,10 @@ dependencies:
115
115
  version: 0.4.2
116
116
  type: :development
117
117
  prerelease: false
118
- version_requirements: *7145620
118
+ version_requirements: *12596320
119
119
  - !ruby/object:Gem::Dependency
120
120
  name: guard
121
- requirement: &7145080 !ruby/object:Gem::Requirement
121
+ requirement: &12621840 !ruby/object:Gem::Requirement
122
122
  none: false
123
123
  requirements:
124
124
  - - ~>
@@ -126,10 +126,10 @@ dependencies:
126
126
  version: 2.10.4
127
127
  type: :development
128
128
  prerelease: false
129
- version_requirements: *7145080
129
+ version_requirements: *12621840
130
130
  - !ruby/object:Gem::Dependency
131
131
  name: guard-rspec
132
- requirement: &7144320 !ruby/object:Gem::Requirement
132
+ requirement: &12617380 !ruby/object:Gem::Requirement
133
133
  none: false
134
134
  requirements:
135
135
  - - ~>
@@ -137,10 +137,10 @@ dependencies:
137
137
  version: 4.5.0
138
138
  type: :development
139
139
  prerelease: false
140
- version_requirements: *7144320
140
+ version_requirements: *12617380
141
141
  - !ruby/object:Gem::Dependency
142
142
  name: rake
143
- requirement: &7143720 !ruby/object:Gem::Requirement
143
+ requirement: &12640620 !ruby/object:Gem::Requirement
144
144
  none: false
145
145
  requirements:
146
146
  - - ~>
@@ -148,10 +148,10 @@ dependencies:
148
148
  version: 10.4.2
149
149
  type: :development
150
150
  prerelease: false
151
- version_requirements: *7143720
151
+ version_requirements: *12640620
152
152
  - !ruby/object:Gem::Dependency
153
153
  name: redcarpet
154
- requirement: &7143080 !ruby/object:Gem::Requirement
154
+ requirement: &12638760 !ruby/object:Gem::Requirement
155
155
  none: false
156
156
  requirements:
157
157
  - - ~>
@@ -159,10 +159,10 @@ dependencies:
159
159
  version: 3.2.2
160
160
  type: :development
161
161
  prerelease: false
162
- version_requirements: *7143080
162
+ version_requirements: *12638760
163
163
  - !ruby/object:Gem::Dependency
164
164
  name: rspec
165
- requirement: &7142480 !ruby/object:Gem::Requirement
165
+ requirement: &12636260 !ruby/object:Gem::Requirement
166
166
  none: false
167
167
  requirements:
168
168
  - - ~>
@@ -170,10 +170,10 @@ dependencies:
170
170
  version: 3.1.0
171
171
  type: :development
172
172
  prerelease: false
173
- version_requirements: *7142480
173
+ version_requirements: *12636260
174
174
  - !ruby/object:Gem::Dependency
175
175
  name: timecop
176
- requirement: &7098200 !ruby/object:Gem::Requirement
176
+ requirement: &12634540 !ruby/object:Gem::Requirement
177
177
  none: false
178
178
  requirements:
179
179
  - - ~>
@@ -181,10 +181,10 @@ dependencies:
181
181
  version: 0.7.0
182
182
  type: :development
183
183
  prerelease: false
184
- version_requirements: *7098200
184
+ version_requirements: *12634540
185
185
  - !ruby/object:Gem::Dependency
186
186
  name: yard
187
- requirement: &7097280 !ruby/object:Gem::Requirement
187
+ requirement: &12659500 !ruby/object:Gem::Requirement
188
188
  none: false
189
189
  requirements:
190
190
  - - ~>
@@ -192,10 +192,10 @@ dependencies:
192
192
  version: 0.8.4
193
193
  type: :development
194
194
  prerelease: false
195
- version_requirements: *7097280
195
+ version_requirements: *12659500
196
196
  - !ruby/object:Gem::Dependency
197
197
  name: rb-inotify
198
- requirement: &7096540 !ruby/object:Gem::Requirement
198
+ requirement: &12657640 !ruby/object:Gem::Requirement
199
199
  none: false
200
200
  requirements:
201
201
  - - ~>
@@ -203,10 +203,10 @@ dependencies:
203
203
  version: 0.9.0
204
204
  type: :development
205
205
  prerelease: false
206
- version_requirements: *7096540
206
+ version_requirements: *12657640
207
207
  - !ruby/object:Gem::Dependency
208
208
  name: rb-fsevent
209
- requirement: &7095320 !ruby/object:Gem::Requirement
209
+ requirement: &12656220 !ruby/object:Gem::Requirement
210
210
  none: false
211
211
  requirements:
212
212
  - - ~>
@@ -214,8 +214,9 @@ dependencies:
214
214
  version: 0.9.2
215
215
  type: :development
216
216
  prerelease: false
217
- version_requirements: *7095320
218
- description: ! 'Be lazy: let Maid clean up after you. Think of it as "Hazel for hackers".'
217
+ version_requirements: *12656220
218
+ description: Be lazy. Let Maid clean up after you, based on rules you define. Think
219
+ of it as "Hazel for hackers".
219
220
  email:
220
221
  - hello@benjaminoakes.com
221
222
  executables:
@@ -307,6 +308,7 @@ rubyforge_project: maid
307
308
  rubygems_version: 1.8.11
308
309
  signing_key:
309
310
  specification_version: 3
310
- summary: ! 'Be lazy: let Maid clean up after you. Think of it as "Hazel for hackers".'
311
+ summary: Be lazy. Let Maid clean up after you, based on rules you define. Think of
312
+ it as "Hazel for hackers".
311
313
  test_files: []
312
314
  has_rdoc: