automatic 13.4.1 → 13.5.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,67 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Name:: Automatic::Plugin::Subscription::Text
3
+ # Author:: soramugi <http://soramugi.net>
4
+ # Created:: May 6, 2013
5
+ # Updated:: May 6, 2013
6
+ # Copyright:: soramugi Copyright (c) 2013
7
+ # License:: Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0.
8
+
9
+ require File.expand_path(File.dirname(__FILE__) + '../../../spec_helper')
10
+
11
+ require 'subscription/text'
12
+
13
+ describe Automatic::Plugin::SubscriptionText do
14
+ context "with empty titles" do
15
+ subject {
16
+ Automatic::Plugin::SubscriptionText.new(
17
+ { 'titles' => [] }
18
+ )
19
+ }
20
+
21
+ its(:run) { should be_empty }
22
+ end
23
+
24
+ context "with titles whose return feed" do
25
+ subject {
26
+ Automatic::Plugin::SubscriptionText.new(
27
+ { 'titles' => ["hugehuge"] }
28
+ )
29
+ }
30
+
31
+ its(:run) { should have(1).feed }
32
+ end
33
+
34
+ context "with urls whose return feed" do
35
+ subject {
36
+ Automatic::Plugin::SubscriptionText.new(
37
+ { 'urls' => ["http://hugehuge"] }
38
+ )
39
+ }
40
+
41
+ its(:run) { should have(1).feed }
42
+ end
43
+
44
+ context "with feeds whose return feed" do
45
+ subject {
46
+ Automatic::Plugin::SubscriptionText.new(
47
+ { 'feeds' => [ {'title' => 'huge', 'url' => "http://hugehuge"} ] }
48
+ )
49
+ }
50
+
51
+ its(:run) { should have(1).feed }
52
+ end
53
+
54
+ context "with retry to feeds whose invalid URL" do
55
+ subject {
56
+ Automatic::Plugin::SubscriptionText.new(
57
+ { 'titles' => [],
58
+ 'retry' => 1,
59
+ 'interval' => 1
60
+ }
61
+ )
62
+ }
63
+
64
+ its(:run) { should be_empty }
65
+ end
66
+
67
+ end
@@ -0,0 +1,57 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Name:: Automatic::Plugin::Subscription::Weather
3
+ # Author:: soramugi <http://soramugi.net>
4
+ # Created:: May 12, 2013
5
+ # Updated:: May 12, 2013
6
+ # Copyright:: soramugi Copyright (c) 2013
7
+ # License:: Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0.
8
+
9
+ require File.expand_path(File.dirname(__FILE__) + '../../../spec_helper')
10
+
11
+ require 'subscription/weather'
12
+
13
+ describe Automatic::Plugin::SubscriptionWeather do
14
+ context "with empty zipcode" do
15
+ subject {
16
+ Automatic::Plugin::SubscriptionWeather.new(
17
+ { }
18
+ )
19
+ }
20
+
21
+ its(:run) { should be_empty }
22
+ end
23
+
24
+ context "with zipcode whose return feed" do
25
+ subject {
26
+ Automatic::Plugin::SubscriptionWeather.new(
27
+ { 'zipcode' => '166-0003' }
28
+ )
29
+ }
30
+
31
+ its(:run) { should have(1).feed }
32
+ end
33
+
34
+ context "with zipcode and day whose return feed" do
35
+ subject {
36
+ Automatic::Plugin::SubscriptionWeather.new(
37
+ { 'zipcode' => '166-0003', 'day' => 'tomorrow' }
38
+ )
39
+ }
40
+
41
+ its(:run) { should have(1).feed }
42
+ end
43
+
44
+ context "with retry to feeds whose invalid URL" do
45
+ subject {
46
+ Automatic::Plugin::SubscriptionWeather.new(
47
+ { 'zipcode' => [],
48
+ 'retry' => 1,
49
+ 'interval' => 1
50
+ }
51
+ )
52
+ }
53
+
54
+ its(:run) { should be_empty }
55
+ end
56
+
57
+ end
data/spec/spec_helper.rb CHANGED
@@ -28,7 +28,7 @@ require 'lib/automatic'
28
28
  # in ./support/ and its subdirectories.
29
29
  Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
30
30
 
31
- if /^1\.8\./ =~ RUBY_VERSION
31
+ if RUBY_VERSION < '1.9.0'
32
32
  require 'rspec'
33
33
  end
34
34
 
