buddies_avatar 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,6 @@
1
1
  require 'test_helper'
2
2
 
3
3
  class NavigationTest < ActionDispatch::IntegrationTest
4
- fixtures :all
5
4
  include Capybara::DSL
6
5
 
7
6
  def clean_database
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 1
9
- version: 0.0.1
8
+ - 2
9
+ version: 0.0.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Lin He
@@ -61,7 +61,7 @@ dependencies:
61
61
  prerelease: false
62
62
  version_requirements: *id003
63
63
  - !ruby/object:Gem::Dependency
64
- name: sqlite3
64
+ name: mini_magick
65
65
  requirement: &id004 !ruby/object:Gem::Requirement
66
66
  none: false
67
67
  requirements:
@@ -70,9 +70,68 @@ dependencies:
70
70
  segments:
71
71
  - 0
72
72
  version: "0"
73
- type: :development
73
+ type: :runtime
74
74
  prerelease: false
75
75
  version_requirements: *id004
76
+ - !ruby/object:Gem::Dependency
77
+ name: sqlite3
78
+ requirement: &id005 !ruby/object:Gem::Requirement
79
+ none: false
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ segments:
84
+ - 0
85
+ version: "0"
86
+ type: :development
87
+ prerelease: false
88
+ version_requirements: *id005
89
+ - !ruby/object:Gem::Dependency
90
+ name: capybara
91
+ requirement: &id006 !ruby/object:Gem::Requirement
92
+ none: false
93
+ requirements:
94
+ - - ~>
95
+ - !ruby/object:Gem::Version
96
+ segments:
97
+ - 1
98
+ - 0
99
+ - 0
100
+ version: 1.0.0
101
+ type: :development
102
+ prerelease: false
103
+ version_requirements: *id006
104
+ - !ruby/object:Gem::Dependency
105
+ name: shoulda-context
106
+ requirement: &id007 !ruby/object:Gem::Requirement
107
+ none: false
108
+ requirements:
109
+ - - "="
110
+ - !ruby/object:Gem::Version
111
+ segments:
112
+ - 1
113
+ - 0
114
+ - 0
115
+ - beta1
116
+ version: 1.0.0.beta1
117
+ type: :development
118
+ prerelease: false
119
+ version_requirements: *id007
120
+ - !ruby/object:Gem::Dependency
121
+ name: launchy
122
+ requirement: &id008 !ruby/object:Gem::Requirement
123
+ none: false
124
+ requirements:
125
+ - - ~>
126
+ - !ruby/object:Gem::Version
127
+ segments:
128
+ - 2
129
+ - 0
130
+ - 5
131
+ version: 2.0.5
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: *id008
76
135
  description: Part of the 'buddies' gem that aims to bring some common social features to a rails site. Buddies avatar gem provides user avatar and cropping feature. Image cropping technique is credited to railscasts.com
77
136
  email:
78
137
  - he9lin@gmail.com
@@ -91,7 +150,6 @@ files:
91
150
  - config/routes.rb
92
151
  - db/migrate/20110916040104_add_avatar_to_users.rb
93
152
  - lib/buddies_avatar/engine.rb
94
- - lib/buddies_avatar/orm/active_record.rb
95
153
  - lib/buddies_avatar/orm/base.rb
96
154
  - lib/buddies_avatar/version.rb
97
155
  - lib/buddies_avatar.rb
@@ -126,11 +184,14 @@ files:
126
184
  - test/dummy/db/migrate/20110916023339_create_users.rb
127
185
  - test/dummy/db/schema.rb
128
186
  - test/dummy/db/test.sqlite3
187
+ - test/dummy/log/development.log
129
188
  - test/dummy/log/test.log
130
189
  - test/dummy/public/404.html
131
190
  - test/dummy/public/422.html
132
191
  - test/dummy/public/500.html
133
192
  - test/dummy/public/favicon.ico
