ermaker_ting 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 4bcc192d874488c12003f055f81d3001d8288217
4
+ data.tar.gz: 6c3ce0f2f53d263e06849e90b0e86898f299da36
5
+ SHA512:
6
+ metadata.gz: 8787fa0609004a1df933e976dcea7314b60ec8a583335182effed3ea189a2b60549d3409b0acc96f06278aa780497eb7fbee594576a71b7f05a6eb08fbbf49f7
7
+ data.tar.gz: b4e972ed94ca9e3a27c8eac530654e1d87187374605793aa3ec34e6e30b91fd07d78dbb67eaf9413f75a9002c96bc9315da831f2f373e1f8dc2930b55721ffe7
data/.gitignore ADDED
@@ -0,0 +1,18 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ coverage
6
+ InstalledFiles
7
+ lib/bundler/man
8
+ pkg
9
+ rdoc
10
+ spec/reports
11
+ test/tmp
12
+ test/version_tmp
13
+ tmp
14
+
15
+ # YARD artifacts
16
+ .yardoc
17
+ _yardoc
18
+ doc/
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --format progress
data/.ruby-gemset ADDED
@@ -0,0 +1 @@
1
+ sandbox
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ ruby-2.1.0
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in ting.gemspec
4
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,170 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ ermaker_ting (0.0.1)
5
+ httparty
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ activesupport (4.0.2)
11
+ i18n (~> 0.6, >= 0.6.4)
12
+ minitest (~> 4.2)
13
+ multi_json (~> 1.3)
14
+ thread_safe (~> 0.1)
15
+ tzinfo (~> 0.3.37)
16
+ arrayfields (4.9.0)
17
+ atomic (1.1.14)
18
+ awesome_print (1.2.0)
19
+ cane (2.6.1)
20
+ parallel
21
+ celluloid (0.15.2)
22
+ timers (~> 1.1.0)
23
+ celluloid-io (0.15.0)
24
+ celluloid (>= 0.15.0)
25
+ nio4r (>= 0.5.0)
26
+ chronic (0.10.2)
27
+ churn (0.0.35)
28
+ chronic (>= 0.2.3)
29
+ hirb
30
+ json_pure
31
+ main
32
+ rest-client (>= 1.6.0)
33
+ ruby_parser (~> 3.0)
34
+ sexp_processor (~> 4.1)
35
+ code_analyzer (0.4.4)
36
+ sexp_processor
37
+ code_metrics (0.1.3)
38
+ coderay (1.1.0)
39
+ colored (1.2)
40
+ diff-lcs (1.2.5)
41
+ docile (1.1.3)
42
+ erubis (2.7.0)
43
+ fakeweb (1.3.0)
44
+ fattr (2.2.1)
45
+ ffi (1.9.3)
46
+ flay (2.4.0)
47
+ ruby_parser (~> 3.0)
48
+ sexp_processor (~> 4.0)
49
+ flog (4.2.0)
50
+ ruby_parser (~> 3.1, > 3.1.0)
51
+ sexp_processor (~> 4.4)
52
+ formatador (0.2.4)
53
+ guard (2.4.0)
54
+ formatador (>= 0.2.4)
55
+ listen (~> 2.1)
56
+ lumberjack (~> 1.0)
57
+ pry (>= 0.9.12)
58
+ thor (>= 0.18.1)
59
+ guard-rspec (4.2.6)
60
+ guard (~> 2.1)
61
+ rspec (>= 2.14, < 4.0)
62
+ hirb (0.7.1)
63
+ httparty (0.12.0)
64
+ json (~> 1.8)
65
+ multi_xml (>= 0.5.2)
66
+ i18n (0.6.9)
67
+ json (1.8.1)
68
+ json_pure (1.8.1)
69
+ listen (2.5.0)
70
+ celluloid (>= 0.15.2)
71
+ celluloid-io (>= 0.15.0)
72
+ rb-fsevent (>= 0.9.3)
73
+ rb-inotify (>= 0.9)
74
+ lumberjack (1.0.4)
75
+ main (5.2.0)
76
+ arrayfields (>= 4.7.4)
77
+ chronic (>= 0.6.2)
78
+ fattr (>= 2.2.0)
79
+ map (>= 5.1.0)
80
+ map (6.5.2)
81
+ method_source (0.8.2)
82
+ metric_fu (4.7.3)
83
+ cane (~> 2.5, >= 2.5.2)
84
+ churn (~> 0.0.35)
85
+ code_metrics (~> 0.1)
86
+ coderay
87
+ flay (~> 2.1, >= 2.0.1)
88
+ flog (~> 4.1, >= 4.1.1)
89
+ metric_fu-Saikuro (~> 1.1, >= 1.1.3)
90
+ multi_json
91
+ rails_best_practices (~> 1.14, >= 1.14.3)
92
+ redcard
93
+ reek (~> 1.3, >= 1.3.4)
94
+ roodi (~> 3.1)
95
+ metric_fu-Saikuro (1.1.3)
96
+ mime-types (2.1)
97
+ minitest (4.7.5)
98
+ multi_json (1.8.4)
99
+ multi_xml (0.5.5)
100
+ nio4r (1.0.0)
101
+ parallel (0.9.2)
102
+ pry (0.9.12.6)
103
+ coderay (~> 1.0)
104
+ method_source (~> 0.8)
105
+ slop (~> 3.4)
106
+ rails_best_practices (1.15.1)
107
+ activesupport
108
+ awesome_print
109
+ code_analyzer (>= 0.4.3)
110
+ colored
111
+ erubis
112
+ i18n
113
+ require_all
114
+ ruby-progressbar
115
+ rake (10.1.1)
116
+ rb-fsevent (0.9.4)
117
+ rb-inotify (0.9.3)
118
+ ffi (>= 0.5.0)
119
+ redcard (1.1.0)
120
+ reek (1.3.6)
121
+ ruby2ruby (~> 2.0.7)
122
+ ruby_parser (~> 3.2)
123
+ sexp_processor
124
+ require_all (1.3.2)
125
+ rest-client (1.6.7)
126
+ mime-types (>= 1.16)
127
+ roodi (3.3.1)
128
+ ruby_parser (~> 3.2, >= 3.2.2)
129
+ rspec (2.14.1)
130
+ rspec-core (~> 2.14.0)
131
+ rspec-expectations (~> 2.14.0)
132
+ rspec-mocks (~> 2.14.0)
133
+ rspec-core (2.14.7)
134
+ rspec-expectations (2.14.5)
135
+ diff-lcs (>= 1.1.3, < 2.0)
136
+ rspec-mocks (2.14.5)
137
+ ruby-progressbar (1.4.1)
138
+ ruby2ruby (2.0.7)
139
+ ruby_parser (~> 3.1)
140
+ sexp_processor (~> 4.0)
141
+ ruby_parser (3.4.0)
142
+ sexp_processor (~> 4.1)
143
+ sexp_processor (4.4.1)
144
+ simplecov (0.8.2)
145
+ docile (~> 1.1.0)
146
+ multi_json
147
+ simplecov-html (~> 0.8.0)
148
+ simplecov-html (0.8.0)
149
+ simplecov-rcov-text (0.0.2)
150
+ slop (3.4.7)
151
+ thor (0.18.1)
152
+ thread_safe (0.1.3)
153
+ atomic
154
+ timers (1.1.0)
155
+ tzinfo (0.3.38)
156
+
157
+ PLATFORMS
158
+ ruby
159
+
160
+ DEPENDENCIES
161
+ bundler (~> 1.3)
162
+ ermaker_ting!
163
+ fakeweb
164
+ guard
165
+ guard-rspec
166
+ metric_fu
167
+ rake
168
+ rspec
169
+ simplecov
170
+ simplecov-rcov-text
data/Guardfile ADDED
@@ -0,0 +1,9 @@
1
+ # A sample Guardfile
2
+ # More info at https://github.com/guard/guard#readme
3
+
4
+ guard :rspec do
5
+ watch(%r{^spec/.+_spec\.rb$})
6
+ watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
7
+ watch('spec/spec_helper.rb') { "spec" }
8
+ end
9
+
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2014 Minwoo Lee
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ the Software, and to permit persons to whom the Software is furnished to do so,
10
+ subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,4 @@
1
+ ting
2
+ ====
3
+
4
+ Ting!!
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,16 @@
1
+ require 'httparty'
2
+
3
+ module Ting
4
+ class Pushover
5
+ @@options = {}
6
+
7
+ def self.config **options
8
+ @@options = options
9
+ end
10
+
11
+ def notify **options
12
+ options = @@options.merge options
13
+ HTTParty.post('https://api.pushover.net/1/messages.json', body: options)
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,3 @@
1
+ module Ting
2
+ VERSION = "0.0.1"
3
+ end
data/lib/ting.rb ADDED
@@ -0,0 +1,5 @@
1
+ require "ting/version"
2
+
3
+ module Ting
4
+ autoload :Pushover, 'ting/pushover'
5
+ end
@@ -0,0 +1,30 @@
1
+ require 'spec_helper'
2
+ require 'ting'
3
+ require 'fake_web'
4
+
5
+ describe Ting::Pushover do
6
+ describe '#notify' do
7
+ before do
8
+ FakeWeb.allow_net_connect = false
9
+ FakeWeb.register_uri(:post, 'https://api.pushover.net/1/messages.json', body:'')
10
+ end
11
+ after do
12
+ FakeWeb.clean_registry
13
+ FakeWeb.allow_net_connect = true
14
+ end
15
+
16
+ it 'gets valid options' do
17
+ Ting::Pushover.new.notify
18
+ FakeWeb.last_request.body.should == ''
19
+ Ting::Pushover.new.notify(a:1)
20
+ FakeWeb.last_request.body.should == 'a=1'
21
+ Ting::Pushover.config(a:1)
22
+ Ting::Pushover.new.notify(a:1)
23
+ FakeWeb.last_request.body.should == 'a=1'
24
+ Ting::Pushover.new.notify(a:2)
25
+ FakeWeb.last_request.body.should == 'a=2'
26
+ Ting::Pushover.new.notify(b:2)
27
+ FakeWeb.last_request.body.should == 'a=1&b=2'
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,32 @@
1
+ # This file was generated by the `rspec --init` command. Conventionally, all
2
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
3
+ # Require this file using `require "spec_helper"` to ensure that it is only
4
+ # loaded once.
5
+ #
6
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
7
+ if ENV['COVERAGE']
8
+ require 'simplecov'
9
+ formatters = [SimpleCov::Formatter::HTMLFormatter]
10
+ begin
11
+ puts '[COVERAGE] Running with SimpleCov HTML Formatter'
12
+ require 'simplecov-rcov-text'
13
+ formatters << SimpleCov::Formatter::RcovTextFormatter
14
+ puts '[COVERAGE] Running with SimpleCov Rcov Formatter'
15
+ rescue LoadError
16
+ puts '[COVERAGE] SimpleCov Rcov formatter could not be loaded'
17
+ end
18
+ SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[ *formatters ]
19
+ SimpleCov.start
20
+ end
21
+
22
+ RSpec.configure do |config|
23
+ config.treat_symbols_as_metadata_keys_with_true_values = true
24
+ config.run_all_when_everything_filtered = true
25
+ config.filter_run :focus
26
+
27
+ # Run specs in random order to surface order dependencies. If you find an
28
+ # order dependency and want to debug it, you can fix the order by providing
29
+ # the seed, which is printed after each run.
30
+ # --seed 1234
31
+ config.order = 'random'
32
+ end
data/ting.gemspec ADDED
@@ -0,0 +1,31 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'ting/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "ermaker_ting"
8
+ spec.version = Ting::VERSION
9
+ spec.authors = ["Minwoo Lee"]
10
+ spec.email = ["ermaker@gmail.com"]
11
+ spec.description = %q{TING!!}
12
+ spec.summary = %q{}
13
+ spec.homepage = ""
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files`.split($/)
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_dependency "httparty"
22
+ spec.add_development_dependency "bundler", "~> 1.3"
23
+ spec.add_development_dependency "rake"
24
+ spec.add_development_dependency "rspec"
25
+ spec.add_development_dependency "fakeweb"
26
+ spec.add_development_dependency "guard"
27
+ spec.add_development_dependency "guard-rspec"
28
+ spec.add_development_dependency "metric_fu"
29
+ spec.add_development_dependency "simplecov"
30
+ spec.add_development_dependency "simplecov-rcov-text"
31
+ end
metadata ADDED
@@ -0,0 +1,202 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ermaker_ting
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Minwoo Lee
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-02-17 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: httparty
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.3'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.3'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: fakeweb
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: guard
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: guard-rspec
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: metric_fu
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: simplecov
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: simplecov-rcov-text
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ description: TING!!
154
+ email:
155
+ - ermaker@gmail.com
156
+ executables: []
157
+ extensions: []
158
+ extra_rdoc_files: []
159
+ files:
160
+ - ".gitignore"
161
+ - ".rspec"
162
+ - ".ruby-gemset"
163
+ - ".ruby-version"
164
+ - Gemfile
165
+ - Gemfile.lock
166
+ - Guardfile
167
+ - LICENSE
168
+ - README.md
169
+ - Rakefile
170
+ - lib/ting.rb
171
+ - lib/ting/pushover.rb
172
+ - lib/ting/version.rb
173
+ - spec/lib/ting/pushover_spec.rb
174
+ - spec/spec_helper.rb
175
+ - ting.gemspec
176
+ homepage: ''
177
+ licenses:
178
+ - MIT
179
+ metadata: {}
180
+ post_install_message:
181
+ rdoc_options: []
182
+ require_paths:
183
+ - lib
184
+ required_ruby_version: !ruby/object:Gem::Requirement
185
+ requirements:
186
+ - - ">="
187
+ - !ruby/object:Gem::Version
188
+ version: '0'
189
+ required_rubygems_version: !ruby/object:Gem::Requirement
190
+ requirements:
191
+ - - ">="
192
+ - !ruby/object:Gem::Version
193
+ version: '0'
194
+ requirements: []
195
+ rubyforge_project:
196
+ rubygems_version: 2.2.1
197
+ signing_key:
198
+ specification_version: 4
199
+ summary: ''
200
+ test_files:
201
+ - spec/lib/ting/pushover_spec.rb
202
+ - spec/spec_helper.rb