@@ -0,0 +1,23 @@
1
+ global:
2
+ timezone: Asia/Tokyo
3
+ cache:
4
+ base: /tmp
5
+ log:
6
+ level: info
7
+
8
+ plugins:
9
+ - module: SubscriptionFeed
10
+ config:
11
+ feeds:
12
+ - http://blog.id774.net/post/feed/
13
+
14
+ - module: StorePermalink
15
+ config:
16
+ db: test_instapaper.db
17
+
18
+ - module: PublishPocket
19
+ config:
20
+ consumer_key: consumer_key
21
+ access_token: access_token
22
+
23
+ #- module: PublishConsole
@@ -0,0 +1,22 @@
1
+ global:
2
+ timezone: Asia/Tokyo
3
+ cache:
4
+ base: /tmp
5
+ log:
6
+ level: info
7
+
8
+ plugins:
9
+ - module: SubscriptionFeed
10
+ config:
11
+ feeds:
12
+ - http://blog.id774.net/post/feed/
13
+
14
+ - module: FilterOne
15
+ config:
16
+ pick: last
17
+
18
+ - module: StorePermalink
19
+ config:
20
+ db: test_one.db
21
+
22
+ # - module: PublishConsole
@@ -0,0 +1,20 @@
1
+ global:
2
+ timezone: Asia/Tokyo
3
+ cache:
4
+ base: /tmp
5
+ log:
6
+ level: info
7
+
8
+ plugins:
9
+ - module: SubscriptionFeed
10
+ config:
11
+ feeds:
12
+ - http://blog.id774.net/post/feed/
13
+
14
+ - module: FilterRand
15
+
16
+ - module: StorePermalink
17
+ config:
18
+ db: test_rand.db
19
+
20
+ # - module: PublishConsole
@@ -0,0 +1,27 @@
1
+ global:
2
+ timezone: Asia/Tokyo
3
+ cache:
4
+ base: /tmp
5
+ log:
6
+ level: info
7
+
8
+ plugins:
9
+ - module: SubscriptionText
10
+ config:
11
+ titles:
12
+ - 'hugehuge'
13
+ urls:
14
+ - 'https://github.com'
15
+ feeds:
16
+ -
17
+ title: 'jenkins'
18
+ url: 'http://jenkins.id774.net/jenkins/'
19
+ -
20
+ title: 'Tumblr'
21
+ url: 'http://www.tumblr.com/dashboard'
22
+
23
+ - module: StorePermalink
24
+ config:
25
+ db: test_text2feed.db
26
+
27
+ # - module: PublishConsole
@@ -0,0 +1,18 @@
1
+ global:
2
+ timezone: Asia/Tokyo
3
+ cache:
4
+ base: /tmp
5
+ log:
6
+ level: info
7
+
8
+ plugins:
9
+ - module: SubscriptionWeather
10
+ config:
11
+ zipcode: 166-0003
12
+ day: 'tomorrow'
13
+
14
+ - module: StorePermalink
15
+ config:
16
+ db: test_weather.db
17
+
18
+ #- module: PublishConsole
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: automatic
3
3
  version: !ruby/object:Gem::Version
4
- version: 13.4.1
4
+ version: 13.5.0
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: 2013-04-10 00:00:00.000000000 Z
12
+ date: 2013-05-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sqlite3
@@ -155,6 +155,54 @@ dependencies:
155
155
  - - ! '>='
156
156
  - !ruby/object:Gem::Version
157
157
  version: '0'
158
+ - !ruby/object:Gem::Dependency
159
+ name: twitter
160
+ requirement: !ruby/object:Gem::Requirement
161
+ none: false
162
+ requirements:
163
+ - - ! '>='
164
+ - !ruby/object:Gem::Version
165
+ version: '0'
166
+ type: :runtime
167
+ prerelease: false
168
+ version_requirements: !ruby/object:Gem::Requirement
169
+ none: false
170
+ requirements:
171
+ - - ! '>='
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
174
+ - !ruby/object:Gem::Dependency
175
+ name: weather_hacker
176
+ requirement: !ruby/object:Gem::Requirement
177
+ none: false
178
+ requirements:
179
+ - - ! '>='
180
+ - !ruby/object:Gem::Version
181
+ version: '0'
182
+ type: :runtime
183
+ prerelease: false
184
+ version_requirements: !ruby/object:Gem::Requirement
185
+ none: false
186
+ requirements:
187
+ - - ! '>='
188
+ - !ruby/object:Gem::Version
189
+ version: '0'
190
+ - !ruby/object:Gem::Dependency
191
+ name: pocket-ruby
192
+ requirement: !ruby/object:Gem::Requirement
193
+ none: false
194
+ requirements:
195
+ - - ! '>='
196
+ - !ruby/object:Gem::Version
197
+ version: '0'
198
+ type: :runtime
199
+ prerelease: false
200
+ version_requirements: !ruby/object:Gem::Requirement
201
+ none: false
202
+ requirements:
203
+ - - ! '>='
204
+ - !ruby/object:Gem::Version
205
+ version: '0'
158
206
  - !ruby/object:Gem::Dependency
