multi_notifier 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 18b7272fe9939ff98ed918124e371a36c7578a4d
4
- data.tar.gz: 59486d4edfcbd4ae618480405cd45837e387dc8c
3
+ metadata.gz: 7373c4ca1c8ca29fbdf531e1ea10b26014894b59
4
+ data.tar.gz: 8837ce5546ca70a55051921d57ffeca29226bac3
5
5
  SHA512:
6
- metadata.gz: 96d5a244e31af51af0247be7b2237ea145fd75ebb72f3720f021246bd40053c02266e389ee5c0142e99c6bac3bf4bc2b69f002c24b3f421c7fce2852f252005b
7
- data.tar.gz: 0b30d55e430443b34929413251abfd2ef2a37510d50c0cd5e2a1751429a349cb24e4d834eed27a3cf862e55d5966d1df68e013ffef156b605a89c34ef1889104
6
+ metadata.gz: 75b253c1810c9392afb6e374ff849bd7fee4b135628b8843b8bee36377672fcf1a329bc2d6f214fb05619588133f958fa92e3d44ece997fd76f1d04ed9efcf0b
7
+ data.tar.gz: 2df23091c755bfb34fa2a37c4ff696a28e929f7f43159210928eb04eb11b2428ad44ca85a50f6b35e372e7b0842f3b37556058efae608ea7841f5779f88c9e1c
data/.travis.yml ADDED
@@ -0,0 +1,5 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.3
4
+ - 2.0.0
5
+ - 2.1.0
data/README.md CHANGED
@@ -38,8 +38,8 @@ builder.adapter :mail,
38
38
  :method => Rails.configuration.action_mailer.delivery_method, # delivery method
39
39
  :settings => Rails.configuration.action_mailer.send("#{Rails.configuration.action_mailer.delivery_method}_settings") # deivery settings
40
40
  },
41
- :from => "notifications@aclgrc.com", # from email
42
- :to => "devs@workpapers.com", # to email
41
+ :from => "from@owenou.com", # from email
42
+ :to => "to@owenou.com", # to email
43
43
  :subject => "subject", # email subject
44
44
  :text_body => mail_text_body, # email body in text
45
45
  :html_body => mail_html_body # email body in html
@@ -47,7 +47,7 @@ builder.adapter :mail,
47
47
 
48
48
  ### Travis
49
49
 
50
- The [travis middleware](https://github.com/jingweno/multi_notifier/blob/master/lib/multi_notifier/middlewares/travis.rb) restart the latest build with the provided repo.
50
+ The [travis middleware](https://github.com/jingweno/multi_notifier/blob/master/lib/multi_notifier/middlewares/travis.rb) restarts the latest build with the provided repo.
51
51
 
52
52
  ```ruby
53
53
  builder.adapter :travis,
@@ -10,7 +10,7 @@ module MultiNotifier
10
10
 
11
11
  def use(type, configs = {})
12
12
  require "multi_notifier/middlewares/#{type}"
13
- adapter = "MultiNotifier::Middlewares::#{type.to_s.classify}".constantize
13
+ adapter = "MultiNotifier::Middlewares::#{type.to_s.titleize.gsub(' ', '')}".constantize
14
14
  adapters << adapter.new(configs)
15
15
 
16
16
  adapter
@@ -11,8 +11,8 @@ module MultiNotifier
11
11
  def notify
12
12
  host = travis_pro? ? ::Travis::Client::PRO_URI : ::Travis::Client::ORG_URI
13
13
  client = travis_client(host, access_token)
14
- repo = client.repo(repo)
15
- repo.last_build.restart
14
+ r = client.repo(repo)
15
+ r.last_build.restart
16
16
  end
17
17
 
18
18
  def travis_pro?
@@ -1,3 +1,3 @@
1
1
  module MultiNotifier
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
@@ -4,9 +4,10 @@ describe MultiNotifier::Builder do
4
4
  it "builds adapter by types" do
5
5
  builder = described_class.new
6
6
  builder.use :mail
7
+ builder.use :travis
7
8
 
8
- builder.adapters.size.should == 1
9
- adapter = builder.adapters.first
10
- adapter.class.name.should == "MultiNotifier::Middlewares::Mail"
9
+ builder.adapters.size.should == 2
10
+ builder.adapters.first.class.name.should == "MultiNotifier::Middlewares::Mail"
11
+ builder.adapters.last.class.name.should == "MultiNotifier::Middlewares::Travis"
11
12
  end
12
13
  end
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: multi_notifier
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jingwen Owen Ou
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-07 00:00:00.000000000 Z
11
+ date: 2014-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: 3.0.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
26
  version: 3.0.0
27
27
  description: Simple and flexbile library for sending notifications
@@ -31,7 +31,8 @@ executables: []
31
31
  extensions: []
32
32
  extra_rdoc_files: []
33
33
  files:
34
- - .gitignore
34
+ - ".gitignore"
35
+ - ".travis.yml"
35
36
  - Gemfile
36
37
  - LICENSE.txt
37
38
  - README.md
@@ -58,17 +59,17 @@ require_paths:
58
59
  - lib
59
60
  required_ruby_version: !ruby/object:Gem::Requirement
60
61
  requirements:
61
- - - '>='
62
+ - - ">="
62
63
  - !ruby/object:Gem::Version
63
64
  version: '0'
64
65
  required_rubygems_version: !ruby/object:Gem::Requirement
65
66
  requirements:
66
- - - '>='
67
+ - - ">="
67
68
  - !ruby/object:Gem::Version
68
69
  version: '0'
69
70
  requirements: []
70
71
  rubyforge_project:
71
- rubygems_version: 2.0.3
72
+ rubygems_version: 2.2.0
72
73
  signing_key:
73
74
  specification_version: 4
74
75
  summary: Simple and flexbile library for sending notifications