mixpal 0.0.5 → 0.4.0

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.
Files changed (77) hide show
  1. checksums.yaml +5 -5
  2. data/.rubocop.yml +24 -0
  3. data/.travis.yml +7 -0
  4. data/Dockerfile +6 -0
  5. data/README.md +51 -11
  6. data/Rakefile +10 -1
  7. data/docker-compose.yml +14 -0
  8. data/lib/mixpal.rb +27 -7
  9. data/lib/mixpal/event.rb +4 -4
  10. data/lib/mixpal/integration.rb +12 -8
  11. data/lib/mixpal/revenue.rb +32 -0
  12. data/lib/mixpal/tracker.rb +44 -27
  13. data/lib/mixpal/user.rb +9 -7
  14. data/lib/mixpal/util.rb +3 -3
  15. data/lib/mixpal/version.rb +1 -1
  16. data/mixpanel_assistant.gemspec +8 -7
  17. data/spec/lib/mixpal/event_spec.rb +20 -18
  18. data/spec/lib/mixpal/revenue_spec.rb +60 -0
  19. data/spec/lib/mixpal/tracker_spec.rb +181 -153
  20. data/spec/lib/mixpal/user_spec.rb +37 -31
  21. data/spec/lib/mixpal/util_spec.rb +15 -14
  22. data/spec/lib/mixpal_spec.rb +13 -2
  23. data/spec/spec_helper.rb +4 -7
  24. data/spec/support/custom_events_module.rb +5 -0
  25. data/spec/support/matchers/element_matchers.rb +2 -2
  26. data/test_app/.gitignore +18 -0
  27. data/test_app/Gemfile +11 -0
  28. data/test_app/README.rdoc +28 -0
  29. data/test_app/Rakefile +6 -0
  30. data/test_app/app/assets/images/.keep +0 -0
  31. data/test_app/app/assets/javascripts/application.js +16 -0
  32. data/test_app/app/assets/stylesheets/application.css +15 -0
  33. data/test_app/app/controllers/application_controller.rb +12 -0
  34. data/test_app/app/controllers/concerns/.keep +0 -0
  35. data/test_app/app/controllers/redirects_controller.rb +10 -0
  36. data/test_app/app/helpers/application_helper.rb +2 -0
  37. data/test_app/app/mailers/.keep +0 -0
  38. data/test_app/app/models/.keep +0 -0
  39. data/test_app/app/models/concerns/.keep +0 -0
  40. data/test_app/app/views/layouts/application.html.erb +16 -0
  41. data/test_app/app/views/redirects/new.html.erb +1 -0
  42. data/test_app/bin/bundle +3 -0
  43. data/test_app/bin/rails +8 -0
  44. data/test_app/bin/rake +8 -0
  45. data/test_app/bin/spring +18 -0
  46. data/test_app/config.ru +4 -0
  47. data/test_app/config/application.rb +30 -0
  48. data/test_app/config/boot.rb +4 -0
  49. data/test_app/config/environment.rb +5 -0
  50. data/test_app/config/environments/development.rb +37 -0
  51. data/test_app/config/environments/production.rb +82 -0
  52. data/test_app/config/environments/test.rb +39 -0
  53. data/test_app/config/initializers/assets.rb +8 -0
  54. data/test_app/config/initializers/backtrace_silencers.rb +7 -0
  55. data/test_app/config/initializers/cookies_serializer.rb +3 -0
  56. data/test_app/config/initializers/filter_parameter_logging.rb +4 -0
  57. data/test_app/config/initializers/inflections.rb +16 -0
  58. data/test_app/config/initializers/mime_types.rb +4 -0
  59. data/test_app/config/initializers/session_store.rb +3 -0
  60. data/test_app/config/initializers/wrap_parameters.rb +14 -0
  61. data/test_app/config/locales/en.yml +23 -0
  62. data/test_app/config/routes.rb +4 -0
  63. data/test_app/config/secrets.yml +22 -0
  64. data/test_app/db/seeds.rb +7 -0
  65. data/test_app/lib/assets/.keep +0 -0
  66. data/test_app/lib/tasks/.keep +0 -0
  67. data/test_app/log/.keep +0 -0
  68. data/test_app/public/404.html +67 -0
  69. data/test_app/public/422.html +67 -0
  70. data/test_app/public/500.html +66 -0
  71. data/test_app/public/favicon.ico +0 -0
  72. data/test_app/public/robots.txt +5 -0
  73. data/test_app/vendor/assets/javascripts/.keep +0 -0
  74. data/test_app/vendor/assets/stylesheets/.keep +0 -0
  75. metadata +112 -44
  76. data/spec/support/mock_rails.rb +0 -6
  77. data/spec/support/mock_storage.rb +0 -19
