automatic 13.7.0 → 13.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +6 -6
- data/VERSION +1 -1
- data/automatic.gemspec +16 -15
- data/doc/ChangeLog +5 -0
- data/lib/automatic.rb +2 -2
- data/plugins/filter/ignore.rb +15 -13
- data/spec/lib/automatic_spec.rb +31 -17
- metadata +19 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 90595ee77c762cb364af9cfd822d89d1d17d0306
|
4
|
+
data.tar.gz: 48e69a16b6577e239df8e265a09562aa379b383d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df3741889e34f71522aab02de4929a4f04edb922a38ed0abb2027352229b1f2291a15b6dd6d54d64ba57e0c7e142d9cd23207f936ae70f4ce262aa4340b899a7
|
7
|
+
data.tar.gz: 877ddcfa68ca1ceec2b69f40dcc98136ee6979dfe019874ecf4d81f0d21aa1ecdefe1c8269bee9a78647ee7dea49c71d3f3c9a26d48170aa8831945198a3fce1
|
data/Gemfile
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
# Version:
|
1
|
+
# Version:20131125
|
2
2
|
|
3
3
|
source "http://rubygems.org"
|
4
4
|
source "http://gems.github.com"
|
5
5
|
|
6
|
-
gem 'json'
|
6
|
+
gem 'json'
|
7
7
|
gem 'sqlite3'
|
8
8
|
gem 'activesupport', '~>4.0.0'
|
9
9
|
gem 'activerecord', '~>4.0.0'
|
@@ -13,7 +13,7 @@ gem 'xml-simple'
|
|
13
13
|
gem 'feedbag'
|
14
14
|
gem 'nokogiri'
|
15
15
|
gem 'sanitize'
|
16
|
-
gem 'twitter'
|
16
|
+
gem 'twitter', '~>4.8.1'
|
17
17
|
gem 'weather_hacker'
|
18
18
|
gem 'pocket-ruby'
|
19
19
|
gem 'hipchat'
|
@@ -21,7 +21,7 @@ gem 'fluent-logger'
|
|
21
21
|
gem 'dalli'
|
22
22
|
|
23
23
|
group :test do
|
24
|
-
gem 'rspec'
|
24
|
+
gem 'rspec', '~> 2.14.0'
|
25
25
|
gem 'rcov', :platforms => :mri_18
|
26
26
|
gem 'simplecov'
|
27
27
|
gem 'simplecov-rcov'
|
@@ -30,7 +30,7 @@ end
|
|
30
30
|
|
31
31
|
group :development do
|
32
32
|
gem "cucumber"
|
33
|
-
gem 'bundler'
|
34
|
-
gem 'builder'
|
33
|
+
gem 'bundler'
|
34
|
+
gem 'builder'
|
35
35
|
gem "jeweler"
|
36
36
|
end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
13.
|
1
|
+
13.12.0
|
data/automatic.gemspec
CHANGED
@@ -2,14 +2,15 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
+
# stub: automatic 13.12.0 ruby lib
|
5
6
|
|
6
7
|
Gem::Specification.new do |s|
|
7
8
|
s.name = "automatic"
|
8
|
-
s.version = "13.
|
9
|
+
s.version = "13.12.0"
|
9
10
|
|
10
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
12
|
s.authors = ["id774"]
|
12
|
-
s.date = "2013-
|
13
|
+
s.date = "2013-12-17"
|
13
14
|
s.description = "Ruby General Automation Framework"
|
14
15
|
s.email = "idnanashi@gmail.com"
|
15
16
|
s.executables = ["automatic"]
|
@@ -158,14 +159,14 @@ Gem::Specification.new do |s|
|
|
158
159
|
s.homepage = "http://github.com/automaticruby/automaticruby"
|
159
160
|
s.licenses = ["GPL"]
|
160
161
|
s.require_paths = ["lib"]
|
161
|
-
s.rubygems_version = "2.
|
162
|
+
s.rubygems_version = "2.1.11"
|
162
163
|
s.summary = "Automatic Ruby"
|
163
164
|
|
164
165
|
if s.respond_to? :specification_version then
|
165
166
|
s.specification_version = 4
|
166
167
|
|
167
168
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
168
|
-
s.add_runtime_dependency(%q<json>, ["
|
169
|
+
s.add_runtime_dependency(%q<json>, [">= 0"])
|
169
170
|
s.add_runtime_dependency(%q<sqlite3>, [">= 0"])
|
170
171
|
s.add_runtime_dependency(%q<activesupport>, ["~> 4.0.0"])
|
171
172
|
s.add_runtime_dependency(%q<activerecord>, ["~> 4.0.0"])
|
@@ -175,18 +176,18 @@ Gem::Specification.new do |s|
|
|
175
176
|
s.add_runtime_dependency(%q<feedbag>, [">= 0"])
|
176
177
|
s.add_runtime_dependency(%q<nokogiri>, [">= 0"])
|
177
178
|
s.add_runtime_dependency(%q<sanitize>, [">= 0"])
|
178
|
-
s.add_runtime_dependency(%q<twitter>, ["
|
179
|
+
s.add_runtime_dependency(%q<twitter>, ["~> 4.8.1"])
|
179
180
|
s.add_runtime_dependency(%q<weather_hacker>, [">= 0"])
|
180
181
|
s.add_runtime_dependency(%q<pocket-ruby>, [">= 0"])
|
181
182
|
s.add_runtime_dependency(%q<hipchat>, [">= 0"])
|
182
183
|
s.add_runtime_dependency(%q<fluent-logger>, [">= 0"])
|
183
184
|
s.add_runtime_dependency(%q<dalli>, [">= 0"])
|
184
185
|
s.add_development_dependency(%q<cucumber>, [">= 0"])
|
185
|
-
s.add_development_dependency(%q<bundler>, ["
|
186
|
-
s.add_development_dependency(%q<builder>, ["
|
186
|
+
s.add_development_dependency(%q<bundler>, [">= 0"])
|
187
|
+
s.add_development_dependency(%q<builder>, [">= 0"])
|
187
188
|
s.add_development_dependency(%q<jeweler>, [">= 0"])
|
188
189
|
else
|
189
|
-
s.add_dependency(%q<json>, ["
|
190
|
+
s.add_dependency(%q<json>, [">= 0"])
|
190
191
|
s.add_dependency(%q<sqlite3>, [">= 0"])
|
191
192
|
s.add_dependency(%q<activesupport>, ["~> 4.0.0"])
|
192
193
|
s.add_dependency(%q<activerecord>, ["~> 4.0.0"])
|
@@ -196,19 +197,19 @@ Gem::Specification.new do |s|
|
|
196
197
|
s.add_dependency(%q<feedbag>, [">= 0"])
|
197
198
|
s.add_dependency(%q<nokogiri>, [">= 0"])
|
198
199
|
s.add_dependency(%q<sanitize>, [">= 0"])
|
199
|
-
s.add_dependency(%q<twitter>, ["
|
200
|
+
s.add_dependency(%q<twitter>, ["~> 4.8.1"])
|
200
201
|
s.add_dependency(%q<weather_hacker>, [">= 0"])
|
201
202
|
s.add_dependency(%q<pocket-ruby>, [">= 0"])
|
202
203
|
s.add_dependency(%q<hipchat>, [">= 0"])
|
203
204
|
s.add_dependency(%q<fluent-logger>, [">= 0"])
|
204
205
|
s.add_dependency(%q<dalli>, [">= 0"])
|
205
206
|
s.add_dependency(%q<cucumber>, [">= 0"])
|
206
|
-
s.add_dependency(%q<bundler>, ["
|
207
|
-
s.add_dependency(%q<builder>, ["
|
207
|
+
s.add_dependency(%q<bundler>, [">= 0"])
|
208
|
+
s.add_dependency(%q<builder>, [">= 0"])
|
208
209
|
s.add_dependency(%q<jeweler>, [">= 0"])
|
209
210
|
end
|
210
211
|
else
|
211
|
-
s.add_dependency(%q<json>, ["
|
212
|
+
s.add_dependency(%q<json>, [">= 0"])
|
212
213
|
s.add_dependency(%q<sqlite3>, [">= 0"])
|
213
214
|
s.add_dependency(%q<activesupport>, ["~> 4.0.0"])
|
214
215
|
s.add_dependency(%q<activerecord>, ["~> 4.0.0"])
|
@@ -218,15 +219,15 @@ Gem::Specification.new do |s|
|
|
218
219
|
s.add_dependency(%q<feedbag>, [">= 0"])
|
219
220
|
s.add_dependency(%q<nokogiri>, [">= 0"])
|
220
221
|
s.add_dependency(%q<sanitize>, [">= 0"])
|
221
|
-
s.add_dependency(%q<twitter>, ["
|
222
|
+
s.add_dependency(%q<twitter>, ["~> 4.8.1"])
|
222
223
|
s.add_dependency(%q<weather_hacker>, [">= 0"])
|
223
224
|
s.add_dependency(%q<pocket-ruby>, [">= 0"])
|
224
225
|
s.add_dependency(%q<hipchat>, [">= 0"])
|
225
226
|
s.add_dependency(%q<fluent-logger>, [">= 0"])
|
226
227
|
s.add_dependency(%q<dalli>, [">= 0"])
|
227
228
|
s.add_dependency(%q<cucumber>, [">= 0"])
|
228
|
-
s.add_dependency(%q<bundler>, ["
|
229
|
-
s.add_dependency(%q<builder>, ["
|
229
|
+
s.add_dependency(%q<bundler>, [">= 0"])
|
230
|
+
s.add_dependency(%q<builder>, [">= 0"])
|
230
231
|
s.add_dependency(%q<jeweler>, [">= 0"])
|
231
232
|
end
|
232
233
|
end
|
data/doc/ChangeLog
CHANGED
data/lib/automatic.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
# Name:: Automatic::Ruby
|
3
3
|
# Author:: 774 <http://id774.net>
|
4
4
|
# Created:: Feb 18, 2012
|
5
|
-
# Updated::
|
5
|
+
# Updated:: Dec 17, 2013
|
6
6
|
# Copyright:: Copyright (c) 2012-2013 Automatic Ruby Developers.
|
7
7
|
# License:: Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0.
|
8
8
|
|
@@ -13,7 +13,7 @@ module Automatic
|
|
13
13
|
require 'automatic/log'
|
14
14
|
require 'automatic/feed_parser'
|
15
15
|
|
16
|
-
VERSION = "13.
|
16
|
+
VERSION = "13.12.0"
|
17
17
|
USER_DIR = "/.automatic"
|
18
18
|
|
19
19
|
class << self
|
data/plugins/filter/ignore.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
# Name:: Automatic::Plugin::Filter::Ignore
|
3
3
|
# Author:: 774 <http://id774.net>
|
4
4
|
# Created:: Feb 22, 2012
|
5
|
-
# Updated::
|
5
|
+
# Updated:: Oct 15, 2013
|
6
6
|
# Copyright:: Copyright (c) 2012-2013 Automatic Ruby Developers.
|
7
7
|
# License:: Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0.
|
8
8
|
|
@@ -28,31 +28,33 @@ module Automatic::Plugin
|
|
28
28
|
end
|
29
29
|
|
30
30
|
private
|
31
|
+
def detect_exclude(item, evaluation, reason)
|
32
|
+
begin
|
33
|
+
if item.include?(evaluation)
|
34
|
+
Automatic::Log.puts("info", "Excluded by #{reason}: #{item}")
|
35
|
+
return true
|
36
|
+
end
|
37
|
+
rescue NoMethodError
|
38
|
+
Automatic::Log.puts("warn", "Invalid feed detected in ignore process with #{item}")
|
39
|
+
return false
|
40
|
+
end
|
41
|
+
end
|
31
42
|
|
32
43
|
def exclude(items)
|
33
44
|
detection = false
|
34
45
|
unless @config['title'].nil?
|
35
46
|
@config['title'].each {|e|
|
36
|
-
if items.title
|
37
|
-
detection = true
|
38
|
-
Automatic::Log.puts("info", "Excluded by title: #{items.link}")
|
39
|
-
end
|
47
|
+
detection = true if detect_exclude(items.title, e.chomp, 'title')
|
40
48
|
}
|
41
49
|
end
|
42
50
|
unless @config['link'].nil?
|
43
51
|
@config['link'].each {|e|
|
44
|
-
if items.link
|
45
|
-
detection = true
|
46
|
-
Automatic::Log.puts("info", "Excluded by link: #{items.link}")
|
47
|
-
end
|
52
|
+
detection = true if detect_exclude(items.link, e.chomp, 'link')
|
48
53
|
}
|
49
54
|
end
|
50
55
|
unless @config['description'].nil?
|
51
56
|
@config['description'].each {|e|
|
52
|
-
if items.description
|
53
|
-
detection = true
|
54
|
-
Automatic::Log.puts("info", "Excluded by description: #{items.link}")
|
55
|
-
end
|
57
|
+
detection = true if detect_exclude(items.description, e.chomp, 'description')
|
56
58
|
}
|
57
59
|
end
|
58
60
|
detection
|
data/spec/lib/automatic_spec.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
|
-
# Name:: Automatic
|
2
|
+
# Name:: Automatic::Ruby
|
3
3
|
# Author:: kzgs
|
4
4
|
# 774 <http://id774.net>
|
5
5
|
# Created:: Mar 9, 2012
|
6
|
-
# Updated::
|
6
|
+
# Updated:: Dec 17, 2013
|
7
7
|
# Copyright:: Copyright (c) 2012-2013 Automatic Ruby Developers.
|
8
8
|
# License:: Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0.
|
9
9
|
|
@@ -14,27 +14,33 @@ require 'automatic'
|
|
14
14
|
describe Automatic do
|
15
15
|
describe "#run" do
|
16
16
|
describe "with a root dir which has default recipe" do
|
17
|
-
|
18
|
-
lambda{
|
17
|
+
subject {
|
19
18
|
Automatic.run(:recipe => "",
|
20
19
|
:root_dir => APP_ROOT,
|
21
20
|
:user_dir => APP_ROOT + "/spec/user_dir")
|
22
|
-
}.should_not raise_exception(Errno::ENOENT)
|
23
21
|
}
|
22
|
+
|
23
|
+
it { expect { subject }.to raise_error }
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
27
27
|
describe "#version" do
|
28
|
-
|
29
|
-
|
30
|
-
}
|
28
|
+
subject { Automatic.const_get(:VERSION) }
|
29
|
+
|
30
|
+
it { expect(subject).to eq "13.12.0" }
|
31
31
|
end
|
32
32
|
|
33
|
-
describe "#(root
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
33
|
+
describe "#(root)_dir" do
|
34
|
+
subject { Automatic.root_dir }
|
35
|
+
|
36
|
+
it { expect(subject).to eq APP_ROOT }
|
37
|
+
|
38
|
+
end
|
39
|
+
|
40
|
+
describe "#(config)_dir" do
|
41
|
+
subject { Automatic.config_dir }
|
42
|
+
|
43
|
+
it { expect(subject).to eq APP_ROOT+"/config" }
|
38
44
|
end
|
39
45
|
|
40
46
|
describe "#user_dir= in test env" do
|
@@ -43,14 +49,18 @@ describe Automatic do
|
|
43
49
|
end
|
44
50
|
|
45
51
|
describe "#user_dir" do
|
52
|
+
subject { Automatic.user_dir }
|
53
|
+
|
46
54
|
it "return valid value" do
|
47
|
-
|
55
|
+
expect(subject).to eq File.join(APP_ROOT, "spec/user_dir")
|
48
56
|
end
|
49
57
|
end
|
50
58
|
|
51
59
|
describe "#user_plugins_dir" do
|
60
|
+
subject { Automatic.user_plugins_dir }
|
61
|
+
|
52
62
|
it "return valid value" do
|
53
|
-
|
63
|
+
expect(subject).to eq File.join(APP_ROOT, "spec/user_dir/plugins")
|
54
64
|
end
|
55
65
|
end
|
56
66
|
|
@@ -66,14 +76,18 @@ describe Automatic do
|
|
66
76
|
end
|
67
77
|
|
68
78
|
describe "#user_dir" do
|
79
|
+
subject { Automatic.user_dir }
|
80
|
+
|
69
81
|
it "return valid value" do
|
70
|
-
|
82
|
+
expect(subject).to eq File.expand_path("~/") + "/.automatic"
|
71
83
|
end
|
72
84
|
end
|
73
85
|
|
74
86
|
describe "#user_plugins_dir" do
|
87
|
+
subject { Automatic.user_plugins_dir }
|
88
|
+
|
75
89
|
it "return valid value" do
|
76
|
-
|
90
|
+
expect(subject).to eq File.expand_path("~/") + "/.automatic/plugins"
|
77
91
|
end
|
78
92
|
end
|
79
93
|
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: automatic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 13.
|
4
|
+
version: 13.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- id774
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-12-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: sqlite3
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -154,16 +154,16 @@ dependencies:
|
|
154
154
|
name: twitter
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
156
156
|
requirements:
|
157
|
-
- -
|
157
|
+
- - ~>
|
158
158
|
- !ruby/object:Gem::Version
|
159
|
-
version:
|
159
|
+
version: 4.8.1
|
160
160
|
type: :runtime
|
161
161
|
prerelease: false
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
163
163
|
requirements:
|
164
|
-
- -
|
164
|
+
- - ~>
|
165
165
|
- !ruby/object:Gem::Version
|
166
|
-
version:
|
166
|
+
version: 4.8.1
|
167
167
|
- !ruby/object:Gem::Dependency
|
168
168
|
name: weather_hacker
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|
@@ -252,30 +252,30 @@ dependencies:
|
|
252
252
|
name: bundler
|
253
253
|
requirement: !ruby/object:Gem::Requirement
|
254
254
|
requirements:
|
255
|
-
- -
|
255
|
+
- - '>='
|
256
256
|
- !ruby/object:Gem::Version
|
257
|
-
version:
|
257
|
+
version: '0'
|
258
258
|
type: :development
|
259
259
|
prerelease: false
|
260
260
|
version_requirements: !ruby/object:Gem::Requirement
|
261
261
|
requirements:
|
262
|
-
- -
|
262
|
+
- - '>='
|
263
263
|
- !ruby/object:Gem::Version
|
264
|
-
version:
|
264
|
+
version: '0'
|
265
265
|
- !ruby/object:Gem::Dependency
|
266
266
|
name: builder
|
267
267
|
requirement: !ruby/object:Gem::Requirement
|
268
268
|
requirements:
|
269
|
-
- -
|
269
|
+
- - '>='
|
270
270
|
- !ruby/object:Gem::Version
|
271
|
-
version:
|
271
|
+
version: '0'
|
272
272
|
type: :development
|
273
273
|
prerelease: false
|
274
274
|
version_requirements: !ruby/object:Gem::Requirement
|
275
275
|
requirements:
|
276
|
-
- -
|
276
|
+
- - '>='
|
277
277
|
- !ruby/object:Gem::Version
|
278
|
-
version:
|
278
|
+
version: '0'
|
279
279
|
- !ruby/object:Gem::Dependency
|
280
280
|
name: jeweler
|
281
281
|
requirement: !ruby/object:Gem::Requirement
|
@@ -455,7 +455,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
455
455
|
version: '0'
|
456
456
|
requirements: []
|
457
457
|
rubyforge_project:
|
458
|
-
rubygems_version: 2.
|
458
|
+
rubygems_version: 2.1.11
|
459
459
|
signing_key:
|
460
460
|
specification_version: 4
|
461
461
|
summary: Automatic Ruby
|