iftttify 0.0.1 → 0.0.2
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 +4 -4
- data/lib/iftttify/iftttify.rb +10 -12
- data/lib/iftttify/version.rb +1 -1
- data/test/dummy/log/test.log +9 -5354
- metadata +31 -71
- data/lib/iftttify/exceptions.rb~ +0 -3
- data/lib/iftttify/iftttify-test.rb~ +0 -2
- data/lib/iftttify/iftttify.rb~ +0 -3
- data/lib/iftttify.rb~ +0 -2
- data/test/dummy/app/controllers/pages_controller.rb~ +0 -10
- data/test/dummy/app/controllers/pages_controller_controller.rb~ +0 -4
- data/test/dummy/config/routes.rb~ +0 -58
- data/test/dummy/log/development.log +0 -0
- data/test/dummy/test/controllers/pages_controller_controller_test.rb~ +0 -9
- data/test/dummy/test/controllers/pages_controller_test.rb~ +0 -154
- data/test/dummy/test/helpers/pages_controller_helper_test.rb~ +0 -4
- data/test/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/8b52dc7bef008d7a85d9ce52db12fe8c +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/901165c6156d9179acf3af06ca62130a +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/bd1089d505cf5d172d83615cc4a8bdcb +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/be08755da3d40b9f93e34e65c8c4176d +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/test/iftttify_test.rb~ +0 -7
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: iftttify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Quan Sun
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-06-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -48,12 +48,8 @@ files:
|
|
48
48
|
- MIT-LICENSE
|
49
49
|
- Rakefile
|
50
50
|
- lib/iftttify.rb
|
51
|
-
- lib/iftttify.rb~
|
52
51
|
- lib/iftttify/exceptions.rb
|
53
|
-
- lib/iftttify/exceptions.rb~
|
54
|
-
- lib/iftttify/iftttify-test.rb~
|
55
52
|
- lib/iftttify/iftttify.rb
|
56
|
-
- lib/iftttify/iftttify.rb~
|
57
53
|
- lib/iftttify/version.rb
|
58
54
|
- lib/tasks/iftttify_tasks.rake
|
59
55
|
- test/dummy/README.rdoc
|
@@ -64,8 +60,6 @@ files:
|
|
64
60
|
- test/dummy/app/assets/stylesheets/pages_controller.css
|
65
61
|
- test/dummy/app/controllers/application_controller.rb
|
66
62
|
- test/dummy/app/controllers/pages_controller.rb
|
67
|
-
- test/dummy/app/controllers/pages_controller.rb~
|
68
|
-
- test/dummy/app/controllers/pages_controller_controller.rb~
|
69
63
|
- test/dummy/app/helpers/application_helper.rb
|
70
64
|
- test/dummy/app/helpers/pages_controller_helper.rb
|
71
65
|
- test/dummy/app/views/layouts/application.html.erb
|
@@ -91,32 +85,16 @@ files:
|
|
91
85
|
- test/dummy/config/initializers/wrap_parameters.rb
|
92
86
|
- test/dummy/config/locales/en.yml
|
93
87
|
- test/dummy/config/routes.rb
|
94
|
-
- test/dummy/config/routes.rb~
|
95
88
|
- test/dummy/config/secrets.yml
|
96
89
|
- test/dummy/db/test.sqlite3
|
97
|
-
- test/dummy/log/development.log
|
98
90
|
- test/dummy/log/test.log
|
99
91
|
- test/dummy/public/404.html
|
100
92
|
- test/dummy/public/422.html
|
101
93
|
- test/dummy/public/500.html
|
102
94
|
- test/dummy/public/favicon.ico
|
103
|
-
- test/dummy/test/controllers/pages_controller_controller_test.rb~
|
104
95
|
- test/dummy/test/controllers/pages_controller_test.rb
|
105
|
-
- test/dummy/test/controllers/pages_controller_test.rb~
|
106
96
|
- test/dummy/test/helpers/pages_controller_helper_test.rb
|
107
|
-
- test/dummy/test/helpers/pages_controller_helper_test.rb~
|
108
|
-
- test/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705
|
109
|
-
- test/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af
|
110
|
-
- test/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953
|
111
|
-
- test/dummy/tmp/cache/assets/test/sprockets/8b52dc7bef008d7a85d9ce52db12fe8c
|
112
|
-
- test/dummy/tmp/cache/assets/test/sprockets/901165c6156d9179acf3af06ca62130a
|
113
|
-
- test/dummy/tmp/cache/assets/test/sprockets/bd1089d505cf5d172d83615cc4a8bdcb
|
114
|
-
- test/dummy/tmp/cache/assets/test/sprockets/be08755da3d40b9f93e34e65c8c4176d
|
115
|
-
- test/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994
|
116
|
-
- test/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6
|
117
|
-
- test/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655
|
118
97
|
- test/iftttify_test.rb
|
119
|
-
- test/iftttify_test.rb~
|
120
98
|
- test/test_helper.rb
|
121
99
|
homepage: https://github.com/qsun/iftttify
|
122
100
|
licenses:
|
@@ -144,64 +122,46 @@ specification_version: 4
|
|
144
122
|
summary: allow IFTTT to talk to our Rails app
|
145
123
|
test_files:
|
146
124
|
- test/iftttify_test.rb
|
147
|
-
- test/iftttify_test.rb~
|
148
|
-
- test/test_helper.rb
|
149
|
-
- test/dummy/public/404.html
|
150
|
-
- test/dummy/public/favicon.ico
|
151
|
-
- test/dummy/public/500.html
|
152
|
-
- test/dummy/public/422.html
|
153
125
|
- test/dummy/Rakefile
|
154
|
-
- test/dummy/
|
155
|
-
- test/dummy/
|
156
|
-
- test/dummy/
|
157
|
-
- test/dummy/
|
158
|
-
- test/dummy/app/helpers/application_helper.rb
|
126
|
+
- test/dummy/app/controllers/application_controller.rb
|
127
|
+
- test/dummy/app/controllers/pages_controller.rb
|
128
|
+
- test/dummy/app/views/pages_controller/ifttt.html.erb
|
129
|
+
- test/dummy/app/views/layouts/application.html.erb
|
159
130
|
- test/dummy/app/helpers/pages_controller_helper.rb
|
160
|
-
- test/dummy/app/
|
131
|
+
- test/dummy/app/helpers/application_helper.rb
|
161
132
|
- test/dummy/app/assets/javascripts/pages_controller.js
|
133
|
+
- test/dummy/app/assets/javascripts/application.js
|
162
134
|
- test/dummy/app/assets/stylesheets/application.css
|
163
135
|
- test/dummy/app/assets/stylesheets/pages_controller.css
|
164
|
-
- test/dummy/
|
165
|
-
- test/dummy/
|
166
|
-
- test/dummy/
|
167
|
-
- test/dummy/
|
168
|
-
- test/dummy/
|
169
|
-
- test/dummy/
|
170
|
-
- test/dummy/
|
136
|
+
- test/dummy/db/test.sqlite3
|
137
|
+
- test/dummy/bin/rails
|
138
|
+
- test/dummy/bin/bundle
|
139
|
+
- test/dummy/bin/rake
|
140
|
+
- test/dummy/public/favicon.ico
|
141
|
+
- test/dummy/public/500.html
|
142
|
+
- test/dummy/public/404.html
|
143
|
+
- test/dummy/public/422.html
|
144
|
+
- test/dummy/README.rdoc
|
145
|
+
- test/dummy/config.ru
|
171
146
|
- test/dummy/log/test.log
|
172
|
-
- test/dummy/config/
|
147
|
+
- test/dummy/config/secrets.yml
|
148
|
+
- test/dummy/config/locales/en.yml
|
149
|
+
- test/dummy/config/database.yml
|
150
|
+
- test/dummy/config/application.rb
|
151
|
+
- test/dummy/config/environments/test.rb
|
173
152
|
- test/dummy/config/environments/production.rb
|
174
153
|
- test/dummy/config/environments/development.rb
|
175
|
-
- test/dummy/config/environments/test.rb
|
176
|
-
- test/dummy/config/initializers/filter_parameter_logging.rb
|
177
154
|
- test/dummy/config/initializers/inflections.rb
|
178
|
-
- test/dummy/config/initializers/backtrace_silencers.rb
|
179
|
-
- test/dummy/config/initializers/cookies_serializer.rb
|
180
|
-
- test/dummy/config/initializers/mime_types.rb
|
181
|
-
- test/dummy/config/initializers/session_store.rb
|
182
155
|
- test/dummy/config/initializers/wrap_parameters.rb
|
183
156
|
- test/dummy/config/initializers/assets.rb
|
157
|
+
- test/dummy/config/initializers/mime_types.rb
|
158
|
+
- test/dummy/config/initializers/filter_parameter_logging.rb
|
159
|
+
- test/dummy/config/initializers/session_store.rb
|
160
|
+
- test/dummy/config/initializers/backtrace_silencers.rb
|
161
|
+
- test/dummy/config/initializers/cookies_serializer.rb
|
184
162
|
- test/dummy/config/environment.rb
|
185
|
-
- test/dummy/config/
|
163
|
+
- test/dummy/config/boot.rb
|
186
164
|
- test/dummy/config/routes.rb
|
187
|
-
- test/dummy/config/locales/en.yml
|
188
|
-
- test/dummy/config/routes.rb~
|
189
|
-
- test/dummy/config/database.yml
|
190
|
-
- test/dummy/config/application.rb
|
191
|
-
- test/dummy/config.ru
|
192
|
-
- test/dummy/README.rdoc
|
193
|
-
- test/dummy/tmp/cache/assets/test/sprockets/8b52dc7bef008d7a85d9ce52db12fe8c
|
194
|
-
- test/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af
|
195
|
-
- test/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6
|
196
|
-
- test/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953
|
197
|
-
- test/dummy/tmp/cache/assets/test/sprockets/be08755da3d40b9f93e34e65c8c4176d
|
198
|
-
- test/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655
|
199
|
-
- test/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994
|
200
|
-
- test/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705
|
201
|
-
- test/dummy/tmp/cache/assets/test/sprockets/bd1089d505cf5d172d83615cc4a8bdcb
|
202
|
-
- test/dummy/tmp/cache/assets/test/sprockets/901165c6156d9179acf3af06ca62130a
|
203
|
-
- test/dummy/test/helpers/pages_controller_helper_test.rb~
|
204
|
-
- test/dummy/test/helpers/pages_controller_helper_test.rb
|
205
|
-
- test/dummy/test/controllers/pages_controller_test.rb~
|
206
165
|
- test/dummy/test/controllers/pages_controller_test.rb
|
207
|
-
- test/dummy/test/
|
166
|
+
- test/dummy/test/helpers/pages_controller_helper_test.rb
|
167
|
+
- test/test_helper.rb
|
data/lib/iftttify/exceptions.rb~
DELETED
data/lib/iftttify/iftttify.rb~
DELETED
data/lib/iftttify.rb~
DELETED
@@ -1,58 +0,0 @@
|
|
1
|
-
Rails.application.routes.draw do
|
2
|
-
get 'pages_controller/ifttt'
|
3
|
-
|
4
|
-
# The priority is based upon order of creation: first created -> highest priority.
|
5
|
-
# See how all your routes lay out with "rake routes".
|
6
|
-
|
7
|
-
# You can have the root of your site routed with "root"
|
8
|
-
# root 'welcome#index'
|
9
|
-
|
10
|
-
# Example of regular route:
|
11
|
-
# get 'products/:id' => 'catalog#view'
|
12
|
-
|
13
|
-
# Example of named route that can be invoked with purchase_url(id: product.id)
|
14
|
-
# get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
|
15
|
-
|
16
|
-
# Example resource route (maps HTTP verbs to controller actions automatically):
|
17
|
-
# resources :products
|
18
|
-
|
19
|
-
# Example resource route with options:
|
20
|
-
# resources :products do
|
21
|
-
# member do
|
22
|
-
# get 'short'
|
23
|
-
# post 'toggle'
|
24
|
-
# end
|
25
|
-
#
|
26
|
-
# collection do
|
27
|
-
# get 'sold'
|
28
|
-
# end
|
29
|
-
# end
|
30
|
-
|
31
|
-
# Example resource route with sub-resources:
|
32
|
-
# resources :products do
|
33
|
-
# resources :comments, :sales
|
34
|
-
# resource :seller
|
35
|
-
# end
|
36
|
-
|
37
|
-
# Example resource route with more complex sub-resources:
|
38
|
-
# resources :products do
|
39
|
-
# resources :comments
|
40
|
-
# resources :sales do
|
41
|
-
# get 'recent', on: :collection
|
42
|
-
# end
|
43
|
-
# end
|
44
|
-
|
45
|
-
# Example resource route with concerns:
|
46
|
-
# concern :toggleable do
|
47
|
-
# post 'toggle'
|
48
|
-
# end
|
49
|
-
# resources :posts, concerns: :toggleable
|
50
|
-
# resources :photos, concerns: :toggleable
|
51
|
-
|
52
|
-
# Example resource route within a namespace:
|
53
|
-
# namespace :admin do
|
54
|
-
# # Directs /admin/products/* to Admin::ProductsController
|
55
|
-
# # (app/controllers/admin/products_controller.rb)
|
56
|
-
# resources :products
|
57
|
-
# end
|
58
|
-
end
|
File without changes
|
@@ -1,154 +0,0 @@
|
|
1
|
-
require 'test_helper'
|
2
|
-
|
3
|
-
class PagesControllerControllerTest < ActionController::TestCase
|
4
|
-
def setup
|
5
|
-
@new_post_with_correct_auth = '<?xml version="1.0" encoding="UTF-8"?>
|
6
|
-
<methodCall>
|
7
|
-
<methodName>metaWeblog.newPost</methodName>
|
8
|
-
<params>
|
9
|
-
<param>
|
10
|
-
<value>
|
11
|
-
<string>MyBlog</string>
|
12
|
-
</value>
|
13
|
-
</param>
|
14
|
-
<param>
|
15
|
-
<value>
|
16
|
-
<string>username</string>
|
17
|
-
</value>
|
18
|
-
</param>
|
19
|
-
<param>
|
20
|
-
<value>
|
21
|
-
<string>password</string>
|
22
|
-
</value>
|
23
|
-
</param>
|
24
|
-
<param>
|
25
|
-
<value>
|
26
|
-
<struct>
|
27
|
-
<member>
|
28
|
-
<name>title</name>
|
29
|
-
<value>
|
30
|
-
<string>My Title</string>
|
31
|
-
</value>
|
32
|
-
</member>
|
33
|
-
<member>
|
34
|
-
<name>description</name>
|
35
|
-
<value>
|
36
|
-
<string>My description</string>
|
37
|
-
</value>
|
38
|
-
</member>
|
39
|
-
<member>
|
40
|
-
<name>categories</name>
|
41
|
-
<value>
|
42
|
-
<array>
|
43
|
-
<data>
|
44
|
-
<value>
|
45
|
-
<string>My Category</string>
|
46
|
-
</value>
|
47
|
-
</data>
|
48
|
-
</array>
|
49
|
-
</value>
|
50
|
-
</member>
|
51
|
-
</struct>
|
52
|
-
</value>
|
53
|
-
</param>
|
54
|
-
<param>
|
55
|
-
<value>
|
56
|
-
<boolean>1</boolean>
|
57
|
-
</value>
|
58
|
-
</param>
|
59
|
-
</params>
|
60
|
-
</methodCall>'
|
61
|
-
@new_post_with_incorrect_auth = '<?xml version="1.0" encoding="UTF-8"?>
|
62
|
-
<methodCall>
|
63
|
-
<methodName>metaWeblog.newPost</methodName>
|
64
|
-
<params>
|
65
|
-
<param>
|
66
|
-
<value>
|
67
|
-
<string>MyBlog</string>
|
68
|
-
</value>
|
69
|
-
</param>
|
70
|
-
<param>
|
71
|
-
<value>
|
72
|
-
<string>u</string>
|
73
|
-
</value>
|
74
|
-
</param>
|
75
|
-
<param>
|
76
|
-
<value>
|
77
|
-
<string>p</string>
|
78
|
-
</value>
|
79
|
-
</param>
|
80
|
-
<param>
|
81
|
-
<value>
|
82
|
-
<struct>
|
83
|
-
<member>
|
84
|
-
<name>title</name>
|
85
|
-
<value>
|
86
|
-
<string>My Title</string>
|
87
|
-
</value>
|
88
|
-
</member>
|
89
|
-
<member>
|
90
|
-
<name>description</name>
|
91
|
-
<value>
|
92
|
-
<string>My description</string>
|
93
|
-
</value>
|
94
|
-
</member>
|
95
|
-
<member>
|
96
|
-
<name>categories</name>
|
97
|
-
<value>
|
98
|
-
<array>
|
99
|
-
<data>
|
100
|
-
<value>
|
101
|
-
<string>My Category</string>
|
102
|
-
</value>
|
103
|
-
</data>
|
104
|
-
</array>
|
105
|
-
</value>
|
106
|
-
</member>
|
107
|
-
</struct>
|
108
|
-
</value>
|
109
|
-
</param>
|
110
|
-
<param>
|
111
|
-
<value>
|
112
|
-
<boolean>1</boolean>
|
113
|
-
</value>
|
114
|
-
</param>
|
115
|
-
</params>
|
116
|
-
</methodCall>'
|
117
|
-
|
118
|
-
end
|
119
|
-
test "should respond to mt.supportedMethods" do
|
120
|
-
raw_post :ifttt, {format: :xml}, '<?xml version="1.0"?>
|
121
|
-
<methodCall>
|
122
|
-
<methodName>mt.supportedMethods</methodName>
|
123
|
-
</methodCall>
|
124
|
-
'
|
125
|
-
assert_response 200
|
126
|
-
assert_match /metaWeblog.getRecentPosts/, @response.body
|
127
|
-
end
|
128
|
-
|
129
|
-
test "should respond to metaWeblog.getRecentPosts" do
|
130
|
-
raw_post :ifttt, {format: :xml}, '<?xml version="1.0"?>
|
131
|
-
<methodCall>
|
132
|
-
<methodName>metaWeblog.getRecentPosts</methodName>
|
133
|
-
</methodCall>
|
134
|
-
'
|
135
|
-
assert_response 200
|
136
|
-
end
|
137
|
-
|
138
|
-
test "should deny unauthorized access to metaWeblog.newPost" do
|
139
|
-
raw_post :ifttt_auth, {format: :xml}, @new_post_with_incorrect_auth
|
140
|
-
assert_response 401
|
141
|
-
end
|
142
|
-
|
143
|
-
test "should accept authorized access to metaWeblog.newPost" do
|
144
|
-
raw_post :ifttt_auth, {format: :xml}, @new_post_with_correct_auth
|
145
|
-
assert_response 200
|
146
|
-
assert_match /42/, @response.body
|
147
|
-
end
|
148
|
-
|
149
|
-
test "should accept metaWeblog.newPost if no credential specified" do
|
150
|
-
raw_post :ifttt, {format: :xml}, @new_post_with_incorrect_auth
|
151
|
-
assert_response 200
|
152
|
-
assert_match /42/, @response.body
|
153
|
-
end
|
154
|
-
end
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|