Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Pictures works against latest IronRuby bits, and has new pictures fro…

…m RailsConf and Vegas. Also, resizer now generates square thumbnails.
  • Loading branch information...
commit a81843d0ad9e793ca03d262ae9005484edb8eb7e 1 parent 7d6be5c
@jschementi authored
Showing with 164 additions and 188 deletions.
  1. +4 −0 .gitignore
  2. +0 −74 2-rails/log/development.log
  3. +3 −3 4-pictures-rails/app/controllers/pictures_controller.rb
  4. +3 −2 4-pictures-rails/app/models/album.rb
  5. +49 −30 4-pictures-rails/app/models/picture.rb
  6. +0 −1  4-pictures-rails/app/views/pictures/_thumbnail_picture.html.erb
  7. +2 −2 4-pictures-rails/app/views/pictures/index.html.erb
  8. +74 −60 4-pictures-rails/lib/tasks/sample_data.rake
  9. +2 −0  4-pictures-rails/lib/tasks/setup.rake
  10. +4 −3 4-pictures-rails/public/stylesheets/dark.css
  11. +23 −13 4-pictures-rails/sample_data/albums.yml
  12. 0  4-pictures-rails/sample_data/albums/{Fall → 1-Fall}/IMG_0655.jpg
  13. 0  4-pictures-rails/sample_data/albums/{Fall → 1-Fall}/IMG_0656.jpg
  14. 0  4-pictures-rails/sample_data/albums/{Fall → 1-Fall}/IMG_0657.jpg
  15. 0  4-pictures-rails/sample_data/albums/{Fall → 1-Fall}/IMG_0674.jpg
  16. 0  4-pictures-rails/sample_data/albums/{Fall → 1-Fall}/IMG_1708.jpg
  17. 0  4-pictures-rails/sample_data/albums/{Fall → 1-Fall}/IMG_1709.jpg
  18. 0  4-pictures-rails/sample_data/albums/{Fall → 1-Fall}/IMG_1710.jpg
  19. 0  4-pictures-rails/sample_data/albums/{Fall → 1-Fall}/IMG_1711.jpg
  20. 0  4-pictures-rails/sample_data/albums/{Fall → 1-Fall}/IMG_1712.jpg
  21. 0  4-pictures-rails/sample_data/albums/{Fall → 1-Fall}/IMG_1713.jpg
  22. 0  4-pictures-rails/sample_data/albums/{Fall → 1-Fall}/IMG_1714.jpg
  23. 0  4-pictures-rails/sample_data/albums/{Fall → 1-Fall}/IMG_1715.jpg
  24. 0  4-pictures-rails/sample_data/albums/{Fall → 1-Fall}/IMG_1716.jpg
  25. 0  4-pictures-rails/sample_data/albums/{Fall → 1-Fall}/IMG_1717.jpg
  26. 0  4-pictures-rails/sample_data/albums/{Fall → 1-Fall}/IMG_1718.jpg
  27. 0  4-pictures-rails/sample_data/albums/{Fall → 1-Fall}/IMG_1741.jpg
  28. 0  4-pictures-rails/sample_data/albums/{Fall → 1-Fall}/IMG_1742.jpg
  29. 0  4-pictures-rails/sample_data/albums/{Fall → 1-Fall}/IMG_1745.jpg
  30. 0  4-pictures-rails/sample_data/albums/{Fall → 1-Fall}/IMG_1746.jpg
  31. 0  4-pictures-rails/sample_data/albums/{Fall → 1-Fall}/IMG_1754.jpg
  32. 0  4-pictures-rails/sample_data/albums/{Fall → 1-Fall}/IMG_1758.jpg
  33. 0  4-pictures-rails/sample_data/albums/{Fall → 1-Fall}/IMG_1761.jpg
  34. 0  4-pictures-rails/sample_data/albums/{Fall → 1-Fall}/IMG_1762.jpg
  35. 0  4-pictures-rails/sample_data/albums/{Fall → 1-Fall}/IMG_1765.jpg
  36. 0  4-pictures-rails/sample_data/albums/{Fall → 1-Fall}/IMG_1793.jpg
  37. 0  4-pictures-rails/sample_data/albums/{Fall → 1-Fall}/IMG_1794.jpg
  38. 0  4-pictures-rails/sample_data/albums/{Germany → 2-Germany}/CIMG0840.jpg
  39. 0  4-pictures-rails/sample_data/albums/{Germany → 2-Germany}/CIMG0842.jpg
  40. 0  4-pictures-rails/sample_data/albums/{Germany → 2-Germany}/CIMG0849.jpg
  41. 0  4-pictures-rails/sample_data/albums/{Germany → 2-Germany}/CIMG1032.jpg
  42. 0  4-pictures-rails/sample_data/albums/{Germany → 2-Germany}/CIMG1035.jpg
  43. 0  4-pictures-rails/sample_data/albums/{Germany → 2-Germany}/CIMG1045.jpg
  44. 0  4-pictures-rails/sample_data/albums/{Germany → 2-Germany}/CIMG1048.jpg
  45. 0  4-pictures-rails/sample_data/albums/{Germany → 2-Germany}/CIMG1049.jpg
  46. 0  4-pictures-rails/sample_data/albums/{Germany → 2-Germany}/CIMG1060.jpg
  47. 0  4-pictures-rails/sample_data/albums/{Germany → 2-Germany}/CIMG1063.jpg
  48. 0  4-pictures-rails/sample_data/albums/{Germany → 2-Germany}/CIMG1065.jpg
  49. 0  4-pictures-rails/sample_data/albums/{Japan → 3-Japan}/P1000047.jpg
  50. 0  4-pictures-rails/sample_data/albums/{Japan → 3-Japan}/P1000048.jpg
  51. 0  4-pictures-rails/sample_data/albums/{Japan → 3-Japan}/P1000082.jpg
  52. 0  4-pictures-rails/sample_data/albums/{Japan → 3-Japan}/P1000169.jpg
  53. 0  4-pictures-rails/sample_data/albums/{Japan → 3-Japan}/P1000176.jpg
  54. 0  4-pictures-rails/sample_data/albums/{Japan → 3-Japan}/P1000985.jpg
  55. 0  4-pictures-rails/sample_data/albums/{Japan → 3-Japan}/P1010036.jpg
  56. 0  4-pictures-rails/sample_data/albums/{Japan → 3-Japan}/P1010045.jpg
  57. 0  4-pictures-rails/sample_data/albums/{Japan → 3-Japan}/P1010059.jpg
  58. 0  4-pictures-rails/sample_data/albums/{Japan → 3-Japan}/P1010068.jpg
  59. 0  4-pictures-rails/sample_data/albums/{Scenary → 4-Scenary}/CIMG1075.jpg
  60. 0  4-pictures-rails/sample_data/albums/{Scenary → 4-Scenary}/IMG_0026.jpg
  61. 0  4-pictures-rails/sample_data/albums/{Scenary → 4-Scenary}/IMG_0027.jpg
  62. 0  4-pictures-rails/sample_data/albums/{Scenary → 4-Scenary}/IMG_0028.jpg
  63. 0  4-pictures-rails/sample_data/albums/{Scenary → 4-Scenary}/IMG_0991.jpg
  64. 0  4-pictures-rails/sample_data/albums/{Scenary → 4-Scenary}/IMG_0997.jpg
  65. 0  4-pictures-rails/sample_data/albums/{Scenary → 4-Scenary}/IMG_0998.jpg
  66. 0  4-pictures-rails/sample_data/albums/{Scenary → 4-Scenary}/IMG_0999.jpg
  67. 0  4-pictures-rails/sample_data/albums/{Scenary → 4-Scenary}/IMG_1009.jpg
  68. 0  4-pictures-rails/sample_data/albums/{Scenary → 4-Scenary}/IMG_1977.jpg
  69. 0  4-pictures-rails/sample_data/albums/{Scenary → 4-Scenary}/IMG_1984.jpg
  70. 0  4-pictures-rails/sample_data/albums/{Scenary → 4-Scenary}/IMG_2005.jpg
  71. 0  4-pictures-rails/sample_data/albums/{Scenary → 4-Scenary}/IMG_2007.jpg
  72. 0  4-pictures-rails/sample_data/albums/{Scenary → 4-Scenary}/IMG_2012.jpg
  73. 0  4-pictures-rails/sample_data/albums/{Scenary → 4-Scenary}/IMG_2014.jpg
  74. 0  4-pictures-rails/sample_data/albums/{Scenary → 4-Scenary}/IMG_2023.jpg
  75. 0  4-pictures-rails/sample_data/albums/{Scenary → 4-Scenary}/IMG_2026.jpg
  76. 0  4-pictures-rails/sample_data/albums/{Scenary → 4-Scenary}/IMG_2266.jpg
  77. 0  4-pictures-rails/sample_data/albums/{Scenary → 4-Scenary}/P1020408.jpg
  78. 0  4-pictures-rails/sample_data/albums/{Scenary → 4-Scenary}/P1020414.jpg
  79. 0  4-pictures-rails/sample_data/albums/{Spring → 5-Spring}/IMG_1505.jpg
  80. 0  4-pictures-rails/sample_data/albums/{Spring → 5-Spring}/IMG_1507.jpg
  81. 0  4-pictures-rails/sample_data/albums/{Spring → 5-Spring}/IMG_1508.jpg
  82. 0  4-pictures-rails/sample_data/albums/{Spring → 5-Spring}/IMG_1637.jpg
  83. 0  4-pictures-rails/sample_data/albums/{Washington DC → 6-Washington DC}/IMG_1431.jpg
  84. 0  4-pictures-rails/sample_data/albums/{Washington DC → 6-Washington DC}/IMG_1443.jpg
  85. 0  4-pictures-rails/sample_data/albums/{Washington DC → 6-Washington DC}/IMG_1444.jpg
  86. 0  4-pictures-rails/sample_data/albums/{Washington DC → 6-Washington DC}/IMG_1445.jpg
  87. 0  4-pictures-rails/sample_data/albums/{Washington DC → 6-Washington DC}/IMG_1446.jpg
  88. 0  4-pictures-rails/sample_data/albums/{Washington DC → 6-Washington DC}/IMG_1463.jpg
  89. 0  4-pictures-rails/sample_data/albums/{Washington DC → 6-Washington DC}/IMG_1474.jpg
  90. 0  4-pictures-rails/sample_data/albums/{Washington DC → 6-Washington DC}/IMG_1475.jpg
  91. 0  4-pictures-rails/sample_data/albums/{Washington DC → 6-Washington DC}/IMG_1498.jpg
  92. 0  4-pictures-rails/sample_data/albums/{Washington DC → 6-Washington DC}/IMG_1500.jpg
  93. 0  4-pictures-rails/sample_data/albums/{Washington DC → 6-Washington DC}/IMG_1501.jpg
  94. BIN  4-pictures-rails/sample_data/albums/7-RailsConf 2009/0954_DSC_0092.jpg
  95. BIN  4-pictures-rails/sample_data/albums/7-RailsConf 2009/0955_DSC_0093.jpg
  96. BIN  4-pictures-rails/sample_data/albums/7-RailsConf 2009/0956_DSC_0094.jpg
  97. BIN  4-pictures-rails/sample_data/albums/7-RailsConf 2009/0957_DSC_0095.jpg
  98. BIN  4-pictures-rails/sample_data/albums/7-RailsConf 2009/0958_DSC_0096.jpg
  99. BIN  4-pictures-rails/sample_data/albums/7-RailsConf 2009/0971_DSC_0109.jpg
  100. BIN  4-pictures-rails/sample_data/albums/7-RailsConf 2009/0972_DSC_0112.jpg
  101. BIN  4-pictures-rails/sample_data/albums/7-RailsConf 2009/0973_DSC_0113.jpg
  102. BIN  4-pictures-rails/sample_data/albums/7-RailsConf 2009/0974_DSC_0114.jpg
  103. BIN  4-pictures-rails/sample_data/albums/7-RailsConf 2009/0975_DSC_0115.jpg
  104. BIN  4-pictures-rails/sample_data/albums/7-RailsConf 2009/0976_DSC_0116.jpg
  105. BIN  4-pictures-rails/sample_data/albums/7-RailsConf 2009/0977_DSC_0117.jpg
  106. BIN  4-pictures-rails/sample_data/albums/7-RailsConf 2009/0978_DSC_0118.jpg
  107. BIN  4-pictures-rails/sample_data/albums/7-RailsConf 2009/0979_DSC_0119.jpg
  108. BIN  4-pictures-rails/sample_data/albums/7-RailsConf 2009/0980_DSC_0120.jpg
  109. BIN  4-pictures-rails/sample_data/albums/7-RailsConf 2009/0982_DSC_0122.jpg
  110. BIN  4-pictures-rails/sample_data/albums/7-RailsConf 2009/0983_DSC_0124.jpg
  111. BIN  4-pictures-rails/sample_data/albums/7-RailsConf 2009/0985_DSC_0127.jpg
  112. BIN  4-pictures-rails/sample_data/albums/7-RailsConf 2009/0987_DSC_0131.jpg
  113. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/0911_DSC_0020.jpg
  114. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/0921_DSC_0034.jpg
  115. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/0922_DSC_0035.jpg
  116. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/0923_DSC_0036.jpg
  117. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/0931_DSC_0047.jpg
  118. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/0992_DSC_0138.jpg
  119. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/0993_DSC_0140.jpg
  120. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/0994_DSC_0141.jpg
  121. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/0995_DSC_0142.jpg
  122. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/0996_DSC_0143.jpg
  123. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/0997_DSC_0144.jpg
  124. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/0998_DSC_0145.jpg
  125. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/0999_DSC_0146.jpg
  126. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1000_DSC_0147.jpg
  127. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1003_DSC_0150.jpg
  128. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1004_DSC_0151.jpg
  129. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1009_DSC_0160.jpg
  130. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1010_DSC_0161.jpg
  131. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1011_DSC_0163.jpg
  132. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1012_DSC_0164.jpg
  133. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1013_DSC_0165.jpg
  134. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1014_DSC_0166.jpg
  135. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1016_DSC_0168.jpg
  136. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1017_DSC_0169.jpg
  137. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1018_DSC_0170.jpg
  138. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1019_DSC_0171.jpg
  139. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1020_DSC_0172.jpg
  140. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1021_DSC_0173.jpg
  141. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1023_DSC_0175.jpg
  142. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1026_DSC_0178.jpg
  143. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1027_DSC_0179.jpg
  144. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1028_DSC_0180.jpg
  145. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1029_DSC_0181.jpg
  146. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1033_DSC_0185.jpg
  147. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1037_DSC_0189.jpg
  148. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1038_DSC_0190.jpg
  149. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1039_DSC_0191.jpg
  150. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1041_DSC_0193.jpg
  151. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1042_DSC_0194.jpg
  152. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1044_DSC_0196.jpg
  153. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1045_DSC_0197.jpg
  154. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1046_DSC_0198.jpg
  155. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1047_DSC_0199.jpg
  156. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1048_DSC_0200.jpg
  157. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1049_DSC_0201.jpg
  158. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1050_DSC_0203.jpg
  159. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1051_DSC_0204.jpg
  160. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1053_DSC_0206.jpg
  161. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1054_DSC_0207.jpg
  162. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1055_DSC_0208.jpg
  163. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1056_DSC_0209.jpg
  164. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1057_DSC_0210.jpg
  165. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1058_DSC_0211.jpg
  166. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1059_DSC_0212.jpg
  167. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1061_DSC_0214.jpg
  168. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1063_DSC_0216.jpg
  169. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1064_DSC_0217.jpg
  170. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1065_DSC_0218.jpg
  171. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1068_DSC_0221.jpg
  172. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1069_DSC_0222.jpg
  173. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1070_DSC_0223.jpg
  174. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1071_DSC_0224.jpg
  175. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1074_DSC_0228.jpg
  176. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1076_DSC_0230.jpg
  177. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1078_DSC_0232.jpg
  178. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1079_DSC_0233.jpg
  179. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1080_DSC_0234.jpg
  180. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1082_DSC_0236.jpg
  181. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1085_DSC_0241.jpg
  182. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/10893_DSC_0291.jpg
  183. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/10895_DSC_0293.jpg
  184. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/10896_DSC_0294 (10).jpg
  185. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/10896_DSC_0294 (11).jpg
  186. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/10896_DSC_0294 (12).jpg
  187. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/10896_DSC_0294 (13).jpg
  188. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/10896_DSC_0294 (2).jpg
  189. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/10896_DSC_0294 (3).jpg
  190. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/10896_DSC_0294 (4).jpg
  191. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/10896_DSC_0294 (5).jpg
  192. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/10896_DSC_0294 (6).jpg
  193. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/10896_DSC_0294 (7).jpg
  194. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/10896_DSC_0294 (8).jpg
  195. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/10896_DSC_0294 (9).jpg
  196. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1089_DSC_0246.jpg
  197. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1090_DSC_0247.jpg
  198. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1091_CSC_0249.jpg
  199. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1092_DSC_0250.jpg
  200. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1093_DSC_0251.jpg
  201. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1094_DSC_0252.jpg
  202. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1095_DSC_0253.jpg
  203. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1099_DSC_0257.jpg
  204. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1100_DSC_0258.jpg
  205. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1104_DSC_0262.jpg
  206. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1107_DSC_0265.jpg
  207. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1108_DSC_0266.jpg
  208. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1109_DSC_0267.jpg
  209. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1110_DSC_0268.jpg
  210. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1111_DSC_0269.jpg
  211. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1112_DSC_0270.jpg
  212. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1113_DSC_0271.jpg
  213. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1114_DSC_0272.jpg
  214. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1115_DSC_0273.jpg
  215. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1119_DSC_0278.jpg
  216. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1120_DSC_0279.jpg
  217. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1121_DSC_0280.jpg
  218. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1123_DSC_0282.jpg
  219. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1124_DSC_0283.jpg
  220. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1125_DSC_0284.jpg
  221. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1129_DSC_0289.jpg
  222. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/20896_DSC_0294.jpg
  223. BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/331084_DSC_0240.jpg
  224. BIN  4-pictures-rails/sample_data/albums/Fall/IMG_0655_small.jpg
  225. BIN  4-pictures-rails/sample_data/albums/Fall/IMG_0656_small.jpg
  226. BIN  4-pictures-rails/sample_data/albums/Fall/IMG_0657_small.jpg
  227. BIN  4-pictures-rails/sample_data/albums/Fall/IMG_0674_small.jpg
  228. BIN  4-pictures-rails/sample_data/albums/Fall/IMG_1708_small.jpg
  229. BIN  4-pictures-rails/sample_data/albums/Fall/IMG_1709_small.jpg
  230. BIN  4-pictures-rails/sample_data/albums/Fall/IMG_1710_small.jpg
  231. BIN  4-pictures-rails/sample_data/albums/Fall/IMG_1711_small.jpg
  232. BIN  4-pictures-rails/sample_data/albums/Fall/IMG_1712_small.jpg
  233. BIN  4-pictures-rails/sample_data/albums/Fall/IMG_1713_small.jpg
  234. BIN  4-pictures-rails/sample_data/albums/Fall/IMG_1714_small.jpg
  235. BIN  4-pictures-rails/sample_data/albums/Fall/IMG_1715_small.jpg
  236. BIN  4-pictures-rails/sample_data/albums/Fall/IMG_1716_small.jpg
  237. BIN  4-pictures-rails/sample_data/albums/Fall/IMG_1717_small.jpg
  238. BIN  4-pictures-rails/sample_data/albums/Fall/IMG_1718_small.jpg
  239. BIN  4-pictures-rails/sample_data/albums/Fall/IMG_1741_small.jpg
  240. BIN  4-pictures-rails/sample_data/albums/Fall/IMG_1742_small.jpg
  241. BIN  4-pictures-rails/sample_data/albums/Fall/IMG_1745_small.jpg
  242. BIN  4-pictures-rails/sample_data/albums/Fall/IMG_1746_small.jpg
  243. BIN  4-pictures-rails/sample_data/albums/Fall/IMG_1754_small.jpg
  244. BIN  4-pictures-rails/sample_data/albums/Fall/IMG_1758_small.jpg
  245. BIN  4-pictures-rails/sample_data/albums/Fall/IMG_1761_small.jpg
  246. BIN  4-pictures-rails/sample_data/albums/Fall/IMG_1762_small.jpg
  247. BIN  4-pictures-rails/sample_data/albums/Fall/IMG_1765_small.jpg
  248. BIN  4-pictures-rails/sample_data/albums/Fall/IMG_1793_small.jpg
  249. BIN  4-pictures-rails/sample_data/albums/Fall/IMG_1794_small.jpg
  250. BIN  4-pictures-rails/sample_data/albums/Germany/CIMG0840_small.jpg
  251. BIN  4-pictures-rails/sample_data/albums/Germany/CIMG0842_small.jpg
  252. BIN  4-pictures-rails/sample_data/albums/Germany/CIMG0849_small.jpg
  253. BIN  4-pictures-rails/sample_data/albums/Germany/CIMG1032_small.jpg
  254. BIN  4-pictures-rails/sample_data/albums/Germany/CIMG1035_small.jpg
  255. BIN  4-pictures-rails/sample_data/albums/Germany/CIMG1045_small.jpg
  256. BIN  4-pictures-rails/sample_data/albums/Germany/CIMG1048_small.jpg
  257. BIN  4-pictures-rails/sample_data/albums/Germany/CIMG1049_small.jpg
  258. BIN  4-pictures-rails/sample_data/albums/Germany/CIMG1060_small.jpg
  259. BIN  4-pictures-rails/sample_data/albums/Germany/CIMG1063_small.jpg
  260. BIN  4-pictures-rails/sample_data/albums/Germany/CIMG1065_small.jpg
  261. BIN  4-pictures-rails/sample_data/albums/Japan/P1000047_small.jpg
  262. BIN  4-pictures-rails/sample_data/albums/Japan/P1000048_small.jpg
  263. BIN  4-pictures-rails/sample_data/albums/Japan/P1000082_small.jpg
  264. BIN  4-pictures-rails/sample_data/albums/Japan/P1000169_small.jpg
  265. BIN  4-pictures-rails/sample_data/albums/Japan/P1000176_small.jpg
  266. BIN  4-pictures-rails/sample_data/albums/Japan/P1000985_small.jpg
  267. BIN  4-pictures-rails/sample_data/albums/Japan/P1010036_small.jpg
  268. BIN  4-pictures-rails/sample_data/albums/Japan/P1010045_small.jpg
  269. BIN  4-pictures-rails/sample_data/albums/Japan/P1010059_small.jpg
  270. BIN  4-pictures-rails/sample_data/albums/Japan/P1010068_small.jpg
  271. BIN  4-pictures-rails/sample_data/albums/Scenary/CIMG1075_small.jpg
  272. BIN  4-pictures-rails/sample_data/albums/Scenary/IMG_0026_small.jpg
  273. BIN  4-pictures-rails/sample_data/albums/Scenary/IMG_0027_small.jpg
  274. BIN  4-pictures-rails/sample_data/albums/Scenary/IMG_0028_small.jpg
  275. BIN  4-pictures-rails/sample_data/albums/Scenary/IMG_0991_small.jpg
  276. BIN  4-pictures-rails/sample_data/albums/Scenary/IMG_0997_small.jpg
  277. BIN  4-pictures-rails/sample_data/albums/Scenary/IMG_0998_small.jpg
  278. BIN  4-pictures-rails/sample_data/albums/Scenary/IMG_0999_small.jpg
  279. BIN  4-pictures-rails/sample_data/albums/Scenary/IMG_1009_small.jpg
  280. BIN  4-pictures-rails/sample_data/albums/Scenary/IMG_1977_small.jpg
  281. BIN  4-pictures-rails/sample_data/albums/Scenary/IMG_1984_small.jpg
  282. BIN  4-pictures-rails/sample_data/albums/Scenary/IMG_2005_small.jpg
  283. BIN  4-pictures-rails/sample_data/albums/Scenary/IMG_2007_small.jpg
  284. BIN  4-pictures-rails/sample_data/albums/Scenary/IMG_2012_small.jpg
  285. BIN  4-pictures-rails/sample_data/albums/Scenary/IMG_2014_small.jpg
  286. BIN  4-pictures-rails/sample_data/albums/Scenary/IMG_2023_small.jpg
  287. BIN  4-pictures-rails/sample_data/albums/Scenary/IMG_2026_small.jpg
  288. BIN  4-pictures-rails/sample_data/albums/Scenary/IMG_2266_small.jpg
  289. BIN  4-pictures-rails/sample_data/albums/Scenary/P1020408_small.jpg
  290. BIN  4-pictures-rails/sample_data/albums/Scenary/P1020414_small.jpg
  291. BIN  4-pictures-rails/sample_data/albums/Spring/IMG_1505_small.jpg
  292. BIN  4-pictures-rails/sample_data/albums/Spring/IMG_1507_small.jpg
  293. BIN  4-pictures-rails/sample_data/albums/Spring/IMG_1508_small.jpg
  294. BIN  4-pictures-rails/sample_data/albums/Spring/IMG_1637_small.jpg
  295. BIN  4-pictures-rails/sample_data/albums/Washington DC/IMG_1431_small.jpg
  296. BIN  4-pictures-rails/sample_data/albums/Washington DC/IMG_1443_small.jpg
  297. BIN  4-pictures-rails/sample_data/albums/Washington DC/IMG_1444_small.jpg
  298. BIN  4-pictures-rails/sample_data/albums/Washington DC/IMG_1445_small.jpg
  299. BIN  4-pictures-rails/sample_data/albums/Washington DC/IMG_1446_small.jpg
  300. BIN  4-pictures-rails/sample_data/albums/Washington DC/IMG_1463_small.jpg