193
+ - test/dummy/public/uploads/user/avatar/1/panda.jpg
194
+ - test/dummy/public/uploads/user/avatar/1/thumb_panda.jpg
134
195
  - test/dummy/public/uploads/user/avatar/980190963/panda.jpg
135
196
  - test/dummy/public/uploads/user/avatar/980190963/thumb_panda.jpg
136
197
  - test/dummy/Rakefile
@@ -142,16 +203,20 @@ files:
142
203
  - test/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705
143
204
  - test/dummy/tmp/cache/assets/D3E/AB0/sprockets%2F562af01abc225db5e83d8549b9a759b2
144
205
  - test/dummy/tmp/cache/assets/D44/120/sprockets%2Fcf7c841ae2c76843f593fb04d1246bb9
206
+ - test/dummy/tmp/cache/assets/D44/480/sprockets%2F1e1c983942aeb241dddf2e6ed8916507
145
207
  - test/dummy/tmp/cache/assets/D45/1B0/sprockets%2Ff79ee6554cade6f1426532e76320ba9b
146
208
  - test/dummy/tmp/cache/assets/D45/FE0/sprockets%2Fe4d788461df33de2f68b1e4b4a49307a
147
209
  - test/dummy/tmp/cache/assets/D4C/5B0/sprockets%2F93616d41b28b4de77ad6b50945f7dc8e
148
210
  - test/dummy/tmp/cache/assets/D54/ED0/sprockets%2F71c9fa01091d432b131da3bb73faf3d4
211
+ - test/dummy/tmp/cache/assets/D60/A10/sprockets%2F40ee4d5f36bc1b45418cd82cb2325ae4
149
212
  - test/dummy/tmp/cache/assets/D84/210/sprockets%2Fabd0103ccec2b428ac62c94e4c40b384
150
213
  - test/dummy/tmp/cache/assets/D94/EC0/sprockets%2F7d1c40e48a2633c3fab4f4adea96e630
151
214
  - test/dummy/tmp/cache/assets/DA8/CF0/sprockets%2F05451cfdd8b7a96ef18a6da9d5f0448c
152
215
  - test/dummy/tmp/cache/assets/DD7/370/sprockets%2F7a362d81a180d98caedc3ee6b56f95ce
153
216
  - test/dummy/tmp/cache/assets/DDD/D70/sprockets%2Ffd1e460aec97cee6c89170cbcc7872f6
154
217
  - test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af
218
+ - test/dummy/tmp/cache/assets/E88/B20/sprockets%2F038dc6bf06847b1fdbcec5bdf7ecaf1a
219
+ - test/dummy/tmp/cache/assets/E88/F00/sprockets%2F72f3aaedc6caddde0a39d09c2c84bde8
155
220
  - test/dummy/tmp/capybara/capybara-20110916132329600183993.html
156
221
  - test/dummy/tmp/capybara/capybara-201109161324214823412123.html
157
222
  - test/fixtures/invalid.txt
@@ -172,7 +237,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
172
237
  requirements:
173
238
  - - ">="
174
239
  - !ruby/object:Gem::Version
175
- hash: -3075531071381096001
240
+ hash: -745393179472619559
176
241
  segments:
177
242
  - 0
178
243
  version: "0"
@@ -181,7 +246,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
181
246
  requirements:
182
247
  - - ">="
183
248
  - !ruby/object:Gem::Version
184
- hash: -3075531071381096001
249
+ hash: -745393179472619559
185
250
  segments:
186
251
  - 0
187
252
  version: "0"
@@ -220,11 +285,14 @@ test_files:
220
285
  - test/dummy/db/migrate/20110916023339_create_users.rb
221
286
  - test/dummy/db/schema.rb
222
287
  - test/dummy/db/test.sqlite3
288
+ - test/dummy/log/development.log
223
289
  - test/dummy/log/test.log
224
290
  - test/dummy/public/404.html
