zapier_ruby 0.0.2 → 0.0.3
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 +5 -13
- data/.zapier_ruby.yml.example +3 -0
- data/README.md +16 -0
- data/bin/zap +15 -0
- data/lib/zapier_ruby/version.rb +1 -1
- metadata +16 -13
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
NDE2ZmRmYmI3YTBkMzcyYjUzOGFmOTBjODg2NjA2MTljZTUxNDcwZg==
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 268a9222d1497987d42c40a1ff508f24fd10d2fe
|
4
|
+
data.tar.gz: 0da16b069457ba8eebda84c5198b93844934ab7a
|
7
5
|
SHA512:
|
8
|
-
metadata.gz:
|
9
|
-
|
10
|
-
Mzg5MjI5ZjRjYzEzYjQ4ODBhZjUxNjUxY2YxMTk2ZTI2MDZhZTAxZmU3MDM2
|
11
|
-
ZTM5ZDJjZmU2MmRhOTc3OTc3Y2QxZTVjOWE2ZTljYTkxY2Q0Yjg=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
MDgzMjViN2U3MjUxY2M0ZTAzOTUwZjhmODY3MTRlYTZhNGEwYzE0N2I4NGI1
|
14
|
-
ODI0MzBkYjFjZmQyMzA5ZmM0ZWMzMDdlYjgwNzAwYjBkOGY0OWI3YWFhNjUz
|
15
|
-
M2EwM2JlMjNhZTJlMTEyZTcwNDgzMGMwNDE3Njc5MTU1MjIyNTc=
|
6
|
+
metadata.gz: 5e1de88c43f9af9746ed0912a73d5e205a110c151d8a91d481b84629641fe0a14e8a0ee2cfaa3ab571405ea43f06e4315235868149013c07b5e9209a60283e3d
|
7
|
+
data.tar.gz: 621f902315e2dafef48ae81af4d2179f55f5ba32ec8fd15c9d3740c3b92efd127d275bd15bebf91a4335e71796ea19a16f905bf2917c02c0a1fdbdca211adb3a
|
data/README.md
CHANGED
@@ -59,6 +59,22 @@ ZapierRuby.configure.do |c|
|
|
59
59
|
end
|
60
60
|
```
|
61
61
|
|
62
|
+
### Command Line Usage ###
|
63
|
+
To use this gem from the command line, you can leverage the `bin/zap` Ruby executable. In order to use this gem via command line, you must execute the gem in a folder which has a `.zapier_ruby.yml` file to configure your zaps. An example `.zapier_ruby.yml` file follows:
|
64
|
+
|
65
|
+
```
|
66
|
+
web_hooks:
|
67
|
+
:example_zap: "xxxxxx"
|
68
|
+
enable_logging: false
|
69
|
+
```
|
70
|
+
|
71
|
+
You must pass `zap [zap_name] [Message]` to the executable. For example:
|
72
|
+
```
|
73
|
+
bundle exec zap example_zap "Hello, world."
|
74
|
+
```
|
75
|
+
|
76
|
+
Which will post {Message: "Hello, world"} to your web hook. The zap name must be configured in .zapier_ruby.yml the executable will error.
|
77
|
+
|
62
78
|
#### Example Usage
|
63
79
|
|
64
80
|
If you do not have email configured for you application, you could send an email via a Zap to notify a new user that their account has been created.
|
data/bin/zap
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require_relative '../lib/zapier_ruby'
|
3
|
+
|
4
|
+
FILE_NAME = ".zapier_ruby.yml"
|
5
|
+
|
6
|
+
if File.exists?(FILE_NAME)
|
7
|
+
ZapierRuby.configure_with(File.join(Dir.pwd, FILE_NAME))
|
8
|
+
else
|
9
|
+
raise("Cannot find .zapier_ruby.yml file in pwd")
|
10
|
+
end
|
11
|
+
|
12
|
+
zap_name = ARGV[0].nil? ? raise("Must supply a zap name") : ARGV[0].to_sym
|
13
|
+
message = ARGV[1] || "No message supplied."
|
14
|
+
|
15
|
+
ZapierRuby::Zapper.new(zap_name).zap({Message: message})
|
data/lib/zapier_ruby/version.rb
CHANGED
metadata
CHANGED
@@ -1,69 +1,72 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zapier_ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Peterson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-02-
|
11
|
+
date: 2015-02-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.7'
|
20
20
|
type: :development
|
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: '1.7'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '10.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '10.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rest-client
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
description: Simple gem to integrate Zapier webhooks with a Ruby project.
|
56
56
|
email:
|
57
57
|
- pete2786@umn.edu
|
58
|
-
executables:
|
58
|
+
executables:
|
59
|
+
- zap
|
59
60
|
extensions: []
|
60
61
|
extra_rdoc_files: []
|
61
62
|
files:
|
62
|
-
- .gitignore
|
63
|
+
- ".gitignore"
|
64
|
+
- ".zapier_ruby.yml.example"
|
63
65
|
- Gemfile
|
64
66
|
- LICENSE.txt
|
65
67
|
- README.md
|
66
68
|
- Rakefile
|
69
|
+
- bin/zap
|
67
70
|
- lib/zapier_ruby.rb
|
68
71
|
- lib/zapier_ruby/config.rb
|
69
72
|
- lib/zapier_ruby/logger_decorator.rb
|
@@ -80,17 +83,17 @@ require_paths:
|
|
80
83
|
- lib
|
81
84
|
required_ruby_version: !ruby/object:Gem::Requirement
|
82
85
|
requirements:
|
83
|
-
- -
|
86
|
+
- - ">="
|
84
87
|
- !ruby/object:Gem::Version
|
85
88
|
version: '0'
|
86
89
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
87
90
|
requirements:
|
88
|
-
- -
|
91
|
+
- - ">="
|
89
92
|
- !ruby/object:Gem::Version
|
90
93
|
version: '0'
|
91
94
|
requirements: []
|
92
95
|
rubyforge_project:
|
93
|
-
rubygems_version: 2.
|
96
|
+
rubygems_version: 2.4.5
|
94
97
|
signing_key:
|
95
98
|
specification_version: 4
|
96
99
|
summary: Simple gem to integrate Zapier webhooks with a Ruby project.
|