@@ -0,0 +1,66 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ body {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
54
+ </style>
55
+ </head>
56
+
57
+ <body>
58
+ <!-- This file lives in public/500.html -->
59
+ <div class="dialog">
60
+ <div>
61
+ <h1>We're sorry, but something went wrong.</h1>
62
+ </div>
63
+ <p>If you are the application owner check the logs for more information.</p>
64
+ </div>
65
+ </body>
66
+ </html>
File without changes
@@ -0,0 +1,5 @@
1
+ # See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
2
+ #
3
+ # To ban all spiders from the entire site uncomment the next two lines:
4
+ # User-agent: *
5
+ # Disallow: /
metadata CHANGED
@@ -1,153 +1,168 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mixpal
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - patbenatar
8
+ - mikehmorrissey
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2013-12-27 00:00:00.000000000 Z
12
+ date: 2020-09-20 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: bundler
15
16
  requirement: !ruby/object:Gem::Requirement
16
17
  requirements:
17
- - - ~>
18
+ - - "~>"
18
19
  - !ruby/object:Gem::Version
19
- version: '1.3'
20
+ version: '2'
20
21
  type: :development
21
22
  prerelease: false
22
23
  version_requirements: !ruby/object:Gem::Requirement
23
24
  requirements:
24
- - - ~>
25
+ - - "~>"
25
26
  - !ruby/object:Gem::Version
26
- version: '1.3'
27
+ version: '2'
27
28
  - !ruby/object:Gem::Dependency
28
29
  name: rake
29
30
  requirement: !ruby/object:Gem::Requirement
30
31
  requirements:
31
- - - '>='
32
+ - - ">="
32
33
  - !ruby/object:Gem::Version
33
34
  version: '0'
34
35
  type: :development
35
36
  prerelease: false
36
37
  version_requirements: !ruby/object:Gem::Requirement
37
38
  requirements:
38
- - - '>='
39
+ - - ">="
39
40
  - !ruby/object:Gem::Version
40
41
  version: '0'
41
42
  - !ruby/object:Gem::Dependency
42
43
  name: pry
43
44
  requirement: !ruby/object:Gem::Requirement
44
45
  requirements:
45
- - - '>='
46
+ - - ">="
46
47
  - !ruby/object:Gem::Version
47
48
  version: '0'
48
49
  type: :development
49
50
  prerelease: false
50
51
  version_requirements: !ruby/object:Gem::Requirement
51
52
  requirements:
52
- - - '>='
53
+ - - ">="
53
54
  - !ruby/object:Gem::Version
54
55
  version: '0'
56
+ - !ruby/object:Gem::Dependency
57
+ name: rubocop
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - "~>"
61
+ - !ruby/object:Gem::Version
62
+ version: 0.91.0
63
+ type: :development
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - "~>"
68
+ - !ruby/object:Gem::Version
69
+ version: 0.91.0
55
70
  - !ruby/object:Gem::Dependency
56
71
  name: rspec
57
72
  requirement: !ruby/object:Gem::Requirement
58
73
  requirements:
59
- - - ~>
74
+ - - "~>"
60
75
  - !ruby/object:Gem::Version
61
- version: 2.14.0
76
+ version: 3.9.0
62
77
  type: :development
63
78
  prerelease: false
64
79
  version_requirements: !ruby/object:Gem::Requirement
65
80
  requirements:
66
- - - ~>
81
+ - - "~>"
67
82
  - !ruby/object:Gem::Version
68
- version: 2.14.0
83
+ version: 3.9.0
69
84
  - !ruby/object:Gem::Dependency
70
85
  name: guard-rspec
71
86
  requirement: !ruby/object:Gem::Requirement
72
87
  requirements:
73
- - - ~>
88
+ - - "~>"
74
89
  - !ruby/object:Gem::Version
75
- version: 3.0.3
90
+ version: 4.7.3
76
91
  type: :development
77
92
  prerelease: false
78
93
  version_requirements: !ruby/object:Gem::Requirement
79
94
  requirements:
80
- - - ~>
95
+ - - "~>"
81
96
  - !ruby/object:Gem::Version
82
- version: 3.0.3
97
+ version: 4.7.3
83
98
  - !ruby/object:Gem::Dependency
84
99
  name: rb-fsevent
85
100
  requirement: !ruby/object:Gem::Requirement
86
101
  requirements:
87
- - - ~>
102
+ - - "~>"
88
103
  - !ruby/object:Gem::Version
89
- version: 0.9.3
104
+ version: 0.10.4
90
105
  type: :development
91
106
  prerelease: false
92
107
  version_requirements: !ruby/object:Gem::Requirement
93
108
  requirements:
94
- - - ~>
109
+ - - "~>"
95
110
  - !ruby/object:Gem::Version
96
- version: 0.9.3
111
+ version: 0.10.4
97
112
  - !ruby/object:Gem::Dependency
98
113
  name: awesome_print
99
114
  requirement: !ruby/object:Gem::Requirement
100
115
  requirements:
101
- - - ~>
116
+ - - "~>"
102
117
  - !ruby/object:Gem::Version
103
- version: 1.1.0
118
+ version: 1.8.0
104
119
  type: :development
105
120
  prerelease: false
106
121
  version_requirements: !ruby/object:Gem::Requirement
107
122
  requirements:
108
- - - ~>
123
+ - - "~>"
109
124
  - !ruby/object:Gem::Version
110
- version: 1.1.0
125
+ version: 1.8.0
111
126
  - !ruby/object:Gem::Dependency
112
127
  name: nokogiri
113
128
  requirement: !ruby/object:Gem::Requirement
114
129
  requirements:
115
- - - ~>
130
+ - - "~>"
116
131
  - !ruby/object:Gem::Version
117
- version: 1.6.0
132
+ version: '1'
118
133
  type: :development
119
134
  prerelease: false
120
135
  version_requirements: !ruby/object:Gem::Requirement
121
136
  requirements:
122
- - - ~>
137
+ - - "~>"
123
138
  - !ruby/object:Gem::Version
124
- version: 1.6.0
139
+ version: '1'
125
140
  - !ruby/object:Gem::Dependency
126
141
  name: actionpack
127
142
  requirement: !ruby/object:Gem::Requirement
128
143
  requirements:
129
- - - '>='
144
+ - - ">="
130
145
  - !ruby/object:Gem::Version
131
146
  version: '3.0'
132
147
  type: :development
133
148
  prerelease: false
134
149
  version_requirements: !ruby/object:Gem::Requirement
135
150
  requirements:
136
- - - '>='
151
+ - - ">="
137
152
  - !ruby/object:Gem::Version
138
153
  version: '3.0'
139
154
  - !ruby/object:Gem::Dependency
140
155
  name: activesupport
141
156
  requirement: !ruby/object:Gem::Requirement
142
157
  requirements:
143
- - - '>='
158
+ - - ">="
144
159
  - !ruby/object:Gem::Version
145
160
  version: '3.0'
146
161
  type: :runtime
147
162
  prerelease: false
148
163
  version_requirements: !ruby/object:Gem::Requirement
149
164
  requirements:
150
- - - '>='
165
+ - - ">="
151
166
  - !ruby/object:Gem::Version
152
167
  version: '3.0'
153
168
  description: Use Mixpanel's JavaScript library from your backend with ease
@@ -157,30 +172,84 @@ executables: []
157
172
  extensions: []
158
173
  extra_rdoc_files: []
159
174
  files:
160
- - .gitignore
161
- - .rspec
175
+ - ".gitignore"
176
+ - ".rspec"
177
+ - ".rubocop.yml"
178
+ - ".travis.yml"
179
+ - Dockerfile
162
180
  - Gemfile
163
181
  - Guardfile
164
182
  - LICENSE.txt
165
183
  - README.md
166
184
  - Rakefile
185
+ - docker-compose.yml
167
186
  - lib/mixpal.rb
168
187
  - lib/mixpal/event.rb
169
188
  - lib/mixpal/integration.rb
189
+ - lib/mixpal/revenue.rb
170
190
  - lib/mixpal/tracker.rb
171
191
  - lib/mixpal/user.rb
172
192
  - lib/mixpal/util.rb
173
193
  - lib/mixpal/version.rb
174
194
  - mixpanel_assistant.gemspec
175
195
  - spec/lib/mixpal/event_spec.rb
196
+ - spec/lib/mixpal/revenue_spec.rb
176
197
  - spec/lib/mixpal/tracker_spec.rb
177
198
  - spec/lib/mixpal/user_spec.rb
178
199
  - spec/lib/mixpal/util_spec.rb
179
200
  - spec/lib/mixpal_spec.rb
180
201
  - spec/spec_helper.rb
202
+ - spec/support/custom_events_module.rb
181
203
  - spec/support/matchers/element_matchers.rb
182
- - spec/support/mock_rails.rb
183
- - spec/support/mock_storage.rb
204
+ - test_app/.gitignore
205
+ - test_app/Gemfile
206
+ - test_app/README.rdoc
207
+ - test_app/Rakefile
208
+ - test_app/app/assets/images/.keep
209
+ - test_app/app/assets/javascripts/application.js
210
+ - test_app/app/assets/stylesheets/application.css
211
+ - test_app/app/controllers/application_controller.rb
212
+ - test_app/app/controllers/concerns/.keep
213
+ - test_app/app/controllers/redirects_controller.rb
214
+ - test_app/app/helpers/application_helper.rb
215
+ - test_app/app/mailers/.keep
216
+ - test_app/app/models/.keep
217
+ - test_app/app/models/concerns/.keep
218
+ - test_app/app/views/layouts/application.html.erb
219
+ - test_app/app/views/redirects/new.html.erb
220
+ - test_app/bin/bundle
221
+ - test_app/bin/rails
222
+ - test_app/bin/rake
223
+ - test_app/bin/spring
224
+ - test_app/config.ru
225
+ - test_app/config/application.rb
226
+ - test_app/config/boot.rb
227
+ - test_app/config/environment.rb
228
+ - test_app/config/environments/development.rb
229
+ - test_app/config/environments/production.rb
230
+ - test_app/config/environments/test.rb
231
+ - test_app/config/initializers/assets.rb
232
+ - test_app/config/initializers/backtrace_silencers.rb
233
+ - test_app/config/initializers/cookies_serializer.rb
234
+ - test_app/config/initializers/filter_parameter_logging.rb
235
+ - test_app/config/initializers/inflections.rb
236
+ - test_app/config/initializers/mime_types.rb
237
+ - test_app/config/initializers/session_store.rb
238
+ - test_app/config/initializers/wrap_parameters.rb
239
+ - test_app/config/locales/en.yml
240
+ - test_app/config/routes.rb
241
+ - test_app/config/secrets.yml
242
+ - test_app/db/seeds.rb
243
+ - test_app/lib/assets/.keep
244
+ - test_app/lib/tasks/.keep
245
+ - test_app/log/.keep
246
+ - test_app/public/404.html
247
+ - test_app/public/422.html
248
+ - test_app/public/500.html
249
+ - test_app/public/favicon.ico
250
+ - test_app/public/robots.txt
251
+ - test_app/vendor/assets/javascripts/.keep
252
+ - test_app/vendor/assets/stylesheets/.keep
184
253
  homepage: https://github.com/patbenatar/mixpal
185
254
  licenses:
186
255
  - MIT
@@ -191,17 +260,16 @@ require_paths:
191
260
  - lib
192
261
  required_ruby_version: !ruby/object:Gem::Requirement
193
262
  requirements:
194
- - - '>='
263
+ - - ">="
195
264
  - !ruby/object:Gem::Version
196
265
  version: '0'
197
266
  required_rubygems_version: !ruby/object:Gem::Requirement
198
267
  requirements:
199
- - - '>='
268
+ - - ">="
200
269
  - !ruby/object:Gem::Version
201
270
  version: '0'
202
271
  requirements: []
203
- rubyforge_project:
204
- rubygems_version: 2.0.3
272
+ rubygems_version: 3.1.2
205
273
  signing_key:
206
274
  specification_version: 4
207
275
  summary: As the JavaScript library is Mixpanel's preferred method of usage, Mixpal
@@ -210,11 +278,11 @@ summary: As the JavaScript library is Mixpanel's preferred method of usage, Mixp
210
278
  form submissions.
211
279
  test_files:
212
280
  - spec/lib/mixpal/event_spec.rb
281
+ - spec/lib/mixpal/revenue_spec.rb
213
282
  - spec/lib/mixpal/tracker_spec.rb
214
283
  - spec/lib/mixpal/user_spec.rb
215
284
  - spec/lib/mixpal/util_spec.rb
216
285
  - spec/lib/mixpal_spec.rb
217
286
  - spec/spec_helper.rb
287
+ - spec/support/custom_events_module.rb
218
288
  - spec/support/matchers/element_matchers.rb
219
- - spec/support/mock_rails.rb
220
- - spec/support/mock_storage.rb
@@ -1,6 +0,0 @@
1
- require File.expand_path("spec/support/mock_storage")
2
-
3
- class MockRails
4
- class_attribute :cache
5
- self.cache = MockStorage.new
6
- end
@@ -1,19 +0,0 @@
1
- class MockStorage
2
- attr_reader :data
3
-
4
- def initialize
5
- @data = {}
6
- end
7
-
8
- def write(key, value)
9
- data[key] = value
10
- end
11
-
12
- def read(key)
13
- data[key]
14
- end
15
-
16
- def delete(key)
17
- !!data.delete(key)
18
- end
19
- end