Sorry, we could not display the entire diff because too many files (355) changed.
View
4 .gitignore
@@ -0,0 +1,4 @@
+4-pictures-rails/db/images
+Thumbs.db
+*_small.jpg
+*.log
View
74 2-rails/log/development.log
@@ -1,74 +0,0 @@
-# Logfile created on Thu May 07 12:19:24 -07:00 2009/!\ FAILSAFE /!\ Thu May 07 12:22:37 -07:00 2009
- Status: 500 Internal Server Error
- Cannot open database "ironruby_rails_dev" requested by the login. The login failed.
-Login failed for user 'REDMOND\jimmysch'.
- System.Data:0:in `OnError'
- System.Data:0:in `ThrowExceptionAndWarning'
- System.Data:0:in `Run'
- System.Data:0:in `CompleteLogin'
- System.Data:0:in `AttemptOneLogin'
- System.Data:0:in `LoginNoFailover'
- System.Data:0:in `OpenLoginEnlist'
- System.Data:0:in `.ctor'
- System.Data:0:in `CreateConnection'
- System.Data:0:in `CreatePooledConnection'
- System.Data:0:in `CreateObject'
- System.Data:0:in `UserCreateRequest'
- System.Data:0:in `GetConnection'
- System.Data:0:in `GetConnection'
- System.Data:0:in `OpenConnection'
- System.Data:0:in `Open'
- c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adapters/mssql_adapter.rb:383:in `connect'
- c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adapters/mssql_adapter.rb:54:in `initialize'
- c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adapters/mssql_adapter.rb:33:in `mssql_connection'
- c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in `new_connection'
- :0:in `__send__'
- c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:245:in `checkout_new_connection'
- c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:185:in `checkout'
- c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in `checkout'
- :0:in `loop'
- c:/ruby/lib/ruby/1.8/monitor.rb:242:in `mon_synchronize'
- c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:183:in `checkout'
- c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:95:in `connection'
- c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:326:in `retrieve_connection'
- c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:123:in `retrieve_connection'
- c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:115:in `connection'
- c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/query_cache.rb:6:in `cache'
- c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/query_cache.rb:28:in `call'
- c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in `call'
- c:/ruby/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/head.rb:9:in `call'
- c:/ruby/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/methodoverride.rb:24:in `call'
- c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/params_parser.rb:15:in `call'
- c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/rewindable_input.rb:25:in `call'
- c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/session/cookie_store.rb:93:in `call'
- c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/reloader.rb:9:in `call'
- c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/failsafe.rb:11:in `call'
- c:/ruby/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/lock.rb:11:in `call'
- c:/ruby/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/lock.rb:11:in `call'
- :0:in `synchronize'
- c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/dispatcher.rb:106:in `call'
- static.rb:13:in `call'
- urlmap.rb:40:in `call'
- :0:in `each'
- urlmap.rb:36:in `call'
- log_tailer.rb:15:in `call'
- content_length.rb:12:in `call'
- webrick.rb:25:in `service'
- httpserver.rb:89:in `service'
- httpserver.rb:43:in `run'
- server.rb:162:in `start_thread'
- c:\dev\ironruby\Merlin\Main\Languages\Ruby\Libraries.LCA_RESTRICTED\Builtins\ThreadOps.cs:640:in `RubyThreadStart'
- c:\dev\ironruby\Merlin\Main\Languages\Ruby\Libraries.LCA_RESTRICTED\Builtins\ThreadOps.cs:621:in `<CreateThread>b__0'
- mscorlib:0:in `ThreadStart_Context'
- mscorlib:0:in `Run'
- mscorlib:0:in `ThreadStart'
-
-
-Processing SayController#index (for 127.0.0.1 at 2009-05-07 12:27:07) [GET]
-Completed in 435ms (View: 302, DB: 0) | 200 OK [http://localhost/say]
-
-
-Processing PostsController#index (for 127.0.0.1 at 2009-05-07 12:28:29) [GET]
-Rendering template within layouts/posts
-Rendering posts/index
-Completed in 2659ms (View: 2127, DB: 0) | 200 OK [http://localhost/posts]
View
6 4-pictures-rails/app/controllers/pictures_controller.rb
@@ -4,7 +4,7 @@ class PicturesController < ApplicationController
def index
filtered_pictures(:limit => 13)
- filtered_albums(:limit => 5)
+ filtered_albums(:limit => 7)
respond_to do |format|
format.html
format.js { render :json => @pictures }
@@ -15,7 +15,7 @@ def index
def mine
params[:person_id] = current_person.id
@pictures = filtered_pictures(:limit => 13)
- @albums = filtered_albums(:limit => 5)
+ @albums = filtered_albums(:limit => 7)
respond_to do |format|
format.html { render :action => 'index' }
format.js { render :json => @pictures }
@@ -42,7 +42,7 @@ def show
respond_to do |format|
format.html
format.js { render :json => @picture }
- format.xml { render :xml => @picture }
+ format.xml { render :xml => @picture }
end
end
View
5 4-pictures-rails/app/models/album.rb
@@ -3,13 +3,14 @@ class Album < ActiveRecord::Base
has_many :pictures
def self.find_for(person, options)
+ options = {:limit => 20, :order => "id DESC"}.merge(options)
find_all_by_person_id(person.id)
end
def self.search(term, options={})
- options = {:limit => 20, :order => "created_at DESC"}.merge(options)
+ options = {:limit => 20, :order => "id DESC"}.merge(options)
unless term.blank?
- options.merge!(:conditions => ['name LIKE ?', "%#{term}%"])
+ options.merge!(:conditions => ['name LIKE ?', "%#{term}%"])
end
all(options)
end
View
79 4-pictures-rails/app/models/picture.rb
@@ -5,15 +5,17 @@ class Picture < ActiveRecord::Base
has_many :taggings, :as => :taggable
has_many :tags, :through => :taggings
+ before_destroy :remove_images
+
IMG_PATH = RAILS_ROOT + '/db/images/'
def self.find_for(person, options)
+ options = {:limit => 20, :order => "id DESC"}.merge(options)
find_all_by_person_id(person.id, options)
end
-
- #FIXME: still SQL
+
def self.search(term, options={})
- options = {:limit => 20, :order => "created_at DESC"}.merge(options)
+ options = {:limit => 20, :order => "id DESC"}.merge(options)
unless term.blank?
options.merge!(:conditions => ['title LIKE ?', "%#{term}%"])
end
@@ -23,42 +25,59 @@ def self.search(term, options={})
def self.tagged_with(tag_name)
Picture.all(:include => [:taggings => :tag], :conditions => {:tags => {:name => tag_name}})
end
-
+
+ def remove_images
+ FileUtils.rm _filename if File.exist? _filename
+ FileUtils.rm _filename(:thumbnail) if File.exist? _filename(:thumbnail)
+ end
+
def data
- begin
- input = FileStream.new((IMG_PATH + self['data']), FileMode.open)
- reader = BinaryReader.new input
- input_bytes = reader.ReadBytes(input.length)
- reader.close
- input.close
- input_bytes
- rescue
- File.open(IMG_PATH + self['data'], 'rb'){ |f| f.read }
- end
+ _read_data_from_filename(_filename)
end
- def data=(data)
- if data.respond_to?(:read)
- self.filename = data.original_filename
- data = data.read
- end
- t = Time.now
- data_id = Digest::SHA1.hexdigest(t.to_s + '-' + t.usec.to_s) + '.jpg'
- require 'fileutils'
- FileUtils.mkdir IMG_PATH unless File.exist? IMG_PATH
- File.open(IMG_PATH + data_id, 'wb') {|f| f.write data }
- self['data'] = data_id
+ def data=(new_data)
+ _write_data_to_filename(new_data, _filename)
end
def thumbnail_data
- data
+ _read_data_from_filename(_filename(:thumbnail))
end
- def thumbnail_data=(data)
- data=(data)
+ def thumbnail_data=(new_data)
+ _write_data_to_filename(new_data, _filename(:thumbnail))
end
def to_xml
- super(:except => :data)
- end
+ super(:except => [:data, :thumbnail_data])
+ end
+
+ private
+ require 'fileutils'
+
+ def _read_data_from_filename(filename)
+ File.open(filename, 'rb'){ |f| f.read }
+ end
+
+ def _write_data_to_filename(data, filename)
+ if data.respond_to?(:read)
+ self.filename = data.original_filename
+ data = data.read
+ end
+
+ FileUtils.mkdir IMG_PATH unless File.exist? IMG_PATH
+
+ File.open(filename, 'wb') {|f| f.write data }
+ end
+
+ def _generate_filenames
+ t = Time.now
+ self['data'] ||= Digest::SHA1.hexdigest(t.to_s + '-' + t.usec.to_s)
+ self['thumbnail_data'] ||= (self['data'] + '_small')
+ end
+
+ def _filename(type = '')
+ type = type.to_s + '_' unless type.to_s.empty?
+ _generate_filenames
+ IMG_PATH + self[type.to_s + 'data'] + '.jpg'
+ end
end
View
1  4-pictures-rails/app/views/pictures/_thumbnail_picture.html.erb
@@ -1,4 +1,3 @@
-<%# require 'ruby-debug'; debugger%>
<% width ||= 96 %>
<% height ||= 96 %>
<% thumbnail ||= :true %>
View
4 4-pictures-rails/app/views/pictures/index.html.erb
@@ -8,7 +8,7 @@
<% if @pictures.size > 0 %>
<div id="featured_picture">
- <%= render :partial => 'thumbnail_picture', :locals => {:picture => @pictures.first, :width => 560, :height => 420, :thumbnail => :false } %>
+ <%= render :partial => 'thumbnail_picture', :locals => {:picture => @pictures.first, :width => 630, :height => 420, :thumbnail => :false } %>
</div>
<% end %>
@@ -31,7 +31,7 @@
<h3>albums</h3>
<div id="recent_albums">
- <table cellpadding="0" cellspacing="0" border="0">
+ <table cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<% @albums.each do |album| %>
<td><%= render :partial => 'thumbnail_album', :locals => {:album => album} %></td>
View
134 4-pictures-rails/lib/tasks/sample_data.rake
@@ -1,14 +1,64 @@
require 'erb'
+require 'fileutils'
+
namespace :sample_data do
- desc "Load sample data from sample_data/ fixture files into the current environment's database. Load specific fixtures using FIXTURES=x,y"
- task :load => [:environment,"db:migrate"] do
-
+
+ desc "Remove images"
+ task :remove_images => :environment do
+ puts "Removing images"
+ Picture.destroy_all
+ end
+
+ desc "Delete thumbnails"
+ task :delete_thumbnails => :environment do
+ puts "Deleting Thumbnails"
+ Dir.entries("sample_data/albums").each do |album_name|
+ Dir.glob("sample_data/albums/#{album_name}/*.jpg").each do |image|
+ ::File.delete image if image.include? "_small"
+ end
+ end
+ end
+
+ desc "Generate thumbnails"
+ task :generate_thumbnails => :environment do
+ puts "Generating thumbnails"
+ require RAILS_ROOT + '/../6-resizer/resizer'
+ require 'ftools'
+ Dir.entries("sample_data/albums").each do |album_name|
+ Dir.glob("sample_data/albums/#{album_name}/*.jpg").each do |image|
+ next if image.include? "_small.jpg"
+ image.gsub!(/\.JPG/, ".jpg")
+ small_name = image.gsub(/\.jpg/, "_small.jpg")
+ max_thumb_size = 144
+ max_side = 1280
+
+ unless ::File.exist? small_name
+ puts "Creating square thumbnail for #{image}"
+ Resizer::resize_by_filename image, small_name, max_thumb_size
+ Resizer::center_square_file small_name, small_name, true # overwrite
+ end
+
+ width, height = Resizer::image_dimensions(image)
+
+ if width > max_side || height > max_side
+ puts "#{image} too large, sizing down to #{max_side}"
+ Resizer::resize_by_filename image, image, max_side, true # overwrite
+ end
+ end
+ end
+ end
+
+ desc "Load sample data from sample_data/ fixture files into the current
+ environment's database. Load specific fixtures using FIXTURES=x,y"
+ task :load => [:environment, "db:migrate", :generate_thumbnails] do
require 'digest'
-
+ require RAILS_ROOT + '/../6-resizer/resizer'
+
ActiveRecord::Base.establish_connection(RAILS_ENV.to_sym)
- (ENV['FIXTURES'] ? ENV['FIXTURES'].split(/,/) : Dir.glob(File.join(RAILS_ROOT, 'sample_data', '*.{yml}'))).each do |fixture_file|
- data_file = File.join(RAILS_ROOT, 'sample_data', File.basename(fixture_file))
- model = File.basename(fixture_file, '.*').camelcase.singularize.constantize
+
+ Dir.glob(File.join(RAILS_ROOT, 'sample_data', '*.{yml}')).each do |ff|
+ data_file = File.join(RAILS_ROOT, 'sample_data', File.basename(ff))
+ model = File.basename(ff, '.*').camelcase.singularize.constantize
if File.exists?(data_file)
File.open(data_file) do |yml|
entries = YAML.load(ERB.new(yml.read).result)
@@ -21,68 +71,32 @@ namespace :sample_data do
end
end
end
- puts "Loaded #{File.basename(fixture_file, '.*').camelcase.singularize.constantize.count} #{File.basename(fixture_file, '.*').camelcase}" rescue nil
+ puts "Loaded #{
+ File.basename(ff, '.*').camelcase.singularize.constantize.count
+ } #{
+ File.basename(ff, '.*').camelcase
+ }" rescue nil
end
end
-
- db_images = RAILS_ROOT + '/db/images'
- Dir.entries("sample_data/albums").each do |album_name|
- album = Album.find_by_name(album_name)
+ Dir.entries("sample_data/albums").each do |an|
+ album = Album.find_by_name(an)
if album
- Dir.glob("sample_data/albums/#{album.name}/*.jpg").each do |image|
+ Dir.glob("sample_data/albums/#{an}/*.jpg").each do |image|
next if image.include?("_small")
- puts "Loading #{File.basename(image)} into #{album.name}"
+ puts "Loading #{File.basename(image)} into #{an}"
- data = File.open(image, "rb") {|f| f.read}
- thumbnail_data = File.exist?(image.gsub(/\.jpg/, "_small.jpg")) ? File.open(image.gsub(/\.jpg/, "_small.jpg"), "rb") {|f| f.read} : ""
-
- album.pictures.create :title => File.basename(image)[0...-4].humanize,
- :mime_type => "image/jpg",
- :data => data, :thumbnail_data => thumbnail_data,
+ data = File.open(image, 'rb'){|f| f.read}
+ thumbnail_data = File.exist?(image.gsub(/\.jpg/, "_small.jpg")) ?
+ File.open(image.gsub(/\.jpg/, "_small.jpg"), "rb") {|f| f.read} :
+ ""
+ album.pictures.create :title => File.basename(image)[0...-4].humanize,
+ :mime_type => "image/jpg",
+ :data => data, :thumbnail_data => thumbnail_data,
:person => album.person, :filename => File.basename(image)
end
end
end
end
-
- desc "Load sample data from sample_data/ fixture files into the current environment's database. Load specific fixtures using FIXTURES=x,y"
- task :marshal => [:environment,"db:migrate"] do
-
- require 'active_record/fixtures'
- BASE_FOR_MARSHAL = File.join(RAILS_ROOT, "sample_data", "marshal")
- FileUtils.mkdir_p BASE_FOR_MARSHAL
- ActiveRecord::Base.establish_connection(RAILS_ENV.to_sym)
- (ENV['FIXTURES'] ? ENV['FIXTURES'].split(/,/) : Dir.glob(File.join(RAILS_ROOT, 'sample_data', '*.{yml}'))).each do |fixture_file|
- data_file = File.join(RAILS_ROOT, 'sample_data', File.basename(fixture_file))
- if File.exists?(data_file)
-puts data_file
- data = YAML.load(ERB.new(File.read(data_file)).result)
- marshal_file_name = File.basename(data_file).sub(/yml$/, "dat")
-puts marshal_file_name
- File.open(File.join(BASE_FOR_MARSHAL, marshal_file_name), "wb") {|f| f.write Marshal.dump(data)}
-# Fixtures.create_fixtures('sample_data', File.basename(fixture_file, '.*')) if File.exists?(data_file)
-# puts "Loaded #{File.basename(fixture_file, '.*').camelcase.singularize.constantize.count} #{File.basename(fixture_file, '.*').camelcase}" rescue nil
- end
- end
- pictures = {}
-# Dir.entries("sample_data/albums").each do |album_name|
-puts "Loading albums and pictures"
- Album.all.each do |album|
- # album = Album.find(:first, :conditions => {:name => album_name})
-puts album .name
- if album
- Dir.glob("sample_data/albums/#{album.name}/*.jpg").each do |image|
- next if image.include?("_small")
- puts "Loading #{File.basename(image)} into #{album.name}"
- data = File.open(image, "rb") {|f| f.read}
- thumbnail_data = File.exist?(image.gsub(/\.jpg/, "_small.jpg")) ? File.open(image.gsub(/\.jpg/, "_small.jpg"), "rb") {|f| f.read} : ""
- picture = album.pictures.create :title => File.basename(image)[0...-4].humanize, :mime_type => "image/jpg", :data => data, :thumbnail_data => thumbnail_data, :person_id => album.person_id, :filename => File.basename(image)
- pictures[picture.id] = picture.instance_variable_get("@attributes").merge("id" => picture.id)
- end
- end
- end
- File.open(File.join(BASE_FOR_MARSHAL, "pictures.dat"), "wb") {|f| f.write Marshal.dump(pictures)}
- end
-
+
end
View
2  4-pictures-rails/lib/tasks/setup.rake
@@ -1,2 +1,4 @@
desc "Perform initial setup of the Pictures app"
task :setup => ["db:migrate", "sample_data:load"]
+
+task :rebuild => ['sample_data:remove_images', 'sample_data:delete_thumbnails', 'db:reset', :setup]
View
7 4-pictures-rails/public/stylesheets/dark.css
@@ -45,7 +45,7 @@ html body span.clear
div#container {
background-color: #222;
- width: 904px;
+ width: 974px;
margin-left: auto;
margin-right: auto;
text-align: left;
@@ -188,6 +188,7 @@ div#content div#recent_pictures {
}
div#content div#recent_albums {
margin: 15px;
+ text-align: center;
}
div#content table tr td {
@@ -293,11 +294,11 @@ div#content img#picture {
img.picture_small {
width: 320px;
- height: 240px;
+ height: 213px;
}
img.picture_medium {
width: 640px;
- height: 480px;
+ height: 426px;
}
img.picture_full {
}
View
36 4-pictures-rails/sample_data/albums.yml
@@ -2,30 +2,40 @@
fall:
id: 1
- name: Fall
+ name: 1-Fall
person_id: 1
germany:
- id: 2
- name: Germany
+ id: 2
+ name: 2-Germany
person_id: 1
japan:
- id: 3
- name: Japan
+ id: 3
+ name: 3-Japan
person_id: 1
scenery:
- id: 4
- name: Scenary
+ id: 4
+ name: 4-Scenary
person_id: 2
-
+
spring:
- id: 5
- name: Spring
+ id: 5
+ name: 5-Spring
person_id: 2
-
+
washington_dc:
- id: 6
- name: Washington DC
+ id: 6
+ name: 6-Washington DC
person_id: 2
+
+railsconf09:
+ id: 7
+ name: 7-RailsConf 2009
+ person_id: 3
+
+lasvegas:
+ id: 8
+ name: 8-Las Vegas
+ person_id: 3
View
0  ...ctures-rails/sample_data/albums/Fall/IMG_0655.jpg → ...ures-rails/sample_data/albums/1-Fall/IMG_0655.jpg
File renamed without changes
View
0  ...ctures-rails/sample_data/albums/Fall/IMG_0656.jpg → ...ures-rails/sample_data/albums/1-Fall/IMG_0656.jpg
File renamed without changes
View
0  ...ctures-rails/sample_data/albums/Fall/IMG_0657.jpg → ...ures-rails/sample_data/albums/1-Fall/IMG_0657.jpg
File renamed without changes
View
0  ...ctures-rails/sample_data/albums/Fall/IMG_0674.jpg → ...ures-rails/sample_data/albums/1-Fall/IMG_0674.jpg
File renamed without changes
View
0  ...ctures-rails/sample_data/albums/Fall/IMG_1708.jpg → ...ures-rails/sample_data/albums/1-Fall/IMG_1708.jpg
File renamed without changes
View
0  ...ctures-rails/sample_data/albums/Fall/IMG_1709.jpg → ...ures-rails/sample_data/albums/1-Fall/IMG_1709.jpg
File renamed without changes
View
0  ...ctures-rails/sample_data/albums/Fall/IMG_1710.jpg → ...ures-rails/sample_data/albums/1-Fall/IMG_1710.jpg
File renamed without changes
View
0  ...ctures-rails/sample_data/albums/Fall/IMG_1711.jpg → ...ures-rails/sample_data/albums/1-Fall/IMG_1711.jpg
File renamed without changes
View
0  ...ctures-rails/sample_data/albums/Fall/IMG_1712.jpg → ...ures-rails/sample_data/albums/1-Fall/IMG_1712.jpg
File renamed without changes
View
0  ...ctures-rails/sample_data/albums/Fall/IMG_1713.jpg → ...ures-rails/sample_data/albums/1-Fall/IMG_1713.jpg
File renamed without changes
View
0  ...ctures-rails/sample_data/albums/Fall/IMG_1714.jpg → ...ures-rails/sample_data/albums/1-Fall/IMG_1714.jpg
File renamed without changes
View
0  ...ctures-rails/sample_data/albums/Fall/IMG_1715.jpg → ...ures-rails/sample_data/albums/1-Fall/IMG_1715.jpg
File renamed without changes
View
0  ...ctures-rails/sample_data/albums/Fall/IMG_1716.jpg → ...ures-rails/sample_data/albums/1-Fall/IMG_1716.jpg
File renamed without changes
View
0  ...ctures-rails/sample_data/albums/Fall/IMG_1717.jpg → ...ures-rails/sample_data/albums/1-Fall/IMG_1717.jpg
File renamed without changes
View
0  ...ctures-rails/sample_data/albums/Fall/IMG_1718.jpg → ...ures-rails/sample_data/albums/1-Fall/IMG_1718.jpg
File renamed without changes
View
0  ...ctures-rails/sample_data/albums/Fall/IMG_1741.jpg → ...ures-rails/sample_data/albums/1-Fall/IMG_1741.jpg
File renamed without changes
View
0  ...ctures-rails/sample_data/albums/Fall/IMG_1742.jpg → ...ures-rails/sample_data/albums/1-Fall/IMG_1742.jpg
File renamed without changes
View
0  ...ctures-rails/sample_data/albums/Fall/IMG_1745.jpg → ...ures-rails/sample_data/albums/1-Fall/IMG_1745.jpg
File renamed without changes
View
0  ...ctures-rails/sample_data/albums/Fall/IMG_1746.jpg → ...ures-rails/sample_data/albums/1-Fall/IMG_1746.jpg
File renamed without changes
View
0  ...ctures-rails/sample_data/albums/Fall/IMG_1754.jpg → ...ures-rails/sample_data/albums/1-Fall/IMG_1754.jpg
File renamed without changes
View
0  ...ctures-rails/sample_data/albums/Fall/IMG_1758.jpg → ...ures-rails/sample_data/albums/1-Fall/IMG_1758.jpg
File renamed without changes
View
0  ...ctures-rails/sample_data/albums/Fall/IMG_1761.jpg → ...ures-rails/sample_data/albums/1-Fall/IMG_1761.jpg
File renamed without changes
View
0  ...ctures-rails/sample_data/albums/Fall/IMG_1762.jpg → ...ures-rails/sample_data/albums/1-Fall/IMG_1762.jpg
File renamed without changes
View
0  ...ctures-rails/sample_data/albums/Fall/IMG_1765.jpg → ...ures-rails/sample_data/albums/1-Fall/IMG_1765.jpg
File renamed without changes
View
0  ...ctures-rails/sample_data/albums/Fall/IMG_1793.jpg → ...ures-rails/sample_data/albums/1-Fall/IMG_1793.jpg
File renamed without changes
View
0  ...ctures-rails/sample_data/albums/Fall/IMG_1794.jpg → ...ures-rails/sample_data/albums/1-Fall/IMG_1794.jpg
Diff not rendered
View
0  ...res-rails/sample_data/albums/Germany/CIMG0840.jpg → ...s-rails/sample_data/albums/2-Germany/CIMG0840.jpg
Diff not rendered
View
0  ...res-rails/sample_data/albums/Germany/CIMG0842.jpg → ...s-rails/sample_data/albums/2-Germany/CIMG0842.jpg
Diff not rendered
View
0  ...res-rails/sample_data/albums/Germany/CIMG0849.jpg → ...s-rails/sample_data/albums/2-Germany/CIMG0849.jpg
Diff not rendered
View
0  ...res-rails/sample_data/albums/Germany/CIMG1032.jpg → ...s-rails/sample_data/albums/2-Germany/CIMG1032.jpg
Diff not rendered
View
0  ...res-rails/sample_data/albums/Germany/CIMG1035.jpg → ...s-rails/sample_data/albums/2-Germany/CIMG1035.jpg
Diff not rendered
View
0  ...res-rails/sample_data/albums/Germany/CIMG1045.jpg → ...s-rails/sample_data/albums/2-Germany/CIMG1045.jpg
Diff not rendered
View
0  ...res-rails/sample_data/albums/Germany/CIMG1048.jpg → ...s-rails/sample_data/albums/2-Germany/CIMG1048.jpg
Diff not rendered
View
0  ...res-rails/sample_data/albums/Germany/CIMG1049.jpg → ...s-rails/sample_data/albums/2-Germany/CIMG1049.jpg
Diff not rendered
View
0  ...res-rails/sample_data/albums/Germany/CIMG1060.jpg → ...s-rails/sample_data/albums/2-Germany/CIMG1060.jpg
Diff not rendered
View
0  ...res-rails/sample_data/albums/Germany/CIMG1063.jpg → ...s-rails/sample_data/albums/2-Germany/CIMG1063.jpg
Diff not rendered
View
0  ...res-rails/sample_data/albums/Germany/CIMG1065.jpg → ...s-rails/sample_data/albums/2-Germany/CIMG1065.jpg
Diff not rendered
View
0  ...tures-rails/sample_data/albums/Japan/P1000047.jpg → ...res-rails/sample_data/albums/3-Japan/P1000047.jpg
Diff not rendered
View
0  ...tures-rails/sample_data/albums/Japan/P1000048.jpg → ...res-rails/sample_data/albums/3-Japan/P1000048.jpg
Diff not rendered
View
0  ...tures-rails/sample_data/albums/Japan/P1000082.jpg → ...res-rails/sample_data/albums/3-Japan/P1000082.jpg
Diff not rendered
View
0  ...tures-rails/sample_data/albums/Japan/P1000169.jpg → ...res-rails/sample_data/albums/3-Japan/P1000169.jpg
Diff not rendered
View
0  ...tures-rails/sample_data/albums/Japan/P1000176.jpg → ...res-rails/sample_data/albums/3-Japan/P1000176.jpg
Diff not rendered
View
0  ...tures-rails/sample_data/albums/Japan/P1000985.jpg → ...res-rails/sample_data/albums/3-Japan/P1000985.jpg
Diff not rendered
View
0  ...tures-rails/sample_data/albums/Japan/P1010036.jpg → ...res-rails/sample_data/albums/3-Japan/P1010036.jpg
Diff not rendered
View
0  ...tures-rails/sample_data/albums/Japan/P1010045.jpg → ...res-rails/sample_data/albums/3-Japan/P1010045.jpg
Diff not rendered
View
0  ...tures-rails/sample_data/albums/Japan/P1010059.jpg → ...res-rails/sample_data/albums/3-Japan/P1010059.jpg
Diff not rendered
View
0  ...tures-rails/sample_data/albums/Japan/P1010068.jpg → ...res-rails/sample_data/albums/3-Japan/P1010068.jpg
Diff not rendered
View
0  ...res-rails/sample_data/albums/Scenary/CIMG1075.jpg → ...s-rails/sample_data/albums/4-Scenary/CIMG1075.jpg
Diff not rendered
View
0  ...res-rails/sample_data/albums/Scenary/IMG_0026.jpg → ...s-rails/sample_data/albums/4-Scenary/IMG_0026.jpg
Diff not rendered
View
0  ...res-rails/sample_data/albums/Scenary/IMG_0027.jpg → ...s-rails/sample_data/albums/4-Scenary/IMG_0027.jpg
Diff not rendered
View
0  ...res-rails/sample_data/albums/Scenary/IMG_0028.jpg → ...s-rails/sample_data/albums/4-Scenary/IMG_0028.jpg
Diff not rendered
View
0  ...res-rails/sample_data/albums/Scenary/IMG_0991.jpg → ...s-rails/sample_data/albums/4-Scenary/IMG_0991.jpg
Diff not rendered
View
0  ...res-rails/sample_data/albums/Scenary/IMG_0997.jpg → ...s-rails/sample_data/albums/4-Scenary/IMG_0997.jpg
Diff not rendered
View
0  ...res-rails/sample_data/albums/Scenary/IMG_0998.jpg → ...s-rails/sample_data/albums/4-Scenary/IMG_0998.jpg
Diff not rendered
View
0  ...res-rails/sample_data/albums/Scenary/IMG_0999.jpg → ...s-rails/sample_data/albums/4-Scenary/IMG_0999.jpg
Diff not rendered
View
0  ...res-rails/sample_data/albums/Scenary/IMG_1009.jpg → ...s-rails/sample_data/albums/4-Scenary/IMG_1009.jpg
Diff not rendered
View
0  ...res-rails/sample_data/albums/Scenary/IMG_1977.jpg → ...s-rails/sample_data/albums/4-Scenary/IMG_1977.jpg
Diff not rendered
View
0  ...res-rails/sample_data/albums/Scenary/IMG_1984.jpg → ...s-rails/sample_data/albums/4-Scenary/IMG_1984.jpg
Diff not rendered
View
0  ...res-rails/sample_data/albums/Scenary/IMG_2005.jpg → ...s-rails/sample_data/albums/4-Scenary/IMG_2005.jpg
Diff not rendered
View
0  ...res-rails/sample_data/albums/Scenary/IMG_2007.jpg → ...s-rails/sample_data/albums/4-Scenary/IMG_2007.jpg
Diff not rendered
View
0  ...res-rails/sample_data/albums/Scenary/IMG_2012.jpg → ...s-rails/sample_data/albums/4-Scenary/IMG_2012.jpg
Diff not rendered
View
0  ...res-rails/sample_data/albums/Scenary/IMG_2014.jpg → ...s-rails/sample_data/albums/4-Scenary/IMG_2014.jpg
Diff not rendered
View
0  ...res-rails/sample_data/albums/Scenary/IMG_2023.jpg → ...s-rails/sample_data/albums/4-Scenary/IMG_2023.jpg
Diff not rendered
View
0  ...res-rails/sample_data/albums/Scenary/IMG_2026.jpg → ...s-rails/sample_data/albums/4-Scenary/IMG_2026.jpg
Diff not rendered
View
0  ...res-rails/sample_data/albums/Scenary/IMG_2266.jpg → ...s-rails/sample_data/albums/4-Scenary/IMG_2266.jpg
Diff not rendered
View
0  ...res-rails/sample_data/albums/Scenary/P1020408.jpg → ...s-rails/sample_data/albums/4-Scenary/P1020408.jpg
Diff not rendered
View
0  ...res-rails/sample_data/albums/Scenary/P1020414.jpg → ...s-rails/sample_data/albums/4-Scenary/P1020414.jpg
Diff not rendered
View
0  ...ures-rails/sample_data/albums/Spring/IMG_1505.jpg → ...es-rails/sample_data/albums/5-Spring/IMG_1505.jpg
Diff not rendered
View
0  ...ures-rails/sample_data/albums/Spring/IMG_1507.jpg → ...es-rails/sample_data/albums/5-Spring/IMG_1507.jpg
Diff not rendered
View
0  ...ures-rails/sample_data/albums/Spring/IMG_1508.jpg → ...es-rails/sample_data/albums/5-Spring/IMG_1508.jpg
Diff not rendered
View
0  ...ures-rails/sample_data/albums/Spring/IMG_1637.jpg → ...es-rails/sample_data/albums/5-Spring/IMG_1637.jpg
Diff not rendered
View
0  ...ils/sample_data/albums/Washington DC/IMG_1431.jpg → ...s/sample_data/albums/6-Washington DC/IMG_1431.jpg
Diff not rendered
View
0  ...ils/sample_data/albums/Washington DC/IMG_1443.jpg → ...s/sample_data/albums/6-Washington DC/IMG_1443.jpg
Diff not rendered
View
0  ...ils/sample_data/albums/Washington DC/IMG_1444.jpg → ...s/sample_data/albums/6-Washington DC/IMG_1444.jpg
Diff not rendered
View
0  ...ils/sample_data/albums/Washington DC/IMG_1445.jpg → ...s/sample_data/albums/6-Washington DC/IMG_1445.jpg
Diff not rendered
View
0  ...ils/sample_data/albums/Washington DC/IMG_1446.jpg → ...s/sample_data/albums/6-Washington DC/IMG_1446.jpg
Diff not rendered
View
0  ...ils/sample_data/albums/Washington DC/IMG_1463.jpg → ...s/sample_data/albums/6-Washington DC/IMG_1463.jpg
Diff not rendered
View
0  ...ils/sample_data/albums/Washington DC/IMG_1474.jpg → ...s/sample_data/albums/6-Washington DC/IMG_1474.jpg
Diff not rendered
View
0  ...ils/sample_data/albums/Washington DC/IMG_1475.jpg → ...s/sample_data/albums/6-Washington DC/IMG_1475.jpg
Diff not rendered
View
0  ...ils/sample_data/albums/Washington DC/IMG_1498.jpg → ...s/sample_data/albums/6-Washington DC/IMG_1498.jpg
Diff not rendered
View
0  ...ils/sample_data/albums/Washington DC/IMG_1500.jpg → ...s/sample_data/albums/6-Washington DC/IMG_1500.jpg
Diff not rendered
View
0  ...ils/sample_data/albums/Washington DC/IMG_1501.jpg → ...s/sample_data/albums/6-Washington DC/IMG_1501.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/7-RailsConf 2009/0954_DSC_0092.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/7-RailsConf 2009/0955_DSC_0093.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/7-RailsConf 2009/0956_DSC_0094.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/7-RailsConf 2009/0957_DSC_0095.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/7-RailsConf 2009/0958_DSC_0096.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/7-RailsConf 2009/0971_DSC_0109.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/7-RailsConf 2009/0972_DSC_0112.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/7-RailsConf 2009/0973_DSC_0113.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/7-RailsConf 2009/0974_DSC_0114.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/7-RailsConf 2009/0975_DSC_0115.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/7-RailsConf 2009/0976_DSC_0116.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/7-RailsConf 2009/0977_DSC_0117.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/7-RailsConf 2009/0978_DSC_0118.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/7-RailsConf 2009/0979_DSC_0119.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/7-RailsConf 2009/0980_DSC_0120.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/7-RailsConf 2009/0982_DSC_0122.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/7-RailsConf 2009/0983_DSC_0124.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/7-RailsConf 2009/0985_DSC_0127.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/7-RailsConf 2009/0987_DSC_0131.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/0911_DSC_0020.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/0921_DSC_0034.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/0922_DSC_0035.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/0923_DSC_0036.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/0931_DSC_0047.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/0992_DSC_0138.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/0993_DSC_0140.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/0994_DSC_0141.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/0995_DSC_0142.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/0996_DSC_0143.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/0997_DSC_0144.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/0998_DSC_0145.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/0999_DSC_0146.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1000_DSC_0147.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1003_DSC_0150.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1004_DSC_0151.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1009_DSC_0160.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1010_DSC_0161.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1011_DSC_0163.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1012_DSC_0164.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1013_DSC_0165.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1014_DSC_0166.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1016_DSC_0168.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1017_DSC_0169.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1018_DSC_0170.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1019_DSC_0171.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1020_DSC_0172.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1021_DSC_0173.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1023_DSC_0175.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1026_DSC_0178.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1027_DSC_0179.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1028_DSC_0180.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1029_DSC_0181.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1033_DSC_0185.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1037_DSC_0189.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1038_DSC_0190.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1039_DSC_0191.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1041_DSC_0193.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1042_DSC_0194.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1044_DSC_0196.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1045_DSC_0197.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1046_DSC_0198.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1047_DSC_0199.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1048_DSC_0200.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1049_DSC_0201.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1050_DSC_0203.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1051_DSC_0204.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1053_DSC_0206.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1054_DSC_0207.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1055_DSC_0208.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1056_DSC_0209.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1057_DSC_0210.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1058_DSC_0211.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1059_DSC_0212.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1061_DSC_0214.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1063_DSC_0216.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1064_DSC_0217.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1065_DSC_0218.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1068_DSC_0221.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1069_DSC_0222.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1070_DSC_0223.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1071_DSC_0224.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1074_DSC_0228.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1076_DSC_0230.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1078_DSC_0232.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1079_DSC_0233.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1080_DSC_0234.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1082_DSC_0236.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1085_DSC_0241.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/10893_DSC_0291.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/10895_DSC_0293.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/10896_DSC_0294 (10).jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/10896_DSC_0294 (11).jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/10896_DSC_0294 (12).jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/10896_DSC_0294 (13).jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/10896_DSC_0294 (2).jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/10896_DSC_0294 (3).jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/10896_DSC_0294 (4).jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/10896_DSC_0294 (5).jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/10896_DSC_0294 (6).jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/10896_DSC_0294 (7).jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/10896_DSC_0294 (8).jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/10896_DSC_0294 (9).jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1089_DSC_0246.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1090_DSC_0247.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1091_CSC_0249.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1092_DSC_0250.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1093_DSC_0251.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1094_DSC_0252.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1095_DSC_0253.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1099_DSC_0257.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1100_DSC_0258.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1104_DSC_0262.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1107_DSC_0265.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1108_DSC_0266.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1109_DSC_0267.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1110_DSC_0268.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1111_DSC_0269.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1112_DSC_0270.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1113_DSC_0271.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1114_DSC_0272.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1115_DSC_0273.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1119_DSC_0278.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1120_DSC_0279.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1121_DSC_0280.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1123_DSC_0282.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1124_DSC_0283.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1125_DSC_0284.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/1129_DSC_0289.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/20896_DSC_0294.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/8-Las Vegas/331084_DSC_0240.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Fall/IMG_0655_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Fall/IMG_0656_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Fall/IMG_0657_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Fall/IMG_0674_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Fall/IMG_1708_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Fall/IMG_1709_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Fall/IMG_1710_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Fall/IMG_1711_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Fall/IMG_1712_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Fall/IMG_1713_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Fall/IMG_1714_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Fall/IMG_1715_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Fall/IMG_1716_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Fall/IMG_1717_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Fall/IMG_1718_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Fall/IMG_1741_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Fall/IMG_1742_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Fall/IMG_1745_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Fall/IMG_1746_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Fall/IMG_1754_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Fall/IMG_1758_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Fall/IMG_1761_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Fall/IMG_1762_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Fall/IMG_1765_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Fall/IMG_1793_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Fall/IMG_1794_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Germany/CIMG0840_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Germany/CIMG0842_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Germany/CIMG0849_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Germany/CIMG1032_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Germany/CIMG1035_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Germany/CIMG1045_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Germany/CIMG1048_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Germany/CIMG1049_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Germany/CIMG1060_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Germany/CIMG1063_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Germany/CIMG1065_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Japan/P1000047_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Japan/P1000048_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Japan/P1000082_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Japan/P1000169_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Japan/P1000176_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Japan/P1000985_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Japan/P1010036_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Japan/P1010045_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Japan/P1010059_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Japan/P1010068_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Scenary/CIMG1075_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Scenary/IMG_0026_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Scenary/IMG_0027_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Scenary/IMG_0028_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Scenary/IMG_0991_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Scenary/IMG_0997_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Scenary/IMG_0998_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Scenary/IMG_0999_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Scenary/IMG_1009_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Scenary/IMG_1977_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Scenary/IMG_1984_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Scenary/IMG_2005_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Scenary/IMG_2007_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Scenary/IMG_2012_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Scenary/IMG_2014_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Scenary/IMG_2023_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Scenary/IMG_2026_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Scenary/IMG_2266_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Scenary/P1020408_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Scenary/P1020414_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Spring/IMG_1505_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Spring/IMG_1507_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Spring/IMG_1508_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Spring/IMG_1637_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Washington DC/IMG_1431_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Washington DC/IMG_1443_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Washington DC/IMG_1444_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Washington DC/IMG_1445_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Washington DC/IMG_1446_small.jpg
Diff not rendered
View
BIN  4-pictures-rails/sample_data/albums/Washington DC/IMG_1463_small.jpg
Diff not rendered
Please sign in to comment.
Something went wrong with that request. Please try again.