225
291
  - test/dummy/public/422.html
226
292
  - test/dummy/public/500.html
227
293
  - test/dummy/public/favicon.ico
294
+ - test/dummy/public/uploads/user/avatar/1/panda.jpg
295
+ - test/dummy/public/uploads/user/avatar/1/thumb_panda.jpg
228
296
  - test/dummy/public/uploads/user/avatar/980190963/panda.jpg
229
297
  - test/dummy/public/uploads/user/avatar/980190963/thumb_panda.jpg
230
298
  - test/dummy/Rakefile
@@ -236,16 +304,20 @@ test_files:
236
304
  - test/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705
237
305
  - test/dummy/tmp/cache/assets/D3E/AB0/sprockets%2F562af01abc225db5e83d8549b9a759b2
238
306
  - test/dummy/tmp/cache/assets/D44/120/sprockets%2Fcf7c841ae2c76843f593fb04d1246bb9
307
+ - test/dummy/tmp/cache/assets/D44/480/sprockets%2F1e1c983942aeb241dddf2e6ed8916507
239
308
  - test/dummy/tmp/cache/assets/D45/1B0/sprockets%2Ff79ee6554cade6f1426532e76320ba9b
240
309
  - test/dummy/tmp/cache/assets/D45/FE0/sprockets%2Fe4d788461df33de2f68b1e4b4a49307a
241
310
  - test/dummy/tmp/cache/assets/D4C/5B0/sprockets%2F93616d41b28b4de77ad6b50945f7dc8e
242
311
  - test/dummy/tmp/cache/assets/D54/ED0/sprockets%2F71c9fa01091d432b131da3bb73faf3d4
312
+ - test/dummy/tmp/cache/assets/D60/A10/sprockets%2F40ee4d5f36bc1b45418cd82cb2325ae4
243
313
  - test/dummy/tmp/cache/assets/D84/210/sprockets%2Fabd0103ccec2b428ac62c94e4c40b384
244
314
  - test/dummy/tmp/cache/assets/D94/EC0/sprockets%2F7d1c40e48a2633c3fab4f4adea96e630
245
315
  - test/dummy/tmp/cache/assets/DA8/CF0/sprockets%2F05451cfdd8b7a96ef18a6da9d5f0448c
246
316
  - test/dummy/tmp/cache/assets/DD7/370/sprockets%2F7a362d81a180d98caedc3ee6b56f95ce
247
317
  - test/dummy/tmp/cache/assets/DDD/D70/sprockets%2Ffd1e460aec97cee6c89170cbcc7872f6
248
318
  - test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af
319
+ - test/dummy/tmp/cache/assets/E88/B20/sprockets%2F038dc6bf06847b1fdbcec5bdf7ecaf1a
320
+ - test/dummy/tmp/cache/assets/E88/F00/sprockets%2F72f3aaedc6caddde0a39d09c2c84bde8
249
321
  - test/dummy/tmp/capybara/capybara-20110916132329600183993.html
250
322
  - test/dummy/tmp/capybara/capybara-201109161324214823412123.html
251
323
  - test/fixtures/invalid.txt
@@ -1,24 +0,0 @@
1
- module BuddiesAvatar
2
- module ORM
3
- module ActiveRecord
4
- extend ActiveSupport::Concern
5
- include Base
6
-
7
- included do
8
- attr_accessor :crop_x, :crop_y, :crop_w, :crop_h
9
- end
10
-
11
- def cropping?
12
- !crop_x.blank? && !crop_y.blank? && !crop_w.blank? && !crop_h.blank?
13
- end
14
-
15
- def crop_string
16
- "#{crop_w}x#{crop_h}+#{crop_x}+#{crop_y}"
17
- end
18
-
19
- def clean_crop_fields
20
- [:crop_x, :crop_y, :crop_w, :crop_h].each { |field| update_attribute field, nil }
21
- end
22
- end
23
- end
24
- end