159
207
  name: cucumber
160
208
  requirement: !ruby/object:Gem::Requirement
@@ -240,6 +288,8 @@ files:
240
288
  - plugins/filter/ignore.rb
241
289
  - plugins/filter/image.rb
242
290
  - plugins/filter/image_source.rb
291
+ - plugins/filter/one.rb
292
+ - plugins/filter/rand.rb
243
293
  - plugins/filter/sort.rb
244
294
  - plugins/filter/tumblr_resize.rb
245
295
  - plugins/notify/ikachan.rb
@@ -248,7 +298,9 @@ files:
248
298
  - plugins/publish/hatena_bookmark.rb
249
299
  - plugins/publish/instapaper.rb
250
300
  - plugins/publish/mail.rb
301
+ - plugins/publish/pocket.rb
251
302
  - plugins/publish/smtp.rb
303
+ - plugins/publish/twitter.rb
252
304
  - plugins/store/database.rb
253
305
  - plugins/store/full_text.rb
254
306
  - plugins/store/permalink.rb
@@ -256,8 +308,10 @@ files:
256
308
  - plugins/subscription/feed.rb
257
309
  - plugins/subscription/google_reader_star.rb
258
310
  - plugins/subscription/link.rb
311
+ - plugins/subscription/text.rb
259
312
  - plugins/subscription/tumblr.rb
260
313
  - plugins/subscription/twitter.rb
314
+ - plugins/subscription/weather.rb
261
315
  - script/build
262
316
  - spec/fixtures/sampleRecipe.yml
263
317
  - spec/lib/automatic/pipeline_spec.rb
@@ -269,6 +323,8 @@ files:
269
323
  - spec/plugins/filter/ignore_spec.rb
270
324
  - spec/plugins/filter/image_source_spec.rb
271
325
  - spec/plugins/filter/image_spec.rb
326
+ - spec/plugins/filter/one_spec.rb
327
+ - spec/plugins/filter/rand_spec.rb
272
328
  - spec/plugins/filter/sort_spec.rb
273
329
  - spec/plugins/filter/tumblr_resize_spec.rb
274
330
  - spec/plugins/notify/ikachan_spec.rb
@@ -277,20 +333,25 @@ files:
277
333
  - spec/plugins/publish/hatena_bookmark_spec.rb
278
334
  - spec/plugins/publish/instapaper_spec.rb
279
335
  - spec/plugins/publish/mail_spec.rb
336
+ - spec/plugins/publish/pocket_spec.rb
280
337
  - spec/plugins/publish/smtp_spec.rb
338
+ - spec/plugins/publish/twitter_spec.rb
281
339
  - spec/plugins/store/full_text_spec.rb
282
340
  - spec/plugins/store/permalink_spec.rb
283
341
  - spec/plugins/store/target_link_spec.rb
284
342
  - spec/plugins/subscription/feed_spec.rb
285
343
  - spec/plugins/subscription/google_reader_star_spec.rb
286
344
  - spec/plugins/subscription/link_spec.rb
345
+ - spec/plugins/subscription/text_spec.rb
287
346
  - spec/plugins/subscription/tumblr_spec.rb
288
347
  - spec/plugins/subscription/twitter_spec.rb
348
+ - spec/plugins/subscription/weather_spec.rb
289
349
  - spec/spec_helper.rb
290
350
  - spec/user_dir/plugins/store/mock.rb
291
351
  - test/fixtures/sampleOPML.xml
292
352
  - test/integration/test_absoluteurl.yml
293
353
  - test/integration/test_activerecord.yml
354
+ - test/integration/test_add_pocket.yml
294
355
  - test/integration/test_fulltext.yml
295
356
  - test/integration/test_googlealert.yml
296
357
  - test/integration/test_googlestar.yml
@@ -300,11 +361,15 @@ files:
300
361
  - test/integration/test_image2local.yml
301
362
  - test/integration/test_instapaper.yml
302
363
  - test/integration/test_link2local.yml
364
+ - test/integration/test_one.yml
365
+ - test/integration/test_rand.yml
303
366
  - test/integration/test_sort.yml
304
367
  - test/integration/test_svnlog.yml
368
+ - test/integration/test_text2feed.yml
305
369
  - test/integration/test_tumblr2local.yml
370
+ - test/integration/test_weather.yml
306
371
  - vendor/.gitkeep
307
- homepage: http://github.com/id774/automaticruby
372
+ homepage: http://github.com/automaticruby/automaticruby
308
373
  licenses:
309
374
  - GPL
310
375
  post_install_message: