pushpop 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,24 @@
1
+ require 'spec_helper'
2
+
3
+ describe 'job' do
4
+ job 'foo-main' do end
5
+ Pushpop.jobs.first.name.should == 'foo-main'
6
+ end
7
+
8
+ describe Pushpop do
9
+
10
+ describe 'add_job' do
11
+ it 'should add a job to the list' do
12
+ empty_proc = Proc.new {}
13
+ Pushpop.add_job('foo', &empty_proc)
14
+ Pushpop.jobs.first.name.should == 'foo'
15
+ end
16
+ end
17
+
18
+ describe 'random_name' do
19
+ it 'should be 8 characters and alphanumeric' do
20
+ Pushpop.random_name.should =~ /^\w{8}$/
21
+ end
22
+ end
23
+
24
+ end
@@ -0,0 +1,9 @@
1
+ require 'spec_helper'
2
+
3
+ describe 'run a job end to end' do
4
+ it 'should run and return template contents' do
5
+ require File.expand_path('../jobs/simple_job', __FILE__)
6
+ Pushpop.jobs.length.should == 1
7
+ Pushpop.jobs.first.run.should == [30, { "return 10" => 10, "increase by 20" => 30}]
8
+ end
9
+ end
@@ -0,0 +1,12 @@
1
+ require 'webmock/rspec'
2
+
3
+ $: << File.join(File.dirname(__FILE__), '../lib')
4
+
5
+ require 'pushpop'
6
+
7
+ RSpec.configure do |config|
8
+ config.before :each do
9
+ Pushpop.jobs.clear
10
+ Pushpop::Job.plugins.clear
11
+ end
12
+ end
@@ -0,0 +1,6 @@
1
+ <% if response %>
2
+ <pre><%= response %></pre>
3
+ <% else %>
4
+ <pre><%= step_responses[:test] %></pre>
5
+ <% end %>
6
+
@@ -0,0 +1 @@
1
+ <pre>The number <%= response %>!</pre>
metadata ADDED
@@ -0,0 +1,113 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: pushpop
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Josh Dzielak
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2014-05-11 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: clockwork
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: keen
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ description: Pushpop is a simple but powerful Ruby app that sends notifications based
47
+ on events captured with Keen IO.
48
+ email: josh@keen.io
49
+ executables: []
50
+ extensions: []
51
+ extra_rdoc_files: []
52
+ files:
53
+ - .gitignore
54
+ - .travis.yml
55
+ - Gemfile
56
+ - Gemfile.lock
57
+ - LICENSE
58
+ - Procfile
59
+ - README.md
60
+ - Rakefile
61
+ - jobs/example_job.rb
62
+ - lib/plugins/keen.rb
63
+ - lib/plugins/sendgrid.rb
64
+ - lib/plugins/twilio.rb
65
+ - lib/pushpop.rb
66
+ - lib/pushpop/job.rb
67
+ - lib/pushpop/step.rb
68
+ - lib/pushpop/version.rb
69
+ - pushpop.gemspec
70
+ - spec/jobs/simple_job.rb
71
+ - spec/plugins/keen_spec.rb
72
+ - spec/plugins/sendgrid_spec.rb
73
+ - spec/pushpop/job_spec.rb
74
+ - spec/pushpop/step_spec.rb
75
+ - spec/pushpop_spec.rb
76
+ - spec/simple_job_spec.rb
77
+ - spec/spec_helper.rb
78
+ - spec/templates/spec.html.erb
79
+ - templates/first_template.html.erb
80
+ homepage: https://github.com/keenlabs/pushpop
81
+ licenses: []
82
+ post_install_message:
83
+ rdoc_options: []
84
+ require_paths:
85
+ - lib
86
+ required_ruby_version: !ruby/object:Gem::Requirement
87
+ none: false
88
+ requirements:
89
+ - - ! '>='
90
+ - !ruby/object:Gem::Version
91
+ version: '0'
92
+ required_rubygems_version: !ruby/object:Gem::Requirement
93
+ none: false
94
+ requirements:
95
+ - - ! '>='
96
+ - !ruby/object:Gem::Version
97
+ version: '0'
98
+ requirements: []
99
+ rubyforge_project:
100
+ rubygems_version: 1.8.23
101
+ signing_key:
102
+ specification_version: 3
103
+ summary: Automatic delivery of reports and alerts based on Keen IO events
104
+ test_files:
105
+ - spec/jobs/simple_job.rb
106
+ - spec/plugins/keen_spec.rb
107
+ - spec/plugins/sendgrid_spec.rb
108
+ - spec/pushpop/job_spec.rb
109
+ - spec/pushpop/step_spec.rb
110
+ - spec/pushpop_spec.rb
111
+ - spec/simple_job_spec.rb
112
+ - spec/spec_helper.rb
113
+ - spec/templates/spec.html.erb